59
58
inherited_sale_order()
61
class sale_order_line(osv.osv):
63
def product_id_change(self, cr, uid, ids, pricelist, product, qty=0,
64
uom=False, qty_uos=0, uos=False, name='', partner_id=False,
65
lang=False, update_tax=True, date_order=False, packaging=False, fiscal_position=False, flag=False,context=None):
68
product_obj = self.pool.get('product.product')
69
res = super(sale_order_line,self).product_id_change(cr, uid, ids, pricelist, product, qty=qty,
70
uom=uom, qty_uos=qty_uos, uos=uos, name=name, partner_id=partner_id,
71
lang=lang, update_tax=update_tax, date_order=date_order, packaging=packaging, fiscal_position=fiscal_position, flag=flag)
73
future_stock = product and self.pool.get('stock.move').search(cr,uid,[('product_id','=',product),
74
('state','in',('assigned','confirmed','waiting')),
75
('picking_id.type','=','in')],context=context)
76
future_stock and res.get('value',False) and res.get('value',False).update({'stock_move_ids':future_stock })
81
_inherit = 'sale.order.line'
83
'stock_move_ids':fields.one2many('stock.move','id_sale','Future Stock',readonly=True,help="Stock move future to reference of salesman for knowing that product is available"),