[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
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user