From baf09b1d43989b6ab8b757fc6a59f6475d0e8598 Mon Sep 17 00:00:00 2001 From: "mayur maheshwari (Open ERP)" Date: Wed, 1 Jun 2011 17:38:12 +0530 Subject: [PATCH 1/2] [FIX]stock:In Purchase Order decimal_precision as it is to receive the products in Process Dialog lp bug: https://launchpad.net/bugs/788064 fixed bzr revid: mma@tinyerp.com-20110601120812-uh83s5ggfxhehgd6 --- addons/stock/stock.py | 2 +- addons/stock/wizard/stock_partial_move.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index d478ab39c9c..0c11e676ffd 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -1548,7 +1548,7 @@ class stock_move(osv.osv): 'state': fields.selection([('draft', 'Draft'), ('waiting', 'Waiting'), ('confirmed', 'Not Available'), ('assigned', 'Available'), ('done', 'Done'), ('cancel', 'Cancelled')], 'State', readonly=True, select=True, help='When the stock move is created it is in the \'Draft\' state.\n After that, it is set to \'Not Available\' state if the scheduler did not find the products.\n When products are reserved it is set to \'Available\'.\n When the picking is done the state is \'Done\'.\ \nThe state is \'Waiting\' if the move is waiting for another one.'), - 'price_unit': fields.float('Unit Price', digits_compute= dp.get_precision('Account'), help="Technical field used to record the product cost set by the user during a picking confirmation (when average price costing method is used)"), + 'price_unit': fields.float('Unit Price', digits_compute= dp.get_precision('Purchase Price'), help="Technical field used to record the product cost set by the user during a picking confirmation (when average price costing method is used)"), 'price_currency_id': fields.many2one('res.currency', 'Currency for average price', help="Technical field used to record the currency chosen by the user during a picking confirmation (when average price costing method is used)"), 'company_id': fields.many2one('res.company', 'Company', required=True, select=True), 'partner_id': fields.related('picking_id','address_id','partner_id',type='many2one', relation="res.partner", string="Partner", store=True, select=True), diff --git a/addons/stock/wizard/stock_partial_move.py b/addons/stock/wizard/stock_partial_move.py index 874b22844d1..68d2aa4afcf 100644 --- a/addons/stock/wizard/stock_partial_move.py +++ b/addons/stock/wizard/stock_partial_move.py @@ -22,6 +22,7 @@ from osv import fields, osv from tools.translate import _ import time +import decimal_precision as dp class stock_partial_move_memory_out(osv.osv_memory): @@ -34,7 +35,7 @@ class stock_partial_move_memory_out(osv.osv_memory): 'prodlot_id' : fields.many2one('stock.production.lot', 'Production Lot'), 'move_id' : fields.many2one('stock.move', "Move"), 'wizard_id' : fields.many2one('stock.partial.move', string="Wizard"), - 'cost' : fields.float("Cost", help="Unit Cost for this product line"), + 'cost' : fields.float('Cost', digits_compute = dp.get_precision('Purchase Price'),help="Unit Cost for this product line"), 'currency' : fields.many2one('res.currency', string="Currency", help="Currency in which Unit cost is expressed"), } From 0e200805d05ee28a0bdbba36b19db2b1881da1c2 Mon Sep 17 00:00:00 2001 From: "mayur maheshwari (Open ERP)" Date: Tue, 7 Jun 2011 11:50:48 +0530 Subject: [PATCH 2/2] [FIX]stock:Improve a changes as per suggetion in stock lp bug: https://launchpad.net/bugs/788064 fixed bzr revid: mma@tinyerp.com-20110607062048-yx7rl8l9qlex1niq --- addons/stock/stock.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index 0c11e676ffd..d478ab39c9c 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -1548,7 +1548,7 @@ class stock_move(osv.osv): 'state': fields.selection([('draft', 'Draft'), ('waiting', 'Waiting'), ('confirmed', 'Not Available'), ('assigned', 'Available'), ('done', 'Done'), ('cancel', 'Cancelled')], 'State', readonly=True, select=True, help='When the stock move is created it is in the \'Draft\' state.\n After that, it is set to \'Not Available\' state if the scheduler did not find the products.\n When products are reserved it is set to \'Available\'.\n When the picking is done the state is \'Done\'.\ \nThe state is \'Waiting\' if the move is waiting for another one.'), - 'price_unit': fields.float('Unit Price', digits_compute= dp.get_precision('Purchase Price'), help="Technical field used to record the product cost set by the user during a picking confirmation (when average price costing method is used)"), + 'price_unit': fields.float('Unit Price', digits_compute= dp.get_precision('Account'), help="Technical field used to record the product cost set by the user during a picking confirmation (when average price costing method is used)"), 'price_currency_id': fields.many2one('res.currency', 'Currency for average price', help="Technical field used to record the currency chosen by the user during a picking confirmation (when average price costing method is used)"), 'company_id': fields.many2one('res.company', 'Company', required=True, select=True), 'partner_id': fields.related('picking_id','address_id','partner_id',type='many2one', relation="res.partner", string="Partner", store=True, select=True),