[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:
parent
cda322ce6f
commit
80c5077c22
@ -77,3 +77,9 @@ class AccountMove(models.Model):
|
||||
|
||||
def _get_last_sequence(self, relaxed=False, with_prefix=None, lock=True):
|
||||
return super()._get_last_sequence(relaxed, None, lock)
|
||||
|
||||
@api.onchange("journal_id")
|
||||
def _onchange_journal_id(self):
|
||||
if not self.quick_edit_mode:
|
||||
self.name = "/"
|
||||
self._compute_name_by_sequence()
|
||||
|
Loading…
x
Reference in New Issue
Block a user