0

我构建了一个增加供应商发票库存的模块。在开发服务器上工作正常,但是当我在工作服务器上双关时出现此错误。我该如何纠正这个错误?

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: Purchase Order Line - purchase.order.line] 
4

1 回答 1

0

OpenERP上的完整性错误有两种可能(在错误描述中提到):

  • 创建或更新记录时,未正确设置或未填写必填字段。什么领域?您对象中的一个字段(提到)。在您的情况下:purchase.order.line。
  • 当您删除一条记录时,您要删除的记录被另一条记录使用,并从 python 代码中设置为必填字段(必填)。

我的猜测是,如果您在创建/更新记录(采购订单)时遇到错误,则可能是您创建/更新了订单行,但订单行中的必填字段之一为空。

于 2013-11-06T14:31:47.007 回答