Skip to content

Commit bbbf71e

Browse files
committed
[FIX] l10n_se: correct input VAT tags and tax report
Steps to reproduce ------------------ 1. Install `l10n_se`. 2. Switch to a Swedish company. 3. Create and confirm a vendor bill with a price of 200, applying the preconfigured 25% purchase tax. 4. Create and confirm a customer invoice with a price of 200, applying the preconfigured 25% sales tax. 5. Open the tax report. Expected behavior ----------------- - Fält 48 (Input VAT) = 50 - Fält 49 (Output VAT - Input VAT) = 50 - 50 = 0 Issue ----- - Input VAT is incorrectly negated, resulting in Fält 48 = -50. - Consequently, Fält 49 is incorrectly calculated as 50 - (-50) = 100. - Additionally, the total for Block G does not match the value in Fält 49. opw-4008171 closes odoo#181952 X-original-commit: ca67a41 Related: odoo/enterprise#70977 Signed-off-by: Claire Bretton (clbr) <[email protected]> Signed-off-by: Séna Serge Nshimiyimana (sesn) <[email protected]>
1 parent 95fa08c commit bbbf71e

File tree

4 files changed

+45
-38
lines changed

4 files changed

+45
-38
lines changed

addons/l10n_se/__manifest__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
'website': 'https://www.odoo.com/documentation/master/applications/finance/fiscal_localizations.html',
55
'icon': '/account/static/description/l10n.png',
66
'countries': ['se'],
7-
'version': '1.0',
7+
'version': '1.1',
88
'author': 'XCLUDE, Odoo S.A.',
99
'category': 'Accounting/Localizations/Account Charts',
1010
'description': """

addons/l10n_se/data/account_tax_report_data.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@
388388
<record id="tax_report_title_vat_debt_credit" model="account.report.line">
389389
<field name="name">Block G – Moms att betala eller få tillbaka</field>
390390
<field name="code">se_g</field>
391-
<field name="aggregation_formula">se_b.balance+se_i.balance+se_d.balance+se_f.balance</field>
391+
<field name="aggregation_formula">se_b.balance+se_i.balance+se_d.balance-se_f.balance</field>
392392
<field name="hierarchy_level">0</field>
393393
<field name="children_ids">
394394
<record id="tax_report_line_49" model="account.report.line">

addons/l10n_se/data/template/account.tax-se.csv

+36-36
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@
88
"","","","","","","","base","refund","-se_05","","",""
99
"","","","","","","","tax","refund","-se_10","a2611","",""
1010
"purchase_tax_25_goods","25% G","VAT Purchases of goods 25%","25%","25.0","purchase","tax_group_25","base","invoice","","","","Ingående moms 25%"
11-
"","","","","","","","tax","invoice","-se_48","a2641","",""
11+
"","","","","","","","tax","invoice","+se_48","a2641","",""
1212
"","","","","","","","base","refund","","","",""
13-
"","","","","","","","tax","refund","+se_48","a2641","",""
13+
"","","","","","","","tax","refund","-se_48","a2641","",""
1414
"purchase_tax_25_services","25% S","VAT Purchases of services 25%","25%","25.0","purchase","tax_group_25","base","invoice","","","","Ingående moms Tjänst 25%"
15-
"","","","","","","","tax","invoice","-se_48","a2641","",""
15+
"","","","","","","","tax","invoice","+se_48","a2641","",""
1616
"","","","","","","","base","refund","","","",""
17-
"","","","","","","","tax","refund","+se_48","a2641","",""
17+
"","","","","","","","tax","refund","-se_48","a2641","",""
1818
"sale_tax_12_goods","12% G","VAT Sale of goods 12%","12%","12.0","sale","tax_group_12","base","invoice","+se_05","","","Utgående moms 12%"
1919
"","","","","","","","tax","invoice","+se_11","a2621","",""
2020
"","","","","","","","base","refund","-se_05","","",""
@@ -24,13 +24,13 @@
2424
"","","","","","","","base","refund","-se_05","","",""
2525
"","","","","","","","tax","refund","-se_11","a2621","",""
2626
"purchase_tax_12_goods","12% G","VAT Purchases of goods 12%","12%","12.0","purchase","tax_group_12","base","invoice","","","","Ingående moms 12%"
27-
"","","","","","","","tax","invoice","-se_48","a2641","",""
27+
"","","","","","","","tax","invoice","+se_48","a2641","",""
2828
"","","","","","","","base","refund","","","",""
29-
"","","","","","","","tax","refund","+se_48","a2641","",""
29+
"","","","","","","","tax","refund","-se_48","a2641","",""
3030
"purchase_tax_12_services","12% S","VAT Purchases of services 12%","12%","12.0","purchase","tax_group_12","base","invoice","","","","Ingående moms Tjänst 12%"
31-
"","","","","","","","tax","invoice","-se_48","a2641","",""
31+
"","","","","","","","tax","invoice","+se_48","a2641","",""
3232
"","","","","","","","base","refund","","","",""
33-
"","","","","","","","tax","refund","+se_48","a2641","",""
33+
"","","","","","","","tax","refund","-se_48","a2641","",""
3434
"sale_tax_6_goods","6% G","VAT Sale of goods 6%","6%","6.0","sale","tax_group_6","base","invoice","+se_05","","","Utgående moms 6%"
3535
"","","","","","","","tax","invoice","+se_12","a2631","",""
3636
"","","","","","","","base","refund","-se_05","","",""
@@ -40,13 +40,13 @@
4040
"","","","","","","","base","refund","-se_05","","",""
4141
"","","","","","","","tax","refund","-se_12","a2631","",""
4242
"purchase_tax_6_goods","6% G","VAT Purchase of goods 6%","6%","6.0","purchase","tax_group_6","base","invoice","","","","Ingående moms 6%"
43-
"","","","","","","","tax","invoice","-se_48","a2641","",""
43+
"","","","","","","","tax","invoice","+se_48","a2641","",""
4444
"","","","","","","","base","refund","","","",""
45-
"","","","","","","","tax","refund","+se_48","a2641","",""
45+
"","","","","","","","tax","refund","-se_48","a2641","",""
4646
"purchase_tax_6_services","6% S","VAT Purchase of services 6%","6%","6.0","purchase","tax_group_6","base","invoice","","","","Ingående moms Tjänst 6%"
47-
"","","","","","","","tax","invoice","-se_48","a2641","",""
47+
"","","","","","","","tax","invoice","+se_48","a2641","",""
4848
"","","","","","","","base","refund","","","",""
49-
"","","","","","","","tax","refund","+se_48","a2641","",""
49+
"","","","","","","","tax","refund","-se_48","a2641","",""
5050
"sale_tax_services_EC","0% EU S","VAT Sale of services in the EU 0%","0%","0.0","sale","tax_group_0","base","invoice","+se_39","","","Momsfri försäljning av tjänst EU"
5151
"","","","","","","","tax","invoice","","","",""
5252
"","","","","","","","base","refund","-se_39","","",""
@@ -56,58 +56,58 @@
5656
"","","","","","","","base","refund","-se_35","","",""
5757
"","","","","","","","tax","refund","","","",""
5858
"purchase_goods_tax_25_EC","25% EU G","VAT Purchase of goods in the EU 25%","25%","25.0","purchase","tax_group_25","base","invoice","+se_20","","","Inköp av varor EU moms 25%"
59-
"","","","","","","","tax","invoice","+se_30||-se_48","a2645","",""
59+
"","","","","","","","tax","invoice","+se_30||+se_48","a2645","",""
6060
"","","","","","","","tax","invoice","","a2614","-100",""
6161
"","","","","","","","base","refund","-se_20","","",""
62-
"","","","","","","","tax","refund","-se_30||+se_48","a2645","",""
62+
"","","","","","","","tax","refund","-se_30||-se_48","a2645","",""
6363
"","","","","","","","tax","refund","","a2614","-100",""
6464
"purchase_goods_tax_12_EC","12% EU G","VAT Purchase of goods in the EU 12%","12%","12.0","purchase","tax_group_12","base","invoice","+se_20","","","Inköp av varor EU moms 12%"
65-
"","","","","","","","tax","invoice","+se_31||-se_48","a2645","",""
65+
"","","","","","","","tax","invoice","+se_31||+se_48","a2645","",""
6666
"","","","","","","","tax","invoice","","a2624","-100",""
6767
"","","","","","","","base","refund","-se_20","","",""
68-
"","","","","","","","tax","refund","-se_31||+se_48","a2645","",""
68+
"","","","","","","","tax","refund","-se_31||-se_48","a2645","",""
6969
"","","","","","","","tax","refund","","a2624","-100",""
7070
"purchase_goods_tax_6_EC","6% EU G","VAT Purchase of goods in the EU 6%","6%","6.0","purchase","tax_group_6","base","invoice","+se_20","","","Inköp av varor EU moms 6%"
71-
"","","","","","","","tax","invoice","+se_32||-se_48","a2645","",""
71+
"","","","","","","","tax","invoice","+se_32||+se_48","a2645","",""
7272
"","","","","","","","tax","invoice","","a2634","-100",""
7373
"","","","","","","","base","refund","-se_20","","",""
74-
"","","","","","","","tax","refund","-se_32||+se_48","a2645","",""
74+
"","","","","","","","tax","refund","-se_32||-se_48","a2645","",""
7575
"","","","","","","","tax","refund","","a2634","-100",""
7676
"purchase_services_tax_25_EC","25% EU S","VAT Purchase of services in the EU 25%","25%","25.0","purchase","tax_group_25","base","invoice","+se_21","","","Inköp av tjänst EU moms 25%"
77-
"","","","","","","","tax","invoice","+se_30||-se_48","a2645","",""
77+
"","","","","","","","tax","invoice","+se_30||+se_48","a2645","",""
7878
"","","","","","","","tax","invoice","","a2614","-100",""
7979
"","","","","","","","base","refund","-se_21","","",""
80-
"","","","","","","","tax","refund","-se_30||+se_48","a2645","",""
80+
"","","","","","","","tax","refund","-se_30||-se_48","a2645","",""
8181
"","","","","","","","tax","refund","","a2614","-100",""
8282
"purchase_services_tax_12_EC","12% EU S","VAT Purchase of services in the EU 12%","12%","12.0","purchase","tax_group_12","base","invoice","+se_21","","","Inköp av tjänst EU moms 12%"
83-
"","","","","","","","tax","invoice","+se_31||-se_48","a2645","",""
83+
"","","","","","","","tax","invoice","+se_31||+se_48","a2645","",""
8484
"","","","","","","","tax","invoice","","a2624","-100",""
8585
"","","","","","","","base","refund","-se_21","","",""
86-
"","","","","","","","tax","refund","-se_31||+se_48","a2645","",""
86+
"","","","","","","","tax","refund","-se_31||-se_48","a2645","",""
8787
"","","","","","","","tax","refund","","a2624","-100",""
8888
"purchase_services_tax_6_EC","6% EU S","VAT Purchase of services in the EU 6%","6%","6.0","purchase","tax_group_6","base","invoice","+se_21","","","Inköp av tjänst EU moms 6%"
89-
"","","","","","","","tax","invoice","+se_32||-se_48","a2645","",""
89+
"","","","","","","","tax","invoice","+se_32||+se_48","a2645","",""
9090
"","","","","","","","tax","invoice","","a2634","-100",""
9191
"","","","","","","","base","refund","-se_21","","",""
92-
"","","","","","","","tax","refund","-se_32||+se_48","a2645","",""
92+
"","","","","","","","tax","refund","-se_32||-se_48","a2645","",""
9393
"","","","","","","","tax","refund","","a2634","-100",""
9494
"purchase_construction_services_tax_25_EC","25% EU RS","VAT Purchase of services in Sweden, reverse charge 25%","25%","25.0","purchase","tax_group_25","base","invoice","+se_24","","","Inköpta tjänster i Sverige, omvändskattskyldighet, 25 %"
95-
"","","","","","","","tax","invoice","+se_30||-se_48","a2647","",""
95+
"","","","","","","","tax","invoice","+se_30||+se_48","a2647","",""
9696
"","","","","","","","tax","invoice","","a2614","-100",""
9797
"","","","","","","","base","refund","-se_24","","",""
98-
"","","","","","","","tax","refund","-se_30||+se_48","a2647","",""
98+
"","","","","","","","tax","refund","-se_30||-se_48","a2647","",""
9999
"","","","","","","","tax","refund","","a2614","-100",""
100100
"purchase_construction_services_tax_12_EC","12% EU RS","VAT Purchase of services in Sweden, reverse charge 12%","12%","12.0","purchase","tax_group_12","base","invoice","+se_24","","","Inköpta tjänster i Sverige, omvändskattskyldighet, 12 %"
101-
"","","","","","","","tax","invoice","+se_31||-se_48","a4426","",""
101+
"","","","","","","","tax","invoice","+se_31||+se_48","a4426","",""
102102
"","","","","","","","tax","invoice","","a2624","-100",""
103103
"","","","","","","","base","refund","-se_24","","",""
104-
"","","","","","","","tax","refund","-se_31||+se_48","a4426","",""
104+
"","","","","","","","tax","refund","-se_31||-se_48","a4426","",""
105105
"","","","","","","","tax","refund","","a2624","-100",""
106106
"purchase_construction_services_tax_6_EC","6% EU RS","VAT Purchase of services in Sweden, reverse charge 6%","6%","6.0","purchase","tax_group_6","base","invoice","+se_24","","","Inköpta tjänster i Sverige, omvändskattskyldighet, 6 %"
107-
"","","","","","","","tax","invoice","+se_32||-se_48","a4427","",""
107+
"","","","","","","","tax","invoice","+se_32||+se_48","a4427","",""
108108
"","","","","","","","tax","invoice","","a2634","-100",""
109109
"","","","","","","","base","refund","-se_24","","",""
110-
"","","","","","","","tax","refund","-se_32||+se_48","a4427","",""
110+
"","","","","","","","tax","refund","-se_32||-se_48","a4427","",""
111111
"","","","","","","","tax","refund","","a2634","-100",""
112112
"sale_tax_services_NEC","0% EU RS","VAT Sale of services outside EU 0%","0%","0.0","sale","tax_group_0","base","invoice","+se_39","","","Momsfri försäljning av tjänst utanför EU"
113113
"","","","","","","","tax","invoice","","","",""
@@ -136,22 +136,22 @@
136136
"","","","","","","","tax","refund","-se_62","a2645","",""
137137
"","","","","","","","tax","refund","","a2635","-100",""
138138
"purchase_services_tax_25_NEC","25% EX S","VAT Purchase of services outside EU 25%","25%","25.0","purchase","tax_group_25","base","invoice","+se_22","","","Inköp av tjänster utanför EU 25%"
139-
"","","","","","","","tax","invoice","+se_30||-se_48","a2645","",""
139+
"","","","","","","","tax","invoice","+se_30||+se_48","a2645","",""
140140
"","","","","","","","tax","invoice","","a2614","-100",""
141141
"","","","","","","","base","refund","-se_22","","",""
142-
"","","","","","","","tax","refund","-se_30||+se_48","a2645","",""
142+
"","","","","","","","tax","refund","-se_30||-se_48","a2645","",""
143143
"","","","","","","","tax","refund","","a2614","-100",""
144144
"purchase_services_tax_12_NEC","12% EX S","VAT Purchase of services outside EU 12%","12%","12.0","purchase","tax_group_12","base","invoice","+se_22","","","Inköp av tjänster utanför EU 12%"
145-
"","","","","","","","tax","invoice","+se_31||-se_48","a2645","",""
145+
"","","","","","","","tax","invoice","+se_31||+se_48","a2645","",""
146146
"","","","","","","","tax","invoice","","a2624","-100",""
147147
"","","","","","","","base","refund","-se_22","","",""
148-
"","","","","","","","tax","refund","-se_31||+se_48","a2645","",""
148+
"","","","","","","","tax","refund","-se_31||-se_48","a2645","",""
149149
"","","","","","","","tax","refund","","a2624","-100",""
150150
"purchase_services_tax_6_NEC","6% EX S","VAT Purchase of services outside EU 6%","6%","6.0","purchase","tax_group_6","base","invoice","+se_22","","","Inköp av tjänster utanför EU 6%"
151-
"","","","","","","","tax","invoice","+se_32||-se_48","a2645","",""
151+
"","","","","","","","tax","invoice","+se_32||+se_48","a2645","",""
152152
"","","","","","","","tax","invoice","","a2634","-100",""
153153
"","","","","","","","base","refund","-se_22","","",""
154-
"","","","","","","","tax","refund","-se_32||+se_48","a2645","",""
154+
"","","","","","","","tax","refund","-se_32||-se_48","a2645","",""
155155
"","","","","","","","tax","refund","","a2634","-100",""
156156
"triangular_tax_25_goods","25% EU G Tr","VAT Triangular Sale of goods 25%","25%","25.0","sale","tax_group_25","base","invoice","+se_37||-se_38","","","Trepartshandel - moms 25%"
157157
"","","","","","","","tax","invoice","","a2615","",""
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
from odoo import api, SUPERUSER_ID
2+
3+
4+
def migrate(cr, version):
5+
env = api.Environment(cr, SUPERUSER_ID, {})
6+
for company in env['res.company'].search([('chart_template', '=', 'se')]):
7+
env['account.chart.template'].try_loading('se', company)

0 commit comments

Comments
 (0)