Search 1.9 billion lines of Odoo code on GitHub

web_time_widget

Author: Center of Research and Development
License: LGPL-3
Branch: 12.0-v2-dev-attendance-count
Repository: niulinlnc/Odoo-DingTalk
Dependencies: web
Languages: HTML (170, 34.6%), JavaScript (177, 36.0%), PO File (36, 7.3%), Python (27, 5.5%), XML (13, 2.6%), and reStructuredText (69, 14.0%)
Other branches: 13.0-dev-attendance-count

<a name="full-float-time-widget"></a> <h2>Full Float Time Widget</h2> <p><a class="reference external" href="http://www.gnu.org/licenses/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/license-LGPL--3-blue.png" /></a> <a class="reference external" href="https://crnd.pro/"><img alt="badge5" src="https://img.shields.io/badge/maintainer-CR&amp;D-purple.png" /></a> <a class="reference external" href="https://github.com/crnd-inc/crnd-web/tree/11.0/web_time_widget"><img alt="badge6" src="https://img.shields.io/badge/GitHub-CRnD_Web_Full_Float_Time_Widget-green.png" /></a></p> <p>Widget consists of two parts: Float Time Duration and Float Full Time.</p> <ol class="arabic"> <li><p class="first">Float Time Duration</p> <blockquote> <p>Widget implies: the integer part of a float represents seconds, the fractional part represents milliseconds.</p> <p>For example: 94225.22 =&gt; 94225 seconds and 22 milliseconds.</p> <p>Full template is: 0d 00:00:00.000 where Dd hh:mm:ss,msc are:</p> <ul class="simple"> <li>D - days, d - literal (days, can be translated), h - hours, m - minutes, s - seconds, msc - milliseconds.</li> </ul> <p>For example: 1d 02:10:25,220 to float 94225.22.</p> <p>Widget has the following options:</p> <ul class="simple"> <li>round_off - true, display template without milliseconds (false by default),</li> <li>time_only - true, display template without days (false by default).</li> </ul> <p>For example:</p> <ul> <li><p class="first">round_off: false, time_only: false:</p> <blockquote> <p>edit mode:</p> <p>0d 00:00:00.000 (94225.22 to template 1d 02:10:25,220, 44439.999 to template 0d 12:20:39,999)</p> <p>normal mode:</p> <p>0d 00:00:00.000 (94225.22 to template 1d 02:10:25,220, 44439.999 to template 12:20:39,999)</p> </blockquote> </li> <li><p class="first">round_off: true, time_only: false: 0d 00:00:00 (94225.22 to template 1d 02:10:25)</p> <blockquote> <p>edit mode:</p> <p>0d 00:00:00 (94225.22 to template 1d 02:10:25, 44439.999 to template 0d 12:20:39)</p> <p>normal mode:</p> <p>0d 00:00:00 (94225.22 to template 1d 02:10:25, 44439.999 to template 12:20:39)</p> </blockquote> </li> <li><p class="first">round_off: true, time_only: true: 00:00:00 (94225.22 to template 26:10:25)</p> </li> <li><p class="first">round_off: false, time_only: true: 00:00:00,000 (94225.22 to template 26:10:25,220)</p> </li> </ul> <p>It simplifies operations with time.</p> </blockquote> </li> <li><p class="first">Float Full Time</p> <blockquote> <p>Widget based on Float Time Duration widget.</p> <p>Represents a float as a twenty-four hours time.</p> <p>Widget restricts inappropriate input.</p> <p>Data can be from 00:00:00,000 to 23:59:59,999 and only positive value.</p> <p>It has the same options, but time_only always is true (except days).</p> <p>It can be used for marking the time of start or stop any process.</p> <p>It means that it will contains the number of seconds from the start of the day.</p> <p>For example:</p> <ul class="simple"> <li>00:00:00,000 in float 0 (midnight)</li> <li>start_at = 01:22:30,220 (in float 4950.22 seconds from midnight)</li> <li>stop_at = 04:45:15,560 (in float 17115.56 seconds from midnight)</li> </ul> <p>It simplifies operations with time.</p> </blockquote> </li> </ol> <p>How it works:</p> <p>Float Time Duration</p> <ol class="arabic"> <li><p class="first">Define the 'float' field in the model:</p> <blockquote> <pre> <code lang="python">duration = fields.Float()</code> </pre> </blockquote> </li> <li><p class="first">Define the Float Time Duration widget on the form or tree view:</p> <blockquote> <pre> <code lang="xml">&lt;field name=&quot;duration&quot; widget=&quot;float_time_duration&quot; options=&quot;{'round_off': True, 'time_only': True}&quot;/&gt;</code> </pre> </blockquote> </li> </ol> <p>Float Full Time</p> <ol class="arabic"> <li><p class="first">Define a field 'float' in the model:</p> <blockquote> <pre> <code lang="python">start_at = fields.Float()</code> </pre> </blockquote> </li> <li><p class="first">Define a widget Float Full Time on the form or tree view:</p> <blockquote> <pre> <code lang="xml">&lt;field name=&quot;start_at&quot; widget=&quot;float_full_time&quot; options=&quot;{'round_off': True}&quot;/&gt;</code> </pre> </blockquote> </li> </ol> <a name="launch-your-own-itsm-system-in-60-seconds"></a> <h3>Launch your own ITSM system in 60 seconds:</h3> <p>Create your own <a class="reference external" href="https://yodoo.systems/saas/template/bureaucrat-itsm-demo-data-95">Bureaucrat ITSM</a> database</p> <p><a class="reference external" href="https://yodoo.systems"><img alt="badge3" src="https://img.shields.io/badge/powered%20by-yodoo.systems-00a09d.png" /></a></p> <a name="bug-tracker"></a> <h2>Bug Tracker</h2> <p>Bugs are tracked on <a class="reference external" href="https://crnd.pro/requests">https://crnd.pro/requests</a>. In case of trouble, please report there.</p> <a name="maintainer"></a> <h3>Maintainer</h3> <img alt="https://crnd.pro/web/image/3699/300x140/crnd.png" src="https://crnd.pro/web/image/3699/300x140/crnd.png" /> <p>Our web site: <a class="reference external" href="https://crnd.pro/">https://crnd.pro/</a></p> <p>This module is maintained by the Center of Research &amp; Development company.</p> <p>We can provide you further Odoo Support, Odoo implementation, Odoo customization, Odoo 3rd Party development and integration software, consulting services. Our main goal is to provide the best quality product for you.</p> <p>For any questions <a class="reference external" href="mailto:info&#64;crnd.pro">contact us</a>.</p>