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 不含税

US$ 1.00 不含税

Not Available For Sale

此组合不存在。

条款和条件
30天退款保证
运输:2-3 个工作日

Dynamic Domain With Studio

US$ 1.00 1.0 USD US$ 1.00 不含税

US$ 1.00 不含税

Not Available For Sale

此组合不存在。

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.