Dear Vo Minh Thu,
Sorry if this topic has been raised already, but I couldn't find details
on how inheritance will be coded in the new API.
If possible, I humbly suggest we chose another syntax than "_inherit"
and "_inherits".
They have been disturbing to new developpers all the time: they can't
rely on what they know about "inheritance" from their OO programming
background or their python skills :
- they think they can use inheritance to express generic/specific
relationships (X' is a X)
- they expect to be able to use the parent class independently of it's
children
- they tend to use python's inheritance syntax and don't understand why
it fails
- the difference between "_inherit" and "_inherits" is not explicit
enough in the current API.
"_inherit" actually changes the behavior of the existing class, so a
decorator like "@overlay", "@redefine" or "@extend" would be more explicit.
Or we could rely on plain python inheritance, but they're not really
expressing the same concepts are they?
"_inherits" is more like a composition relationship (a product variant
is made of a template) so maybe a decorator "@component" would be more
adequate.
Lionel Sausin.
_______________________________________________
Mailing list: https://launchpad.net/~openerp-expert-framework
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-expert-framework
More help : https://help.launchpad.net/ListHelp