[FIX] product: unfuck templates and products in views
authorMartin Trigaux <mat@openerp.com>
Fri, 11 Jul 2014 14:22:52 +0000 (16:22 +0200)
committerMartin Trigaux <mat@openerp.com>
Fri, 11 Jul 2014 15:03:04 +0000 (17:03 +0200)
commit0a6d63b82cc4af3da3a1980374baa794b0c1f231
treed305cf8da37c1d55586e62090d37f338d6fc1b5a
parent7d732b1011f577b12a1c2aac9ef205e633ab8f61
[FIX] product: unfuck templates and products in views

product.product reuses most of the product.template views however some parts need to be excluded or replaced.
Instead of adding template only parts in base view and removing it for product, split the views in 'common' (product_template_form_view), 'template only' (product_template_only_form_view) and 'product only' (product_normal_form_view) where the first is inherited by the other two. The attribute mode='primary' on both second views allows to make sure that future inheritance of product_template_form_view and product_template_only_form_view will work with the full rendered product_template_form_view view.
This allows us to have valid buttons in crm for bill of material (filters based on active_id).
Also cleaning the mess with circular dependencies.
addons/mrp/mrp_view.xml
addons/product/product_view.xml