Skip to content
Snippets Groups Projects
Unverified Commit ccc9dae4 authored by Damien Bouvy's avatar Damien Bouvy
Browse files

[FIX] account: return correct values for default call

In the new API, default calls are supposed to return recordset
(even empty recordset), not bool values for relationnal fields.

If the table for this model was already present and if no l10n_x
was installed, no default value could be computed correctly for
existing entries. This caused a crash on install.

opw-683470
parent 402ac6b9
Branches
Tags
No related merge requests found
......@@ -101,7 +101,7 @@ class AccountBankStatement(models.Model):
journals = self.env['account.journal'].search([('type', '=', journal_type), ('company_id', '=', company_id)])
if journals:
return journals[0]
return False
return self.env['account.journal']
@api.multi
def _get_opening_balance(self, journal_id):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment