[FIX] account: Prevent crash when having custom coa
- Create manually an account.payment after having created manually some journals (without installing a coa). - Install a module containing a coa and calling try_loading_for_current_company or depending of other module doing such things. => Crash because company.chart_template_id is not set. -opw: 1921711 closes odoo/odoo#30117
This commit is contained in:
@@ -142,8 +142,9 @@ class AccountChartTemplate(models.Model):
|
||||
'bank_account_code_prefix': self.bank_account_code_prefix,
|
||||
'cash_account_code_prefix': self.cash_account_code_prefix,
|
||||
})
|
||||
wizard.onchange_chart_template_id()
|
||||
wizard.execute()
|
||||
if not wizard.existing_accounting(company):
|
||||
wizard.onchange_chart_template_id()
|
||||
wizard.execute()
|
||||
|
||||
@api.multi
|
||||
def open_select_template_wizard(self):
|
||||
|
||||
Reference in New Issue
Block a user