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.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):
    ..............

 

相关文章:

  • 2021-12-25
  • 2021-07-19
  • 2021-10-14
  • 2022-02-21
  • 2021-12-26
  • 2022-02-14
  • 2022-12-23
  • 2022-01-08
猜你喜欢
  • 2021-12-12
  • 2021-05-25
  • 2022-12-23
  • 2021-06-26
  • 2021-10-28
  • 2021-11-13
  • 2022-01-15
相关资源
相似解决方案