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.

2) use _name overloading if you want to modify an existing model.

is this a correct deduction?

--
  ________________________________________________________________
  Paul Stevens                                      paul at nfg.nl
  NET FACILITIES GROUP                     GPG/PGP: 1024D/11F8CD31
  The Netherlands________________________________http://www.nfg.nl

--
tryton-dev@googlegroups.com mailing list

Reply via email to