12 changed files with 188 additions and 0 deletions
@ -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 |
|||
|
|||
|
@ -0,0 +1,22 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################## |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# Copyright (C) 2013-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Nilmar Shereef(<https://www.cybrosys.com>) |
|||
# 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 <https://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################## |
@ -0,0 +1,39 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################## |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# Copyright (C) 2013-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Nilmar Shereef(<https://www.cybrosys.com>) |
|||
# 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 <https://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################## |
|||
{ |
|||
'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, |
|||
} |
After Width: | Height: | Size: 109 KiB |
After Width: | Height: | Size: 50 KiB |
After Width: | Height: | Size: 14 KiB |
@ -0,0 +1,37 @@ |
|||
<section class="oe_container oe_dark"> |
|||
<div class="oe_row oe_spaced"> |
|||
<h2 class="oe_slogan">Product Image in POS Order Line</h2> |
|||
<div> |
|||
<h4><p>Features</p></h4> |
|||
<ul> |
|||
<li>Product image in pos order line.</li> |
|||
</ul> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
|
|||
<section class="oe_container"> |
|||
<div class="oe_row oe_spaced"> |
|||
<div class="oe_demo oe_picture oe_screenshot"> |
|||
<img src="pos_order_line_image.png"> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
|
|||
<section class="oe_container oe_dark"> |
|||
<h2 class="oe_slogan" style="margin-top:20px;" >Need Any Help?</h2> |
|||
<div class="oe_slogan" style="margin-top:10px !important;"> |
|||
<a class="btn btn-primary btn-lg mt8" |
|||
style="color: #FFFFFF !important;" href="http://www.cybrosys.com"><i |
|||
class="fa fa-envelope"></i> Email </a> <a |
|||
class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;" |
|||
href="http://www.cybrosys.com/contact/"><i |
|||
class="fa fa-phone"></i> Contact Us </a> <a |
|||
class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;" |
|||
href="http://www.cybrosys.com/odoo-customization-and-installation/"><i |
|||
class="fa fa-check-square"></i> Request Customization </a> |
|||
</div> |
|||
<img src="cybro_logo.png" style="width: 190px; margin-bottom: 20px;" class="center-block"> |
|||
</section> |
|||
|
|||
|
After Width: | Height: | Size: 256 KiB |
@ -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; |
|||
} |
@ -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; |
|||
}, |
|||
}); |
|||
|
|||
|
|||
}); |
@ -0,0 +1,15 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<template id="template" xml:space="preserve"> |
|||
<t t-extend="Orderline"> |
|||
<t t-jquery="span.product-name" t-operation="before"> |
|||
<div class="pos_product_image"> |
|||
<img t-att-src='image_url'/> |
|||
</div> |
|||
</t> |
|||
</t> |
|||
</template> |
|||
|
|||
|
|||
|
|||
|
|||
|
@ -0,0 +1,11 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<openerp> |
|||
<data> |
|||
<template id="pos_chatter" inherit_id="point_of_sale.assets"> |
|||
<xpath expr="." position="inside"> |
|||
<link rel="stylesheet" href="pos_order_line_image/static/src/css/order_line_image.css" /> |
|||
<script type="text/javascript" src="pos_order_line_image/static/src/js/pos_order_line.js"/> |
|||
</xpath> |
|||
</template> |
|||
</data> |
|||
</openerp> |
Loading…
Reference in new issue