Inheriting from mulitple class in OpenERP

This kind of scenario comes up when we want same set of fields to be repeated in core modules.

For eg., if I want order status page to be displayed in Sales and Purchase Order both. So, I define a order_status object which holds the common fields. Then I will inherit sale_order and purchase_order objects and also inherit order_status object.

Now, the next question is to how to assign more than one object to _inherit attribute. The trick is to define multiple class in list as follows-

class sale_order(osv.osv):


class purchase_order(osv.osv):

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s