fields function store attribute does not allow chain update

Bug #1089902 reported by Cedric Le Brouster(OpenFire)
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Odoo Server (MOVED TO GITHUB)
Confirmed
Low
OpenERP's Framework R&D

Bug Description

This problem occurs when a fields.function has another fields.function in its store={} parameter. The first function is never called next to the second one.

For example :

class A:
    'a_value' : fields.function(_update_value,
                                store={'class_b' : _function,'b_value',10]},
                                method=True, type='integer', string='value')

class B:
    'b_value' : fields.function(_update_value,
                                store={'class_c' : _function,'c_value',10]},
                                method=True, type='integer', string='value')

class C:
    'c_value' : fields.integer('value')

Here, changing a c_value would change the b_value, but not the a_value.
(With b_value set as readonly='false', we could change it manually and see that the a_value is correctly recalculated.)

Tested with nightly build : openerp-6.1-20121213-004437

description: updated
description: updated
Revision history for this message
Jignesh Rathod(OpenERP) (jir-openerp) wrote :
Revision history for this message
Jignesh Rathod(OpenERP) (jir-openerp) wrote :

Hello,

I have checked your scenario as Cedric Le Brouster ,
I agree with << Cedric Le Brouster >> , When function field use store={} parameter it does not change
value next to the second.

For Example ...

Class

C - Change field
B - Function field change value on change of C class field. [ Change Value ]
A- Function field change value on change of B class field. [ Failed to called Function A ]

So class A function never called next to the second.

I am confirming this issue to improve function field for allow chain update.

I have attached a test case [ function_field_chain.py ]

Thank you.

Changed in openobject-server:
assignee: nobody → OpenERP's Framework R&D (openerp-dev-framework)
importance: Undecided → Low
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.