[IMP] stock: change labels on warehouse form view.

Change labels for reception and delivery steps as well as the
routes names.

This commit is related to task id 1854693.
This commit is contained in:
Hetashree Chauhan
2018-06-27 11:18:22 +02:00
committed by Simon Lejeune
parent c9ae24b024
commit 91d90599b7
3 changed files with 20 additions and 16 deletions
+11 -11
View File
@@ -36,16 +36,16 @@ class Warehouse(models.Model):
'Routes', domain="[('warehouse_selectable', '=', True)]",
help='Defaults routes through the warehouse')
reception_steps = fields.Selection([
('one_step', 'Receive goods directly in stock (1 step)'),
('two_steps', 'Unload in input location then go to stock (2 steps)'),
('three_steps', 'Unload in input location, go through a quality control before being admitted in stock (3 steps)')],
('one_step', 'Receive goods directly (1 step)'),
('two_steps', 'Receive goods in input and then stock (2 steps)'),
('three_steps', 'Receive goods in input, then quality and then stock (3 steps)')],
'Incoming Shipments', default='one_step', required=True,
help="Default incoming route to follow")
delivery_steps = fields.Selection([
('ship_only', 'Ship directly from stock (Ship only)'),
('pick_ship', 'Bring goods to output location before shipping (Pick + Ship)'),
('pick_pack_ship', 'Make packages into a dedicated location, then bring them to the output location for shipping (Pick + Pack + Ship)')],
'Outgoing Shippings', default='ship_only', required=True,
('ship_only', 'Deliver goods directly (1 step)'),
('pick_ship', 'Send goods in output and then deliver (2 steps)'),
('pick_pack_ship', 'Pack goods, send goods in output and then deliver (3 steps)')],
'Outgoing Shipments', default='ship_only', required=True,
help="Default outgoing route to follow")
wh_input_stock_loc_id = fields.Many2one('stock.location', 'Input Location')
wh_qc_stock_loc_id = fields.Many2one('stock.location', 'Quality Control Location')
@@ -433,10 +433,10 @@ class Warehouse(models.Model):
return customer_loc, supplier_loc
def _get_route_name(self, route_type):
names = {'one_step': _('Receipt in 1 step'), 'two_steps': _('Receipt in 2 steps'),
'three_steps': _('Receipt in 3 steps'), 'crossdock': _('Cross-Dock'),
'ship_only': _('Ship Only'), 'pick_ship': _('Pick + Ship'),
'pick_pack_ship': _('Pick + Pack + Ship')}
names = {'one_step': _('Receive in 1 step (stock)'), 'two_steps': _('Receive in 2 steps (input + stock)'),
'three_steps': _('Receive in 3 steps (input + quality + stock)'), 'crossdock': _('Cross-Dock'),
'ship_only': _('Deliver in 1 step (ship)'), 'pick_ship': _('Deliver in 2 steps (pick + ship)'),
'pick_pack_ship': _('Deliver in 3 steps (pick + pack + ship)')}
return names[route_type]
def get_routes_dict(self):
+1 -1
View File
@@ -1826,8 +1826,8 @@ class TestRoutes(TestStockCommon):
# create and get back the pick ship route
self.wh.write({'delivery_steps': 'pick_ship'})
self.pick_ship_route = self.wh.route_ids.filtered(lambda r: 'Pick + Ship' in r.name)
self.pick_ship_route = self.wh.route_ids.filtered(lambda r: '(pick + ship)' in r.name)
def test_pick_ship_1(self):
""" Enable the pick ship route, force a procurement group on the
pick. When a second move is added, make sure the `partner_id` and
+8 -4
View File
@@ -31,10 +31,14 @@
<notebook colspan="4" groups="stock.group_adv_location">
<page string="Warehouse Configuration" colspan="4">
<group colspan="4">
<field name="reception_steps" widget='radio'/>
<field name="delivery_steps" widget='radio'/>
<field name="default_resupply_wh_id" widget='selection'/>
<field name="resupply_wh_ids" domain="[('id', '!=', id)]" widget='many2many_checkboxes'/>
<group string="Shipments">
<field name="reception_steps" widget='radio'/>
<field name="delivery_steps" widget='radio'/>
</group>
<group string="Resupply">
<field name="default_resupply_wh_id" widget='selection'/>
<field name="resupply_wh_ids" domain="[('id', '!=', id)]" widget='many2many_checkboxes'/>
</group>
</group>
</page>
<page string="Technical Information" groups='base.group_no_one'>