无法访问属性openERP

时间:2013-10-25 13:20:15

标签: openerp

我是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

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

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.

0 个答案:

没有答案