[MOD/IMP] Lunch : Usability Improvements
bzr revid: vir@tinyerp.com-20100817100952-augbpb170q6y3sfz
This commit is contained in:
parent
0dc844df5c
commit
1ba1c9c9ea
|
@ -141,6 +141,7 @@ class lunch_order(osv.osv):
|
|||
'state': fields.selection([('draft', 'Draft'), ('confirmed', 'Confirmed'), ], \
|
||||
'State', readonly=True, select=True),
|
||||
'price': fields.function(_price_get, method=True, string="Price"),
|
||||
'category': fields.many2one('lunch.category','Category'),
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
|
@ -198,7 +199,8 @@ class lunch_order(osv.osv):
|
|||
if not product:
|
||||
return {'value': {'price': 0.0}}
|
||||
price = self.pool.get('lunch.product').read(cr, uid, product, ['price'])['price']
|
||||
return {'value': {'price': price}}
|
||||
categ_id = self.pool.get('lunch.product').browse(cr, uid, product).category_id.id
|
||||
return {'value': {'price': price,'category':categ_id}}
|
||||
|
||||
lunch_order()
|
||||
|
||||
|
|
|
@ -29,8 +29,9 @@
|
|||
<field name="user_id" select="1"/>
|
||||
<field name="date" select="1"/>
|
||||
<field name="product" select="1" on_change="onchange_product(product)"/>
|
||||
<field name="price"/>
|
||||
<field name="category"/>
|
||||
<field name="descript"/>
|
||||
<field name="price"/>
|
||||
<field name="cashmove"/>
|
||||
<field name="state"/>
|
||||
</group>
|
||||
|
@ -48,6 +49,7 @@
|
|||
<tree colors="blue:state in ('draft');black:state in ('confirmed')" string="Order">
|
||||
<field name="user_id"/>
|
||||
<field name="product"/>
|
||||
<field name="category"/>
|
||||
<field name="date"/>
|
||||
<field name="cashmove"/>
|
||||
<field name="state"/>
|
||||
|
@ -85,7 +87,9 @@
|
|||
<newline/>
|
||||
<group expand="0" string="Group By..." colspan="4" col="20">
|
||||
<filter string="Cashbox" icon="terp-dolar" domain="[]" context="{'group_by':'cashmove'}"/>
|
||||
<filter string="Product" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'product'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<!-- <filter string="Product" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'product'}"/>-->
|
||||
<filter string="Category" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'category'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
|
|
Loading…
Reference in New Issue