summaryrefslogtreecommitdiff
path: root/addons/l10n_br
diff options
context:
space:
mode:
authorwilliam <wan@odoo.com>2020-03-20 10:39:54 +0000
committerJosse Colpaert <jco@odoo.com>2020-03-31 16:41:23 +0000
commitd2851b203924dcb0e56e534751a552e99757971b (patch)
tree1525abf49227ccc17d22b8bb8b9607b8b7f8ecdd /addons/l10n_br
parentb6e2bb655b8f539053a88246040ff0689b74a934 (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_br')
-rw-r--r--addons/l10n_br/__manifest__.py33
-rw-r--r--addons/l10n_br/demo/demo_company.xml34
2 files changed, 52 insertions, 15 deletions
diff --git a/addons/l10n_br/__manifest__.py b/addons/l10n_br/__manifest__.py
index ae11115bd92..fe44aa64f0c 100644
--- a/addons/l10n_br/__manifest__.py
+++ b/addons/l10n_br/__manifest__.py
@@ -24,23 +24,23 @@ This module consists of:
- IRPJ
- CSLL
-The field tax_discount has also been added in the account.tax.template and
-account.tax objects to allow the proper computation of some Brazilian VATs
-such as ICMS. The chart of account creation wizard has been extended to
+The field tax_discount has also been added in the account.tax.template and
+account.tax objects to allow the proper computation of some Brazilian VATs
+such as ICMS. The chart of account creation wizard has been extended to
propagate those new data properly.
-It's important to note however that this module lack many implementations to
-use Odoo properly in Brazil. Those implementations (such as the electronic
-fiscal Invoicing which is already operational) are brought by more than 15
-additional modules of the Brazilian Launchpad localization project
-https://launchpad.net/openerp.pt-br-localiz and their dependencies in the
-extra addons branch. Those modules aim at not breaking with the remarkable
-Odoo modularity, this is why they are numerous but small. One of the
-reasons for maintaining those modules apart is that Brazilian Localization
-leaders need commit rights agility to complete the localization as companies
-fund the remaining legal requirements (such as soon fiscal ledgers,
-accounting SPED, fiscal SPED and PAF ECF that are still missing as September
-2011). Those modules are also strictly licensed under AGPL V3 and today don't
+It's important to note however that this module lack many implementations to
+use Odoo properly in Brazil. Those implementations (such as the electronic
+fiscal Invoicing which is already operational) are brought by more than 15
+additional modules of the Brazilian Launchpad localization project
+https://launchpad.net/openerp.pt-br-localiz and their dependencies in the
+extra addons branch. Those modules aim at not breaking with the remarkable
+Odoo modularity, this is why they are numerous but small. One of the
+reasons for maintaining those modules apart is that Brazilian Localization
+leaders need commit rights agility to complete the localization as companies
+fund the remaining legal requirements (such as soon fiscal ledgers,
+accounting SPED, fiscal SPED and PAF ECF that are still missing as September
+2011). Those modules are also strictly licensed under AGPL V3 and today don't
come with any additional paid permission for online use of 'private modules'.
""",
'author': 'Akretion, Odoo Brasil',
@@ -54,4 +54,7 @@ come with any additional paid permission for online use of 'private modules'.
'data/account_tax_template_data.xml',
'views/account_view.xml',
],
+ 'demo': [
+ 'demo/demo_company.xml',
+ ],
}
diff --git a/addons/l10n_br/demo/demo_company.xml b/addons/l10n_br/demo/demo_company.xml
new file mode 100644
index 00000000000..13efede4d41
--- /dev/null
+++ b/addons/l10n_br/demo/demo_company.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<odoo>
+ <record id="partner_demo_company_br" model="res.partner">
+ <field name="name">BR Company</field>
+ <field name="vat">51494569013170</field>
+ <field name="street"></field>
+ <field name="city">Rio de Janeiro</field>
+ <field name="country_id" ref="base.br"/>
+ <field name="state_id" ref="base.state_br_to"/>
+ <field name="zip">20570-120</field>
+ <field name="phone">+55 11 96123-4567</field>
+ <field name="email">info@company.brexample.com</field>
+ <field name="website">www.brexample.com</field>
+ </record>
+
+ <record id="demo_company_br" model="res.company">
+ <field name="name">BR Company</field>
+ <field name="partner_id" ref="partner_demo_company_br"/>
+ </record>
+
+ <function model="res.company" name="_onchange_country_id">
+ <value eval="[ref('demo_company_br')]"/>
+ </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_br.demo_company_br'))]}"/>
+ </function>
+
+ <function model="account.chart.template" name="try_loading">
+ <value eval="[ref('l10n_br.l10n_br_account_chart_template')]"/>
+ <value model="res.company" eval="obj().env.ref('l10n_br.demo_company_br')"/>
+ </function>
+</odoo>