Merge pull request #142 from expsa/dev_odex25_purchase_changes

fix
This commit is contained in:
eslam 2024-07-09 15:02:51 +03:00 committed by GitHub
commit 517507ee1d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -205,7 +205,7 @@ class PurchaseOrderCustom(models.Model):
for rec in budgets:
for line in rec.lines_ids:
budget_post = self.env['account.budget.post'].search([]).filtered(
lambda x: line.account_id in x.account_ids)
lambda x: line.account_id in x.account_ids.ids)
analytic_account_id = line.analytic_account_id
budget_lines = analytic_account_id.crossovered_budget_line.filtered(
@ -286,7 +286,7 @@ class PurchaseOrderCustom(models.Model):
analytic_account_id = line.account_analytic_id
budget_post = self.env['account.budget.post'].search([]).filtered(
lambda
x: line.product_id.property_account_expense_id.id and line.product_id.property_account_expense_id.id or line.product_id.categ_id.property_account_expense_categ_id.id in x.account_ids)
x: line.product_id.property_account_expense_id.id and line.product_id.property_account_expense_id.id or line.product_id.categ_id.property_account_expense_categ_id.id in x.account_ids.ids)
budget_lines = analytic_account_id.crossovered_budget_line.filtered(
lambda x: x.general_budget_id in budget_post and
x.crossovered_budget_id.state == 'done' and