From 108ed78f0bcdca7f3dd68aa4053e55116e4ca382 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Thu, 31 Dec 2015 16:03:27 +0100 Subject: [PATCH] Add Function fields on Product from Template issue5087 review23611002 --- product.py | 7 ------- view/product_form.xml | 8 ++++---- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/product.py b/product.py index c40a80678d..4a84e901ff 100644 --- a/product.py +++ b/product.py @@ -50,10 +50,3 @@ class Product: & ~Eval('_parent_template', {}).get('attribute_set')), }, depends=['attribute_set']) - attribute_set = fields.Function(fields.Many2One('product.attribute.set', - 'Set'), 'on_change_with_attribute_set') - - @fields.depends('template') - def on_change_with_attribute_set(self, name=None): - if self.template and getattr(self.template, 'attribute_set', None): - return self.template.attribute_set.id diff --git a/view/product_form.xml b/view/product_form.xml index c2606c7b36..0ac3905476 100644 --- a/view/product_form.xml +++ b/view/product_form.xml @@ -2,9 +2,9 @@ - - + + + +