How to override create,write,unlink method in Odoo v8
2014-12-01 10:59
267 查看
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.
if you want override write method ,you are not supposed to use write method,using multi decorator instead.
the same with unlink:
Let see it.
if you want override create method you have to use the model decorator.
@api.model def create(self,values): ............
if you want override write method ,you are not supposed to use write method,using multi decorator instead.
@api.multi def write(self,values): ......................
the same with unlink:
@api.multi def unlink(self): ..............
相关文章推荐
- Linux tip - How to create a file and write by script?
- How to create cab package for wm5/wm6
- how to create workflow diagram via vosio
- How to write custom static code analysis rules and integrate them into Visual Studio 2010
- how to use writeUTF & writeUTFBytes
- How to create and delete a SharePoint site by web application
- How to create a resizeable dialog box with scroll bars in Visual C++
- Makefile新手入门:How to write Makefile
- How to write comment in PowerShell Script
- How to create a Maven web app and deploy to Tomcat - fast
- how to write shell scripts
- How to Create Modifiers Using the API QP_MODIFIERS_PUB.PROCESS_MODIFIERS
- 在本地计算机无法启动mysql服务 错误1067:进程意外中止 日志错误:MySQL: Can't create/write to file 'D:\\mysql\Data\admin.pid' (Errcode: 13)
- How to write a good tech blog
- How to write a controller( from 3ds max sdk 9 )
- No write since last change (add ! to override)
- How to create svn database on the ubuntu
- How to create XML validator from XML schema?
- How to create VO s and VLs dynamically in OAF
- How to Write a Linux usb module