0 编辑 关闭 删除 标记 want to make form readonly based on condition 编辑 关闭 删除 标记 odoo 1 一月 2025 退订 订阅 评论 分享 贴子评论 丢弃 2 答案 0 odoo 2 一月 2025 最佳答案 ADD ATTR READONLY TO YOUR XML FILE <sheet> <field name="state"/> <field name="fields" attrs="{'readonly': [('state', '!=', 'nil')]}"/></sheet> 备注 分享 贴子评论 丢弃 0 odoo 1 一月 2025 最佳答案 Hi,You have to add readonly condition to every node/fields in the form, you cannot generically add it to sheet tag.Either you can apply to all fields directly or using python methods, you can do it.Thanks 备注 分享 1 备注 贴子评论 丢弃 odoo - 5 一月 2025 删除 转换为答案 yes bro, This worked