Merge lp:~gdukai/wms/fix-837952 into lp:wms

Proposed by Dukai Gábor
Status: Merged
Merged at revision: 241
Proposed branch: lp:~gdukai/wms/fix-837952
Merge into: lp:wms
Diff against target: 16 lines (+4/-2)
1 file modified
wms_sale/object/picking.py (+4/-2)
To merge this branch: bzr merge lp:~gdukai/wms/fix-837952
Reviewer Review Type Date Requested Status
Christophe CHAUVET Approve
Review via email: mp+73758@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Christophe CHAUVET (christophe-chauvet) wrote :

Hi

Thanks thanks for submiting as a branch

on second thought, we can change this line

if 'warehouse_id' not in values or not values['warehouse_id']:

by this one

if not values.get('warehouse_id', False):

As, if key not present is return False, and if present but return False it works

Comment ?

lp:~gdukai/wms/fix-837952 updated
242. By Dukai Gábor

last fix improved

Revision history for this message
Dukai Gábor (gdukai) wrote :

Sure, I've committed the changes.

Revision history for this message
Christophe CHAUVET (christophe-chauvet) wrote :

Thanks

Regards,

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'wms_sale/object/picking.py'
2--- wms_sale/object/picking.py 2011-03-09 13:58:38 +0000
3+++ wms_sale/object/picking.py 2011-09-02 10:35:42 +0000
4@@ -49,8 +49,10 @@
5 purchase_obj = self.pool.get('purchase.order')
6 user_obj = self.pool.get('res.users')
7
8- user = user_obj.browse(cr, uid, uid, context=context)
9- values['warehouse_id'] = user.context_warehouse_id and user.context_warehouse_id.id or False
10+ if not values.get('warehouse_id', False):
11+ user = user_obj.browse(cr, uid, uid, context=context)
12+ values['warehouse_id'] = user.context_warehouse_id \
13+ and user.context_warehouse_id.id or False
14
15 ###
16 ## Check if we are in sale or purchase order

Subscribers

People subscribed via source and target branches