FIX a bug in stock module: add decimal precision ! (we should not do that in a 'usability' module, but...)
Add sum on quant tree view
This commit is contained in:
@@ -21,6 +21,7 @@
|
|||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
from openerp import models, fields
|
from openerp import models, fields
|
||||||
|
import openerp.addons.decimal_precision as dp
|
||||||
|
|
||||||
|
|
||||||
class StockInventory(models.Model):
|
class StockInventory(models.Model):
|
||||||
@@ -50,11 +51,13 @@ class StockPickingType(models.Model):
|
|||||||
|
|
||||||
name = fields.Char(translate=False)
|
name = fields.Char(translate=False)
|
||||||
|
|
||||||
|
|
||||||
class StockLocationRoute(models.Model):
|
class StockLocationRoute(models.Model):
|
||||||
_inherit = 'stock.location.route'
|
_inherit = 'stock.location.route'
|
||||||
|
|
||||||
name = fields.Char(translate=False)
|
name = fields.Char(translate=False)
|
||||||
|
|
||||||
|
|
||||||
class StockWarehouseOrderpoint(models.Model):
|
class StockWarehouseOrderpoint(models.Model):
|
||||||
_inherit = 'stock.warehouse.orderpoint'
|
_inherit = 'stock.warehouse.orderpoint'
|
||||||
|
|
||||||
@@ -64,3 +67,24 @@ class StockWarehouseOrderpoint(models.Model):
|
|||||||
'An orderpoint already exists for the same company, same warehouse, '
|
'An orderpoint already exists for the same company, same warehouse, '
|
||||||
'same stock location and same product.'
|
'same stock location and same product.'
|
||||||
)]
|
)]
|
||||||
|
|
||||||
|
|
||||||
|
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'
|
||||||
|
|
||||||
|
reserved_availability = fields.Float(
|
||||||
|
digits=dp.get_precision('Product Unit of Measure'))
|
||||||
|
availability = fields.Float(
|
||||||
|
digits=dp.get_precision('Product Unit of Measure'))
|
||||||
|
|
||||||
|
|
||||||
|
class StockMoveOperationLink(models.Model):
|
||||||
|
_inherit = 'stock.move.operation.link'
|
||||||
|
|
||||||
|
qty = fields.Float(digits=dp.get_precision('Product Unit of Measure'))
|
||||||
|
|||||||
@@ -231,6 +231,9 @@ in the quantities for his reception -->
|
|||||||
<field name="reservation_id" position="attributes">
|
<field name="reservation_id" position="attributes">
|
||||||
<attribute name="invisible">0</attribute>
|
<attribute name="invisible">0</attribute>
|
||||||
</field>
|
</field>
|
||||||
|
<field name="qty" position="attributes">
|
||||||
|
<attribute name="sum">Total Qty</attribute>
|
||||||
|
</field>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user