在odoo的create函数中添加逻辑

odoo的create函数比较特殊,在其中,self并没有被传入进来,需要使用res来代替其它自定义函数中self的功能。

    @api.model
    def create(self, vals):
        res = super().create(vals)
        print(res.variable) #而不是self.variable

猜你喜欢

转载自blog.csdn.net/figosoar/article/details/114322619