c2c-oerpscenario team mailing list archive
-
c2c-oerpscenario team
-
Mailing list archive
-
Message #13306
[Bug 704922] [NEW] Trigger on store function field doesn't work in inherits object
Public bug reported:
Hi,
This is a quite complex one affecting last v6.0 :( Also to explain, I'll try...
Situation :
- Add a store field on account.analytic.line with the following:
'aa_currency_id': fields.function(_get_account_currency, method=True, type='many2one', relation='res.currency', string='Account currency',
store={
'account.analytic.account': (_get_account_line, ['company_id'], 50),
'account.analytic.line': (lambda self,cr,uid,ids,c={}: ids, ['amount','unit_amount'],10),
},
help="The related analytic account currency."),
- This will trigger any modifications done on the related analytic
account or in the amount or unit_amount field of analytic lines. When
the trigger is trigged, the value of aa_curency_id is re-computed by
_get_account_currency.
This works perfectly as expected, the trigger works. But then you
install hr_timesheet module which inherits account.analytic.line and try
to change something in the hr.analytic.timesheet, the trigger on the
account.analytic.line isn't trigged !!!
You can find a working example in the c2c_multicost_base module of
extra-addons for v 5.0, in v5.0 this works perfectly. Changing the
hr.analytic.timesheet will trig the account.analytic.line.
I expect this to work also n v 6.0. A trigger put on an object A should
be trigged also when an inherits object B change some values in the
inherited object A.
Thanks to have a look, this sould be very important I think.
Regards,
Joël
** Affects: openobject-server
Importance: Undecided
Status: New
** Summary changed:
- Trigger on store field doesn't work inherits object
+ Trigger on store function field doesn't work in inherits object
--
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/704922
Title:
Trigger on store function field doesn't work in inherits object
Status in OpenERP Server:
New
Bug description:
Hi,
This is a quite complex one affecting last v6.0 :( Also to explain, I'll try...
Situation :
- Add a store field on account.analytic.line with the following:
'aa_currency_id': fields.function(_get_account_currency, method=True, type='many2one', relation='res.currency', string='Account currency',
store={
'account.analytic.account': (_get_account_line, ['company_id'], 50),
'account.analytic.line': (lambda self,cr,uid,ids,c={}: ids, ['amount','unit_amount'],10),
},
help="The related analytic account currency."),
- This will trigger any modifications done on the related analytic
account or in the amount or unit_amount field of analytic lines. When
the trigger is trigged, the value of aa_curency_id is re-computed by
_get_account_currency.
This works perfectly as expected, the trigger works. But then you
install hr_timesheet module which inherits account.analytic.line and
try to change something in the hr.analytic.timesheet, the trigger on
the account.analytic.line isn't trigged !!!
You can find a working example in the c2c_multicost_base module of
extra-addons for v 5.0, in v5.0 this works perfectly. Changing the
hr.analytic.timesheet will trig the account.analytic.line.
I expect this to work also n v 6.0. A trigger put on an object A
should be trigged also when an inherits object B change some values in
the inherited object A.
Thanks to have a look, this sould be very important I think.
Regards,
Joël
Follow ups
-
[Bug 704922] Re: Trigger on store function field doesn't work in inherits object
From: Ferdinand @ Camptocamp, 2011-11-11
-
[Bug 704922] Re: Trigger on store function field doesn't work in inherits object
From: Priyesh (OpenERP), 2011-11-08
-
[Bug 704922] Re: Trigger on store function field doesn't work in inherits object
From: Priyesh (OpenERP), 2011-11-08
-
[Bug 704922] Re: Trigger on store function field doesn't work in inherits object
From: Nicolas Clavier, 2011-09-19
-
[Bug 704922] Re: Trigger on store function field doesn't work in inherits object
From: Cristian Salamea (Gnuthink), 2011-05-09
-
[Bug 704922] Re: Trigger on store function field doesn't work in inherits object
From: Ferdinand @ Camptocamp, 2011-04-27
-
[Bug 704922] Re: Trigger on store function field doesn't work in inherits object
From: Joël Grand-Guillaume, 2011-03-11
-
[Bug 704922] Re: Trigger on store function field doesn't work in inherits object
From: Albert Cervera i Areny - http://www.NaN-tic.com, 2011-03-07
-
[Bug 704922] Re: Trigger on store function field doesn't work in inherits object
From: Albert Cervera i Areny - http://www.NaN-tic.com, 2011-03-06
-
[Bug 704922] Re: Trigger on store function field doesn't work in inherits object
From: Yogesh(Open ERP), 2011-02-01
-
[Bug 704922] Re: Trigger on store function field doesn't work in inherits object
From: Yogesh(Open ERP), 2011-01-24
-
[Bug 704922] Re: Trigger on store function field doesn't work in inherits object
From: Azazahmed Saiyed (OpenERP), 2011-01-21
-
[Bug 704922] Re: Trigger on store function field doesn't work in inherits object
From: Joël Grand-Guillaume, 2011-01-20
-
[Bug 704922] Re: Trigger on store function field doesn't work in inherits object
From: Azazahmed Saiyed (OpenERP), 2011-01-20
-
[Bug 704922] Re: Trigger on store function field doesn't work in inherits object
From: Joël Grand-Guillaume, 2011-01-19
-
[Bug 704922] [NEW] Trigger on store function field doesn't work in inherits object
From: Joël Grand-Guillaume, 2011-01-19
References