我是Openerp的学习者,这可能是基本问题。
以下是我的代码:
def add_slab_info(self, cr, uid, ids, context={}):
sqty=2
for qty in range(0,sqty):
area = (length) * (width)
Self.pool.get(object).create(cr, uid, {'product_id':value.product_id.id,
'sno':no,'length':length,'width':width,'price':price,
'area':area,
})
self.pool.get('purchase.order.line').write(cr,uid,record_id,
'product_qty': sum(area),
'product_field':product})
如果sqty=2,则创建2条线
^{pr2}$我要求面积之和。有人能帮我吗?在
你可以试试这个。希望这会有帮助
相关问题 更多 >
编程相关推荐