[IMP]: Improve tree view.
bzr revid: atp@tinyerp.com-20120602065841-zoz75mk96usd2psi
This commit is contained in:
@@ -169,7 +169,7 @@ class purchase_requisition(osv.osv):
|
||||
def get_needaction_user_ids(self, cr, uid, ids, context=None):
|
||||
result = dict.fromkeys(ids, [])
|
||||
for obj in self.browse(cr, uid, ids, context=context):
|
||||
if (obj.state == 'draft'):
|
||||
if (obj.state == 'draft') and obj.user_id:
|
||||
result[obj.id] = [obj.user_id.id]
|
||||
return result
|
||||
|
||||
|
||||
@@ -115,15 +115,17 @@
|
||||
<field name="type">tree</field>
|
||||
<field name="model">purchase.requisition</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree colors="grey:state == 'done';red:date_end<current_date and state not in ('done','cancel');black:date_end>=current_date;" string="Purchase Requisition">
|
||||
<tree fonts="bold:needaction_pending==True" colors="grey:state == 'cancel';red:date_end<current_date and state not in ('done','cancel');black:date_end>=current_date;" string="Purchase Requisition">
|
||||
<field name="needaction_pending" invisible="1"/>
|
||||
<field name="name"/>
|
||||
<field name="user_id"/>
|
||||
<field name="date_start"/>
|
||||
<field name="user_id"/>
|
||||
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
|
||||
<field name="date_end"/>
|
||||
<field name="origin"/>
|
||||
<field name="state"/>
|
||||
</tree>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_purchase_requisition_filter" model="ir.ui.view">
|
||||
|
||||
Reference in New Issue
Block a user