[FIX] website_sale: no need to specific to a selection field that it is of type char
authorDenis Ledoux <dle@odoo.com>
Fri, 17 Oct 2014 12:47:26 +0000 (14:47 +0200)
committerDenis Ledoux <dle@odoo.com>
Fri, 17 Oct 2014 12:48:45 +0000 (14:48 +0200)
Besides, if set, the field will appear as a simple char field in the form view & editable lists
+ADD the type in the editable view

addons/website_sale/models/product.py
addons/website_sale/views/views.xml

index 2c0156f..1ce85d5 100644 (file)
@@ -194,7 +194,7 @@ class product_product(osv.Model):
 class product_attribute(osv.Model):
     _inherit = "product.attribute"
     _columns = {
-        'type': fields.selection([('radio', 'Radio'), ('select', 'Select'), ('color', 'Color'), ('hidden', 'Hidden')], string="Type", type="char"),
+        'type': fields.selection([('radio', 'Radio'), ('select', 'Select'), ('color', 'Color'), ('hidden', 'Hidden')], string="Type"),
     }
     _defaults = {
         'type': lambda *a: 'radio',
index 9971097..239583d 100644 (file)
             </field>
         </field>
     </record>
+    <record id="attribute_tree_view" model="ir.ui.view">
+        <field name="name">product.attribute.tree.type</field>
+        <field name="model">product.attribute</field>
+        <field name="inherit_id" ref="product.attribute_tree_view"></field>
+        <field name="arch" type="xml">
+            <field name="name" position="after">
+                <field name="type"/>
+            </field>
+        </field>
+    </record>
 
     <!-- Product Public Categories -->
     <record id="product_public_category_form_view" model="ir.ui.view">