From 786f005b65722311cb4452c94c68c1d6d2397876 Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Mon, 29 Feb 2016 14:50:21 +0100 Subject: [PATCH] stock_usability : Only do the change of precision on function fields, not on real field. In fact, when we change the precision on "real" fields, it will convert them from type "double precision" in postgres to type "numeric". One of the consequences of this it that it deletes the stock.history SQL view that is defined in stock_account/wizard/stock_valuation_history.py... but this SQL view is never re-created until you reload the module stock_account. So it's not a good idea of thix to bug in this stock_usability module ; it needs to be fixed in the stock module itself. More work needs to be done on https://github.com/odoo/odoo/pull/10038 --- stock_usability/stock.py | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/stock_usability/stock.py b/stock_usability/stock.py index 780cafc..12dcba6 100644 --- a/stock_usability/stock.py +++ b/stock_usability/stock.py @@ -67,12 +67,6 @@ class StockWarehouseOrderpoint(models.Model): )] -class StockQuant(models.Model): - _inherit = 'stock.quant' - - qty = fields.Float(digits=dp.get_precision('Product Unit of Measure')) - - class StockMove(models.Model): _inherit = 'stock.move' @@ -101,12 +95,6 @@ class StockMove(models.Model): return res -class StockMoveOperationLink(models.Model): - _inherit = 'stock.move.operation.link' - - qty = fields.Float(digits=dp.get_precision('Product Unit of Measure')) - - class ProcurementOrder(models.Model): _inherit = "procurement.order"