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
<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">