diff --git a/custom_receipts_for_pos/__manifest__.py b/custom_receipts_for_pos/__manifest__.py index fd14549f4..5e4b319ac 100644 --- a/custom_receipts_for_pos/__manifest__.py +++ b/custom_receipts_for_pos/__manifest__.py @@ -23,7 +23,7 @@ { 'name': 'POS Receipt Design', - 'version': '16.0.1.0.1', + 'version': '16.0.1.0.0', 'summary': """Option to select the customised Receipts for each POS""", 'description': "Option to select the customised Receipts for each POS", 'category': 'Point of Sale', @@ -38,6 +38,7 @@ 'views/pos_receipt_views.xml', 'views/res_config_settings_views.xml', ], + 'demo':['demo/pos_receipt_views_demo.xml'], 'assets': { 'point_of_sale.assets': [ 'custom_receipts_for_pos/static/js/ReceiptScreen/order_receipt.js', diff --git a/custom_receipts_for_pos/demo/pos_receipt_views_demo.xml b/custom_receipts_for_pos/demo/pos_receipt_views_demo.xml new file mode 100644 index 000000000..642a77703 --- /dev/null +++ b/custom_receipts_for_pos/demo/pos_receipt_views_demo.xml @@ -0,0 +1,269 @@ + + + + + Design 1 + +
+ +
+
+ +
Tel:
+
+ +
:
+
+ +
+
+ +
+
+ + + + +
+
+ +
+
--------------------------------
+
Served by
+
+
+
+
+ +
+ +
+
+
+
+ + + + + + + + + + + + + + + + +
ProductQtyAmount
+ + +
+ % discount +
+
+ +
+ +
+ + + +
+
+
+
+ + + +
+
Subtotal :
+ +
+ + +
+
+
+ +
+
+ TOTAL : + +
+ +
+ + ]]>
+
+ + Design 2 + +
+
+ Phone:
+
+ +
+
+ Date : + + + + + + +
+ Order :
+
+
+
+ Cashier :
+ + Customer : + +
+
+
+ +
+ +
+
+
+
+ + + + + + + + + + + + + + + + +
ProductQtyAmount
+ + +
+ % discount +
+
+ +
+ +
+ + + +
+
+
+
+ + + +
+
Subtotal :
+ +
+ + +
+
+
+ +
+
+ TOTAL : + +
+

+
+ + +
+ + +
+
+
+
+ CHANGE : + +
+
+ + +
+ Discounts : + +
+
+ + +
+ + +
+
+
+ Total Taxes : + +
+
+ ]]>
+
+
\ No newline at end of file diff --git a/custom_receipts_for_pos/static/js/ReceiptScreen/order_receipt.js b/custom_receipts_for_pos/static/js/ReceiptScreen/order_receipt.js index 08b30d960..8a7c79799 100644 --- a/custom_receipts_for_pos/static/js/ReceiptScreen/order_receipt.js +++ b/custom_receipts_for_pos/static/js/ReceiptScreen/order_receipt.js @@ -23,6 +23,7 @@ odoo.define('custom_receipts_for_pos.receipt',function(require){ super.setup(); onMounted(()=>{ var self=this; + if(self.env.pos.config.is_custom_receipt){ var receipt_design=self.env.pos.config.design_receipt var order=self._receiptEnv.order; @@ -40,8 +41,10 @@ odoo.define('custom_receipts_for_pos.receipt',function(require){ var s=new XMLSerializer(); var newXmlStr=s.serializeToString(xmlDoc); var qweb=new QWeb2.Engine(); + console.log('receipt', self._receiptEnv) qweb.add_template(''+newXmlStr+''); var receipt=qweb.render('receipt_design',data);$('div.pos-receipt').replaceWith(receipt); + console.log(receipt, 'ooooo') } }) } diff --git a/custom_receipts_for_pos/views/point_of_sale_view.xml b/custom_receipts_for_pos/views/point_of_sale_view.xml index c9c0f9f67..bfa337b2b 100644 --- a/custom_receipts_for_pos/views/point_of_sale_view.xml +++ b/custom_receipts_for_pos/views/point_of_sale_view.xml @@ -9,7 +9,7 @@