diff options
| author | william <wan@odoo.com> | 2020-03-20 10:39:54 +0000 |
|---|---|---|
| committer | Josse Colpaert <jco@odoo.com> | 2020-03-31 16:41:23 +0000 |
| commit | d2851b203924dcb0e56e534751a552e99757971b (patch) | |
| tree | 1525abf49227ccc17d22b8bb8b9607b8b7f8ecdd /addons/l10n_hn | |
| parent | b6e2bb655b8f539053a88246040ff0689b74a934 (diff) | |
[IMP] l10n_*: add demo company
Task 2198388
When testing and demoing localization, it can but cumbersome to create a
Company with the right credentials and install the chart of account on
it.
This commit aims to shorten the process. The first version only contains
a valid vat (or similar) number, but we should add fields specific to
localization in the future so that we have a working environment as soon
as we install the localization.
change manifest
closes odoo/odoo#48102
Signed-off-by: Josse Colpaert <jco@openerp.com>
Diffstat (limited to 'addons/l10n_hn')
| -rw-r--r-- | addons/l10n_hn/__manifest__.py | 5 | ||||
| -rw-r--r-- | addons/l10n_hn/demo/demo_company.xml | 34 |
2 files changed, 38 insertions, 1 deletions
diff --git a/addons/l10n_hn/__manifest__.py b/addons/l10n_hn/__manifest__.py index d2c5afec9e9..8855b8bb601 100644 --- a/addons/l10n_hn/__manifest__.py +++ b/addons/l10n_hn/__manifest__.py @@ -14,7 +14,7 @@ 'description': """ This is the base module to manage the accounting chart for Honduras. ==================================================================== - + Agrega una nomenclatura contable para Honduras. TambiƩn incluye impuestos y la moneda Lempira. -- Adds accounting chart for Honduras. It also includes taxes and the Lempira currency.""", @@ -28,4 +28,7 @@ and the Lempira currency.""", 'data/account_data.xml', 'data/account_chart_template_data.xml', ], + 'demo': [ + 'demo/demo_company.xml', + ], } diff --git a/addons/l10n_hn/demo/demo_company.xml b/addons/l10n_hn/demo/demo_company.xml new file mode 100644 index 00000000000..11e08ffd47d --- /dev/null +++ b/addons/l10n_hn/demo/demo_company.xml @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> + <record id="partner_demo_company_hn" model="res.partner"> + <field name="name">HN Company</field> + <field name="vat"></field> + <field name="street">CA-1</field> + <field name="city">Nacaome</field> + <field name="country_id" ref="base.hn"/> + + <field name="zip"></field> + <field name="phone">+504 9123-4567</field> + <field name="email">info@company.hnexample.com</field> + <field name="website">www.hnexample.com</field> + </record> + + <record id="demo_company_hn" model="res.company"> + <field name="name">HN Company</field> + <field name="partner_id" ref="partner_demo_company_hn"/> + </record> + + <function model="res.company" name="_onchange_country_id"> + <value eval="[ref('demo_company_hn')]"/> + </function> + + <function model="res.users" name="write"> + <value eval="[ref('base.user_root'), ref('base.user_admin'), ref('base.user_demo')]"/> + <value eval="{'company_ids': [(4, ref('l10n_hn.demo_company_hn'))]}"/> + </function> + + <function model="account.chart.template" name="try_loading"> + <value eval="[ref('l10n_hn.cuentas_plantilla')]"/> + <value model="res.company" eval="obj().env.ref('l10n_hn.demo_company_hn')"/> + </function> +</odoo> |
