diff options
| author | Nicolas Martinelli <nim@odoo.com> | 2020-09-25 10:13:12 +0000 |
|---|---|---|
| committer | Nicolas Martinelli <nim@odoo.com> | 2020-09-29 14:34:44 +0000 |
| commit | bfe3a127f5535e11cc87ebd0fff4a5cfe5039a23 (patch) | |
| tree | 02a1aa813be5fdd5f89d4624f2764bf0031c072c | |
| parent | a8c847808ca624614becc2958bcc13f4739eee24 (diff) | |
[FIX] point_of_sale: VAT label on receipt
- Set the company country to India
- Open th POS, make a sale
- Print the receipt
The label for the VAT is 'VAT' while it should be 'GSTIN'.
The `VAT:` label is hardcoded in the receipt template. It is expected to
be adapted to the localization thanks to the translation. However, in
this case it doesn't work: since we keep the English language, there is
no translation applied.
We use the country `vat_label` and fall back on the `VAT` string.
opw-2343652
closes odoo/odoo#58831
X-original-commit: 652e240901a052ed612f91620bdab3cbd5608e3f
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
| -rw-r--r-- | addons/point_of_sale/i18n/point_of_sale.pot | 1 | ||||
| -rw-r--r-- | addons/point_of_sale/static/src/js/models.js | 2 | ||||
| -rw-r--r-- | addons/point_of_sale/static/src/xml/Screens/ReceiptScreen/OrderReceipt.xml | 2 |
3 files changed, 3 insertions, 2 deletions
diff --git a/addons/point_of_sale/i18n/point_of_sale.pot b/addons/point_of_sale/i18n/point_of_sale.pot index 091fb0f013d..b85ac57d6ab 100644 --- a/addons/point_of_sale/i18n/point_of_sale.pot +++ b/addons/point_of_sale/i18n/point_of_sale.pot @@ -4566,6 +4566,7 @@ msgstr "" #. module: point_of_sale #. openerp-web +#: code:addons/point_of_sale/static/src/js/models.js:0 #: code:addons/point_of_sale/static/src/xml/Screens/ClientListScreen/ClientDetailsEdit.xml:0 #, python-format msgid "Tax ID" diff --git a/addons/point_of_sale/static/src/js/models.js b/addons/point_of_sale/static/src/js/models.js index 6914cd46568..8f2b5013442 100644 --- a/addons/point_of_sale/static/src/js/models.js +++ b/addons/point_of_sale/static/src/js/models.js @@ -2789,7 +2789,7 @@ exports.Order = Backbone.Model.extend({ company_registry: company.company_registry, contact_address: company.partner_id[1], vat: company.vat, - vat_label: company.country && company.country.vat_label || '', + vat_label: company.country && company.country.vat_label || _t('Tax ID'), name: company.name, phone: company.phone, logo: this.pos.company_logo_base64, diff --git a/addons/point_of_sale/static/src/xml/Screens/ReceiptScreen/OrderReceipt.xml b/addons/point_of_sale/static/src/xml/Screens/ReceiptScreen/OrderReceipt.xml index 3296649adc4..2a587c7fab9 100644 --- a/addons/point_of_sale/static/src/xml/Screens/ReceiptScreen/OrderReceipt.xml +++ b/addons/point_of_sale/static/src/xml/Screens/ReceiptScreen/OrderReceipt.xml @@ -21,7 +21,7 @@ <div>Tel:<t t-esc="receipt.company.phone" /></div> </t> <t t-if="receipt.company.vat"> - <div>VAT:<t t-esc="receipt.company.vat" /></div> + <div><t t-esc="receipt.company.vat_label"/>:<t t-esc="receipt.company.vat" /></div> </t> <t t-if="receipt.company.email"> <div><t t-esc="receipt.company.email" /></div> |
