← Back to team overview

openerp-expert-framework team mailing list archive

Re: Multiple inheritance problem with MRO

 

On 04/23/2012 10:45 AM, Georges Racinet wrote:
Le 23/04/2012 09:38, Olivier Dony a écrit :
You should never touch the MRO to alter OpenERP models inheritance, or at all.
This is a Python implementation detail and the ORM takes care of managing it
properly when you use OpenERP inheritance. If you need to mess with it your
design is probably bad and certainly too complicated.


+1 too. However, sometimes the design of the *official* addons is such that skipping through the MRO is the most elegant solution. My example was taken from a small glue module that makes project_timesheet work with analytic_user_function...

Cheers,
Stefan.

--
Therp - Maatwerk in open ontwikkeling

Stefan Rijnhart - Ontwerp en implementatie

mail: stefan@xxxxxxxx
tel: +31 (0) 614478606
http://therp.nl
https://twitter.com/therp_stefan



References