From 9b7398820e86506bd77fb3f94d8a74d37a5ee625 Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Wed, 23 Oct 2013 18:32:47 +0200 Subject: [PATCH] [DOC] stock: for the record, rationale for stock.location.complete_name being stored bzr revid: odo@openerp.com-20131023163247-bir34amewsxiby2t --- addons/stock/stock.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index d818ca794d5..af70faeef41 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -159,6 +159,10 @@ class stock_location(osv.osv): \n* Production: Virtual counterpart location for production operations: this location consumes the raw material and produces finished products """, select = True), # temporarily removed, as it's unused: 'allocation_method': fields.selection([('fifo', 'FIFO'), ('lifo', 'LIFO'), ('nearest', 'Nearest')], 'Allocation Method', required=True), + + # as discussed on bug 765559, the main purpose of this field is to allow sorting the list of locations + # according to the displayed names, and reversing that sort by clicking on a column. It does not work for + # translated values though - so it needs fixing. 'complete_name': fields.function(_complete_name, type='char', size=256, string="Location Name", store={'stock.location': (_get_sublocations, ['name', 'location_id'], 10)}),