Files
odoo-usability/volume_precision/models/precision.py
2021-11-26 18:57:02 +03:00

25 lines
588 B
Python
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Copyright 2019 David BEAL @ Akretion
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import fields, models
from odoo.addons import decimal_precision as dp
class ProductTemplate(models.Model):
_inherit = "product.template"
volume = fields.Float(digits=dp.get_precision("Volume"))
class ProductProduct(models.Model):
_inherit = "product.product"
volume = fields.Float(digits=dp.get_precision("Volume"))
class StockPicking(models.Model):
_inherit = "stock.picking"
volume = fields.Float(digits=dp.get_precision("Volume"))