[MIGR] stock: stock_picking
Picking models are migrated to new API. No change is performed to code structure or functional structure. Some code cleaning may be performed when migrating to simplify the code. Other files may be updated due to the move towards the new API.
This commit is contained in:
@@ -98,6 +98,7 @@ class StockPicking(models.Model):
|
||||
|
||||
@api.multi
|
||||
def do_transfer(self):
|
||||
# TDE FIXME: should work in batch
|
||||
self.ensure_one()
|
||||
res = super(StockPicking, self).do_transfer()
|
||||
|
||||
@@ -111,6 +112,7 @@ class StockPicking(models.Model):
|
||||
|
||||
@api.multi
|
||||
def put_in_pack(self):
|
||||
# TDE FIXME: work in batch, please
|
||||
self.ensure_one()
|
||||
package_id = super(StockPicking, self).put_in_pack()
|
||||
package = self.env['stock.quant.package'].browse(package_id)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -309,7 +309,7 @@ class TestStockFlow(TestStockCommon):
|
||||
|
||||
# Confirm back order of incoming shipment.
|
||||
back_order_in.action_confirm()
|
||||
self.assertEqual(back_order_in.state, 'assigned', 'Wrong state of incoming shipment back order.')
|
||||
self.assertEqual(back_order_in.state, 'assigned', 'Wrong state of incoming shipment back order: %s instead of %s' % (back_order_in.state, 'assigned'))
|
||||
for move in back_order_in.move_lines:
|
||||
self.assertEqual(move.state, 'assigned', 'Wrong state of move line.')
|
||||
|
||||
@@ -917,7 +917,7 @@ class TestStockFlow(TestStockCommon):
|
||||
#-----------------------------------------------------------------------
|
||||
|
||||
# Check incoming shipment state.
|
||||
self.assertEqual(picking_in.state, 'done', 'Incoming shipment state should be done.')
|
||||
self.assertEqual(picking_in.state, 'done', 'Incoming shipment state: %s instead of %s' % (picking_in.state, 'done'))
|
||||
# Check incoming shipment move lines state.
|
||||
for move in picking_in.move_lines:
|
||||
self.assertEqual(move.state, 'done', 'Wrong state of move lines.')
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
<field name="name"/>
|
||||
<field name="sequence_id"/>
|
||||
<field name="warehouse_id"/>
|
||||
<field name="code" on_change="onchange_picking_code(code)"/>
|
||||
<field name="code"/>
|
||||
<field name="return_picking_type_id"/>
|
||||
<field name="default_location_src_id" attrs="{'required': [('code', '=', 'internal')]}"/>
|
||||
<field name="default_location_dest_id" attrs="{'required': [('code', 'in', ('internal', 'incoming'))]}"/>
|
||||
@@ -121,7 +121,7 @@
|
||||
name="Dashboard"/>
|
||||
|
||||
<menuitem id="menu_pickingtype" name="Operations Types" parent="stock.menu_warehouse_config" action="action_picking_type_list" sequence="4" groups="stock.group_stock_multi_locations"/>
|
||||
|
||||
|
||||
<record model="ir.ui.view" id="stock_picking_calendar">
|
||||
<field name="name">stock.picking.calendar</field>
|
||||
<field name="model">stock.picking</field>
|
||||
@@ -222,7 +222,7 @@
|
||||
</h1>
|
||||
<group>
|
||||
<group>
|
||||
<field name="partner_id" attrs="{'invisible': [('picking_type_code', '=', 'internal')]}" on_change="onchange_picking_type(picking_type_id,partner_id)"/>
|
||||
<field name="partner_id" attrs="{'invisible': [('picking_type_code', '=', 'internal')]}"/>
|
||||
<field name="location_id" groups="stock.group_stock_multi_locations" attrs="{'invisible': [('picking_type_code', '=', 'incoming')]}"/>
|
||||
<field name="location_dest_id" groups="stock.group_stock_multi_locations" attrs="{'invisible': [('picking_type_code', '=', 'outgoing')]}"/>
|
||||
<field name="backorder_id" readonly="1" attrs="{'invisible': [('backorder_id','=',False)]}"/>
|
||||
@@ -367,7 +367,7 @@
|
||||
<group>
|
||||
<group>
|
||||
<field name="move_type"/>
|
||||
<field name="picking_type_id" on_change="onchange_picking_type(picking_type_id,partner_id)"/>
|
||||
<field name="picking_type_id"/>
|
||||
<field name="picking_type_code" invisible="1"/>
|
||||
<field name="quant_reserved_exist" invisible="1"/>
|
||||
</group>
|
||||
|
||||
Reference in New Issue
Block a user