Merge lp:~therp-nl/openobject-addons/7.0-lp1217146-fix_undefined_lot_stock_output_id into lp:openobject-addons/7.0

Proposed by Stefan Rijnhart (Opener)
Status: Needs review
Proposed branch: lp:~therp-nl/openobject-addons/7.0-lp1217146-fix_undefined_lot_stock_output_id
Merge into: lp:openobject-addons/7.0
Diff against target: 20 lines (+4/-4)
1 file modified
stock/stock.py (+4/-4)
To merge this branch: bzr merge lp:~therp-nl/openobject-addons/7.0-lp1217146-fix_undefined_lot_stock_output_id
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+182295@code.launchpad.net
To post a comment you must log in.

Unmerged revisions

9387. By Stefan Rijnhart (Opener)

[FIX] Cannot create new warehouse

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'stock/stock.py'
2--- stock/stock.py 2013-08-23 09:59:12 +0000
3+++ stock/stock.py 2013-08-27 08:26:34 +0000
4@@ -2955,12 +2955,12 @@
5
6 def _default_lot_output_id(self, cr, uid, context=None):
7 try:
8- lot_input_stock_model, lot_input_stock_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'stock', 'stock_location_output')
9- self.pool.get('stock.location').check_access_rule(cr, uid, [lot_input_stock_id], 'read', context=context)
10+ lot_output_stock_model, lot_output_stock_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'stock', 'stock_location_output')
11+ self.pool.get('stock.location').check_access_rule(cr, uid, [lot_output_stock_id], 'read', context=context)
12 except (ValueError, orm.except_orm):
13 # the user does not have read access on the location or it does not exists
14- lot_output_id = False
15- return lot_output_id
16+ lot_output_stock_id = False
17+ return lot_output_stock_id
18
19 _defaults = {
20 'company_id': lambda self, cr, uid, c: self.pool.get('res.company')._company_default_get(cr, uid, 'stock.inventory', context=c),