← Back to team overview

openerp-india team mailing list archive

[Bug 1089902] [NEW] fields function store attribute does not allow chain update

 

Public bug reported:

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

** Affects: openobject-server
     Importance: Undecided
         Status: New

** Description changed:

  This problem occurs when a fields.function has another fields.function
- in its store={} parameter. When the first function is never called next
- to the second one.
+ 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')
+     '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')
+     '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')
+     '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 changed:

  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')
+                                 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')
+                                 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

-- 
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Server.
https://bugs.launchpad.net/bugs/1089902

Title:
  fields function store attribute does not allow chain update

Status in OpenERP Server:
  New

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

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-server/+bug/1089902/+subscriptions


Follow ups

References