Amit Parmar (OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/trunk-kabanization-product-aar into
lp:~openerp-dev/openobject-addons/trunk-kabanization.
Requested reviews:
Amit (Open ERP) (apa-tiny)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-kabanization-product-aar/+merge/76159
Hello Sir,
I have made improvements as mentioned in pad.
please check it.
Thanks,
AAR
(Amit Parmar)
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-kabanization-product-aar/+merge/76159
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/trunk-kabanization.
=== modified file 'point_of_sale/point_of_sale.py'
--- point_of_sale/point_of_sale.py 2011-07-08 09:22:32 +0000
+++ point_of_sale/point_of_sale.py 2011-09-20 06:53:26 +0000
@@ -1233,6 +1233,7 @@
'expense_pdt': fields.boolean('Product for Output'),
'am_out': fields.boolean('Control for Output Operations'),
'disc_controle': fields.boolean('Discount Control'),
+ 'product_image': fields.binary('Image'),
}
_defaults = {
'disc_controle': True,
=== modified file 'point_of_sale/point_of_sale_view.xml'
--- point_of_sale/point_of_sale_view.xml 2011-08-25 04:10:37 +0000
+++ point_of_sale/point_of_sale_view.xml 2011-09-20 06:53:26 +0000
@@ -659,6 +659,7 @@
<field name="expense_pdt"/>
<field name="am_out"/>
<field name="disc_controle"/>
+ <field name="product_image"/>
</field>
</field>
</record>
=== modified file 'product/product.py'
--- product/product.py 2011-08-28 01:17:39 +0000
+++ product/product.py 2011-09-20 06:53:26 +0000
@@ -461,6 +461,7 @@
'active': lambda *a: 1,
'price_extra': lambda *a: 0.0,
'price_margin': lambda *a: 1.0,
+ 'color': 0,
}
_name = "product.product"
@@ -487,6 +488,7 @@
'price_margin': fields.float('Variant Price Margin', digits_compute=dp.get_precision('Sale Price')),
'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),
+ 'color': fields.integer('Color Index')
}
def unlink(self, cr, uid, ids, context=None):
=== modified file 'product/product_view.xml'
--- product/product_view.xml 2011-07-08 09:22:32 +0000
+++ product/product_view.xml 2011-09-20 06:53:26 +0000
@@ -191,6 +191,87 @@
</form>
</field>
</record>
+ <!-- Product Kanban View -->
+ <record model="ir.ui.view" id="product_case_kanban_view">
+ <field name="name">product Kanban</field>
+ <field name="model">product.product</field>
+ <field name="type">kanban</field>
+ <field name="arch" type="xml">
+ <kanban default_group_by="type">
+ <field name="name"/>
+ <field name="default_code"/>
+ <field name="type"/>
+ <field name="standard_price"/>
+ <field name="list_price"/>
+ <field name="qty_available"/>
+ <field name="virtual_available"/>
+ <field name="product_image"/>
+ <templates>
+ <t t-name="kanban-box">
+ <t t-if="Math.max(0,record.qty_available.raw_value) == record.qty_available.raw_value" t-set="color" t-value="kanban_color(2)"/>
+ <t t-set="color" t-if="record.qty_available.raw_value == 0" t-value="kanban_color(5)"/>
+ <t t-set="color" t-if="record.type.raw_value == 'service'" t-value="kanban_color(6)"/>
+ <t t-set="color" t-if="Math.max(0,record.qty_available.raw_value) != record.qty_available.raw_value" t-value="kanban_color(1)"/>
+ <div t-att-class="color + (Math.max(0,record.qty_available.raw_value) != record.qty_available.raw_value ? ' oe_kanban_color_alert' : '')">
+ <div class="oe_kanban_box oe_kanban_color_border">
+ <table class="oe_kanban_table oe_kanban_box_header oe_kanban_color_bgdark oe_kanban_color_border oe_kanban_draghandle">
+ <tr>
+ <td class="oe_kanban_title3" align="left" valign="middle">
+ <t t-if="record.default_code.raw_value">
+ <b>[<field name="default_code"/>]</b>
+ </t> <b><field name="name"/></b>
+ </td>
+ <td align="right" valign="top" width="22">
+ <img t-att-src="kanban_gravatar(record.product_manager.raw_value, 22)" class="oe_kanban_gravatar"/>
+ </td>
+ </tr>
+ </table>
+
+ <div class="oe_kanban_box_content oe_kanban_color_bglight oe_kanban_box_show_onclick_trigger">
+ <t t-if="record.type.raw_value != 'service'">
+ <table>
+ <tr>
+ <td>
+ <t t-if="record.product_image.raw_value">
+ <img t-att-src="'data:image/png;base64,'+record.product_image.raw_value" width='48' height='48'/>
+ </t>
+ <t t-if="record.product_image.raw_value == ''">
+ <img src="/web/static/src/img/stock_person.png" width='48' height='48' />
+ </t>
+ </td>
+ <td>
+ <b><field name="qty_available"/></b> pce on hand <b><field name="virtual_available"/></b> pce available
+ <br/>
+ <t t-if="record.list_price.raw_value != 0">
+ Public Price : <b><field name="list_price"/></b> Cost : <b><field name="standard_price"/></b>
+ </t>
+ </td>
+ </tr>
+ </table>
+ </t>
+ <t t-if="record.type.raw_value == 'service'">
+ <div>
+ No Stock
+ </div>
+ </t>
+ </div>
+
+ <div class="oe_kanban_buttons_set oe_kanban_color_border oe_kanban_color_bglight oe_kanban_box_show_onclick">
+ <div class="oe_kanban_left">
+ <a string="Edit" icon="gtk-edit" type="edit"/>
+ <a string="Change Color" icon="color-picker" type="color" name="color"/>
+ <a string="Update Stock" name="%(stock.action_view_change_product_quantity)d" icon="gtk-execute" type="action"/>
+ </div>
+ <br class="oe_kanban_clear"/>
+ </div>
+ </div>
+ </div>
+ </t>
+ </templates>
+ </kanban>
+ </field>
+ </record>
+
<record id="product_normal_action" model="ir.actions.act_window">
<field name="name">Products</field>
<field name="type">ir.actions.act_window</field>
@@ -205,8 +286,9 @@
<field name="type">ir.actions.act_window</field>
<field name="res_model">product.product</field>
<field name="view_type">form</field>
+ <field name="view_mode">tree,form,kanban</field>
<field name="context">{"search_default_filter_to_sell":1}</field>
- <field name="view_id" ref="product_product_tree_view"/>
+ <field name="view_id" ref="product_product_tree_view"/>
<field name="search_view_id" ref="product_search_form_view"/>
<field name="help">You must define a Product for everything you buy or sell. Products can be raw materials, stockable products, consumables or services. The Product form contains detailed information about your products related to procurement logistics, sales price, product category, suppliers and so on.</field>
</record>
_______________________________________________
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