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
This commit is contained in:
Alexis de Lattre
2016-02-29 14:50:21 +01:00
parent 549ab31e82
commit 8b3dd37c33

View File

@@ -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): class StockMove(models.Model):
_inherit = 'stock.move' _inherit = 'stock.move'
@@ -101,12 +95,6 @@ class StockMove(models.Model):
return res 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): class ProcurementOrder(models.Model):
_inherit = "procurement.order" _inherit = "procurement.order"