diff options
| author | Mehul Patel <mep@odoo.com> | 2017-12-06 19:02:51 +0530 |
|---|---|---|
| committer | Olivier Colson <oco@odoo.com> | 2018-03-05 13:20:30 +0100 |
| commit | a27488fa23c3d360a7db229b328442d515ebfd22 (patch) | |
| tree | 7120b3145a67da62ca8ec75e635965653b45960f /addons/l10n_generic_coa | |
| parent | fc9855d419e0cc8e2bcc52055ca120f8401c4418 (diff) | |
[FIX] l10n_generic_coa : define journal_id in the demo data creating vendor bills
The default function commputing the journal_id on invoices uses the context to get the type of the invoice and choose the journal. In regular cases, it works fine, but not with demo data. Hence, we need to explicitly set the journal on them.
Diffstat (limited to 'addons/l10n_generic_coa')
| -rw-r--r-- | addons/l10n_generic_coa/data/account_invoice_demo.xml | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/addons/l10n_generic_coa/data/account_invoice_demo.xml b/addons/l10n_generic_coa/data/account_invoice_demo.xml index 1f25cabae1a..a93b18c6121 100644 --- a/addons/l10n_generic_coa/data/account_invoice_demo.xml +++ b/addons/l10n_generic_coa/data/account_invoice_demo.xml @@ -118,6 +118,7 @@ <field name="reference_type">none</field> <field name="payment_term_id" ref="account.account_payment_term"/> <field name="type">in_invoice</field> + <field name="journal_id" search="[('type', '=', 'purchase')]"/> <field name="date_invoice" eval="time.strftime('%Y-%m')+'-01'"/> </record> <record id="demo_invoice_0_line_1" model="account.invoice.line"> @@ -141,6 +142,7 @@ <field name="partner_id" ref="base.res_partner_12"/> <field name="type">in_invoice</field> <field name="date_invoice" eval="time.strftime('%Y-%m')+'-01'"/> + <field name="journal_id" search="[('type', '=', 'purchase')]"/> </record> <record id="ceo_wages_line" model="account.invoice.line"> @@ -160,6 +162,7 @@ <field name="partner_id" ref="base.res_partner_1"/> <field name="type">in_invoice</field> <field name="date_invoice" eval="time.strftime('%Y-%m')+'-15'"/> + <field name="journal_id" search="[('type', '=', 'purchase')]"/> </record> <record id="coffee_machine_line" model="account.invoice.line"> |
