继承采购订单并创建新对象

Inherit purchase order and create new object

Blockquote

我继承了 _inherit='purchase.order,并创建了名称为 _name='job.order' 的新对象并使用了它的视图,但是当我要保存它时在图片中显示错误(odoo 警告) .

使用 _inherits 而不是 _inherit 这样您将创建新对象,其中包含所有字段 'purchase.order 加上您在模型中声明的不会影响原始模型的新字段。

for reference check res.user model in base module