[FIX] purchase: purchases button on product templates

The purchases button on product templates open the purchase orders
that have at least one of the variants of the templates

Set in the context of the action button action_purchase_line_product_tree
'search_default_product_id': active_id, 'default_product_id': active_id
as no point, as default_product_id expects a variant id (product.product)
while active_id is a template id (product.template).

opw-626521
This commit is contained in:
Denis Ledoux 2015-01-27 10:18:29 +01:00
parent f9b1161ea7
commit 8381d47543
1 changed files with 1 additions and 1 deletions

View File

@ -606,7 +606,7 @@
</record>
<record model="ir.actions.act_window" id="action_purchase_line_product_tree">
<field name="context">{'search_default_product_id': active_id, 'default_product_id': active_id}</field>
<field name="context">{}</field><!-- force empty -->
<field name="name">Purchases</field>
<field name="res_model">purchase.order.line</field>
<field name="view_id" ref="purchase_order_line_tree"/>