diff --git a/addons/mrp/stock.py b/addons/mrp/stock.py
index 59b41e71c90..1863959882e 100644
--- a/addons/mrp/stock.py
+++ b/addons/mrp/stock.py
@@ -259,11 +259,12 @@ class stock_warehouse(osv.osv):
all_routes += [warehouse.manufacture_pull_id.route_id.id]
return all_routes
- def _handle_renaming(self, cr, uid, warehouse, name, context=None):
- res = super(stock_warehouse, self)._handle_renaming(cr, uid, warehouse, name, context=context)
+ def _handle_renaming(self, cr, uid, warehouse, name, code, context=None):
+ res = super(stock_warehouse, self)._handle_renaming(cr, uid, warehouse, name, code, context=context)
pull_obj = self.pool.get('procurement.rule')
#change the manufacture pull rule name
- pull_obj.write(cr, uid, warehouse.manufacture_pull_id.id, {'name': warehouse.manufacture_pull_id.name.replace(warehouse.name, name, 1)}, context=context)
+ if warehouse.manufacture_pull_id:
+ pull_obj.write(cr, uid, warehouse.manufacture_pull_id.id, {'name': warehouse.manufacture_pull_id.name.replace(warehouse.name, name, 1)}, context=context)
return res
def _get_all_products_to_resupply(self, cr, uid, warehouse, context=None):
diff --git a/addons/product/product.py b/addons/product/product.py
index 2bb6dfe8c5e..9169ec99ead 100644
--- a/addons/product/product.py
+++ b/addons/product/product.py
@@ -130,7 +130,7 @@ class product_uom(osv.osv):
_order = "name"
_columns = {
'name': fields.char('Unit of Measure', required=True, translate=True),
- 'category_id': fields.many2one('product.uom.categ', 'Category', required=True, ondelete='cascade',
+ 'category_id': fields.many2one('product.uom.categ', 'Product Category', required=True, ondelete='cascade',
help="Conversion between Units of Measure can only occur if they belong to the same category. The conversion will be made based on the ratios."),
'factor': fields.float('Ratio', required=True,digits=(12, 12),
help='How much bigger or smaller this unit is compared to the reference Unit of Measure for this category:\n'\
@@ -578,7 +578,7 @@ class product_product(osv.osv):
if context is None:
context = {}
product = self.browse(cr, uid, product_id, context=context)
- date = context.get('history_date', time.strftime('%Y-%m-%d %H:%M:%s'))
+ date = context.get('history_date', time.strftime('%Y-%m-%d %H:%M:%S'))
prices_history_obj = self.pool.get('prices.history')
history_ids = prices_history_obj.search(cr, uid, [('company_id', '=', company_id), ('product_template_id', '=', product.product_tmpl_id.id), ('datetime', '<=', date)], limit=1)
if history_ids:
diff --git a/addons/purchase/stock.py b/addons/purchase/stock.py
index 06b484ec149..f0adb7b2afc 100644
--- a/addons/purchase/stock.py
+++ b/addons/purchase/stock.py
@@ -148,11 +148,12 @@ class stock_warehouse(osv.osv):
break
return res
- def _handle_renaming(self, cr, uid, warehouse, name, context=None):
- res = super(stock_warehouse, self)._handle_renaming(cr, uid, warehouse, name, context=context)
+ def _handle_renaming(self, cr, uid, warehouse, name, code, context=None):
+ res = super(stock_warehouse, self)._handle_renaming(cr, uid, warehouse, name, code, context=context)
pull_obj = self.pool.get('procurement.rule')
#change the buy pull rule name
- pull_obj.write(cr, uid, warehouse.buy_pull_id.id, {'name': warehouse.buy_pull_id.name.replace(warehouse.name, name, 1)}, context=context)
+ if warehouse.buy_pull_id:
+ pull_obj.write(cr, uid, warehouse.buy_pull_id.id, {'name': warehouse.buy_pull_id.name.replace(warehouse.name, name, 1)}, context=context)
return res
def change_route(self, cr, uid, ids, warehouse, new_reception_step=False, new_delivery_step=False, context=None):
diff --git a/addons/sale_stock/stock_view.xml b/addons/sale_stock/stock_view.xml
index 9d03ecd3e57..2c7c80ba25f 100644
--- a/addons/sale_stock/stock_view.xml
+++ b/addons/sale_stock/stock_view.xml
@@ -30,17 +30,6 @@
-
- stock.location.route.tree.inherit
-
- stock.location.route
-
-
-
-
-
-
-
diff --git a/addons/stock/stock.py b/addons/stock/stock.py
index 5e409242f50..20a6d8b1622 100644
--- a/addons/stock/stock.py
+++ b/addons/stock/stock.py
@@ -82,6 +82,19 @@ class stock_location(osv.osv):
context_with_inactive['active_test'] = False
return self.search(cr, uid, [('id', 'child_of', ids)], context=context_with_inactive)
+ def _name_get(self, cr, uid, location, context=None):
+ name = location.name
+ while location.location_id and location.usage != 'view':
+ location = location.location_id
+ name = location.name + '/' + name
+ return name
+
+ def name_get(self, cr, uid, ids, context=None):
+ res = []
+ for location in self.browse(cr, uid, ids, context=context):
+ res.append((location.id, self._name_get(cr, uid, location, context=context)))
+ return res
+
_columns = {
'name': fields.char('Location Name', size=64, required=True, translate=True),
'active': fields.boolean('Active', help="By unchecking the active field, you may hide a location without deleting it."),
@@ -2398,7 +2411,7 @@ class stock_warehouse(osv.osv):
_description = "Warehouse"
_columns = {
- 'name': fields.char('Name', size=128, required=True, select=True),
+ 'name': fields.char('Warehouse Name', size=128, required=True, select=True),
'company_id': fields.many2one('res.company', 'Company', required=True, select=True),
'partner_id': fields.many2one('res.partner', 'Address'),
'view_location_id': fields.many2one('stock.location', 'View Location', required=True, domain=[('usage', '=', 'view')]),
@@ -2756,7 +2769,7 @@ class stock_warehouse(osv.osv):
#create view location for warehouse
wh_loc_id = location_obj.create(cr, uid, {
- 'name': _(vals.get('name')),
+ 'name': _(vals.get('code')),
'usage': 'view',
'location_id': data_obj.get_object_reference(cr, uid, 'stock', 'stock_location_locations')[1]
}, context=context)
@@ -2913,14 +2926,14 @@ class stock_warehouse(osv.osv):
'pick_pack_ship': (_('Pick + Pack + Ship'), [(warehouse.lot_stock_id, warehouse.wh_pack_stock_loc_id, warehouse.pick_type_id.id), (warehouse.wh_pack_stock_loc_id, warehouse.wh_output_stock_loc_id, warehouse.pack_type_id.id), (warehouse.wh_output_stock_loc_id, customer_loc, warehouse.out_type_id.id)]),
}
- def _handle_renaming(self, cr, uid, warehouse, name, context=None):
+ def _handle_renaming(self, cr, uid, warehouse, name, code, context=None):
location_obj = self.pool.get('stock.location')
route_obj = self.pool.get('stock.location.route')
pull_obj = self.pool.get('procurement.rule')
push_obj = self.pool.get('stock.location.path')
#rename location
location_id = warehouse.lot_stock_id.location_id.id
- location_obj.write(cr, uid, location_id, {'name': name}, context=context)
+ location_obj.write(cr, uid, location_id, {'name': code}, context=context)
#rename route and push-pull rules
for route in warehouse.route_ids:
route_obj.write(cr, uid, route.id, {'name': route.name.replace(warehouse.name, name, 1)}, context=context)
@@ -2948,12 +2961,13 @@ class stock_warehouse(osv.osv):
self.switch_location(cr, uid, warehouse.id, warehouse, vals.get('reception_steps', False), vals.get('delivery_steps', False), context=context)
# switch between route
self.change_route(cr, uid, ids, warehouse, vals.get('reception_steps', False), vals.get('delivery_steps', False), context=context_with_inactive)
+ warehouse.refresh()
if vals.get('code') or vals.get('name'):
name = warehouse.name
#rename sequence
if vals.get('name'):
- name = vals.get('name')
- self._handle_renaming(cr, uid, warehouse, name, context=context_with_inactive)
+ name = vals.get('name', warehouse.name)
+ self._handle_renaming(cr, uid, warehouse, name, vals.get('code', warehouse.code), context=context_with_inactive)
seq_obj.write(cr, uid, warehouse.in_type_id.sequence_id.id, {'name': name + _(' Sequence in'), 'prefix': vals.get('code', warehouse.code) + '\IN\\'}, context=context)
seq_obj.write(cr, uid, warehouse.out_type_id.sequence_id.id, {'name': name + _(' Sequence out'), 'prefix': vals.get('code', warehouse.code) + '\OUT\\'}, context=context)
seq_obj.write(cr, uid, warehouse.pack_type_id.sequence_id.id, {'name': name + _(' Sequence packing'), 'prefix': vals.get('code', warehouse.code) + '\PACK\\'}, context=context)
@@ -3773,7 +3787,7 @@ class stock_picking_type(osv.osv):
return res and res[0] or False
_columns = {
- 'name': fields.char('Name', translate=True, required=True),
+ 'name': fields.char('Picking Type Name', translate=True, required=True),
'complete_name': fields.function(_get_name, type='char', string='Name'),
'auto_force_assign': fields.boolean('Automatic Availability', help='This picking type does\'t need to check for the availability in source location.'),
'color': fields.integer('Color'),
diff --git a/addons/stock/stock_view.xml b/addons/stock/stock_view.xml
index 208907a262a..e693c85ea85 100644
--- a/addons/stock/stock_view.xml
+++ b/addons/stock/stock_view.xml
@@ -585,16 +585,6 @@
-
- stock.location.tree
- stock.location
- child_ids
-
-
-
-
-
- {'product_id': active_id}Stock by Location
@@ -605,29 +595,6 @@
Movesstock.move
-
- Inventory by Location
- stock.location
- ir.actions.act_window
- [('location_id','=',False)]
- tree
-
-
-
- Click to add a location.
-
- This is the structure of your company's warehouses and
- locations. You can click on a location to get the list of the
- products and their stock level in this particular location and
- all its children.
-
-
-
-
stock.warehouse
@@ -816,11 +783,10 @@
-
+
-
@@ -828,6 +794,7 @@
+
@@ -1016,6 +983,18 @@
+
+ stock.move.graph
+ stock.move
+
+
+
+
+
+
+
+
+
stock.move.treestock.move
@@ -1254,6 +1233,13 @@
+
+
+ graph
+
+
+
+
@@ -2069,9 +2055,6 @@
-
-
-
@@ -2090,10 +2073,10 @@
-
+
-
+
diff --git a/addons/stock/wizard/stock_move_view.xml b/addons/stock/wizard/stock_move_view.xml
index 8c90b27960f..583cf952c84 100644
--- a/addons/stock/wizard/stock_move_view.xml
+++ b/addons/stock/wizard/stock_move_view.xml
@@ -7,8 +7,7 @@
Scrap Movestock.move.scrap
-
+
+
+ Current Inventory Valuation
+ stock.history
+ ir.actions.act_window
+ [('date','<=',time.strftime('%Y-%m-%d %H:%M:%S'))]
+ form
+ tree,graph
+
+
+
diff --git a/addons/stock_picking_wave/stock_picking_wave.py b/addons/stock_picking_wave/stock_picking_wave.py
index fa70f61c3bd..c5e3377b023 100644
--- a/addons/stock_picking_wave/stock_picking_wave.py
+++ b/addons/stock_picking_wave/stock_picking_wave.py
@@ -6,13 +6,10 @@ class stock_picking_wave(osv.osv):
_name = "stock.picking.wave"
_order = "name desc"
_columns = {
- 'name': fields.char('name', required=True, help='Name of the picking wave'),
+ 'name': fields.char('Picking Wave Name', required=True, help='Name of the picking wave'),
'user_id': fields.many2one('res.users', 'Responsible', help='Person responsible for this wave'),
- 'time': fields.float('Time', help='Time it will take to perform the wave'),
'picking_ids': fields.one2many('stock.picking', 'wave_id', 'Pickings', help='List of picking associated to this wave'),
- 'capacity': fields.float('Capacity', help='The capacity of the transport used to get the goods'),
- 'capacity_uom': fields.many2one('product.uom', 'Unit of Measure', help='The Unity Of Measure of the transport capacity'),
- 'state': fields.selection([('draft', 'Draft'), ('in_progress', 'Running'), ('done', 'Done'), ('cancel', 'Cancelled')], required=True),
+ 'state': fields.selection([('draft', 'Draft'), ('in_progress', 'Running'), ('done', 'Done'), ('cancel', 'Cancelled')], string="State", required=True),
}
_defaults = {
diff --git a/addons/stock_picking_wave/stock_picking_wave_demo.xml b/addons/stock_picking_wave/stock_picking_wave_demo.xml
index 0ef026422ec..890adf104f6 100644
--- a/addons/stock_picking_wave/stock_picking_wave_demo.xml
+++ b/addons/stock_picking_wave/stock_picking_wave_demo.xml
@@ -6,15 +6,11 @@
-->
Picking Dry for John
- 15
- in_progressPicking Freeze for Mickael
- 600
- in_progress
diff --git a/addons/stock_picking_wave/stock_picking_wave_view.xml b/addons/stock_picking_wave/stock_picking_wave_view.xml
index c6f920e01d2..450232603e1 100644
--- a/addons/stock_picking_wave/stock_picking_wave_view.xml
+++ b/addons/stock_picking_wave/stock_picking_wave_view.xml
@@ -21,17 +21,7 @@
-
-
-
-
-
-