[IMP] sale,purchase,invoice: make `Send by mail` action more robust to template/view...
[odoo/odoo.git] / addons / l10n_be / l10n_be_wizard.yml
1 -
2   !record {model: ir.actions.todo, id: config_call_account_template}:
3     action_id: account.action_wizard_multi_chart
4     type: automatic
5 -
6   !python {model: ir.actions.todo}: |
7     install_todo = self.browse(cr, uid, ref('l10n_be.config_call_account_template'))
8     if install_todo.state == 'open':
9         wiz = self.pool.get('wizard.multi.charts.accounts')
10         values = {
11             'chart_template_id': ref('l10n_be.l10nbe_chart_template')
12         }
13         values.update(
14             wiz.onchange_chart_template_id(cr, uid, False, ref('l10n_be.l10nbe_chart_template')).get('value', {})
15         )
16         wiz_id = wiz.create(cr, uid, values)
17         wiz.execute(cr, uid, [wiz_id])
18         install_todo.write({'state':'done'})