[FIX] account: fixed typo in create() of account.journal with effect of not creating the refund sequence

This commit is contained in:
qdp-odoo
2015-09-17 13:26:42 +02:00
parent 2850fcf992
commit fa2812325f
+1 -1
View File
@@ -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)