diff --git a/pos_order_line_image/README.rst b/pos_order_line_image/README.rst new file mode 100644 index 000000000..b83b29acd --- /dev/null +++ b/pos_order_line_image/README.rst @@ -0,0 +1,22 @@ +=============================== +Pos Order Line Product Image v9 +=============================== + +This module adds product image in pos order line widget. + +Installation +============ + +Just select it from available modules to install it, there is no need to extra installations. + +Configuration +============= + +Nothing to configure. + +Credits +======= +Developer: Aswani pc @ cybrosys +Guidance: Nilmar Shereef @ cybrosys, shereef@cybrosys.in + + diff --git a/pos_order_line_image/__init__.py b/pos_order_line_image/__init__.py new file mode 100644 index 000000000..6d98448df --- /dev/null +++ b/pos_order_line_image/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2013-TODAY Cybrosys Technologies(). +# Author: Nilmar Shereef() +# 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 . +# +############################################################################## diff --git a/pos_order_line_image/__openerp__.py b/pos_order_line_image/__openerp__.py new file mode 100644 index 000000000..e793fef91 --- /dev/null +++ b/pos_order_line_image/__openerp__.py @@ -0,0 +1,39 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2013-TODAY Cybrosys Technologies(). +# Author: Nilmar Shereef() +# 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': "Product Image in POS Order Line", + 'version': '9.0.1.0.0', + 'summary': """Product Image in POS Order Line Widget""", + 'description': """This module adds product image in pos order line widget""", + 'author': "Cybrosys Techno Solutions", + 'company': "Cybrosys Techno Solutions", + 'website': "https://www.cybrosys.com", + 'category': 'Point of Sale', + 'depends': ['base', 'point_of_sale'], + 'data': ['views/pos_order_line_image.xml'], + 'qweb': ['static/src/xml/pos_order_line.xml'], + 'images': ['static/description/banner.jpg'], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, +} diff --git a/pos_order_line_image/static/description/banner.jpg b/pos_order_line_image/static/description/banner.jpg new file mode 100644 index 000000000..4fd40efe1 Binary files /dev/null and b/pos_order_line_image/static/description/banner.jpg differ diff --git a/pos_order_line_image/static/description/cybro_logo.png b/pos_order_line_image/static/description/cybro_logo.png new file mode 100644 index 000000000..bb309114c Binary files /dev/null and b/pos_order_line_image/static/description/cybro_logo.png differ diff --git a/pos_order_line_image/static/description/icon.png b/pos_order_line_image/static/description/icon.png new file mode 100644 index 000000000..e61b712c0 Binary files /dev/null and b/pos_order_line_image/static/description/icon.png differ diff --git a/pos_order_line_image/static/description/index.html b/pos_order_line_image/static/description/index.html new file mode 100644 index 000000000..3707c43b1 --- /dev/null +++ b/pos_order_line_image/static/description/index.html @@ -0,0 +1,37 @@ +
+
+

Product Image in POS Order Line

+
+

Features

+
    +
  • Product image in pos order line.
  • +
+
+
+
+ +
+
+
+ +
+
+
+ +
+

Need Any Help?

+ + +
+ + diff --git a/pos_order_line_image/static/description/pos_order_line_image.png b/pos_order_line_image/static/description/pos_order_line_image.png new file mode 100644 index 000000000..88e1131b6 Binary files /dev/null and b/pos_order_line_image/static/description/pos_order_line_image.png differ diff --git a/pos_order_line_image/static/src/css/order_line_image.css b/pos_order_line_image/static/src/css/order_line_image.css new file mode 100644 index 000000000..e7e337209 --- /dev/null +++ b/pos_order_line_image/static/src/css/order_line_image.css @@ -0,0 +1,15 @@ +.pos .order .orderline .pos_product_image{ + float:left; + margin:auto; +} +.pos .order { + padding-top: 0px !important; +} +.pos .order .orderline .product-name { + padding-top: 11px !important; +} +.pos .order .orderline .info-list { + color: #888; + margin-left: 10px; + padding-bottom: 19px; +} \ No newline at end of file diff --git a/pos_order_line_image/static/src/js/pos_order_line.js b/pos_order_line_image/static/src/js/pos_order_line.js new file mode 100644 index 000000000..4d72a1a36 --- /dev/null +++ b/pos_order_line_image/static/src/js/pos_order_line.js @@ -0,0 +1,27 @@ +odoo.define('pos_order_line_image.models', function (require) { +"use strict"; +var screens = require('point_of_sale.screens'); +var OrderWidget = screens.OrderWidget +var core = require('web.core'); +var QWeb = core.qweb; + +OrderWidget.include({ + render_orderline: function(orderline){ + var image_url = this.get_product_image_url(orderline.product); + var el_str = QWeb.render('Orderline',{widget:this, line:orderline, image_url:image_url}); + var el_node = document.createElement('div'); + el_node.innerHTML = _.str.trim(el_str); + el_node = el_node.childNodes[0]; + el_node.orderline = orderline; + el_node.addEventListener('click',this.line_click_handler); + + orderline.node = el_node; + return el_node; + }, + get_product_image_url: function(product){ + return window.location.origin + '/web/image?model=product.product&field=image_small&id='+product.id; + }, +}); + + +}); diff --git a/pos_order_line_image/static/src/xml/pos_order_line.xml b/pos_order_line_image/static/src/xml/pos_order_line.xml new file mode 100644 index 000000000..96c7a60ea --- /dev/null +++ b/pos_order_line_image/static/src/xml/pos_order_line.xml @@ -0,0 +1,15 @@ + + + + + + + diff --git a/pos_order_line_image/views/pos_order_line_image.xml b/pos_order_line_image/views/pos_order_line_image.xml new file mode 100644 index 000000000..7c6c13664 --- /dev/null +++ b/pos_order_line_image/views/pos_order_line_image.xml @@ -0,0 +1,11 @@ + + + +