I want the status record to be uneditable if state = active, done
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- 회계
- 재고 관리
- PoS
- Project
- MRP
신고된 질문입니다
Hi,
In Odoo 17, to make a field (like status) read-only when the record’s state is either "active" or "done" You can achieve this using the 'readonly' attribute in the XML view, or by using Python logic with @api.depends and readonly=True on the field.
XML
<field name="status" readonly="state in ['active', 'done']"/>
Hope it helps
is this you need for particular users or all users ( not to edit record - only view)
i want to all fields in record to be uneditable
Use the following code in your XML:
field name="state" readonly="state in ['active', 'done']"
관련 게시물 | 답글 | 화면 | 활동 | |
---|---|---|---|---|
|
4
10월 25
|
240 | ||
POS receipt template V19
해결 완료
|
|
2
10월 25
|
328 | |
|
1
10월 25
|
320 | ||
|
1
9월 25
|
335 | ||
|
1
9월 25
|
416 |