[FIX] account_banking_sepa_direct_debit: Avoid problems in DBs with other localizations

If you have another localization installed, this test is not going to work, as the
defaults assign other taxes as defaults, and the generic CoA is marked as not complete
set, so values are not set either on onchange.
This commit is contained in:
Pedro M. Baeza
2018-03-26 14:11:38 +02:00
parent 7c727eed3e
commit 673ce8beeb

View File

@@ -37,9 +37,19 @@ class TestSDD(common.HttpCase):
'company_ids': [(6, 0, self.main_company.ids)],
'company_id': self.main_company.id,
})
self.env.ref(
'l10n_generic_coa.configurable_chart_template'
).try_loading_for_current_company()
chart = self.env.ref('l10n_generic_coa.configurable_chart_template')
wizard = self.env['wizard.multi.charts.accounts'].create({
'company_id': self.main_company.id,
'chart_template_id': chart.id,
'code_digits': 6,
'currency_id': self.env.ref('base.EUR').id,
'transfer_account_id': chart.transfer_account_id.id,
# Set these values for not letting the dangerous default ones
'sale_tax_id': False,
'purchase_tax_id': False,
})
wizard.onchange_chart_template_id()
wizard.execute()
self.partner_agrolait = self.env.ref('base.res_partner_2')
self.partner_c2c = self.env.ref('base.res_partner_12')
self.partner_agrolait.company_id = self.main_company.id