[FIX] account: secure_sequence_id not being created on create
closes odoo/odoo#157306 X-original-commit: 707c5e4903add7c06d11c30e12f1271fdfe293a3 Signed-off-by: William André (wan) <wan@odoo.com>
This commit is contained in:
committed by
william-andre
parent
4c8f7c9011
commit
47dd0c3fb3
@@ -706,6 +706,10 @@ class AccountJournal(models.Model):
|
||||
if journal.type == 'bank' and not journal.bank_account_id and vals.get('bank_acc_number'):
|
||||
journal.set_bank_account(vals.get('bank_acc_number'), vals.get('bank_id'))
|
||||
|
||||
# Create the secure_sequence_id if necessary
|
||||
if journal.restrict_mode_hash_table and not journal.secure_sequence_id:
|
||||
journal._create_secure_sequence(['secure_sequence_id'])
|
||||
|
||||
return journals
|
||||
|
||||
def set_bank_account(self, acc_number, bank_id=None):
|
||||
|
||||
@@ -16,4 +16,4 @@ List of contributors:
|
||||
Raul Martin raul.martin@braintec.com https://github.com/BT-rmartin
|
||||
Frédéric Garbely frederic.garbely@braintec.com https://github.com/BT-fgarbely
|
||||
Carlos Serra Toro carlos.serra@braintec.com https://github.com/BT-cserra
|
||||
|
||||
Cristian Rodriguez Navarro cristian.rodriguez@braintec.com https://github.com/BT-crodriguez
|
||||
|
||||
Reference in New Issue
Block a user