Skip to content

Commit a3eb173

Browse files
committed
[FIX] l10n_nz: change GST Only Imports tags
Current set up under the tax concerned is "BOX 11" which is incorrect as according to the IRD GST report, BOX 11 excludes the amount of imported goods. The tax in consideration is used when the NZ Customs bills the user only for the GST amount based on the purchase value of the goods. Therefore, the tax grids for this tax need to changed to "BOX 13". Backport of 6d70452299cb06ad65bb745218fedfcbdb8f2c8e PR backport: odoo#202382 task-3926151 closes odoo#202370 Signed-off-by: John Laterre (jol) <jol@odoo.com>
1 parent 0f1b5fb commit a3eb173

File tree

5 files changed

+51
-7
lines changed

5 files changed

+51
-7
lines changed

addons/l10n_nz/__manifest__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
'name': 'New Zealand - Accounting',
44
'icon': '/account/static/description/l10n.png',
55
'countries': ['nz'],
6-
'version': '1.1',
6+
'version': '1.2',
77
'category': 'Accounting/Localizations/Account Charts',
88
'description': """
99
New Zealand Accounting Module

addons/l10n_nz/data/account_tax_report_data.xml

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,35 @@
9393
<field name="name">[BOX 13] Credit adjustments from your calculation sheet</field>
9494
<field name="code">NZBOX13</field>
9595
<field name="expression_ids">
96-
<record id="tax_report_box13_formula" model="account.report.expression">
96+
<record id="tax_report_box13_aggregation" model="account.report.expression">
9797
<field name="label">balance</field>
98-
<field name="engine">external</field>
99-
<field name="formula">sum</field>
100-
<field name="subformula">editable;rounding=2</field>
98+
<field name="engine">aggregation</field>
99+
<field name="formula">NZBOX13_tags.balance + NZBOX13_manual.balance</field>
100+
</record>
101+
</field>
102+
<field name="children_ids">
103+
<record id="tax_report_box13_tags" model="account.report.line">
104+
<field name="name">[BOX 13] Amount computed from tax tags</field>
105+
<field name="code">NZBOX13_tags</field>
106+
<field name="expression_ids">
107+
<record id="tax_report_box13_tag" model="account.report.expression">
108+
<field name="label">balance</field>
109+
<field name="engine">tax_tags</field>
110+
<field name="formula">BOX 13</field>
111+
</record>
112+
</field>
113+
</record>
114+
<record id="tax_report_box13_manual" model="account.report.line">
115+
<field name="name">[BOX 13] Manual adjustments</field>
116+
<field name="code">NZBOX13_manual</field>
117+
<field name="expression_ids">
118+
<record id="tax_report_box13_formula" model="account.report.expression">
119+
<field name="label">balance</field>
120+
<field name="engine">external</field>
121+
<field name="formula">sum</field>
122+
<field name="subformula">editable;rounding=2</field>
123+
</record>
124+
</field>
101125
</record>
102126
</field>
103127
</record>

addons/l10n_nz/data/template/account.tax-nz.csv

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@
2828
"","","","","","","","","","","base","refund","",""
2929
"","","","","","","","","","","tax","refund","",""
3030
"nz_tax_purchase_gst_only","100% ONLY","5","GST Only - Imports","GST Only on Imports","purchase","division","100.0","True","tax_group_100","base","invoice","",""
31-
"","","","","","","","","","","tax","invoice","+BOX 11","nz_21330"
31+
"","","","","","","","","","","tax","invoice","+BOX 13","nz_21330"
3232
"","","","","","","","","","","base","refund","",""
33-
"","","","","","","","","","","tax","refund","-BOX 11","nz_21330"
33+
"","","","","","","","","","","tax","refund","-BOX 13","nz_21330"
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
def migrate(cr, version):
2+
cr.execute("""
3+
UPDATE account_report_expression e
4+
SET label = 'balance'
5+
FROM ir_model_data d
6+
WHERE e.id = d.res_id
7+
AND d.module = 'l10n_nz'
8+
AND d.name = 'tax_report_box13_formula'
9+
AND e.label = '_upg_1.2balance'
10+
""")
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
def migrate(cr, version):
2+
cr.execute("""
3+
UPDATE account_report_expression e
4+
SET label = '_upg_1.2balance'
5+
FROM ir_model_data d
6+
WHERE e.id = d.res_id
7+
AND d.module = 'l10n_nz'
8+
AND d.name = 'tax_report_box13_formula'
9+
AND e.label = 'balance'
10+
""")

0 commit comments

Comments
 (0)