Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
7604 Widoki

These are the states, I just found in model. How can I change this in accordance with odoo17.

1)states={'draft': [('readonly', False)]}

2)states={'done': [('readonly', True)], 'post': [('readonly', True)]}

3) date = fields.Date(states={'done': [('readonly', True)]}, default=fields.Date.context_today, string="Trip Date")

4)states={'done': [('readonly', True)], 'approved': [('readonly', True)], 'reported': [('readonly', True)]}

Awatar
Odrzuć
Najlepsza odpowiedź

Hi

Try this in xml.


 1.readonly="state not in ['draft']"

2.readonly="state in ['done', 'post']"

3.readonly="state in ['done']"

4.readonly="state not in ['done', 'approved','reported']"


Hope it helps

Awatar
Odrzuć

How Odoo implemented this in sale order model?