0

我是 OpenERP 新手,访问对象/记录的属性(字段)时遇到问题:

def fields_view_get(self, cr, uid, view_id=None, view_type='form', context={}, toolbar=False):
    result = super(extended_shipments_wz, self).fields_view_get(cr, uid, view_id, view_type, context=context, toolbar=toolbar)
    shipment_id = self._get_active_id(cr, uid, view_id, context)
    shipment_obj = self.pool.get('stock.picking.in').browse(cr, uid, shipment_id)
   #some more code 
   #shipment_obj.origin, etc... fails
   return result

ship_id 给了我正确的 ID。当我尝试访问任何 shipping_obj 属性(仅用于测试)时,shipping_obj 被返回(非空)它给了我错误:

LINE 1: ...ng.id FROM "stock_picking" WHERE stock_picking.id IN (false)... ^ HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.
4

0 回答 0