[IMP] account: Rename context key skip_sync_invoice => skip_invoice_line_sync
The skip_invoice_sync context key already exists on account.move. The context key must be different on account.move.line but skip_sync_invoice is very confusing. closes odoo/odoo#111555 X-original-commit: 7dcd5495772d6032233f071c8fa25c81be0530ec Related: odoo/enterprise#36570 Signed-off-by: Laurent Smet <las@odoo.com> Signed-off-by: John Laterre (jol) <jol@odoo.com>
This commit is contained in:
@@ -1328,7 +1328,7 @@ class AccountMoveLine(models.Model):
|
||||
|
||||
@contextmanager
|
||||
def _sync_invoice(self, container):
|
||||
if container['records'].env.context.get('skip_sync_invoice'):
|
||||
if container['records'].env.context.get('skip_invoice_line_sync'):
|
||||
yield
|
||||
return # avoid infinite recursion
|
||||
|
||||
@@ -1341,7 +1341,7 @@ class AccountMoveLine(models.Model):
|
||||
'price_subtotal': line.currency_id.round(line.price_subtotal),
|
||||
'move_type': line.move_id.move_type,
|
||||
} for line in container['records'].with_context(
|
||||
skip_sync_invoice=True,
|
||||
skip_invoice_line_sync=True,
|
||||
).filtered(lambda l: l.move_id.is_invoice(True))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user