diff --git a/addons/stock/product.py b/addons/stock/product.py index 1cd677706f6..a173647bed9 100644 --- a/addons/stock/product.py +++ b/addons/stock/product.py @@ -324,11 +324,6 @@ class product_template(osv.osv): return res _columns = { - 'valuation':fields.selection([('manual_periodic', 'Periodical (manual)'), - ('real_time','Real Time (automated)'),], 'Inventory Valuation', - help="If real-time valuation is enabled for a product, the system will automatically write journal entries corresponding to stock moves." \ - "The inventory variation account set on the product category will represent the current inventory value, and the stock input and stock output account will hold the counterpart moves for incoming and outgoing products." - , required=True), 'type': fields.selection([('product', 'Stockable Product'), ('consu', 'Consumable'), ('service', 'Service')], 'Product Type', required=True, help="Consumable: Will not imply stock management for this product. \nStockable product: Will imply stock management for this product."), 'property_stock_procurement': fields.property( type='many2one', @@ -376,7 +371,6 @@ class product_template(osv.osv): _defaults = { 'sale_delay': 7, - 'valuation': 'manual_periodic', } def action_view_routes(self, cr, uid, ids, context=None): diff --git a/addons/stock_account/product.py b/addons/stock_account/product.py index b043fc4094b..807c5bc08fc 100644 --- a/addons/stock_account/product.py +++ b/addons/stock_account/product.py @@ -114,19 +114,16 @@ class product_product(osv.osv): self.write(cr, uid, rec_id, {'standard_price': new_price}) return True + +class product_template(osv.osv): + _name = 'product.template' + _inherit = 'product.template' _columns = { 'valuation': fields.property(type='selection', selection=[('manual_periodic', 'Periodical (manual)'), ('real_time', 'Real Time (automated)')], string='Inventory Valuation', help="If real-time valuation is enabled for a product, the system will automatically write journal entries corresponding to stock moves, with product price as specified by the 'Costing Method'" \ "The inventory variation account set on the product category will represent the current inventory value, and the stock input and stock output account will hold the counterpart moves for incoming and outgoing products." , required=True), - } - - -class product_template(osv.osv): - _name = 'product.template' - _inherit = 'product.template' - _columns = { 'cost_method': fields.property(type='selection', selection=[('standard', 'Standard Price'), ('average', 'Average Price'), ('real', 'Real Price')], help="""Standard Price: The cost price is manually updated at the end of a specific period (usually every year). Average Price: The cost price is recomputed at each incoming shipment and used for the product valuation. @@ -145,6 +142,11 @@ class product_template(osv.osv): help="When doing real-time inventory valuation, counterpart journal items for all outgoing stock moves will be posted in this account, unless " "there is a specific valuation account set on the destination location. When not set on the product, the one from the product category is used."), } + + _defaults = { + 'valuation': 'manual_periodic', + 'cost_method': 'standard', + } class product_category(osv.osv):