Dynamic Domain With Studio

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

US$ 1,00 1.0 USD US$ 1,00 Chưa gồm thuế GTGT

US$ 1,00 Chưa gồm thuế GTGT

Not Available For Sale

Sự kết hợp này không tồn tại.

Điều khoản và điều kiện
Hoàn tiền trong 30 ngày
Giao hàng: Từ 2 tới 3 ngày làm việc

Dynamic Domain With Studio

US$ 1,00 1.0 USD US$ 1,00 Chưa gồm thuế GTGT

US$ 1,00 Chưa gồm thuế GTGT

Not Available For Sale

Sự kết hợp này không tồn tại.

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.