0
將銷售訂單項中的值寫入銷售訂單項我想在銷售訂單項中使用按鈕將值添加到銷售訂單項中時我在下面提到的代碼中收到錯誤預期單件:sale.order.line (41,42)如何使用按鈕
def writes(self, cr, uid, ids, context=None):
sale_order_obj = self.browse(cr, uid, ids, context=context)
sale_order_line_obj = self.pool.get('sale.order.line')
sale_obj=sale_order_obj.order_line
for line in sale_obj:
sale_order_line_obj.write(cr, uid, line.id, {'ship': sale_obj.ship.id}, context=context)