我在 python 文件中有两个类(odoo 版本是 12):
class Module_procede(models.Model):
_name = 'moduletest.procede'
pr = fields.Char("firstname", default='???', required=True)
mp = fields.Char("lastname", required=True)
class Module_procede(models.Model):
_name = 'moduletest.prix'
pr_ = fields.Char("firstname", default='???', required=True)
mp_ = fields.Char("lastname", required=True)
如何为字段“pr_”建立关系Many2one,如下所示:
pr = fields.Many2one(pr_)