Priyan RockZ
Priyan RockZ

Reputation: 1615

widget="selection" with domain fields issue

here is my view xml part

<field name="bpl_estate_id" placeholder="Estate" widget="selection" />

here is my model python part

'bpl_company_id':fields.many2one('res.company', 'Company', help='Company'),
'bpl_estate_id':fields.many2one('bpl.estate.n.registration', 'Estate', 
domain="[('company_id','=',bpl_company_id)]"),

my issue is when i used estate field,with widget option, then no domain filtered ? (show all records)

please advice me to implement this

Upvotes: 0

Views: 1412

Answers (2)

PCatinean
PCatinean

Reputation: 106

Dynamic domains are not supported on selection widgets, simple as that

https://lists.launchpad.net/openerp-india/msg03333.html

Upvotes: 1

simahawk
simahawk

Reputation: 2431

You have to use an onchange to set the domain dynamically. Look at this.

Upvotes: 1

Related Questions