Tejas Tank (OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/trunk-kanban-views2-products-tta into
lp:~openerp-dev/openobject-addons/trunk-kanban-views2.
Requested reviews:
Amit (Open ERP) (apa-tiny)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-kanban-views2-products-tta/+merge/79102
Hello,
Products kanban view.
New changes are applied.
Bold content font removed, as per the criteria color are set.
Red for negative stock, blue for service products, light light gray for 0 stock
and light gray for normal.
Thanks,
Tejas
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-kanban-views2-products-tta/+merge/79102
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/trunk-kanban-views2.
=== modified file 'product/product.py'
--- product/product.py 2011-09-29 05:14:07 +0000
+++ product/product.py 2011-10-12 10:38:57 +0000
@@ -460,7 +460,7 @@
'active': lambda *a: 1,
'price_extra': lambda *a: 0.0,
'price_margin': lambda *a: 1.0,
- 'color': 0,
+ 'color': -1,
}
_name = "product.product"
=== modified file 'product/product_view.xml'
--- product/product_view.xml 2011-10-04 12:52:20 +0000
+++ product/product_view.xml 2011-10-12 10:38:57 +0000
@@ -205,14 +205,29 @@
<kanban default_group_by="type">
<templates>
<t t-name="kanban-box">
- <t t-set="color" t-value="kanban_color(record.color.raw_value || record.type.raw_value)"/>
- <div t-att-class="color + (record.color.raw_value == 1 ? ' oe_kanban_color_alert' : '')">
+ <t t-if="record.virtual_available.raw_value < 0 && record.type.raw_value!='service'">
+ <t t-set="color" t-value="kanban_color(1)"/>
+ </t>
+ <t t-if="record.virtual_available.raw_value == 0 && record.type.raw_value!='service'">
+ <t t-set="color" t-value="kanban_color(-1)"/>
+ </t>
+ <t t-if="record.type.raw_value=='service'">
+ <t t-set="color" t-value="kanban_color(6)"/>
+ </t>
+ <t t-if="record.virtual_available.raw_value > 0 && record.type.raw_value!='service'">
+ <t t-if="record.color.raw_value == -1">
+ <t t-set="color" t-value="kanban_color(9)"/>
+ </t>
+ <t t-if="record.color.raw_value != -1">
+ <t t-set="color" t-value="kanban_color(record.color.raw_value)"/>
+ </t>
+ </t>
+ <div t-att-class="color + ((record.color.raw_value == 1) ? ' 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_title1" align="left" valign="middle">
- <t t-if="record.default_code.raw_value">[<field name="default_code"/>]</t>
- <field name="name"/>
+ <t t-if="record.default_code.raw_value"><field name="default_code"/></t>
</td>
<td align="right" valign="top" width="22">
<img t-att-src="kanban_gravatar(record.product_manager.raw_value, 22)" class="oe_kanban_gravatar"/>
@@ -231,7 +246,8 @@
</t>
</td>
<td>
- <div class="oe_kanban_title2">
+ <div>
+ <field name="name"/><br/>
<t t-if="record.type.raw_value=='service'">No Stock</t>
<t t-if="record.type.raw_value!='service'">
<div><field name="qty_available"/> On Hand , <field name="virtual_available"/> Available</div>
_______________________________________________
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