Add Function fields on Product from Template

issue5087
review23611002
This commit is contained in:
Cédric Krier
2015-12-31 16:03:27 +01:00
parent d21d98be43
commit 108ed78f0b
2 changed files with 4 additions and 11 deletions
-7
View File
@@ -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
+4 -4
View File
@@ -2,9 +2,9 @@
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<data>
<xpath
expr="/form/separator[@name='description']"
position="before">
<field name="attributes" colspan="6"/>
<xpath expr="/form/notebook" position="inside">
<page name="attributes">
<field name="attributes" colspan="4"/>
</page>
</xpath>
</data>