Community mailing list archives

community@mail.odoo.com

Re: Form view inheritance

by
Quentin THEURET
- 09/17/2015 08:11:46
On 17/09/2015 13:43, André P. wrote:
> I believe you only need to add "primary" to
> the new view.
> 
> Your approach seems fine, and is consistent with Odoo's own approach to
> the Product Template / Product Product. The Form view of Product.Product
> inherits from the Form view of Product.Template, but it doesn't show
> when you open a Product.Template.

André,

I didn't know the 'mode' attribute for a view. But in the Fabien's case,
the 'model' attribute of the view will be different.
Can Odoo inherit views of a parent model for a children model ?

In the case of product.product/product.template, product.product
inherits from product.template (_inherits), so for Odoo, if you call
product.product, it takes the fields/methods of product.product and
product.template models. In the Fabien's case, maybe the Contract
doesn't have an _inherits attribute to CommercialProposal. In this case,
I think the 'mode' attribute on the view will not work.

Regards,

-- 
Quentin THEURET

TeMPO Consulting
20, Avenue de la paix
67000 Strasbourg
France

http://www.tempo-consulting.fr
Tel : 33 (0)3 88 56 82 18
Fax : 33 (0)9 70 63 35 46