[FIX] account: display banner tax lock before creation
Steps to reproduce: - set a tax lock date - create a new move - set the accounting date prior to the tax lock date - set an invoice_line with a tax Issue: The banner teeling you information about the tax lock date won't appear unless the move is created. opw-3370727 closes odoo/odoo#134388 X-original-commit: d67aa6a798d9f7359549bbf56ec6fa2913f930ec Signed-off-by: William André (wan) <wan@odoo.com> Signed-off-by: Yolann Sabaux (yosa) <yosa@odoo.com>
This commit is contained in:
@@ -1395,7 +1395,8 @@ class AccountMove(models.Model):
|
||||
else:
|
||||
move.bank_partner_id = move.commercial_partner_id
|
||||
|
||||
@api.depends('date', 'line_ids.debit', 'line_ids.credit', 'line_ids.tax_line_id', 'line_ids.tax_ids', 'line_ids.tax_tag_ids')
|
||||
@api.depends('date', 'line_ids.debit', 'line_ids.credit', 'line_ids.tax_line_id', 'line_ids.tax_ids', 'line_ids.tax_tag_ids',
|
||||
'invoice_line_ids.debit', 'invoice_line_ids.credit', 'invoice_line_ids.tax_line_id', 'invoice_line_ids.tax_ids', 'invoice_line_ids.tax_tag_ids')
|
||||
def _compute_tax_lock_date_message(self):
|
||||
for move in self:
|
||||
accounting_date = move.date or fields.Date.context_today(move)
|
||||
@@ -3403,7 +3404,7 @@ class AccountMove(models.Model):
|
||||
}
|
||||
|
||||
def _affect_tax_report(self):
|
||||
return any(line._affect_tax_report() for line in self.line_ids)
|
||||
return any(line._affect_tax_report() for line in (self.line_ids | self.invoice_line_ids))
|
||||
|
||||
def _get_move_display_name(self, show_ref=False):
|
||||
''' Helper to get the display name of an invoice depending of its type.
|
||||
|
||||
Reference in New Issue
Block a user