Merge pull request #375 from expsa/dev_odex25_accounting

Dev odex25 accounting
This commit is contained in:
Mostafa 2024-07-23 23:26:45 +03:00 committed by GitHub
commit 776d99ca57
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 14 additions and 13 deletions

View File

@ -134,9 +134,10 @@ class AccountMove(models.Model):
def button_draft(self):
res = super(AccountMove, self).button_draft()
if self.is_check:
date = fields.Date.from_string(self.date)
for line in self.invoice_line_ids:
for rec in self:
if rec.is_check:
date = fields.Date.from_string(rec.date)
for line in rec.invoice_line_ids:
analytic_account_id = line.analytic_account_id
budget_post = self.env['account.budget.post'].search([]).filtered(
lambda x: line.account_id in x.account_ids)