From 62b39f31ce7c36444870e5a04ddfa00d342b4657 Mon Sep 17 00:00:00 2001 From: Abdurrahman Saber Date: Thu, 9 Oct 2025 13:15:48 +0300 Subject: [PATCH] [FIX] exp_budget_check: use mapped for non relational field --- odex25_accounting/exp_budget_check/models/account_invoice.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/odex25_accounting/exp_budget_check/models/account_invoice.py b/odex25_accounting/exp_budget_check/models/account_invoice.py index b46d68715..97d875ecb 100644 --- a/odex25_accounting/exp_budget_check/models/account_invoice.py +++ b/odex25_accounting/exp_budget_check/models/account_invoice.py @@ -148,7 +148,7 @@ class AccountMove(models.Model): lambda x: x.general_budget_id in budget_post and x.crossovered_budget_id.state == 'done' and x.date_from <= self.invoice_date <= x.date_to) - amount = budget_lines.confirm + amount = sum(budget_lines.mapped('confirm')) amount += (line.price_subtotal + line.price_tax) budget_lines.write({'confirm': amount}) budget_lines.write({'reserve': abs((line.price_subtotal + line.price_tax) - budget_lines.reserve)}) @@ -167,7 +167,7 @@ class AccountMove(models.Model): lambda x: x.general_budget_id in budget_post and x.crossovered_budget_id.state == 'done' and fields.Date.from_string(x.date_from) <= date <= fields.Date.from_string(x.date_to)) - amount = budget_lines.confirm + amount = sum(budget_lines.mapped('confirm')) amount -= (line.price_subtotal + line.price_tax) budget_lines.write({'confirm': amount}) return res