From b4192a44a2b5cbb75a195fb17b39bd52f5f467c1 Mon Sep 17 00:00:00 2001 From: MOHANKUMAR T <31698165+mohan-13@users.noreply.github.com> Date: Mon, 8 Jul 2024 18:49:25 +0530 Subject: [PATCH] BAH-4006 | Fix. Digit precision for lot specific price details (#177) --- bahmni_stock/models/stock_move_line.py | 6 +++--- bahmni_stock/models/stock_production_lot.py | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/bahmni_stock/models/stock_move_line.py b/bahmni_stock/models/stock_move_line.py index 6486785..f31b3d9 100644 --- a/bahmni_stock/models/stock_move_line.py +++ b/bahmni_stock/models/stock_move_line.py @@ -8,9 +8,9 @@ class StockMoveLine(models.Model): _inherit = 'stock.move.line' - sale_price = fields.Float(string="Sale Price") - mrp = fields.Float(string="MRP") - cost_price = fields.Float(string="Cost Price") + sale_price = fields.Float(string="Sale Price", digits='Product Price') + mrp = fields.Float(string="MRP", digits='Product Price') + cost_price = fields.Float(string="Cost Price", digits='Product Price') balance = fields.Float(string="Balance") existing_lot_id = fields.Many2one( 'stock.lot', 'Lot/Serial Number', diff --git a/bahmni_stock/models/stock_production_lot.py b/bahmni_stock/models/stock_production_lot.py index 1bb71df..7e26621 100644 --- a/bahmni_stock/models/stock_production_lot.py +++ b/bahmni_stock/models/stock_production_lot.py @@ -88,9 +88,9 @@ def _get_future_stock_forecast(self): product_uom = self.env['product.uom'].browse(product_uom_id) lot.stock_forecast = result[0].get('sum') * product_uom.factor - sale_price = fields.Float(string="Sale Price") - mrp = fields.Float(string="MRP") - cost_price = fields.Float(string="Cost Price") + sale_price = fields.Float(string="Sale Price", digits='Product Price') + mrp = fields.Float(string="MRP", digits='Product Price') + cost_price = fields.Float(string="Cost Price", digits='Product Price') stock_forecast = fields.Float(string="Available forecast", compute=_get_future_stock_forecast,store=True, digits=dp.get_precision('Product Unit of Measure'),