On 14/10/10 12:01 +0200, Paul J Stevens wrote: > > Hi all, > > I'm a bit confused about inheritance in tryton. > > I see two patterns: one using _inherits, and an other doing... something > else, like account_invoice_history, which almost looks like proper > sub-classing (overloading? adapting?) > > In the first case, a new - specialized - model is introduced, while in > the latter, the same model is re-used, fields may be added, and > behaviour maybe modified. Right? > > Please correct me if I'm wrong - trying to figure out the use cases for > them: > > 1) use _inherits if you want to create a new model that adapts/extends > an existing model, while leaving the original model as-is.
Yes this is inheritage. > 2) use _name overloading if you want to modify an existing model. Yes this is extending model. -- Cédric Krier B2CK SPRL Rue de Rotterdam, 4 4000 Liège Belgium Tel: +32 472 54 46 59 Email/Jabber: cedric.kr...@b2ck.com Website: http://www.b2ck.com/
pgpMixN8zGjXK.pgp
Description: PGP signature