Merge lp:~unifield-team/unifield-server/us-982 into lp:unifield-server

Proposed by jftempo
Status: Merged
Merged at revision: 3721
Proposed branch: lp:~unifield-team/unifield-server/us-982
Merge into: lp:unifield-server
Diff against target: 60 lines (+31/-1)
2 files modified
bin/addons/msf_config_locations/stock_configuration.py (+29/-0)
bin/addons/msf_doc_import/check_line.py (+2/-1)
To merge this branch: bzr merge lp:~unifield-team/unifield-server/us-982
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+292759@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'bin/addons/msf_config_locations/stock_configuration.py'
--- bin/addons/msf_config_locations/stock_configuration.py 2015-11-20 10:30:30 +0000
+++ bin/addons/msf_config_locations/stock_configuration.py 2016-04-25 07:49:49 +0000
@@ -308,6 +308,35 @@
308 'internal_dest': fields.function(_get_dummy, fnct_search=_dest_int, method=True, string='Internal Picking Dest. Loc.', type='boolean',308 'internal_dest': fields.function(_get_dummy, fnct_search=_dest_int, method=True, string='Internal Picking Dest. Loc.', type='boolean',
309 help='Returns the available locations for destination location of an internal picking according to the product.'),309 help='Returns the available locations for destination location of an internal picking according to the product.'),
310 }310 }
311
312 def create(self, cr, uid, vals=None, context=None):
313 """
314 Remove the whitespaces before and after the name of the location
315 :param cr: Cursor to the database
316 :param uid: ID of the res.users that calls this method
317 :param vals: Values to be put on the new location
318 :param context: Context of the call
319 :return: Result of the super() call
320 """
321 if vals and vals.get('name'):
322 vals['name'] = vals.get('name', '').strip()
323
324 return super(stock_location, self).create(cr, uid, vals, context=context)
325
326 def write(self, cr, uid, ids, vals=None, context=None):
327 """
328 Remove the whitespaces before and after the name of the location
329 :param cr: Cursor to the database
330 :param uid: ID of the res.users that calls this method
331 :param ids: List of stock.location ID to be updated
332 :param vals: Values to be put on the new location
333 :param context: Context of the call
334 :return: Result of the super() call
335 """
336 if vals and vals.get('name'):
337 vals['name'] = vals.get('name', '').strip()
338
339 return super(stock_location, self).write(cr, uid, ids, vals, context=context)
311 340
312stock_location()341stock_location()
313342
314343
=== modified file 'bin/addons/msf_doc_import/check_line.py'
--- bin/addons/msf_doc_import/check_line.py 2016-01-11 14:17:53 +0000
+++ bin/addons/msf_doc_import/check_line.py 2016-04-25 07:49:49 +0000
@@ -199,6 +199,7 @@
199 product_id = kwargs.get('product_id')199 product_id = kwargs.get('product_id')
200 pick_type = kwargs.get('pick_type')200 pick_type = kwargs.get('pick_type')
201 pick_subtype = kwargs.get('pick_subtype')201 pick_subtype = kwargs.get('pick_subtype')
202 context = kwargs.get('context', {})
202 loc_id = None203 loc_id = None
203 loc_name = None204 loc_name = None
204 msg = ''205 msg = ''
@@ -225,7 +226,7 @@
225 pack_loc_id = loc_obj.pool.get('ir.model.data').get_object_reference(cr, uid, 'msf_outgoing', 'stock_location_packing')[1]226 pack_loc_id = loc_obj.pool.get('ir.model.data').get_object_reference(cr, uid, 'msf_outgoing', 'stock_location_packing')[1]
226 domain.extend([('id', '=', pack_loc_id)])227 domain.extend([('id', '=', pack_loc_id)])
227228
228 loc_ids = loc_obj.search(cr, uid, domain)229 loc_ids = loc_obj.search(cr, uid, domain, context=context)
229 if loc_ids:230 if loc_ids:
230 loc_id = loc_ids[0]231 loc_id = loc_ids[0]
231 elif loc_obj.search(cr, uid, [('name', '=ilike', loc_name)]):232 elif loc_obj.search(cr, uid, [('name', '=ilike', loc_name)]):

Subscribers

People subscribed via source and target branches

to all changes: