odex25_standard/odex25_project/web_widget_time_delta
zainab8585 b70e055f52 [REMOVE]REMOVE PYCHACE 2024-07-28 12:18:20 +02:00
..
i18n Add odex25_project 2024-06-24 14:17:49 +03:00
images Add odex25_project 2024-06-24 14:17:49 +03:00
static Add odex25_project 2024-06-24 14:17:49 +03:00
view Add odex25_project 2024-06-24 14:17:49 +03:00
README.rst Add odex25_project 2024-06-24 14:17:49 +03:00
__init__.py Add odex25_project 2024-06-24 14:17:49 +03:00
__manifest__.py Add odex25_project 2024-06-24 14:17:49 +03:00

README.rst

Timedelta widget for Odoo web client
================================


Features
========


* Display the time on form view

  |formview|

* Display the time on list view

  |listview|


Usage
=====

You need to declare a integer field Default set second.

    duration = fields.integer(
        string="Duration",
        help="Set Duration",
        default="60"
    )


In the view declaration, put widget='time_delta' for Form and  widget='time_delta_list' for List

    ...
    <field name="arch" type="xml">
        <tree string="View name">
            ...
            <field name="duration" widget="time_delta_list"/>
            ...
        </tree>
    </field>
    ...

    ...
    <field name="arch" type="xml">
        <form string="View name">
            ...
            <field name="duration" widget="time_delta"/>
            ...
        </rom>
    </field>
    ...