Files
odoo_source/addons/l10n_ke/data/template/account.tax-ke.csv
T
Daniel Kosky (dako) 0eca149232 [IMP] l10n_ke,_edi_tremol: KRA item codes
Description of the problem:
When an item in an invoice is not 16% standard VAT rated, the KRA
expects an "Item Code". These "Item Code"s were formerly referred to as
HS Codes, however this was never an accurate description of what they
were, since they never shared in the nomenclature of the Harmonised
System and they refer to services (as opposed to just goods).

Examples of KRA Item Codes:
- 0001.12.00 The exportation of goods (0%)
- 0010.21.00 Tea and coffee brokerage services (exempted)
- 0001.13.14 Natural gas in gaseous state (8%)

The KRA's item code system consists of several components:
- A code, of the format 'XXXX.XX.XX' (where X is a digit [0-9])
- A description explaining the use case of the code
- The tax rate specific to code, this can be interpreted as "using this
  code justifies using the tax rate that you have on the invoice line"

There are few conceptual problems with the application of these codes,
since they don't exactly match the way things are approached in Odoo. I
took care in the examples to include the "Exportation of goods" code.
Which should be used to justify all zero-rated taxes on exports. I also
included an example where, for instance, natural gas is rated at 8%.

From the two examples above, it is clear that the code does not relate
directly to the product, which is where the fields are currently
represented. Instead, the relationship is more accurately between the
code and the line that it describes.

However, to avoid putting the code on the line and complicating the
'account.move.line' model further, we can the relationship between the
code and the tax.

This means that for each code the user finds themselves using, there
will have to be a specific tax, for example (with respect to the
examples above):
- "Zero Rated Exports (0%)"
- "Tea/Coffee Brokerage (0%)"
- "Natural gas (8%)"

In this commit:

A new model representing the KRA item codes is added in l10n_ke, along
with a many2one relation to it on the account.tax.template/account.tax
models. Accompanying views for the new l10n.ke.item.code model and the
many2one field on the tax are added.

In l10n_ke/data the item codes themselves are added in csv format.
L10n_ke/security is added, and ir.model.access.csv to describe access
rights for the new l10n.ke.item.code model.

The account tax template is updated to add a default export tax with the
appropriate export item code applied to it.

In l10n_ke_edi_tremol, the move validation and serialisation (in which
invoice data is serialised for sending to the device) is updated to
handle the new schema.

The inheritance of product and the additional item-code related fields
is removed from l10n_ke_edi_tremol as they are no longer required, the
same is true of the associated views.

closes odoo/odoo#112013

Related: odoo/upgrade#4528
Signed-off-by: Josse Colpaert <jco@odoo.com>
2023-07-20 17:01:08 +02:00

7.8 KiB

1iddescriptioninvoice_labeltype_tax_usenameamount_typeamounttax_group_idl10n_ke_item_code_idrepartition_line_ids/repartition_typerepartition_line_ids/document_typerepartition_line_ids/tag_idsrepartition_line_ids/factor_percentrepartition_line_ids/account_id
2ST16Sales VAT (16%)Sales VAT (16%)sale16%percent16.0tax_group_16baseinvoice+16% Sales Base
3taxinvoice+16% Sales Tax100ke2200
4baserefund-16% Sales Base
5taxrefund-16% Sales Tax100ke2200
6ST8Sales VAT (8%)Sales VAT (8%)sale8%percent8.0tax_group_8baseinvoice+8% Sales Base
7taxinvoice+8% Sales Tax100ke2200
8baserefund-8% Sales Base
9taxrefund-8% Sales Tax100ke2200
10ST0Sales VAT Zero RatedSales VAT Zero Ratedsale0%percent0.0tax_group_0baseinvoice+Zero Rated Sales Base
11taxinvoice100
12baserefund-Zero Rated Sales Base
13taxrefund100
14STEXSales VAT ExemptSales VAT Exemptsale0% EXEMPTpercent0.0tax_group_0baseinvoice+Exempt Sales Base
15taxinvoice100
16baserefund-Exempt Sales Base
17taxrefund100
18SWT33% WH3%sale3% WHpercent-3.0tax_group_withholdingbaseinvoice
19taxinvoiceke1120
20baserefund
21taxrefundke1120
22SWT55% WH5%sale5% WHpercent-5.0tax_group_withholdingbaseinvoice
23taxinvoiceke1120
24baserefund
25taxrefundke1120
26SWT1010% WH10%sale10% WHpercent-10.0tax_group_withholdingbaseinvoice
27taxinvoiceke1120
28baserefund
29taxrefundke1120
30SWT1212% WH12%sale12% WHpercent-12.0tax_group_withholdingbaseinvoice
31taxinvoiceke1120
32baserefund
33taxrefundke1120
34SWT1515% WH15%sale15% WHpercent-15.0tax_group_withholdingbaseinvoice
35taxinvoiceke1120
36baserefund
37taxrefundke1120
38SWT2020% WH20%sale20% WHpercent-20.0tax_group_withholdingbaseinvoice
39taxinvoiceke1120
40baserefund
41taxrefundke1120
42SWT2525% WH25%sale25% WHpercent-25.0tax_group_withholdingbaseinvoice
43taxinvoiceke1120
44baserefund
45taxrefundke1120
46SWT3030% WH30%sale30% WHpercent-30.0tax_group_withholdingbaseinvoice
47taxinvoiceke1120
48baserefund
49taxrefundke1120
50PT16Purchases VAT (16%)Purchases VAT (16%)purchase16%percent16.0tax_group_16baseinvoice+16% Purchases Base
51taxinvoice+16% Purchases Tax100ke1110
52baserefund-16% Purchases Base
53taxrefund-16% Purchases Tax100ke1110
54PT8Purchases VAT (8%)Purchases VAT (8%)purchase8%percent8.0tax_group_8baseinvoice+8% purchases Base
55taxinvoice+8% Purchases Tax100ke1110
56baserefund-8% purchases Base
57taxrefund-8% Purchases Tax100ke1110
58PT0Purchases VAT Zero rated (0%)Purchases VAT Zero ratedpurchase0%percent0.0tax_group_0baseinvoice+Zero Rated Purchases Base
59taxinvoice100
60baserefund-Zero Rated Purchases Base
61taxrefund100
62PTEXPurchase VAT ExemptPurchase VAT Exemptpurchase0% EXEMPTpercent0.0tax_group_0baseinvoice+Exempt Purchases Base
63taxinvoice100
64baserefund-Exempt Purchases Base
65taxrefund100
66PWT33% WH3%purchase3% WHpercent-3.0tax_group_withholdingbaseinvoice
67taxinvoiceke2203
68baserefund
69taxrefundke2203
70PWT55% WH5%purchase5% WHpercent-5.0tax_group_withholdingbaseinvoice
71taxinvoiceke2203
72baserefund
73taxrefundke2203
74PWT1010% WH10%purchase10% WHpercent-10.0tax_group_withholdingbaseinvoice
75taxinvoiceke2203
76baserefund
77taxrefundke2203
78PWT1212% WH12%purchase12% WHpercent-12.0tax_group_withholdingbaseinvoice
79taxinvoiceke2203
80baserefund
81taxrefundke2203
82PWT1515% WH15%purchase15% WHpercent-15.0tax_group_withholdingbaseinvoice
83taxinvoiceke2203
84baserefund
85taxrefundke2203
86PWT2020% WH20%purchase20% WHpercent-20.0tax_group_withholdingbaseinvoice
87taxinvoiceke2203
88baserefund
89taxrefundke2203
90PWT2525% WH25%purchase25% WHpercent-25.0tax_group_withholdingbaseinvoice
91taxinvoiceke2203
92baserefund
93taxrefundke2203
94PWT3030% WH30%purchase30% WHpercent-30.0tax_group_withholdingbaseinvoice
95taxinvoiceke2203
96baserefund
97taxrefundke2203
98ST0EXPORTExport (0%)0%sale0% EXPORTpercent0tax_group_0l10n_ke.item_code_2023_00011200baseinvoice+Exempt Sales Base