diff options
| author | stephanchrst <stephanchrst@gmail.com> | 2022-05-10 21:51:50 +0700 |
|---|---|---|
| committer | stephanchrst <stephanchrst@gmail.com> | 2022-05-10 21:51:50 +0700 |
| commit | 3751379f1e9a4c215fb6eb898b4ccc67659b9ace (patch) | |
| tree | a44932296ef4a9b71d5f010906253d8c53727726 /addons/l10n_in_pos/static/src | |
| parent | 0a15094050bfde69a06d6eff798e9a8ddf2b8c21 (diff) | |
initial commit 2
Diffstat (limited to 'addons/l10n_in_pos/static/src')
| -rw-r--r-- | addons/l10n_in_pos/static/src/js/receipt.js | 17 | ||||
| -rw-r--r-- | addons/l10n_in_pos/static/src/xml/pos_receipt.xml | 27 |
2 files changed, 44 insertions, 0 deletions
diff --git a/addons/l10n_in_pos/static/src/js/receipt.js b/addons/l10n_in_pos/static/src/js/receipt.js new file mode 100644 index 00000000..89ccc681 --- /dev/null +++ b/addons/l10n_in_pos/static/src/js/receipt.js @@ -0,0 +1,17 @@ +odoo.define('l10n_in_pos.receipt', function (require) { +"use strict"; + +var models = require('point_of_sale.models'); + +models.load_fields('product.product', 'l10n_in_hsn_code'); + +var _super_orderline = models.Orderline.prototype; +models.Orderline = models.Orderline.extend({ + export_for_printing: function() { + var line = _super_orderline.export_for_printing.apply(this,arguments); + line.l10n_in_hsn_code = this.get_product().l10n_in_hsn_code; + return line; + }, +}); + +}); diff --git a/addons/l10n_in_pos/static/src/xml/pos_receipt.xml b/addons/l10n_in_pos/static/src/xml/pos_receipt.xml new file mode 100644 index 00000000..ab6e4cb2 --- /dev/null +++ b/addons/l10n_in_pos/static/src/xml/pos_receipt.xml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="utf-8"?> +<templates id="template" xml:space="preserve"> + <t t-name="OrderReceipt" t-inherit="point_of_sale.OrderReceipt" t-inherit-mode="extension" owl="1"> + <xpath expr="//div[hasclass('orderlines')]" position="before"> + <t t-if="receipt.client and env.pos.company.country and env.pos.company.country.code == 'IN'"> + <div class="pos-receipt-center-align"> + <div><t t-esc="receipt.client.name" /></div> + <t t-if="receipt.client.phone"> + <div> + <span>Phone: </span> + <t t-esc="receipt.client.phone" /> + </div> + </t> + <br /> + </div> + </t> + </xpath> + <xpath expr="//WrappedProductNameLines" position="after"> + <t t-if="line.l10n_in_hsn_code and env.pos.company.country and env.pos.company.country.code == 'IN'"> + <div class="pos-receipt-left-padding"> + <span>HSN Code: </span> + <t t-esc="line.l10n_in_hsn_code"/> + </div> + </t> + </xpath> + </t> +</templates> |
