From 175deb06e2651d767c6ba59caea2ee92953c54fc Mon Sep 17 00:00:00 2001 From: Bertrand Chenal Date: Fri, 14 Mar 2008 14:04:34 +0100 Subject: [PATCH] Improvements on products: - Cost method is now required. - default type is now stockable - bugfix: default cost price method is now fixed --- template.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/template.py b/template.py index e475774f25..18f22594f0 100644 --- a/template.py +++ b/template.py @@ -23,7 +23,7 @@ class Template(OSV): cost_price = fields.Numeric('Cost Price', states=STATES, digits=(12, 2)) cost_price_method = fields.Selection( [("fixed","Fixed Price"),("average","Average Cost Price")], - "Cost Method") + "Cost Method", required=True) default_uom = fields.Many2One('product.uom', 'Default UOM', required=True, states=STATES,) active = fields.Boolean('Active',) @@ -32,10 +32,10 @@ class Template(OSV): return 1 def default_type(self, cursor, user, context=None): - return 'consumable' + return 'stockable' def default_cost_price_method(self, cursor, user, context=None): - return 'static' + return 'fixed' def get_list_price_uom(self, cursor, user, ids, name, arg, context=None): product_uom_obj = self.pool.get('product.uom')