[FIX] product: remove empty from state field selection
authorDenis Ledoux <dle@odoo.com>
Wed, 22 Oct 2014 09:51:30 +0000 (11:51 +0200)
committerDenis Ledoux <dle@odoo.com>
Wed, 22 Oct 2014 09:51:30 +0000 (11:51 +0200)
In order to avoid having twice "empty" in the web client. There is always an empty option in selection field in the web client. When the selection field is required, you have to select it, and it is not required, you can set False as selection value

addons/product/product.py

index 3282185..77dfd85 100644 (file)
@@ -511,8 +511,7 @@ class product_template(osv.osv):
         'warranty': fields.float('Warranty'),
         'sale_ok': fields.boolean('Can be Sold', help="Specify if the product can be selected in a sales order line."),
         'pricelist_id': fields.dummy(string='Pricelist', relation='product.pricelist', type='many2one'),
-        'state': fields.selection([('',''),
-            ('draft', 'In Development'),
+        'state': fields.selection([('draft', 'In Development'),
             ('sellable','Normal'),
             ('end','End of Lifecycle'),
             ('obsolete','Obsolete')], 'Status'),