c2c-oerpscenario team mailing list archive
-
c2c-oerpscenario team
-
Mailing list archive
-
Message #25284
[Bug 789576] [NEW] [6.0] fields.related override: store function persists
Public bug reported:
Hi,
when a fields.related is overridden by a regular field, the store
function is not removed. Values assigned to the field by the users of
the system get overwritten immediately by the store function of the
original field definition.
Here is an example from the HR module:
'parent_id': fields.related('department_id', 'manager_id',
relation='hr.employee', string='Manager', type='many2one', store=True,
select=True, readonly=True, help="It is linked with manager of
Department"),
We want to override this definition with "fields.many2one('hr.employee',
'Manager')", but any write on this field triggers a recalculation based
on the related field.
The problem is in orm.__init__() where the list of a model's store
functions is populated but never purged.
Reproducable with openerp-server/6.0 rev. 3435.
Cheers,
Stefan.
** Affects: openobject-server
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/789576
Title:
[6.0] fields.related override: store function persists
Status in OpenERP Server:
New
Bug description:
Hi,
when a fields.related is overridden by a regular field, the store
function is not removed. Values assigned to the field by the users of
the system get overwritten immediately by the store function of the
original field definition.
Here is an example from the HR module:
'parent_id': fields.related('department_id', 'manager_id',
relation='hr.employee', string='Manager', type='many2one', store=True,
select=True, readonly=True, help="It is linked with manager of
Department"),
We want to override this definition with
"fields.many2one('hr.employee', 'Manager')", but any write on this
field triggers a recalculation based on the related field.
The problem is in orm.__init__() where the list of a model's store
functions is populated but never purged.
Reproducable with openerp-server/6.0 rev. 3435.
Cheers,
Stefan.
Follow ups
-
[Bug 789576] Re: fields.related override: store function persists
From: Vo Minh Thu (OpenERP), 2011-10-04
-
[Bug 789576] Re: fields.related override: store function persists
From: Launchpad Bug Tracker, 2011-09-27
-
[Bug 789576] Re: fields.related override: store function persists
From: Naresh(OpenERP), 2011-09-27
-
[Bug 789576] Re: fields.related override: store function persists
From: Vo Minh Thu (OpenERP), 2011-09-16
-
[Bug 789576] Re: fields.related override: store function persists
From: Stefan Rijnhart (Therp), 2011-08-19
-
[Bug 789576] Re: fields.related override: store function persists
From: Nimesh Contractor(Open ERP), 2011-06-21
-
[Bug 789576] Re: fields.related override: store function persists
From: Launchpad Bug Tracker, 2011-06-21
-
[Bug 789576] Re: fields.related override: store function persists
From: Nimesh Contractor(Open ERP), 2011-06-21
-
[Bug 789576] Re: fields.related override: store function persists
From: Vinay Rana (openerp), 2011-06-14
-
[Bug 789576] Re: [6.0] fields.related override: store function persists
From: Vinay Rana (openerp), 2011-06-03
-
[Bug 789576] Re: [6.0] fields.related override: store function persists
From: Launchpad Bug Tracker, 2011-05-28
-
[Bug 789576] [NEW] [6.0] fields.related override: store function persists
From: Stefan Rijnhart (Therp), 2011-05-28
References