Odoo Help

0

domain from two conditions

By
Ayesha
on 1/12/18, 8:26 AM 222 views

I made a new module named "sites" and then added it to sale order line.

now I made another module "job_order" and "job_order_line",  job_order has sale.order and job_order_line contain sites  now i want to apply domain on sites (the one present in master SO but not already selected in job order line i.e self) when i return domain in on change function it is working fine but when customer edits previously added site domain doesn't apply because no on change is executed is there any way i can apply default domain i.e in fields.Many2one(site.site', domain= ?..

return {'domain': {'name': [('id', 'in', (self.order_id.order_id.order_line.mapped('site_id') - self.order_id.line_id.mapped('name')).ids)]}}

self(job order line)
order_id (Job order master)
order_id (Sale order)
order_line( sale order line).mapped('site_id')

self(job order line).
order_id(job order).
line_id(job order line).mapped('name')(site_ids)


About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)

Stats

Asked: 1/12/18, 8:26 AM
Seen: 222 times
Last updated: 1/12/18, 8:37 AM