[FIX] account: the new-API default of a relational fields must be a recordset
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user