Search 1.9 billion lines of Odoo code on GitHub

web_widget_uom_view_precision

Author: Yiğit Budak, Odoo Community Association (OCA)
License: AGPL-3
Branch: 12.0
Repository: aaltinisik/web
Dependencies: base, stock, uom, and web
Languages: HTML (346, 62.0%), JavaScript (63, 11.3%), PO File (28, 5.0%), Python (41, 7.3%), XML (21, 3.8%), and reStructuredText (59, 10.6%)

<h1 class="title">UOM View Precision Widget</h1> <p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/web/tree/12.0/web_widget_uom_view_precision"><img alt="OCA/web" src="https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/web-12-0/web-12-0-web_widget_uom_view_precision"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/162/12.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p> <p>This module provides a widget for quantity fields. It formats the value according to the UOM of the product.</p> <img alt="Product list with formatted quantity" src="https://raw.githubusercontent.com/OCA/web/12.0/web_widget_uom_view_precision/static/description/example.png" style="width: 600px;" /> <p><strong>Table of contents</strong></p> <div class="contents local topic" id="contents"> <ul class="simple"> <li><a class="reference internal" href="#usage" id="id1">Usage</a></li> <li><a class="reference internal" href="#bug-tracker" id="id2">Bug Tracker</a></li> <li><a class="reference internal" href="#credits" id="id3">Credits</a><ul> <li><a class="reference internal" href="#authors" id="id4">Authors</a></li> <li><a class="reference internal" href="#maintainers" id="id5">Maintainers</a></li> </ul> </li> </ul> </div> <a name="usage"></a> <h2><a class="toc-backref" href="#id1">Usage</a></h2> <p>Set your preferred precision on UOM records.</p> <p>In the form view declaration, put widget='uom' attribute in the field tag:</p> <pre> <code>... &lt;field name=&quot;arch&quot; type=&quot;xml&quot;&gt; &lt;form string=&quot;View name&quot;&gt; ... &lt;field name=&quot;quantity_field&quot; widget=&quot;uom&quot;/&gt; ... &lt;/form&gt; &lt;/field&gt; ...</code> </pre> <p>You can also specify the uom field with (default is &quot;uom_id&quot;):</p> <pre> <code>... &lt;field name=&quot;mytimefieldname&quot; widget=&quot;uom&quot; options=&quot;{'uom_field': 'myUOMfield'}&quot;/&gt; ...</code> </pre> <a name="bug-tracker"></a> <h2><a class="toc-backref" href="#id2">Bug Tracker</a></h2> <p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/web/issues">GitHub Issues</a>. 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 <a class="reference external" href="https://github.com/OCA/web/issues/new?body=module:%20web_widget_uom_view_precision%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p> <p>Do not contact contributors directly about support or help with technical issues.</p> <a name="credits"></a> <h2><a class="toc-backref" href="#id3">Credits</a></h2> <a name="authors"></a> <h3><a class="toc-backref" href="#id4">Authors</a></h3> <ul class="simple"> <li>Yiğit Budak</li> </ul> <a name="maintainers"></a> <h3><a class="toc-backref" href="#id5">Maintainers</a></h3> <p>This module is maintained by the OCA.</p> <a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a> <p>OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.</p> <p>This module is part of the <a class="reference external" href="https://github.com/OCA/web/tree/12.0/web_widget_uom_view_precision">OCA/web</a> project on GitHub.</p> <p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>