Chaban33
Chaban33

Reputation: 1382

Make filter in Sale Oder based on other models field state

I want to add a filter to search view of sale order. It should filter order based on SO picking state.

For example, I want to filter SO that have pickings and pickings state is 'confirmed'

what are my options?

I did try to add a relation to field picking_ids.state but getting an error

openerp.osv.expression: Non-stored field sale.order.picking_ids cannot be searched.

Upvotes: 0

Views: 201

Answers (1)

Oliver Schneider
Oliver Schneider

Reputation: 414

Extend sale.order and create a new computed field which you can use in your filter and will be stored and depends on picking_ids.state

Upvotes: 1

Related Questions