Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否可以从一个 xml 继承并更改其可更新性。我尝试继承“检查操作规则”以将“interval_number”从 4 小时更改为 1 小时。使其每小时运行一次。我不认为它可能因为 noupdate="1" 起作用。有人对此有任何想法吗?
是的,您可以借助 hook 更改 noupdate 文件。在数据旁边的清单文件中添加'post_init_hook': 'post_init_hook',
'post_init_hook': 'post_init_hook',
创建 hooks.py 文件
def post_init_hook(cr, registry): env = api.Environment(cr, SUPERUSER_ID, {}) orginalxml=env.ref('module.external id') orginalxml.write({'field_name_to_inherit':value, })