Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
649f0bd
[ADD] web_editor_disable_chatgpt
amh-mw Oct 3, 2025
bf9a86b
Create module web_datetime_picker_default_time
grindtildeath Jul 10, 2024
ea5d4b9
Support dynamic default time from another field
grindtildeath Jul 16, 2024
be138d1
Apply default time on manual entry of date string
grindtildeath Aug 13, 2024
68f91a8
[UPD] Update web_datetime_picker_default_time.pot
Aug 29, 2024
3118957
[BOT] post-merge updates
OCA-git-bot Aug 29, 2024
f68d630
Added translation using Weblate (Italian)
mymage Sep 16, 2024
459d5d4
[IMP] web_datetime_picker_default_time: pre-commit auto fixes
natuan9 Dec 11, 2024
bda5862
[MIG] web_datetime_picker_default_time: Migration to 18.0
natuan9 Dec 14, 2024
a53f0ae
Merge PR #3311 into 18.0
OCA-git-bot Oct 9, 2025
334d845
[UPD] Update web_datetime_picker_default_time.pot
Oct 9, 2025
53b5ca6
[BOT] post-merge updates
OCA-git-bot Oct 9, 2025
21cd901
[IMP] web_company_color: mobile systray button
DavidJForgeFlow Oct 14, 2025
d35d235
web_dialog_size: prevent export wizard from shrinking when dialog max…
BhaveshHeliconia Oct 15, 2025
63b30c5
Merge PR #3302 into 18.0
OCA-git-bot Oct 15, 2025
66d3088
[UPD] Update web_editor_disable_chatgpt.pot
Oct 15, 2025
32ee0de
[BOT] post-merge updates
OCA-git-bot Oct 15, 2025
118d537
Merge PR #3319 into 18.0
OCA-git-bot Oct 15, 2025
e9cc5a0
[BOT] post-merge updates
OCA-git-bot Oct 15, 2025
28f763c
Merge PR #3317 into 18.0
OCA-git-bot Oct 15, 2025
ac4500d
[BOT] post-merge updates
OCA-git-bot Oct 15, 2025
9d1498e
Added translation using Weblate (Italian)
mymage Oct 16, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,13 @@ addon | version | maintainers | summary
--- | --- | --- | ---
[web_calendar_slot_duration](web_calendar_slot_duration/) | 18.0.1.0.0 | <a href='https://github.com/Yajo'><img src='https://github.com/Yajo.png' width='32' height='32' style='border-radius:50%;' alt='Yajo'/></a> | Customizable calendar slot durations
[web_chatter_position](web_chatter_position/) | 18.0.1.0.0 | <a href='https://github.com/trisdoan'><img src='https://github.com/trisdoan.png' width='32' height='32' style='border-radius:50%;' alt='trisdoan'/></a> | Add an option to change the chatter position
[web_company_color](web_company_color/) | 18.0.1.0.3 | | Web Company Color
[web_company_color](web_company_color/) | 18.0.1.0.4 | | Web Company Color
[web_copy_confirm](web_copy_confirm/) | 18.0.1.0.0 | | Show confirmation dialogue before copying records
[web_dialog_size](web_dialog_size/) | 18.0.1.0.0 | | A module that lets the user expand a dialog box to the full screen width.
[web_datetime_picker_default_time](web_datetime_picker_default_time/) | 18.0.1.0.0 | <a href='https://github.com/grindtildeath'><img src='https://github.com/grindtildeath.png' width='32' height='32' style='border-radius:50%;' alt='grindtildeath'/></a> | Allows to define a default time on datetime picker
[web_dialog_size](web_dialog_size/) | 18.0.1.0.1 | | A module that lets the user expand a dialog box to the full screen width.
[web_disable_export_group](web_disable_export_group/) | 18.0.1.0.0 | | Web Disable Export Group
[web_editor_class_selector](web_editor_class_selector/) | 18.0.1.0.0 | <a href='https://github.com/carlos-lopez-tecnativa'><img src='https://github.com/carlos-lopez-tecnativa.png' width='32' height='32' style='border-radius:50%;' alt='carlos-lopez-tecnativa'/></a> | Web editor class selector
[web_editor_disable_chatgpt](web_editor_disable_chatgpt/) | 18.0.1.0.0 | | Web Disable ChatGPT
[web_environment_ribbon](web_environment_ribbon/) | 18.0.1.0.3 | | Web Environment Ribbon
[web_excel_export_dynamic_expand](web_excel_export_dynamic_expand/) | 18.0.1.0.0 | | Export collapsed groups or the full tree, based on its view.
[web_favicon](web_favicon/) | 18.0.1.0.0 | | Allows to set a custom shortcut icon (aka favicon)
Expand Down
1 change: 1 addition & 0 deletions checklog-odoo.cfg
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[checklog-odoo]
ignore=
WARNING.* 0 failed, 0 error\(s\).*
Missing widget: res_partner_many2one for field of type many2one
4 changes: 3 additions & 1 deletion setup/_metapackage/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
[project]
name = "odoo-addons-oca-web"
version = "18.0.20251007.0"
version = "18.0.20251015.0"
dependencies = [
"odoo-addon-web_calendar_slot_duration==18.0.*",
"odoo-addon-web_chatter_position==18.0.*",
"odoo-addon-web_company_color==18.0.*",
"odoo-addon-web_copy_confirm==18.0.*",
"odoo-addon-web_datetime_picker_default_time==18.0.*",
"odoo-addon-web_dialog_size==18.0.*",
"odoo-addon-web_disable_export_group==18.0.*",
"odoo-addon-web_editor_class_selector==18.0.*",
"odoo-addon-web_editor_disable_chatgpt==18.0.*",
"odoo-addon-web_environment_ribbon==18.0.*",
"odoo-addon-web_excel_export_dynamic_expand==18.0.*",
"odoo-addon-web_favicon==18.0.*",
Expand Down
2 changes: 1 addition & 1 deletion web_company_color/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Web Company Color
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:622d249810675797d351ceaaa800f9df89d92067ce131c14087b0b92fbf78283
!! source digest: sha256:75f2396aade33370837fa8dc343dfb818e4b777b8115331fed547449727181f5
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
Expand Down
2 changes: 1 addition & 1 deletion web_company_color/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{
"name": "Web Company Color",
"category": "web",
"version": "18.0.1.0.3",
"version": "18.0.1.0.4",
"author": "Alexandre Díaz, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/web",
"depends": ["web", "base_sparse_field"],
Expand Down
5 changes: 4 additions & 1 deletion web_company_color/models/res_company.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,10 @@ class ResCompany(models.Model):
background-color: %(color_navbar_bg_hover)s !important;
}
}
.o_menu_systray button{
.o_menu_systray button,
.o_navbar_breadcrumbs,
.o_main_navbar button,
.o_menu_toggle {
color: %(color_navbar_text)s !important;
&:hover, &:focus, &:active, &:focus:active {
background-color: %(color_navbar_bg_hover)s !important;
Expand Down
2 changes: 1 addition & 1 deletion web_company_color/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ <h1>Web Company Color</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:622d249810675797d351ceaaa800f9df89d92067ce131c14087b0b92fbf78283
!! source digest: sha256:75f2396aade33370837fa8dc343dfb818e4b777b8115331fed547449727181f5
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" 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 image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/license-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/web/tree/18.0/web_company_color"><img alt="OCA/web" src="https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/web-18-0/web-18-0-web_company_color"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/web&amp;target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This module change navbar colors based in the company logo colors.</p>
Expand Down
144 changes: 144 additions & 0 deletions web_datetime_picker_default_time/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

================================
Web Datetime Picker Default Time
================================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:57ed080d68dcc33c99d25c23549366d7703114c6c61f803e30e21f2c01fd0141
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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/license-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-OCA%2Fweb-lightgray.png?logo=github
:target: https://github.com/OCA/web/tree/18.0/web_datetime_picker_default_time
:alt: OCA/web
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/web-18-0/web-18-0-web_datetime_picker_default_time
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/web&target_branch=18.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module customizes the datetime picker widget and allows to define a
default time to be applied in case the user selects only a Date.

For example, if a user wants to define a commitment date without having
to specify the time on that date, setting the default time value on the
field in the Form view allows to ensure the commitment date will be set
to this time instead of the time when the page was loaded by the
browser.

**Table of contents**

.. contents::
:local:

Usage
=====

**Static Default Time** You can define the default time as follows for a
static value For ``widget="datetime"``:

.. code:: xml

<field name="your_datetime_field" widget="datetime" options="{'defaultTime': {'hour': 8, 'minute': 30, 'second': 15 }}"/>

For ``widget="daterange"``:

.. code:: xml

<field name="your_start_datetime_field" widget="datetime" options="{'end_date_field': 'your_end_datetime_field', 'defaultStartTime': {'hour': 2, 'minute': 22, 'second': 22,}, 'defaultEndTime': {'hour': 3, 'minute': 33, 'second': 33,}}"/>

**Dynamic Default Time** Otherwise you can also use a JSON field to make
it dynamic through a compute function, and reference this field in the
view:

.. code:: python

start_time = field.Json(compute="_compute_start_time")

def _compute_start_time(self):
for rec in self:
rec.start_time = {'hour': 8, 'minute': 30, 'second': 15 }

.. code:: xml

<field name="start_time" invisible="1" />
<field name="your_datetime_field" options="{'defaultTime': 'start_time'}"/>

Known issues / Roadmap
======================

- Handle Timezone related to the default time

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/web/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/web/issues/new?body=module:%20web_datetime_picker_default_time%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

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

Credits
=======

Authors
-------

* Camptocamp

Contributors
------------

- Akim Juillerat akim.juillerat@camptocamp.com
- Iván Todorovich ivan.todorovich@camptocamp.com

- `Trobz <https://trobz.com>`__:

- Tuan Nguyen <tuanna@trobz.com>

Other credits
-------------

The migration of this module from 16.0 to 18.0 was financially supported
by Camptocamp.

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

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.

.. |maintainer-grindtildeath| image:: https://github.com/grindtildeath.png?size=40px
:target: https://github.com/grindtildeath
:alt: grindtildeath

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-grindtildeath|

This module is part of the `OCA/web <https://github.com/OCA/web/tree/18.0/web_datetime_picker_default_time>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
Empty file.
23 changes: 23 additions & 0 deletions web_datetime_picker_default_time/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Copyright 2024 Camptocamp SA
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl)
{
"name": "Web Datetime Picker Default Time",
"summary": "Allows to define a default time on datetime picker",
"version": "18.0.1.0.0",
"category": "web",
"website": "https://github.com/OCA/web",
"author": "Camptocamp, Odoo Community Association (OCA)",
"maintainers": ["grindtildeath"],
"license": "AGPL-3",
"depends": [
"web",
],
"assets": {
"web.assets_backend": [
"/web_datetime_picker_default_time/static/src/js/*.js",
],
"web.assets_unit_tests": [
"web_datetime_picker_default_time/static/tests/web_datetime_picker_default_time.test.js",
],
},
}
14 changes: 14 additions & 0 deletions web_datetime_picker_default_time/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 18.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
3 changes: 3 additions & 0 deletions web_datetime_picker_default_time/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
4 changes: 4 additions & 0 deletions web_datetime_picker_default_time/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
* Akim Juillerat <akim.juillerat@camptocamp.com>
* Iván Todorovich <ivan.todorovich@camptocamp.com>
- [Trobz](https://trobz.com):
- Tuan Nguyen \<<tuanna@trobz.com>\>
1 change: 1 addition & 0 deletions web_datetime_picker_default_time/readme/CREDITS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The migration of this module from 16.0 to 18.0 was financially supported by Camptocamp.
7 changes: 7 additions & 0 deletions web_datetime_picker_default_time/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
This module customizes the datetime picker widget and allows to define a default
time to be applied in case the user selects only a Date.

For example, if a user wants to define a commitment date without having to specify
the time on that date, setting the default time value on the field in the Form view
allows to ensure the commitment date will be set to this time instead of the time
when the page was loaded by the browser.
1 change: 1 addition & 0 deletions web_datetime_picker_default_time/readme/ROADMAP.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* Handle Timezone related to the default time
28 changes: 28 additions & 0 deletions web_datetime_picker_default_time/readme/USAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
**Static Default Time**
You can define the default time as follows for a static value
For `widget="datetime"`:
```xml
<field name="your_datetime_field" widget="datetime" options="{'defaultTime': {'hour': 8, 'minute': 30, 'second': 15 }}"/>
```

For `widget="daterange"`:
```xml
<field name="your_start_datetime_field" widget="datetime" options="{'end_date_field': 'your_end_datetime_field', 'defaultStartTime': {'hour': 2, 'minute': 22, 'second': 22,}, 'defaultEndTime': {'hour': 3, 'minute': 33, 'second': 33,}}"/>
```

**Dynamic Default Time**
Otherwise you can also use a JSON field to make it dynamic through a compute function,
and reference this field in the view:

```python
start_time = field.Json(compute="_compute_start_time")

def _compute_start_time(self):
for rec in self:
rec.start_time = {'hour': 8, 'minute': 30, 'second': 15 }
```

```xml
<field name="start_time" invisible="1" />
<field name="your_datetime_field" options="{'defaultTime': 'start_time'}"/>
```
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading