Skip to content
Snippets Groups Projects
Commit 81bf724c authored by Raphael Collet's avatar Raphael Collet
Browse files

[FIX] account: the new-API default of a relational fields must be a recordset

parent 86059a0b
No related branches found
No related tags found
No related merge requests found
......@@ -184,10 +184,10 @@ class AccountJournal(models.Model):
_order = 'sequence, type, code'
def _default_inbound_payment_methods(self):
return [(4, self.env.ref('account.account_payment_method_manual_in').id)]
return self.env.ref('account.account_payment_method_manual_in')
def _default_outbound_payment_methods(self):
return [(4, self.env.ref('account.account_payment_method_manual_out').id)]
return self.env.ref('account.account_payment_method_manual_out')
name = fields.Char(string='Journal Name', required=True)
code = fields.Char(string='Short Name', size=5, required=True, help="The code will be displayed on reports.")
......
......@@ -59,8 +59,8 @@ class AccountJournal(models.Model):
})
def _default_outbound_payment_methods(self):
vals = super(AccountJournal, self)._default_outbound_payment_methods()
return vals + [(4, self.env.ref('account_check_writing.account_payment_method_check_writing').id, None)]
methods = super(AccountJournal, self)._default_outbound_payment_methods()
return methods + self.env.ref('account_check_writing.account_payment_method_check_writing')
@api.model
def _enable_check_writing_on_bank_journals(self):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment