Inheritence Problem
Serge Orlov
Serge.Orlov at gmail.com
Sun Nov 13 03:38:11 EST 2005
graemeharnish at gmail.com wrote:
> Hello. I'm trying to mod an open source app called TinyERP and inherit
> from a parent object, and in essence change how _column is defined. I
> found sample code of:
Looks like "Spot the differences" puzzle to me. Hint: look at the
underscore characters.
>
> class custom_product(osv.osv):
> __inherits__ = "product.product"
> __name__ = "product.product"
> _columns = {
> 'color' : fields.many2one('color','Color'),
> 'size': fields.many2one('size','Size'),
> }
> custom_product()
>
...
> class product_uom_categ(osv.osv):
> _name = 'product.uom.categ'
> _description = 'Product uom categ'
> _columns = {
> 'name': fields.char('Name', size=64, required=True),
> }
> product_uom_categ()
More information about the Python-list
mailing list