[FIX] account: state dependency _compute_amount
Reintroduction of the dependency on the state of the account.move for the _compute_amount method. Some customers are experiencing problems following the migration to version 16. If they had draft 'account.move' before the migration, the 'amount_residual' field is set to 0 during the migration. When they validate the move after the migration, it goes directly to the paid status because the field is not recomputed. opw-3182437 opw-3196490 opw-3229872 closes odoo/odoo#116180 X-original-commit: 3c7f6c3e39c05d7dfd24dd1b73f7bb3f19230f72 Signed-off-by: Laurent Smet <las@odoo.com>
This commit is contained in:
@@ -864,7 +864,8 @@ class AccountMove(models.Model):
|
||||
'line_ids.amount_residual',
|
||||
'line_ids.amount_residual_currency',
|
||||
'line_ids.payment_id.state',
|
||||
'line_ids.full_reconcile_id')
|
||||
'line_ids.full_reconcile_id',
|
||||
'state')
|
||||
def _compute_amount(self):
|
||||
for move in self:
|
||||
total_untaxed, total_untaxed_currency = 0.0, 0.0
|
||||
|
||||
Reference in New Issue
Block a user