[MERGE]merge with latest trunk-wms
authorCedric Snauwaert <csn@openerp.com>
Mon, 24 Mar 2014 10:55:38 +0000 (11:55 +0100)
committerCedric Snauwaert <csn@openerp.com>
Mon, 24 Mar 2014 10:55:38 +0000 (11:55 +0100)
bzr revid: csn@openerp.com-20140324105538-z2i6ieo57vk67eu0

1  2 
addons/stock/__openerp__.py
addons/stock/stock.py
addons/stock/stock_view.xml

Simple merge
@@@ -3522,9 -3509,8 +3550,9 @@@ class stock_pack_operation(osv.osv)
          'currency': fields.many2one('res.currency', string="Currency", help="Currency in which Unit cost is expressed", ondelete='CASCADE'),
          'linked_move_operation_ids': fields.one2many('stock.move.operation.link', 'operation_id', string='Linked Moves', readonly=True, help='Moves impacted by this operation for the computation of the remaining quantities'),
          'remaining_qty': fields.function(_get_remaining_qty, type='float', string='Remaining Qty'),
-         'location_id': fields.many2one('stock.location', 'Location From'),
-         'location_dest_id': fields.many2one('stock.location', 'Location To'),
+         'location_id': fields.many2one('stock.location', 'Location From', required=True),
+         'location_dest_id': fields.many2one('stock.location', 'Location To', required=True),
 +        'processed': fields.selection([('true','Yes'), ('false','No')],'Has been processed?', required=True),
      }
  
      _defaults = {
                                      <button name="recheck_availability" string="Recheck Availability" type="object" attrs="{'invisible': ['|',('pack_operation_exist', '=', False),('state','not in',('assigned', 'partially_available'))]}" groups="stock.group_stock_user" class="oe_link oe_right oe_inline"/>
                                  </group>
                              </group>
-                             <field name="pack_operation_ids" attrs="{'invisible': [('pack_operation_exist', '=', False)]}" context="{'default_owner_id': owner_id}">
+                             <field name="pack_operation_ids" attrs="{'invisible': [('pack_operation_exist', '=', False)]}" context="{'default_owner_id': owner_id, 'default_location_id': location_id, 'default_location_dest_id': location_dest_id}">
 -                                <tree editable="top">   
 +                                <tree editable="top" colors="grey:processed=='true'">
 +                                    <field name="processed" invisible="1"/>   
                                      <field name="location_id"/>
                                      <field name="product_id" on_change='product_id_change(product_id, product_uom_id, product_qty, context)'/>
                                      <field name="product_uom_id" groups="product.group_uom" on_change='on_change_tests(product_id, product_uom_id, product_qty, context)'/>