我使用委托从自定义模块中的sale_order继承字段:
class EXAMPLE(osv.osv):
_name = 'EXAMPLECLASS'
_inherits = {
'sale.order': 'sale_order_id'}
我使用sale_order的标准视图。一切正常,我可以在sale_order中添加和更新order_lines。但是,当我尝试从sale_order删除order_line时,我收到以下错误:
Integrity Error
The operation cannot be completed, probably due to the following:
- deletion: you may be trying to delete a record while other records still reference it
- creation/update: a mandatory field is not correctly set
[object with reference: order_id - order.id]
我错过了什么?我认为这与“' _inherits'只继承字段而不是方法。
非常感谢任何有关此事的帮助。