openerp-community team mailing list archive
-
openerp-community team
-
Mailing list archive
-
Message #00348
[Merge] lp:~openerp-community/openobject-server/stefan-therp_lp789576 into lp:openobject-server/6.0
Stefan Rijnhart (Therp) has proposed merging lp:~openerp-community/openobject-server/stefan-therp_lp789576 into lp:openobject-server/6.0.
Requested reviews:
OpenERP Core Team (openerp)
Related bugs:
Bug #789576 in OpenERP Server: "[6.0] fields.related override: store function persists"
https://bugs.launchpad.net/openobject-server/+bug/789576
For more details, see:
https://code.launchpad.net/~openerp-community/openobject-server/stefan-therp_lp789576/+merge/62769
--
https://code.launchpad.net/~openerp-community/openobject-server/stefan-therp_lp789576/+merge/62769
Your team OpenERP Community is subscribed to branch lp:~openerp-community/openobject-server/stefan-therp_lp789576.
=== modified file 'bin/osv/orm.py'
--- bin/osv/orm.py 2011-05-25 13:26:12 +0000
+++ bin/osv/orm.py 2011-05-28 15:29:23 +0000
@@ -2780,9 +2780,12 @@
f = self._columns[store_field]
if hasattr(f, 'digits_change'):
f.digits_change(cr)
- if not isinstance(f, fields.function):
- continue
- if not f.store:
+ if not isinstance(f, fields.function) or not f.store:
+ # remove store functions of overridden fields
+ fncts = self.pool._store_function.get(self._name, [])
+ for x, y, z, e, f, l in fncts:
+ if (x==self._name) and (y==store_field):
+ fncts.remove((x, y, z, e, f, l))
continue
if self._columns[store_field].store is True:
sm = {self._name: (lambda self, cr, uid, ids, c={}: ids, None, 10, None)}