← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 623889] Re: stored function fields don't get updated on unlink() if the trigger is the same object (5.0)

 

** Also affects: openobject-server/5.0
   Importance: Undecided
       Status: New

** Also affects: openobject-server/trunk
   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/623889

Title:
  stored function fields don't get updated on unlink() if the trigger is the same object (5.0)

Status in OpenObject Server:
  New
Status in OpenObject Server 5.0 series:
  New
Status in OpenObject Server trunk series:
  New

Bug description:
  Hi!
5.0 latest bzr.
Stored function fields that calculate values depending on other records from the same object, don't get updated on unlink(). 

Example code:
        'internal': fields.function(_is_internal, method=True, type='boolean',
            string='Internal', store={
                'stock.warehouse.orderpoint':
                    (_get_orderpoints, ['location_id'], 10),
                'stock.location': (_get_locations, ['procurement_location_id'], 20),
            }),
Here, _get_orderpoints() won't be called on unlink() because of the following code in orm.orm.unlink():
        for order, object, store_ids, fields in result_store:
            if object != self._name: