summaryrefslogtreecommitdiff
path: root/addons/l10n_nz/data
diff options
context:
space:
mode:
authorOlivier Colson <oco@odoo.com>2019-04-19 10:06:07 +0000
committerOlivier Colson <oco@odoo.com>2019-05-10 11:52:58 +0000
commit3936d655c4bfd845b6ead724cecdc8e7c62816eb (patch)
tree402e137e0fa09b06c1b237ab6a346670dea480c2 /addons/l10n_nz/data
parent574295df57d8da78ca6109f277a5a2332bf38101 (diff)
[IMP] account, l10n_*: v13 taxes
- Add repartition lines on taxes - Link account tags directly to account.move.line; remove the tag_ids field from account.tag - Add a new report engine dedicated to tax reports, directly generating account tags. It is called as an alternate mode of generic tax report, with a dedicated "Use tax grids" toggle. >> The biggest change lies in the way the new tax report computes its values. Everything is now aggregated directly using the tags set on the account move lines. Thanks to that, modifying the configuration of a tax today will not impact the report for the previous periods anymore. This is a big improvement, as it means the report will keep on reflecting the values that were submitted to the state before, whatever the configuration change. - Add an audit char field to account.move.line telling with tax grids are impacted by the line, with the corresponding amount - Modify the behavior of cash basis taxes: the cash basis account is now used as the transition account, while the regular account given in tax declaration is used to store the final entry (it was the opposite before) - Modify every l10n_* module in order to keep them consistent with these changes closes odoo/odoo#32833 Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
Diffstat (limited to 'addons/l10n_nz/data')
-rw-r--r--addons/l10n_nz/data/account.account.tag.csv9
-rw-r--r--addons/l10n_nz/data/account.tax.template.csv9
-rw-r--r--addons/l10n_nz/data/account_tax_template_data.xml283
3 files changed, 283 insertions, 18 deletions
diff --git a/addons/l10n_nz/data/account.account.tag.csv b/addons/l10n_nz/data/account.account.tag.csv
deleted file mode 100644
index 7bf0b3d421d..00000000000
--- a/addons/l10n_nz/data/account.account.tag.csv
+++ /dev/null
@@ -1,9 +0,0 @@
-id,name,applicability
-tag_nz_tax_sale_15,Taxable Sales Ex-GST,taxes
-tag_nz_tax_sale_inc_15,Taxable Sales Inc-GST,taxes
-tag_nz_tax_sale_0,Tax Exclusive Sales,taxes
-tag_nz_tax_purchase_15,Taxable Purchases Ex-GST,taxes
-tag_nz_tax_purchase_inc_15,Taxable Purchases Inc-GST,taxes
-tag_nz_tax_purchase_0,Tax Exempt Purchases,taxes
-tag_nz_tax_purchase_taxable_import,Taxable Import without GST,taxes
-tag_nz_tax_purchase_gst_only,GST Payment for Taxable Imports,taxes
diff --git a/addons/l10n_nz/data/account.tax.template.csv b/addons/l10n_nz/data/account.tax.template.csv
deleted file mode 100644
index 95285fdb24e..00000000000
--- a/addons/l10n_nz/data/account.tax.template.csv
+++ /dev/null
@@ -1,9 +0,0 @@
-id,chart_template_id:id,name,sequence,description,type_tax_use,amount_type,amount,price_include,account_id:id,refund_account_id:id,tag_ids:id,tax_group_id:id
-nz_tax_sale_15,l10n_nz_chart_template,Sale (15%),1,GST Sales,sale,percent,15,FALSE,nz_21310,nz_21310,tag_nz_tax_sale_15,tax_group_15
-nz_tax_sale_inc_15,l10n_nz_chart_template,GST Inc Sale (15%),2,GST Inclusive Sales,sale,percent,15,TRUE,nz_21310,nz_21310,tag_nz_tax_sale_inc_15,tax_group_gst_15
-nz_tax_sale_0,l10n_nz_chart_template,Zero/Export (0%) Sale,3,Zero Rated (Export) Sales,sale,percent,0,FALSE,nz_21310,nz_21310,tag_nz_tax_sale_0,tax_group_0
-nz_tax_purchase_15,l10n_nz_chart_template,Purch (15%),1,GST Purchases,purchase,percent,15,FALSE,nz_21330,nz_21330,tag_nz_tax_purchase_15,tax_group_15
-nz_tax_purchase_inc_15,l10n_nz_chart_template,GST Inc Purch (15%),2,GST Inclusive Purchases,purchase,percent,15,TRUE,nz_21330,nz_21330,tag_nz_tax_purchase_inc_15,tax_group_gst_15
-nz_tax_purchase_0,l10n_nz_chart_template,Zero/Import (0%) Purch,3,Zero Rated Purchases,purchase,percent,0,FALSE,nz_21330,nz_21330,tag_nz_tax_purchase_0,tax_group_0
-nz_tax_purchase_taxable_import,l10n_nz_chart_template,Purch (Imports Taxable),4,Purchase (Taxable Imports) - Tax Paid Separately,purchase,percent,0,FALSE,nz_21330,nz_21330,tag_nz_tax_purchase_taxable_import,tax_group_0
-nz_tax_purchase_gst_only,l10n_nz_chart_template,GST Only – Imports,5,GST Only on Imports,purchase,percent,100000000,TRUE,nz_21330,nz_21330,tag_nz_tax_purchase_gst_only,tax_group_100000000
diff --git a/addons/l10n_nz/data/account_tax_template_data.xml b/addons/l10n_nz/data/account_tax_template_data.xml
new file mode 100644
index 00000000000..272d267882e
--- /dev/null
+++ b/addons/l10n_nz/data/account_tax_template_data.xml
@@ -0,0 +1,283 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<odoo>
+ <record id="nz_tax_sale_15" model="account.tax.template">
+ <field name="chart_template_id" ref="l10n_nz_chart_template"/>
+ <field name="name">Sale (15%)</field>
+ <field name="sequence">1</field>
+ <field name="description">GST Sales</field>
+ <field name="type_tax_use">sale</field>
+ <field name="amount_type">percent</field>
+ <field name="amount">15</field>
+ <field name="price_include">FALSE</field>
+ <field name="tax_group_id" ref="tax_group_15"/>
+ <field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
+ (0,0, {
+ 'factor_percent': 100,
+ 'repartition_type': 'base',
+ }),
+
+ (0,0, {
+ 'factor_percent': 100,
+ 'repartition_type': 'tax',
+ 'account_id': ref('nz_21310'),
+ }),
+ ]"/>
+ <field name="refund_repartition_line_ids" eval="[(5, 0, 0),
+ (0,0, {
+ 'factor_percent': 100,
+ 'repartition_type': 'base',
+ }),
+
+ (0,0, {
+ 'factor_percent': 100,
+ 'repartition_type': 'tax',
+ 'account_id': ref('nz_21310'),
+ }),
+ ]"/>
+ </record>
+ <record id="nz_tax_sale_inc_15" model="account.tax.template">
+ <field name="chart_template_id" ref="l10n_nz_chart_template"/>
+ <field name="name">GST Inc Sale (15%)</field>
+ <field name="sequence">2</field>
+ <field name="description">GST Inclusive Sales</field>
+ <field name="type_tax_use">sale</field>
+ <field name="amount_type">percent</field>
+ <field name="amount">15</field>
+ <field name="price_include">TRUE</field>
+ <field name="tax_group_id" ref="tax_group_gst_15"/>
+ <field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
+ (0,0, {
+ 'factor_percent': 100,
+ 'repartition_type': 'base',
+ }),
+
+ (0,0, {
+ 'factor_percent': 100,
+ 'repartition_type': 'tax',
+ 'account_id': ref('nz_21310'),
+ }),
+ ]"/>
+ <field name="refund_repartition_line_ids" eval="[(5, 0, 0),
+ (0,0, {
+ 'factor_percent': 100,
+ 'repartition_type': 'base',
+ }),
+
+ (0,0, {
+ 'factor_percent': 100,
+ 'repartition_type': 'tax',
+ 'account_id': ref('nz_21310'),
+ }),
+ ]"/>
+ </record>
+ <record id="nz_tax_sale_0" model="account.tax.template">
+ <field name="chart_template_id" ref="l10n_nz_chart_template"/>
+ <field name="name">Zero/Export (0%) Sale</field>
+ <field name="sequence">3</field>
+ <field name="description">Zero Rated (Export) Sales</field>
+ <field name="type_tax_use">sale</field>
+ <field name="amount_type">percent</field>
+ <field name="amount">0</field>
+ <field name="price_include">FALSE</field>
+ <field name="tax_group_id" ref="tax_group_0"/>
+ <field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
+ (0,0, {
+ 'factor_percent': 100,
+ 'repartition_type': 'base',
+ }),
+
+ (0,0, {
+ 'factor_percent': 100,
+ 'repartition_type': 'tax',
+ 'account_id': ref('nz_21310'),
+ }),
+ ]"/>
+ <field name="refund_repartition_line_ids" eval="[(5, 0, 0),
+ (0,0, {
+ 'factor_percent': 100,
+ 'repartition_type': 'base',
+ }),
+
+ (0,0, {
+ 'factor_percent': 100,
+ 'repartition_type': 'tax',
+ 'account_id': ref('nz_21310'),
+ }),
+ ]"/>
+ </record>
+ <record id="nz_tax_purchase_15" model="account.tax.template">
+ <field name="chart_template_id" ref="l10n_nz_chart_template"/>
+ <field name="name">Purch (15%)</field>
+ <field name="sequence">1</field>
+ <field name="description">GST Purchases</field>
+ <field name="type_tax_use">purchase</field>
+ <field name="amount_type">percent</field>
+ <field name="amount">15</field>
+ <field name="price_include">FALSE</field>
+ <field name="tax_group_id" ref="tax_group_15"/>
+ <field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
+ (0,0, {
+ 'factor_percent': 100,
+ 'repartition_type': 'base',
+ }),
+
+ (0,0, {
+ 'factor_percent': 100,
+ 'repartition_type': 'tax',
+ 'account_id': ref('nz_21330'),
+ }),
+ ]"/>
+ <field name="refund_repartition_line_ids" eval="[(5, 0, 0),
+ (0,0, {
+ 'factor_percent': 100,
+ 'repartition_type': 'base',
+ }),
+
+ (0,0, {
+ 'factor_percent': 100,
+ 'repartition_type': 'tax',
+ 'account_id': ref('nz_21330'),
+ }),
+ ]"/>
+ </record>
+ <record id="nz_tax_purchase_inc_15" model="account.tax.template">
+ <field name="chart_template_id" ref="l10n_nz_chart_template"/>
+ <field name="name">GST Inc Purch (15%)</field>
+ <field name="sequence">2</field>
+ <field name="description">GST Inclusive Purchases</field>
+ <field name="type_tax_use">purchase</field>
+ <field name="amount_type">percent</field>
+ <field name="amount">15</field>
+ <field name="price_include">TRUE</field>
+ <field name="tax_group_id" ref="tax_group_gst_15"/>
+ <field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
+ (0,0, {
+ 'factor_percent': 100,
+ 'repartition_type': 'base',
+ }),
+
+ (0,0, {
+ 'factor_percent': 100,
+ 'repartition_type': 'tax',
+ 'account_id': ref('nz_21330'),
+ }),
+ ]"/>
+ <field name="refund_repartition_line_ids" eval="[(5, 0, 0),
+ (0,0, {
+ 'factor_percent': 100,
+ 'repartition_type': 'base',
+ }),
+
+ (0,0, {
+ 'factor_percent': 100,
+ 'repartition_type': 'tax',
+ 'account_id': ref('nz_21330'),
+ }),
+ ]"/>
+ </record>
+ <record id="nz_tax_purchase_0" model="account.tax.template">
+ <field name="chart_template_id" ref="l10n_nz_chart_template"/>
+ <field name="name">Zero/Import (0%) Purch</field>
+ <field name="sequence">3</field>
+ <field name="description">Zero Rated Purchases</field>
+ <field name="type_tax_use">purchase</field>
+ <field name="amount_type">percent</field>
+ <field name="amount">0</field>
+ <field name="price_include">FALSE</field>
+ <field name="tax_group_id" ref="tax_group_0"/>
+ <field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
+ (0,0, {
+ 'factor_percent': 100,
+ 'repartition_type': 'base',
+ }),
+
+ (0,0, {
+ 'factor_percent': 100,
+ 'repartition_type': 'tax',
+ 'account_id': ref('nz_21330'),
+ }),
+ ]"/>
+ <field name="refund_repartition_line_ids" eval="[(5, 0, 0),
+ (0,0, {
+ 'factor_percent': 100,
+ 'repartition_type': 'base',
+ }),
+
+ (0,0, {
+ 'factor_percent': 100,
+ 'repartition_type': 'tax',
+ 'account_id': ref('nz_21330'),
+ }),
+ ]"/>
+ </record>
+ <record id="nz_tax_purchase_taxable_import" model="account.tax.template">
+ <field name="chart_template_id" ref="l10n_nz_chart_template"/>
+ <field name="name">Purch (Imports Taxable)</field>
+ <field name="sequence">4</field>
+ <field name="description">Purchase (Taxable Imports) - Tax Paid Separately</field>
+ <field name="type_tax_use">purchase</field>
+ <field name="amount_type">percent</field>
+ <field name="amount">0</field>
+ <field name="price_include">FALSE</field>
+ <field name="tax_group_id" ref="tax_group_0"/>
+ <field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
+ (0,0, {
+ 'factor_percent': 100,
+ 'repartition_type': 'base',
+ }),
+
+ (0,0, {
+ 'factor_percent': 100,
+ 'repartition_type': 'tax',
+ 'account_id': ref('nz_21330'),
+ }),
+ ]"/>
+ <field name="refund_repartition_line_ids" eval="[(5, 0, 0),
+ (0,0, {
+ 'factor_percent': 100,
+ 'repartition_type': 'base',
+ }),
+
+ (0,0, {
+ 'factor_percent': 100,
+ 'repartition_type': 'tax',
+ 'account_id': ref('nz_21330'),
+ }),
+ ]"/>
+ </record>
+ <record id="nz_tax_purchase_gst_only" model="account.tax.template">
+ <field name="chart_template_id" ref="l10n_nz_chart_template"/>
+ <field name="name">GST Only – Imports</field>
+ <field name="sequence">5</field>
+ <field name="description">GST Only on Imports</field>
+ <field name="type_tax_use">purchase</field>
+ <field name="amount_type">percent</field>
+ <field name="amount">100000000</field>
+ <field name="price_include">TRUE</field>
+ <field name="tax_group_id" ref="tax_group_100000000"/>
+ <field name="invoice_repartition_line_ids" eval="[(5, 0, 0),
+ (0,0, {
+ 'factor_percent': 100,
+ 'repartition_type': 'base',
+ }),
+
+ (0,0, {
+ 'factor_percent': 100,
+ 'repartition_type': 'tax',
+ 'account_id': ref('nz_21330'),
+ }),
+ ]"/>
+ <field name="refund_repartition_line_ids" eval="[(5, 0, 0),
+ (0,0, {
+ 'factor_percent': 100,
+ 'repartition_type': 'base',
+ }),
+
+ (0,0, {
+ 'factor_percent': 100,
+ 'repartition_type': 'tax',
+ 'account_id': ref('nz_21330'),
+ }),
+ ]"/>
+ </record>
+</odoo>