Merge lp:~openerp-dev/openobject-addons/7.0-opw-606452-acl into lp:openobject-addons/7.0

Proposed by Anaël Closson (openerp)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/7.0-opw-606452-acl
Merge into: lp:openobject-addons/7.0
Diff against target: 27 lines (+10/-0)
1 file modified
stock/stock.py (+10/-0)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/7.0-opw-606452-acl
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+217205@code.launchpad.net
To post a comment you must log in.

Unmerged revisions

10015. By Anaël Closson (openerp)

[FIX] stock: avoid multiple computation of the function fields due to stock.picking.* inheritance.

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 2014-04-23 15:06:21 +0000
3+++ stock/stock.py 2014-04-25 11:07:29 +0000
4@@ -3041,6 +3041,11 @@
5 #instead of it's own workflow (which is not existing)
6 return self.pool.get('stock.picking')._workflow_signal(cr, uid, ids, signal, context=context)
7
8+ def _store_set_values(self, cr, uid, ids, fields, context):
9+ #override in order to avoid triggering computation of function fields as it should already be done
10+ #by stock.picking - opw 606452
11+ return True
12+
13 def message_post(self, *args, **kwargs):
14 """Post the message on stock.picking to be able to see it in the form view when using the chatter"""
15 return self.pool.get('stock.picking').message_post(*args, **kwargs)
16@@ -3114,6 +3119,11 @@
17 #instead of it's own workflow (which is not existing)
18 return self.pool.get('stock.picking')._workflow_signal(cr, uid, ids, signal, context=context)
19
20+ def _store_set_values(self, cr, uid, ids, fields, context):
21+ #override in order to avoid triggering computation of function fields as it should already be done
22+ #by stock.picking - opw 606452
23+ return True
24+
25 def message_post(self, *args, **kwargs):
26 """Post the message on stock.picking to be able to see it in the form view when using the chatter"""
27 return self.pool.get('stock.picking').message_post(*args, **kwargs)