[FIX] Selection fields cost_method fifo from start

bzr revid: jco@openerp.com-20130508120726-ar1enpakpqkq9f0x
This commit is contained in:
Josse Colpaert
2013-05-08 14:07:26 +02:00
parent 07f4789510
commit 07dc9e827f
2 changed files with 13 additions and 13 deletions
+1 -1
View File
@@ -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'),
+12 -12
View File
@@ -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):