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.
我们如何更改@api.depends方法中的状态值?我尝试了 但没有工作然后工作 但立即,我们必须返回列表视图或重新加载页面以查看新状态return {'value':{'stat':'done'}}self.state='done'self.browse(self.id).write({'state':'done' })
return {'value':{'stat':'done'}}
self.state='done'
self.browse(self.id).write({'state':'done' })
你的问题可以用这个来解决。
@api.onchange('your_field') def your_method_name(self): self.state='done' return { 'type': 'ir.actions.client', 'tag': 'reload', }