[trunk] [7.0] res.partner._commercial_sync_to_children is called even if only non-commercial fields changed

Bug #1210186 reported by Holger Brunn (Therp)
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Server (MOVED TO GITHUB)
Fix Released
Low
OpenERP's Framework R&D

Bug Description

When writing to a partner who is a commercial entity, _commercial_sync_to_children is called even if we write an unrelated value, which has quite a performance penalty if this partner has several thousand children.

I think we should check if one of the update_values is a commercial field in http://bazaar.launchpad.net/~openerp/openobject-server/trunk/view/head:/openerp/addons/base/res/res_partner.py#L481 and only then write to the tree of children, the same way as it is done for the address some lines below.

Tags: performance

Related branches

Revision history for this message
Olivier Dony (Odoo) (odo-openerp) wrote :

Thanks for reporting!

Changed in openobject-server:
assignee: nobody → OpenERP's Framework R&D (openerp-dev-framework)
importance: Undecided → Low
status: New → Confirmed
summary: - [trunk] [7.0] _commercial_sync_to_children is called on every write
+ [trunk] [7.0] res.partner._commercial_sync_to_children is called even if
+ only non-commercial fields changed
Revision history for this message
Olivier Dony (Odoo) (odo-openerp) wrote :

Holger's patch has been merged in 7.0 at revision 5056 rev-id: <email address hidden>.
Thanks for reporting and providing a patch!

Changed in openobject-server:
milestone: none → 7.0
status: Confirmed → Fix Released
no longer affects: ocb-server/7.0
no longer affects: ocb-server
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.