-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TA#66835 [16.0][MIG] canada_vat_label (#158)
Co-authored-by: Lanto Razafindrabe <[email protected]>
- Loading branch information
1 parent
d89e3e6
commit 2aa7b7f
Showing
11 changed files
with
118 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
================ | ||
Canada Vat Label | ||
================ | ||
This module customizes the ``VAT`` label for Canada. | ||
|
||
.. contents:: Table of Contents | ||
|
||
Context | ||
------- | ||
Each company in France has a VAT number. VAT means ``Value-Added Tax``. | ||
|
||
In Quebec, each company has 2 numbers: ``GST`` and ``QST``. | ||
In Ontario, companies have a single ``HST`` number. | ||
|
||
In Odoo, the field ``vat_label`` of res.country allows to define the label for | ||
the equivalent of ``VAT``. | ||
|
||
This mecanism does is inadequate in Canada. | ||
|
||
Overview | ||
-------- | ||
The solution for Canada is to write all numbers in the same field. | ||
|
||
.. image:: static/description/quebec_company.png | ||
|
||
The value entered in the field is displayed as is in the footer of external reports. | ||
|
||
.. image:: static/description/quebec_footer.png | ||
|
||
Contributors | ||
------------ | ||
* Numigi (tm) and all its contributors (https://bit.ly/numigiens) | ||
|
||
More information | ||
---------------- | ||
* Meet us at https://bit.ly/numigi-com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Copyright 2020 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) | ||
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Copyright 2020 - today Numigi (tm) and all its contributors (https://bit.ly/numigiens) | ||
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). | ||
|
||
{ | ||
"name": "Canada VAT Label", | ||
"version": "16.0.1.0.0", | ||
"author": "Numigi", | ||
"maintainer": "Numigi", | ||
"license": "LGPL-3", | ||
"category": "Other", | ||
"summary": "Customize VAT labels for Canada", | ||
"depends": ["web", "web_custom_label", "lang_fr_activated"], | ||
"data": ["data/web_custom_label.xml", "views/report_footer.xml"], | ||
"installable": True, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<odoo noupdate="1"> | ||
|
||
<record id="label_vat_english" model="web.custom.label"> | ||
<field name="lang">en_US</field> | ||
<field name="model_ids" eval="[(4, ref('base.model_res_company'))]" /> | ||
<field name="type_">field</field> | ||
<field name="position">string</field> | ||
<field name="reference">vat</field> | ||
<field name="term">Tax Number</field> | ||
</record> | ||
|
||
<record id="label_vat_french" model="web.custom.label"> | ||
<field name="lang">fr_FR</field> | ||
<field name="model_ids" eval="[(4, ref('base.model_res_company'))]" /> | ||
<field name="type_">field</field> | ||
<field name="position">string</field> | ||
<field name="reference">vat</field> | ||
<field name="term">Numéro de taxe</field> | ||
</record> | ||
|
||
</odoo> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<odoo> | ||
|
||
<template id="external_layout_striped" inherit_id="web.external_layout_striped"> | ||
<xpath expr="//li[@t-if='forced_vat']" position="replace"> | ||
<li t-if="forced_vat"> | ||
<span t-esc="forced_vat" /> | ||
</li> | ||
</xpath> | ||
</template> | ||
|
||
<template id="external_layout_boxed" inherit_id="web.external_layout_boxed"> | ||
<xpath expr="//li[@t-if='forced_vat']" position="replace"> | ||
<li t-if="forced_vat"> | ||
<span t-esc="forced_vat" /> | ||
</li> | ||
</xpath> | ||
</template> | ||
|
||
<template id="external_layout_clean" inherit_id="web.external_layout_bold"> | ||
<xpath expr="//li[@t-if='forced_vat']" position="replace"> | ||
<li t-if="forced_vat"> | ||
<span t-esc="forced_vat" /> | ||
</li> | ||
</xpath> | ||
</template> | ||
|
||
<template id="external_layout_standard" inherit_id="web.external_layout_standard"> | ||
<xpath expr="//li[@t-if='forced_vat']" position="replace"> | ||
<li t-if="forced_vat"> | ||
<span t-esc="forced_vat" /> | ||
</li> | ||
</xpath> | ||
</template> | ||
|
||
</odoo> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters