diff options
| author | Denis Vermylen (dve) <dve@odoo.com> | 2016-08-04 14:20:12 +0200 |
|---|---|---|
| committer | Thibault Delavallée <tde@openerp.com> | 2016-09-02 10:16:49 +0200 |
| commit | bc8d5dbf2c2ee19b337195bdb4bee8e6ba8508cf (patch) | |
| tree | f108dbb28c9e94ee851e096d6b954c4ff3f30030 /addons/account/demo | |
| parent | 6a8e4c611918162e3d1673f86994a9aa1ce92372 (diff) | |
[REF] account: replace workflow by python code
Diffstat (limited to 'addons/account/demo')
| -rw-r--r-- | addons/account/demo/account_invoice_demo.yml | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/addons/account/demo/account_invoice_demo.yml b/addons/account/demo/account_invoice_demo.yml index 52f16f3240d..a925aefa6dd 100644 --- a/addons/account/demo/account_invoice_demo.yml +++ b/addons/account/demo/account_invoice_demo.yml @@ -17,7 +17,8 @@ price_unit: 280.0 quantity: 5.0 - - !workflow {model: account.invoice, action: invoice_open, ref: demo_invoice_1} + !python {model: account.invoice, id: demo_invoice_1}: + self.action_invoice_open() - !record {model: account.invoice, id: demo_invoice_2}: company_id: base.main_company @@ -32,7 +33,8 @@ price_unit: 25 quantity: 20 - - !workflow {model: account.invoice, action: invoice_open, ref: demo_invoice_2} + !python {model: account.invoice, id: demo_invoice_2}: + self.action_invoice_open() - !record {model: account.invoice, id: demo_invoice_3}: company_id: base.main_company @@ -47,7 +49,8 @@ price_unit: 15.0 quantity: 5.0 - - !workflow {model: account.invoice, action: invoice_open, ref: demo_invoice_3} + !python {model: account.invoice, id: demo_invoice_3}: + self.action_invoice_open() - Set the context for supplier bills because the 'type' field is readonly in invoice form views, so it value won't be considered by the yaml import - @@ -90,7 +93,7 @@ if account: line_vals['account_id'] = account.id self._update('account.invoice.line', 'account', line_vals, 'ceo_wages_line') - self.env['account.invoice'].browse(ref('demo_invoice_january_wages')).signal_workflow('invoice_open') + self.env['account.invoice'].browse(ref('demo_invoice_january_wages')).action_invoice_open() - !record {model: account.invoice, id: demo_invoice_equipment_purchase}: company_id: base.main_company @@ -114,7 +117,7 @@ line_vals['invoice_line_tax_ids'] = [(6, 0, [tax_id])] self._update('account.invoice.line', 'account', line_vals, 'coffee_machine_line') self.env['account.invoice'].browse(ref('demo_invoice_equipment_purchase'))._onchange_invoice_line_ids() - self.env['account.invoice'].browse(ref('demo_invoice_equipment_purchase')).signal_workflow('invoice_open') + self.env['account.invoice'].browse(ref('demo_invoice_equipment_purchase')).action_invoice_open() - !python {model: account.bank.statement.line, id: False} : | account = self.env['account.account'].search([ |
