diff --git a/addons/stock/report/report_stock_move_view.xml b/addons/stock/report/report_stock_move_view.xml
index 2949f53b117..4f320ab58a9 100644
--- a/addons/stock/report/report_stock_move_view.xml
+++ b/addons/stock/report/report_stock_move_view.xml
@@ -141,7 +141,7 @@
formtree,graph
- {'full':'1','contact_display': 'partner','search_default_done':1,'search_default_year':1, 'search_default_month':1, 'search_default_group_type':1, 'group_by': [], 'group_by_no_leaf':1,}
+ {'contact_display': 'partner','search_default_done':1,'search_default_year':1, 'search_default_month':1, 'search_default_group_type':1, 'group_by': [], 'group_by_no_leaf':1,}Moves Analysis allows you to easily check and analyse your company stock moves. Use this report when you want to analyse the different routes taken by your products and inventory management performance.
diff --git a/addons/stock/stock.py b/addons/stock/stock.py
index 6acde78f419..e9928eb0aa7 100644
--- a/addons/stock/stock.py
+++ b/addons/stock/stock.py
@@ -74,35 +74,22 @@ class stock_location(osv.osv):
_order = 'parent_left'
def name_get(self, cr, uid, ids, context=None):
- res = []
- if context is None:
- context = {}
- if not len(ids):
- return []
- reads = self.read(cr, uid, ids, ['name','location_id'], context=context)
- for record in reads:
- name = record['name']
- if context.get('full',False):
- if record['location_id']:
- name = record['location_id'][1] + ' / ' + name
- res.append((record['id'], name))
- else:
- res.append((record['id'], name))
- return res
+ # always return the full hierarchical name
+ res = self._complete_name(cr, uid, ids, 'complete_name', None, context=context)
+ return res.items()
def _complete_name(self, cr, uid, ids, name, args, context=None):
""" Forms complete name of location from parent location to child location.
@return: Dictionary of values
"""
- def _get_one_full_name(location, level=4):
- if location.location_id:
- parent_path = _get_one_full_name(location.location_id, level-1) + "/"
- else:
- parent_path = ''
- return parent_path + location.name
res = {}
for m in self.browse(cr, uid, ids, context=context):
- res[m.id] = _get_one_full_name(m)
+ names = [m.name]
+ parent = m.location_id
+ while parent:
+ names.append(parent.name)
+ parent = parent.location_id
+ res[m.id] = ' / '.join(reversed(names))
return res
diff --git a/addons/stock/stock_view.xml b/addons/stock/stock_view.xml
index f4409cd90b4..4ed57da90a5 100644
--- a/addons/stock/stock_view.xml
+++ b/addons/stock/stock_view.xml
@@ -186,7 +186,6 @@
stock.inventoryform
- {'full':'1'}Periodical Inventories are used to count the number of products available per location. You can use it once a year when you do the general inventory or whenever you need it, to correct the current stock level of a product.
@@ -330,8 +329,8 @@
-
-
+
+
@@ -407,7 +406,7 @@
form
- {'full':'1',"search_default_available":1}
+ {"search_default_available":1}This is the list of all the production lots (serial numbers) you recorded. When you select a lot, you can get the upstream or downstream traceability of the products contained in lot. By default, the list is filtred on the serial numbers that are available in your warehouse but you can uncheck the 'Available' button to get all the lots you produced, received or delivered to customers.