首页 > 代码库 > How to override create,write,unlink method in Odoo v8
How to override create,write,unlink method in Odoo v8
As we all know, Odoo 8 has new api which is different with v7. So how to override the create,write,unlink orm method in odoo 8 way ?
Let see it.
if you want override create method you have to use the model decorator.
@api.modeldef create(self,values): ............
if you want override write method ,you are not supposed to use write method,using multi decorator instead.
@api.multidef write(self,values): ......................
the same with unlink:
@api.multidef unlink(self): ..............
How to override create,write,unlink method in Odoo v8
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。