diff --git a/point_of_sale_logo/README.rst b/point_of_sale_logo/README.rst new file mode 100644 index 000000000..fbf10cd3b --- /dev/null +++ b/point_of_sale_logo/README.rst @@ -0,0 +1,25 @@ +====================== +Point of Sale Logo v11 +====================== +This module helps you to set a logo for every point of sale. This will help you to +identify the point of sale easily. You can also see this logo in pos screen and pos receipt. + +Installation +============ +Just select it from available modules to install it, +there is no need to extra installations. + + +Configuration & Usage +===================== +* Go to configuration of POS. +* Add a logo to your POS. +* Ensure logo is near the resolution (width:76px;height:47px). + +Credits +======= +Developer: Nilmar Shereef @ cybrosys, shereef@cybrosys.in +Developer: Jesni Banu @ cybrosys, jesni@cybrosys.in +Developer: Niyas Raphy (Migrated to v11) + + diff --git a/point_of_sale_logo/__init__.py b/point_of_sale_logo/__init__.py new file mode 100644 index 000000000..f020f1fc1 --- /dev/null +++ b/point_of_sale_logo/__init__.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2017-TODAY Cybrosys Technologies(). +# Author: Cybrosys Techno Solutions() +# you can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# It is forbidden to publish, distribute, sublicense, or sell copies +# of the Software or modified copies of the Software. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. +# If not, see . +# +############################################################################## + +from . import models + diff --git a/point_of_sale_logo/__manifest__.py b/point_of_sale_logo/__manifest__.py new file mode 100644 index 000000000..de81ee957 --- /dev/null +++ b/point_of_sale_logo/__manifest__.py @@ -0,0 +1,47 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2017-TODAY Cybrosys Technologies(). +# Author: Cybrosys Techno Solutions() +# you can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# It is forbidden to publish, distribute, sublicense, or sell copies +# of the Software or modified copies of the Software. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. +# If not, see . +# +############################################################################## + +{ + 'name': 'Point of Sale Logo', + 'version': '11.0.1.0.0', + 'summary': """Logo For Every Point of Sale (Screen & Receipt)""", + 'description': """"This module helps you to set a logo for every point of sale. This will help you to + identify the point of sale easily. You can also see this logo in pos screen and pos receipt.""", + 'category': 'Point Of Sale', + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'website': "http://www.cybrosys.com", + 'depends': ['base', 'point_of_sale'], + 'data': [ + 'views/pos_config_image_view.xml', + 'views/pos_image_view.xml', + ], + 'qweb': ['static/src/xml/pos_ticket_view.xml', + 'static/src/xml/pos_screen_image_view.xml'], + 'images': ['static/description/banner.jpg'], + 'license': 'AGPL-3', + 'demo': [], + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/point_of_sale_logo/models/__init__.py b/point_of_sale_logo/models/__init__.py new file mode 100644 index 000000000..135fb3244 --- /dev/null +++ b/point_of_sale_logo/models/__init__.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2017-TODAY Cybrosys Technologies(). +# Author: Cybrosys Techno Solutions() +# you can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# It is forbidden to publish, distribute, sublicense, or sell copies +# of the Software or modified copies of the Software. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. +# If not, see . +# +############################################################################## + +from . import pos_config_image + diff --git a/point_of_sale_logo/models/pos_config_image.py b/point_of_sale_logo/models/pos_config_image.py new file mode 100644 index 000000000..2f0bd5101 --- /dev/null +++ b/point_of_sale_logo/models/pos_config_image.py @@ -0,0 +1,30 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2017-TODAY Cybrosys Technologies(). +# Author: Cybrosys Techno Solutions() +# you can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# It is forbidden to publish, distribute, sublicense, or sell copies +# of the Software or modified copies of the Software. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. +# If not, see . +# +############################################################################## + +from odoo import models, fields + + +class PosConfigImage(models.Model): + _inherit = 'pos.config' + + image = fields.Binary(string='Image') diff --git a/point_of_sale_logo/static/description/banner.jpg b/point_of_sale_logo/static/description/banner.jpg new file mode 100644 index 000000000..a4183aa09 Binary files /dev/null and b/point_of_sale_logo/static/description/banner.jpg differ diff --git a/point_of_sale_logo/static/description/cybro_logo.png b/point_of_sale_logo/static/description/cybro_logo.png new file mode 100644 index 000000000..bb309114c Binary files /dev/null and b/point_of_sale_logo/static/description/cybro_logo.png differ diff --git a/point_of_sale_logo/static/description/icon.png b/point_of_sale_logo/static/description/icon.png new file mode 100644 index 000000000..e5bc493a3 Binary files /dev/null and b/point_of_sale_logo/static/description/icon.png differ diff --git a/point_of_sale_logo/static/description/index.html b/point_of_sale_logo/static/description/index.html new file mode 100644 index 000000000..eadfd82e0 --- /dev/null +++ b/point_of_sale_logo/static/description/index.html @@ -0,0 +1,110 @@ +
+
+

Point of Sale Logo

+

Logo For Every Point of Sale

+

Cybrosys Technologies

+
+

Features:

+
    +
  •    Logo for each point of sale.
  • +
  •    Logo in pos screen.
  • +
  •    Logo in pos receipt.
  • +
+
+
+

This module helps you to set a logo for every point of sale. This will help you to + identify the point of sale easily. You can also see this logo in pos screen and pos receipt.

+
+
+
+ +
+
+

Logo for each point of sale

+
+

+ ☛ Point of Sale -> Configuration -> Point of Sale
+ Here you can set logo for your point of sale.
+ Note:- Please choose the image with the dimension "width:76px;height:47px" for better output. +

+
+
+
+ +
+
+
+
+ +
+
+
+
+ +
+
+

Logo in pos screen

+
+

+ ☛ You can see your point of sale logo from the top left corner of pos screen
+

+
+
+
+ +
+
+
+
+ +
+
+
+
+ +
+
+

Logo in pos receipt

+
+

+ ☛ POS receipt with point of sale logo and name
+

+
+
+
+ +
+
+
+
+ +
+
+
+
+ +
+

Need Any Help?

+ +
diff --git a/point_of_sale_logo/static/description/main.png b/point_of_sale_logo/static/description/main.png new file mode 100644 index 000000000..9f48d3cf2 Binary files /dev/null and b/point_of_sale_logo/static/description/main.png differ diff --git a/point_of_sale_logo/static/description/parcel_config.png b/point_of_sale_logo/static/description/parcel_config.png new file mode 100644 index 000000000..573cd0104 Binary files /dev/null and b/point_of_sale_logo/static/description/parcel_config.png differ diff --git a/point_of_sale_logo/static/description/parcel_rcpt.png b/point_of_sale_logo/static/description/parcel_rcpt.png new file mode 100644 index 000000000..e09f39ca1 Binary files /dev/null and b/point_of_sale_logo/static/description/parcel_rcpt.png differ diff --git a/point_of_sale_logo/static/description/parcel_screen.png b/point_of_sale_logo/static/description/parcel_screen.png new file mode 100644 index 000000000..688d0de62 Binary files /dev/null and b/point_of_sale_logo/static/description/parcel_screen.png differ diff --git a/point_of_sale_logo/static/description/pos_screen.png b/point_of_sale_logo/static/description/pos_screen.png new file mode 100644 index 000000000..7f95b12b7 Binary files /dev/null and b/point_of_sale_logo/static/description/pos_screen.png differ diff --git a/point_of_sale_logo/static/description/recpt.png b/point_of_sale_logo/static/description/recpt.png new file mode 100644 index 000000000..2bc2ac03a Binary files /dev/null and b/point_of_sale_logo/static/description/recpt.png differ diff --git a/point_of_sale_logo/static/src/js/pos_image_field.js b/point_of_sale_logo/static/src/js/pos_image_field.js new file mode 100644 index 000000000..274772e0f --- /dev/null +++ b/point_of_sale_logo/static/src/js/pos_image_field.js @@ -0,0 +1,38 @@ +odoo.define("point_of_sale_logo.image", function (require) { + "use strict"; + var PosBaseWidget = require('point_of_sale.chrome'); + var screens = require('point_of_sale.screens'); + var core = require('web.core'); + + var QWeb = core.qweb; + console.log("PosBaseWidget", PosBaseWidget) + screens.ReceiptScreenWidget.include({ + render_receipt: function () { + this._super(this); + var order = this.pos.get_order() + this.$('.pos-receipt-container').html(QWeb.render('PosTicket',{ + widget:this, + a2 : window.location.origin + '/web/image?model=pos.config&field=image&id='+this.pos.config.id, + order: order, + receipt: order.export_for_printing(), + orderlines: order.get_orderlines(), + paymentlines: order.get_paymentlines(), + })); + }, + }); + PosBaseWidget.Chrome.include({ + renderElement:function () { + + var self = this; + console.log("self:", self) + + if(self.pos.config){ + if(self.pos.config.image){ + this.flag = 1 + this.a3 = window.location.origin + '/web/image?model=pos.config&field=image&id='+self.pos.config.id; + } + } + this._super(this); + } + }); +}); \ No newline at end of file diff --git a/point_of_sale_logo/static/src/xml/pos_screen_image_view.xml b/point_of_sale_logo/static/src/xml/pos_screen_image_view.xml new file mode 100644 index 000000000..eb0ef063b --- /dev/null +++ b/point_of_sale_logo/static/src/xml/pos_screen_image_view.xml @@ -0,0 +1,22 @@ + + + + +
+
+ + + + + + + +
+
+ + +
+
+
+
+
\ No newline at end of file diff --git a/point_of_sale_logo/static/src/xml/pos_ticket_view.xml b/point_of_sale_logo/static/src/xml/pos_ticket_view.xml new file mode 100644 index 000000000..04d436652 --- /dev/null +++ b/point_of_sale_logo/static/src/xml/pos_ticket_view.xml @@ -0,0 +1,156 @@ + + + + +
+
+
+ + Phone:
+
+ Cashier:
+ + +
+
+ + + + + + +
+
+ +
+
+ +
+
+ +
+
+
+ +
+ +
+
+
+ + + + + + + + + + + + + + + + + + + +
NameQtyPriceValue
+ + +
+ With a % discount +
+
+
+ + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
Subtotal: + +
+ +
Discount: + +
Total: + +
+
+ + + + + + + + + + + + + + + +
+ + + + + +
+
+ + + + + + + + + + + +
Change: + + + +
+
+
+
+
\ No newline at end of file diff --git a/point_of_sale_logo/views/pos_config_image_view.xml b/point_of_sale_logo/views/pos_config_image_view.xml new file mode 100644 index 000000000..f5a8a0528 --- /dev/null +++ b/point_of_sale_logo/views/pos_config_image_view.xml @@ -0,0 +1,15 @@ + + + + + pos.config.inherit.form + pos.config + + + + + + + + + \ No newline at end of file diff --git a/point_of_sale_logo/views/pos_image_view.xml b/point_of_sale_logo/views/pos_image_view.xml new file mode 100644 index 000000000..569dfccf6 --- /dev/null +++ b/point_of_sale_logo/views/pos_image_view.xml @@ -0,0 +1,10 @@ + + + + + + \ No newline at end of file