[FIX] account: fixed typo in create() of account.journal with effect of not creating the refund sequence
This commit is contained in:
@@ -409,7 +409,7 @@ class AccountJournal(models.Model):
|
||||
# We just need to create the relevant sequences according to the chosen options
|
||||
if not vals.get('sequence_id'):
|
||||
vals.update({'sequence_id': self.sudo()._create_sequence(vals).id})
|
||||
if vals.get('type') in ('sale', 'puchase') and vals.get('refund_sequence') and not vals.get('refund_sequence_id'):
|
||||
if vals.get('type') in ('sale', 'purchase') and vals.get('refund_sequence') and not vals.get('refund_sequence_id'):
|
||||
vals.update({'refund_sequence_id': self.sudo()._create_sequence(vals, refund=True).id})
|
||||
|
||||
journal = super(AccountJournal, self).create(vals)
|
||||
|
||||
Reference in New Issue
Block a user