以前问过同样的问题。但它是关于从写函数访问字段。我的问题是调用python函数..
我的代码如下..
@api.multi
def write(self,values):
self.call_fun()//calling python function//
if self.pool['res.users'].has_group(self._cr, self.env.user.id, 'stpi.group_stpi_manager'):
pass
else:
if self.create_uid != self.env.user:
raise Warning('You can not able to edit this document as this is not your record')
return super(book_meeting, self).write(values)
我得到的错误是