[FIX]variable name and function typo
bzr revid: csn@openerp.com-20130802142226-mmw62e3hdhp2qzrk
This commit is contained in:
parent
ca62ba1fa3
commit
4b6024d3f6
|
@ -86,5 +86,5 @@ class res_partner(osv.osv):
|
||||||
class stock_picking_wave_type(osv.osv):
|
class stock_picking_wave_type(osv.osv):
|
||||||
_name = 'stock.picking.wave.type'
|
_name = 'stock.picking.wave.type'
|
||||||
_columns = {
|
_columns = {
|
||||||
'name': fields.char('Type'),
|
'name': fields.char('Type', required=True),
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,8 +27,8 @@ class stock_picking_to_wave(osv.osv_memory):
|
||||||
'wave_id': fields.many2one('stock.picking.wave', 'Picking Wave', required=True),
|
'wave_id': fields.many2one('stock.picking.wave', 'Picking Wave', required=True),
|
||||||
}
|
}
|
||||||
|
|
||||||
def merge(self, cr, uid, ids, context=None):
|
def attach_pickings(self, cr, uid, ids, context=None):
|
||||||
#use active_ids to add picking line to the selected wave
|
#use active_ids to add picking line to the selected wave
|
||||||
wave = self.browse(cr, uid, ids, context=context)[0].wave_id.id
|
wave_id = self.browse(cr, uid, ids, context=context)[0].wave_id.id
|
||||||
picking = context.get('active_ids', False)
|
picking_ids = context.get('active_ids', False)
|
||||||
return self.pool.get('stock.picking.wave').write(cr, uid, [wave], {'picking_ids': map(lambda x: (4, x, False), picking)}, context=context)
|
return self.pool.get('stock.picking').write(cr, uid, picking_ids, {'wave_id': wave_id})
|
|
@ -11,7 +11,7 @@
|
||||||
<separator string="Select a wave"/>
|
<separator string="Select a wave"/>
|
||||||
<field name="wave_id" class="oe_inline"/>
|
<field name="wave_id" class="oe_inline"/>
|
||||||
<footer>
|
<footer>
|
||||||
<button name="merge" type="object" string="Add to wave" class="oe_highlight"/>
|
<button name="attach_pickings" type="object" string="Add to wave" class="oe_highlight"/>
|
||||||
or
|
or
|
||||||
<button string="Cancel" class="oe_link" special="cancel"/>
|
<button string="Cancel" class="oe_link" special="cancel"/>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
Loading…
Reference in New Issue