From fa2812325fd6454731f596aeac2d09244fefe7d4 Mon Sep 17 00:00:00 2001 From: qdp-odoo Date: Thu, 17 Sep 2015 10:48:51 +0200 Subject: [PATCH] [FIX] account: fixed typo in create() of account.journal with effect of not creating the refund sequence --- addons/account/models/account.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/models/account.py b/addons/account/models/account.py index ae2c661d0a7..8ca776ed955 100644 --- a/addons/account/models/account.py +++ b/addons/account/models/account.py @@ -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)