[FIX]variable name and function typo

bzr revid: csn@openerp.com-20130802142226-mmw62e3hdhp2qzrk
This commit is contained in:
Cedric Snauwaert 2013-08-02 16:22:26 +02:00
parent ca62ba1fa3
commit 4b6024d3f6
3 changed files with 6 additions and 6 deletions

View File

@ -86,5 +86,5 @@ class res_partner(osv.osv):
class stock_picking_wave_type(osv.osv):
_name = 'stock.picking.wave.type'
_columns = {
'name': fields.char('Type'),
'name': fields.char('Type', required=True),
}

View File

@ -27,8 +27,8 @@ class stock_picking_to_wave(osv.osv_memory):
'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
wave = self.browse(cr, uid, ids, context=context)[0].wave_id.id
picking = 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)
wave_id = self.browse(cr, uid, ids, context=context)[0].wave_id.id
picking_ids = context.get('active_ids', False)
return self.pool.get('stock.picking').write(cr, uid, picking_ids, {'wave_id': wave_id})

View File

@ -11,7 +11,7 @@
<separator string="Select a wave"/>
<field name="wave_id" class="oe_inline"/>
<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
<button string="Cancel" class="oe_link" special="cancel"/>
</footer>