From 07dc9e827f160a26baf4eeb464559b7e42d08f81 Mon Sep 17 00:00:00 2001 From: Josse Colpaert Date: Wed, 8 May 2013 14:07:26 +0200 Subject: [PATCH] [FIX] Selection fields cost_method fifo from start bzr revid: jco@openerp.com-20130508120726-ar1enpakpqkq9f0x --- addons/product/product.py | 2 +- addons/stock_fifo_lifo/stock_fifo_lifo.py | 24 +++++++++++------------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/addons/product/product.py b/addons/product/product.py index d0694af82a4..251995ee7b6 100644 --- a/addons/product/product.py +++ b/addons/product/product.py @@ -308,7 +308,7 @@ class product_template(osv.osv): 'volume': fields.float('Volume', help="The volume in m3."), 'weight': fields.float('Gross Weight', digits_compute=dp.get_precision('Stock Weight'), help="The gross weight in Kg."), 'weight_net': fields.float('Net Weight', digits_compute=dp.get_precision('Stock Weight'), help="The net weight in Kg."), - 'cost_method': fields.property('', type='selection', view_load=True, selection = [('standard','Standard Price'), ('average','Average Price')], + 'cost_method': fields.property('', type='selection', view_load=True, selection = [('standard','Standard Price'), ('average','Average Price'), ('fifo', 'FIFO price'), ('lifo', 'LIFO price')], help="Standard Price: The cost price is manually updated at the end of a specific period (usually every year). \nAverage Price: The cost price is recomputed at each incoming shipment.", string="Costing Method"), 'warranty': fields.float('Warranty'), diff --git a/addons/stock_fifo_lifo/stock_fifo_lifo.py b/addons/stock_fifo_lifo/stock_fifo_lifo.py index a0b95cdc70c..ec872537fef 100644 --- a/addons/stock_fifo_lifo/stock_fifo_lifo.py +++ b/addons/stock_fifo_lifo/stock_fifo_lifo.py @@ -25,18 +25,18 @@ from openerp.osv import osv, fields #@TODO Should not this be product template? #TODO: remove this module and put everything in existing core modules (purchase, stock, product...) -class product_product (osv.osv): - _name = "product.product" - _inherit = "product.product" - _columns = { - 'cost_method': fields.property('', type='selection', view_load=True, selection = [('standard','Standard Price'), ('average','Average Price'), - ('fifo', 'FIFO price'), ('lifo', 'LIFO 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. - FIFO: When cost is calculated the FIFO way. - LIFO: When cost is calculated the LIFO way. """, - string="Costing Method"), - } +# class product_product (osv.osv): +# _name = "product.product" +# _inherit = "product.product" +# _columns = { +# 'cost_method': fields.property('', type='selection', view_load=True, selection = [('standard','Standard Price'), ('average','Average Price'), +# ('fifo', 'FIFO price'), ('lifo', 'LIFO 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. +# FIFO: When cost is calculated the FIFO way. +# LIFO: When cost is calculated the LIFO way. """, +# string="Costing Method"), +# } def get_stock_matchings_fifolifo(self, cr, uid, ids, qty, fifo, product_uom_id = False, currency_id = False, context=None):