Skip to Content
Menu
This question has been flagged
2 Replies
1328 Views

I have an example field within res.partner that is a simple selection of two choices: "Brick&Mortar" or "Online"

if the choice is "Online" then another field [ URL ] should be accessible to have the online store link entered.

If the choice is "Brick&Mortar" then the [ URL ] field should be greyed out, not allowing input

How do I go about setting up the field URL to reach this affect? Related, Dependencies, Compute?

A push in the right direction or explanation is appreciated.

d

Avatar
Discard
Best Answer

Hi Damon:

You can make the url field conditionally read only like so.

<field name="url_field" attrs="{'readonly': [('brick_and_mortar_field', '=', 'code_of_brick_and_mortar')]}"/>

You will need to replace the bold parts with the actual field name and code that you have.

Avatar
Discard
Author Best Answer

Another way to describe this is like Sugar CRM calls Dependent Drop Downs

Avatar
Discard