Amit Patel (Open ERP) has proposed merging
lp:~openerp-dev/openobject-addons/trunk-pos-apa into lp:openobject-addons.
Requested reviews:
OpenERP Core Team (openerp)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-pos-apa/+merge/87060
Hello
I have improved the point_of_sale module for images.
rite now , for kanban view 'product_image' field is work and for
pos(touchscreen) 'img' field is work.
I set the one field for both the things. now we can set the image in product
form and use in the kanban view and also same image for pos(touchscreen).
[IMP/FIX]:point_of_sale:used same product's image which are used in product
form.
Thanks,
Amit
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-pos-apa/+merge/87060
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/trunk-pos-apa.
=== modified file 'point_of_sale/point_of_sale.py'
--- point_of_sale/point_of_sale.py 2011-12-28 09:06:08 +0000
+++ point_of_sale/point_of_sale.py 2011-12-29 06:43:26 +0000
@@ -732,7 +732,7 @@
_columns = {
'income_pdt': fields.boolean('PoS Cash Input', help="This is a product you can use to put cash into a statement for the point of sale backend."),
'expense_pdt': fields.boolean('PoS Cash Output', help="This is a product you can use to take cash from a statement for the point of sale backend, exemple: money lost, transfer to bank, etc."),
- 'img': fields.binary('Product Image, must be 50x50', help="Use an image size of 50x50."),
+ # 'img': fields.binary('Product Image, must be 50x50', help="Use an image size of 50x50."),
'pos_categ_id': fields.many2one('pos.category','PoS Category',
help="If you want to sell this product through the point of sale, select the category it belongs to.")
}
=== modified file 'product/product.py'
--- product/product.py 2011-12-21 22:15:04 +0000
+++ product/product.py 2011-12-29 06:43:26 +0000
@@ -505,7 +505,7 @@
'pricelist_id': fields.dummy(string='Pricelist', relation='product.pricelist', type='many2one'),
'name_template': fields.related('product_tmpl_id', 'name', string="Name", type='char', size=128, store=True, select=True),
'color': fields.integer('Color Index'),
- 'product_image': fields.binary('Image'),
+ 'img': fields.binary('Product Image, must be 50x50', help="Use an image size of 50x50."),
}
def unlink(self, cr, uid, ids, context=None):
=== modified file 'product/product_view.xml'
--- product/product_view.xml 2011-12-27 13:11:40 +0000
+++ product/product_view.xml 2011-12-29 06:43:26 +0000
@@ -86,7 +86,7 @@
<field name="purchase_ok"/>
</group>
<group colspan="1" col="1">
- <field name="product_image" widget='image' nolabel="1"/>
+ <field name="img" widget='image' nolabel="1"/>
</group>
</group>
@@ -205,7 +205,7 @@
<kanban>
<field name="color"/>
<field name="type"/>
- <field name="product_image"/>
+ <field name="img"/>
<field name="list_price"/>
<templates>
<t t-name="kanban-box">
@@ -216,7 +216,7 @@
<field name="name"/>
</div>
<div class="oe_kanban_box_content oe_kanban_color_bglight oe_kanban_box_show_onclick_trigger">
- <img t-att-src="kanban_image('product.product', 'product_image', record.id.value)" width="48" style="float: left; padding: 0 4px 4px 0"/>
+ <img t-att-src="kanban_image('product.product', 'img', record.id.value)" width="48" style="float: left; padding: 0 4px 4px 0"/>
<div t-if="record.type.raw_value == 'service'">No Stock</div>
<t t-if="record.type.raw_value != 'service'">
<div>Stock: <field name="qty_available"/> on hand, <field name="virtual_available"/> available</div>
=== modified file 'stock/product_view.xml'
--- stock/product_view.xml 2011-12-21 13:10:28 +0000
+++ stock/product_view.xml 2011-12-29 06:43:26 +0000
@@ -134,13 +134,13 @@
<kanban>
<field name="color"/>
<field name="type"/>
- <field name="product_image"/>
+ <field name="img"/>
<field name="list_price"/>
<templates>
<t t-name="kanban-box">
<div class="oe_product_vignette">
<div class="oe_product_img">
- <a type="edit"><img t-att-src="kanban_image('product.product', 'product_image', record.id.value)" class="oe_product_photo"/></a>
+ <a type="edit"><img t-att-src="kanban_image('product.product', 'img', record.id.value)" class="oe_product_photo"/></a>
</div>
<div class="oe_product_desc">
<h4><a type="edit"><field name="name"></field></a></h4>
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp