[FIX] account: remove useless attribute start in sum

Using named attribute 'start' in sum function is not compatible with
python 3.7, it is also set as 'start=0' which is useless as it is the
default value of start argument.

Part-of: odoo/odoo#97862
This commit is contained in:
Pierre Masereel
2022-08-10 01:59:53 +02:00
parent 7a4dea6e10
commit e149bdcd4b
+1 -1
View File
@@ -572,7 +572,7 @@ class AccountMoveLine(models.Model):
line.balance = (
line.balance
or line.debit - line.credit
or -sum((line.move_id.line_ids - line).mapped('balance'), start=0)
or -sum((line.move_id.line_ids - line).mapped('balance'))
)
else:
line.balance = False