Hey so in our contract module we have a 'Contract Type' many2one field which references the account.analytic.group. Within that model there is a many2many field for selecing accepted SLA types (Service Level Agreement).
Now the issue im having is lets say the 'Contract Type' is set to 'Hardware Sales'
I need the SLA column on my contract lines to only show the values that are in the many2many field in the group.
I have used context and passed the Contract type through to the contract lines model so when they add a new line it knows what account.analytic.group it is. But now i cant actually put a domain on my SLA field to only show the ones in the group.
Ive tried everything i can think of, any help will be appreciated. Thanks (:
Edit: Ive tried doing a domain of [('id','in',x_group_id.x_assigned_sla)]
But this hasnt worked.
My Structure:
account.analytic.group (model)
x_accepted_sla (many2many) rel: x_sla_type
account.analytic.account (model)
group_id (many2one) rel: account.analytic.group
account.analytic.invoice.line (model)
x_group_id (many2one) context(Pulled from parent group_id)
x_sla (many2one) rel: x_sla_type <!-- This is what needs to be filtered based on the selection in the account.analytic.group -->