Dynamic Domain With Studio

https://falinwa.odoo.com/web/image/product.template/6214/image_1920?unique=2f253cc

US$ 1.00 1.0 USD US$ 1.00 VAT Excluded

US$ 1.00 VAT Excluded

Not Available For Sale

This combination does not exist.

Terms and Conditions
30-day money-back guarantee
Shipping: 2-3 Business Days

Dynamic Domain With Studio

US$ 1.00 1.0 USD US$ 1.00 VAT Excluded

US$ 1.00 VAT Excluded

Not Available For Sale

This combination does not exist.

STORY BEHIND THE FEATURES

ODOO BEHAVIOUR

Odoo Studio allow adding domain to field but it is not dynamic.


CLUEDOO BEHAVIOUR

Cluedoo allows specifying dynamic domain for a field in a view using the value of another field in that view.

By putting a domain as computed in a char field, user can use this field as a domain  for target field.


CLUEDOO RECOMMENDATION

To be installed in 100% of your database.

HOW TO USE MODULE




EXAMPLE


User requirement:

On Contact form, assign only Sales Teams who are responsible of Client's industry.


Technical Requirement:

On Contact form, make field Sales Team (team_id) takes domain from field Industry (industry_id).






Step 1: Create domain field type char with advanced properties as below:


Dependencies: 

industry_id


Compute: 

for record in self:
  industry = record.industry_id
  a = """[["x_studio_many2many_field_czjSL","=",%s]]"""%(industry.id)
  record.write({'x_studio_domain_sales_team_1': str(a)})








Result:










Step 2: Use view to add domain to target field:


1. Make sure developer mode is activated


2. Click on bug icon/ Edit View: Form


3. Go to Inherited Views tab, open Odoo Studio customization view


4. Add field x_studio_domain_sales_team_1 to field team_id's domain.







Result:


Field Sales Team only suggest Teams shares the same industry with Contact.