From c0ca9eeab054b8941925ca15e6ba336fdd79688d Mon Sep 17 00:00:00 2001 From: David Beal Date: Wed, 20 Mar 2019 12:57:15 +0100 Subject: [PATCH] ADD module volume_precision --- volume_precision/README.rst | 63 +++ volume_precision/__init__.py | 1 + volume_precision/__manifest__.py | 20 + volume_precision/data/precision.xml | 9 + volume_precision/models/__init__.py | 1 + volume_precision/models/precision.py | 23 + volume_precision/readme/CONFIGURE.rst | 1 + volume_precision/readme/CONTRIBUTORS.rst | 1 + volume_precision/readme/DESCRIPTION.rst | 2 + .../static/description/index.html | 420 ++++++++++++++++++ 10 files changed, 541 insertions(+) create mode 100644 volume_precision/README.rst create mode 100644 volume_precision/__init__.py create mode 100644 volume_precision/__manifest__.py create mode 100644 volume_precision/data/precision.xml create mode 100644 volume_precision/models/__init__.py create mode 100644 volume_precision/models/precision.py create mode 100644 volume_precision/readme/CONFIGURE.rst create mode 100644 volume_precision/readme/CONTRIBUTORS.rst create mode 100644 volume_precision/readme/DESCRIPTION.rst create mode 100644 volume_precision/static/description/index.html diff --git a/volume_precision/README.rst b/volume_precision/README.rst new file mode 100644 index 0000000..1f3b0da --- /dev/null +++ b/volume_precision/README.rst @@ -0,0 +1,63 @@ +================ +Volume Precision +================ + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-akretion%2Fodoo--usability-lightgray.png?logo=github + :target: https://github.com/akretion/odoo-usability/tree/12.0/volume_precision + :alt: akretion/odoo-usability + +|badge1| |badge2| |badge3| + +- add Volume decimal precision +- override field definition with it + +**Table of contents** + +.. contents:: + :local: + +Configuration +============= + +Settings > Technical > Database Structure > Decimal Precision : Volume + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us smashing it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* Akretion + +Contributors +~~~~~~~~~~~~ + +David Beal + +Maintainers +~~~~~~~~~~~ + +This module is part of the `akretion/odoo-usability `_ project on GitHub. + +You are welcome to contribute. diff --git a/volume_precision/__init__.py b/volume_precision/__init__.py new file mode 100644 index 0000000..0650744 --- /dev/null +++ b/volume_precision/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/volume_precision/__manifest__.py b/volume_precision/__manifest__.py new file mode 100644 index 0000000..4c94cbf --- /dev/null +++ b/volume_precision/__manifest__.py @@ -0,0 +1,20 @@ +# Copyright 2019 David BEAL @ Akretion +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +{ + 'name': 'Volume Precision', + 'summary': 'Add a code field in company', + 'version': '12.0.0.0.1', + 'author': 'Akretion', + 'maintainer': 'Akretion', + 'license': 'AGPL-3', + 'category': 'product', + 'depends': [ + 'delivery', + ], + 'website': 'http://www.akretion.com/', + 'data': [ + 'data/precision.xml', + ], + 'installable': True, +} diff --git a/volume_precision/data/precision.xml b/volume_precision/data/precision.xml new file mode 100644 index 0000000..e1bf7a4 --- /dev/null +++ b/volume_precision/data/precision.xml @@ -0,0 +1,9 @@ + + + + + Volume + 4 + + + diff --git a/volume_precision/models/__init__.py b/volume_precision/models/__init__.py new file mode 100644 index 0000000..0729aac --- /dev/null +++ b/volume_precision/models/__init__.py @@ -0,0 +1 @@ +from . import precision diff --git a/volume_precision/models/precision.py b/volume_precision/models/precision.py new file mode 100644 index 0000000..626aa58 --- /dev/null +++ b/volume_precision/models/precision.py @@ -0,0 +1,23 @@ +# Copyright 2019 David BEAL @ Akretion +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from odoo import models, fields +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')) diff --git a/volume_precision/readme/CONFIGURE.rst b/volume_precision/readme/CONFIGURE.rst new file mode 100644 index 0000000..8e5c46a --- /dev/null +++ b/volume_precision/readme/CONFIGURE.rst @@ -0,0 +1 @@ +Settings > Technical > Database Structure > Decimal Precision : Volume diff --git a/volume_precision/readme/CONTRIBUTORS.rst b/volume_precision/readme/CONTRIBUTORS.rst new file mode 100644 index 0000000..cc14d2f --- /dev/null +++ b/volume_precision/readme/CONTRIBUTORS.rst @@ -0,0 +1 @@ +David Beal diff --git a/volume_precision/readme/DESCRIPTION.rst b/volume_precision/readme/DESCRIPTION.rst new file mode 100644 index 0000000..8c491ce --- /dev/null +++ b/volume_precision/readme/DESCRIPTION.rst @@ -0,0 +1,2 @@ +- add Volume decimal precision +- override field definition with it diff --git a/volume_precision/static/description/index.html b/volume_precision/static/description/index.html new file mode 100644 index 0000000..995ad54 --- /dev/null +++ b/volume_precision/static/description/index.html @@ -0,0 +1,420 @@ + + + + + + +Volume Precision + + + +
+

Volume Precision

+ + +

Beta License: AGPL-3 akretion/odoo-usability

+
    +
  • add Volume decimal precision
  • +
  • override field definition with it
  • +
+

Table of contents

+ +
+

Configuration

+

Settings > Technical > Database Structure > Decimal Precision : Volume

+
+
+

Bug Tracker

+

Bugs are tracked on GitHub Issues. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us smashing it by providing a detailed and welcomed +feedback.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • Akretion
  • +
+
+ +
+

Maintainers

+

This module is part of the akretion/odoo-usability project on GitHub.

+

You are welcome to contribute.

+
+
+
+ +