mirror of
https://github.com/OCA/account-financial-tools.git
synced 2025-02-02 12:47:26 +02:00
[FIX] account_move_name_sequence: redefine _onchange_journal_id
In v16, _onchange_journal_id is defined to update name when journal_id is modified During the creation of new account.move, this onchange is triggered and called the standard _compute_name method How to reproduce issue: * Create new invoice => Name is defined instead of to be 'Draft'
This commit is contained in:
committed by
Moises Lopez - https://www.vauxoo.com/
parent
e83249247e
commit
27e59d504e
@@ -77,3 +77,9 @@ class AccountMove(models.Model):
|
||||
|
||||
def _get_last_sequence(self, relaxed=False, with_prefix=None):
|
||||
return super()._get_last_sequence(relaxed, None)
|
||||
|
||||
@api.onchange("journal_id")
|
||||
def _onchange_journal_id(self):
|
||||
if not self.quick_edit_mode:
|
||||
self.name = "/"
|
||||
self._compute_name_by_sequence()
|
||||
|
||||
Reference in New Issue
Block a user