Initial commit: OCA Technical packages (595 packages)

This commit is contained in:
Ernad Husremovic 2025-08-29 15:43:03 +02:00
commit 2cc02aac6e
24950 changed files with 2318079 additions and 0 deletions

View file

@ -0,0 +1,47 @@
# User Locale Settings
Odoo addon: base_user_locale
## Installation
```bash
pip install odoo-bringout-oca-server-ux-base_user_locale
```
## Dependencies
This addon depends on:
- base_setup
- calendar
## Manifest Information
- **Name**: User Locale Settings
- **Version**: 16.0.1.1.1
- **Category**: Usability
- **License**: AGPL-3
- **Installable**: True
## Source
Based on [OCA/server-ux](https://github.com/OCA/server-ux) branch 16.0, addon `base_user_locale`.
## License
This package maintains the original AGPL-3 license from the upstream Odoo project.
## Documentation
- Overview: doc/OVERVIEW.md
- Architecture: doc/ARCHITECTURE.md
- Models: doc/MODELS.md
- Controllers: doc/CONTROLLERS.md
- Wizards: doc/WIZARDS.md
- Reports: doc/REPORTS.md
- Security: doc/SECURITY.md
- Install: doc/INSTALL.md
- Usage: doc/USAGE.md
- Configuration: doc/CONFIGURATION.md
- Dependencies: doc/DEPENDENCIES.md
- Troubleshooting: doc/TROUBLESHOOTING.md
- FAQ: doc/FAQ.md

View file

@ -0,0 +1,98 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association
====================
User Locale Settings
====================
..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:88c4ef438dac4a712e650cf04f2f670b843b122b32170d50148fc80ec2ee8da7
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |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%2Fserver--ux-lightgray.png?logo=github
:target: https://github.com/OCA/server-ux/tree/16.0/base_user_locale
:alt: OCA/server-ux
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/server-ux-16-0/server-ux-16-0-base_user_locale
: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/server-ux&target_branch=16.0
:alt: Try me on Runboat
|badge1| |badge2| |badge3| |badge4| |badge5|
This module allows overriding following settings for user or company:
* Time format
* Date format
* First day of the week
* Decimal Separator
* Thousands Separator
**Table of contents**
.. contents::
:local:
Usage
=====
To configure it at company level go to *Settings / General Settings* and search
the section *Locale*.
To configure it at user level go to your user preferences.
Bug Tracker
===========
Bugs are tracked on `GitHub Issues <https://github.com/OCA/server-ux/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/server-ux/issues/new?body=module:%20base_user_locale%0Aversion:%2016.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
~~~~~~~
* CorporateHub
Contributors
~~~~~~~~~~~~
* `CorporateHub <https://corporatehub.eu/>`__
* Alexey Pelykh <alexey.pelykh@corphub.eu>
* Miquel Raïch <miquel.raich@forgeflow.com>
* Lois Rilo <lois.rilo@forgeflow.com>
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.
This module is part of the `OCA/server-ux <https://github.com/OCA/server-ux/tree/16.0/base_user_locale>`_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

View file

@ -0,0 +1,4 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from . import controllers
from . import models

View file

@ -0,0 +1,15 @@
# Copyright 2019 Brainbean Apps (https://brainbeanapps.com)
# Copyright 2022 CorporateHub (https://corporatehub.eu)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
"name": "User Locale Settings",
"version": "16.0.1.1.1",
"author": "CorporateHub, Odoo Community Association (OCA)",
"category": "Usability",
"license": "AGPL-3",
"depends": ["base_setup", "calendar"],
"website": "https://github.com/OCA/server-ux",
"data": ["views/res_config_settings.xml", "views/res_users.xml"],
"installable": True,
}

View file

@ -0,0 +1,3 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from . import web_client

View file

@ -0,0 +1,48 @@
# Copyright 2019 Brainbean Apps (https://brainbeanapps.com)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
import json
from odoo import http
from odoo.http import request
from odoo.addons.web.controllers.utils import ensure_db
from odoo.addons.web.controllers.webclient import WebClient
class WebClient(WebClient):
def get_user_lang_parameters(self, user):
res = {}
date_format = user.date_format or user.env.company.date_format
if date_format:
res.update({"date_format": date_format})
time_format = user.time_format or user.env.company.time_format
if time_format:
res.update({"time_format": time_format})
week_start = user.week_start or user.env.company.week_start
if week_start:
res.update({"week_start": int(week_start)}) # NOTE: WebClient needs int
point_decimal = user.decimal_point or user.env.company.decimal_point
if point_decimal:
res.update({"decimal_point": point_decimal})
sep_thousands = user.thousands_sep or user.env.company.thousands_sep
if sep_thousands:
res.update({"thousands_sep": sep_thousands})
return res
@http.route(
"/web/webclient/translations/<string:unique>",
type="http",
auth="public",
cors="*",
)
def translations(self, unique, mods=None, lang=None):
res = super().translations(unique, mods, lang)
if "uid" in request.session:
ensure_db()
user = request.env["res.users"].sudo().browse(request.session["uid"])
json_data = res.get_data()
data = json.loads(json_data)
data["lang_parameters"].update(self.get_user_lang_parameters(user))
res.set_data(json.dumps(data))
return res

View file

@ -0,0 +1,157 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * base_user_locale
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.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"
#. module: base_user_locale
#: model_terms:ir.ui.view,arch_db:base_user_locale.res_config_settings_view_form
msgid ""
"<span class=\"fa fa-lg fa-building-o\" title=\"Values set here are company-"
"specific.\" role=\"img\" aria-label=\"Values set here are company-"
"specific.\" groups=\"base.group_multi_company\"/>"
msgstr ""
#. module: base_user_locale
#: model:ir.model,name:base_user_locale.model_calendar_event
msgid "Calendar Event"
msgstr ""
#. module: base_user_locale
#: model:ir.model,name:base_user_locale.model_res_company
msgid "Companies"
msgstr ""
#. module: base_user_locale
#: model:ir.model,name:base_user_locale.model_res_config_settings
msgid "Config Settings"
msgstr ""
#. module: base_user_locale
#: model_terms:ir.ui.view,arch_db:base_user_locale.res_config_settings_view_form
msgid "Configure global override of date format for all users."
msgstr ""
#. module: base_user_locale
#: model_terms:ir.ui.view,arch_db:base_user_locale.res_config_settings_view_form
msgid "Configure global override of time format for all users."
msgstr ""
#. module: base_user_locale
#: model_terms:ir.ui.view,arch_db:base_user_locale.res_config_settings_view_form
msgid "Configure global override of week start for all users."
msgstr ""
#. module: base_user_locale
#: model:ir.model.fields,field_description:base_user_locale.field_res_company__date_format
#: model:ir.model.fields,field_description:base_user_locale.field_res_config_settings__date_format
#: model:ir.model.fields,field_description:base_user_locale.field_res_users__date_format
msgid "Date Format"
msgstr ""
#. module: base_user_locale
#: model:ir.model.fields,field_description:base_user_locale.field_res_company__decimal_point
#: model:ir.model.fields,field_description:base_user_locale.field_res_config_settings__decimal_point
#: model:ir.model.fields,field_description:base_user_locale.field_res_users__decimal_point
msgid "Decimal Separator"
msgstr ""
#. module: base_user_locale
#: model:ir.model.fields.selection,name:base_user_locale.selection__res_company__week_start__5
#: model:ir.model.fields.selection,name:base_user_locale.selection__res_users__week_start__5
msgid "Friday"
msgstr ""
#. module: base_user_locale
#: model_terms:ir.ui.view,arch_db:base_user_locale.res_config_settings_view_form
msgid "Locale"
msgstr ""
#. module: base_user_locale
#: model:ir.model.fields.selection,name:base_user_locale.selection__res_company__week_start__1
#: model:ir.model.fields.selection,name:base_user_locale.selection__res_users__week_start__1
msgid "Monday"
msgstr ""
#. module: base_user_locale
#: model:ir.model.fields.selection,name:base_user_locale.selection__res_company__week_start__6
#: model:ir.model.fields.selection,name:base_user_locale.selection__res_users__week_start__6
msgid "Saturday"
msgstr ""
#. module: base_user_locale
#: model:ir.model.fields,help:base_user_locale.field_res_company__date_format
#: model:ir.model.fields,help:base_user_locale.field_res_company__decimal_point
#: model:ir.model.fields,help:base_user_locale.field_res_company__thousands_sep
#: model:ir.model.fields,help:base_user_locale.field_res_company__time_format
#: model:ir.model.fields,help:base_user_locale.field_res_config_settings__date_format
#: model:ir.model.fields,help:base_user_locale.field_res_config_settings__decimal_point
#: model:ir.model.fields,help:base_user_locale.field_res_config_settings__thousands_sep
#: model:ir.model.fields,help:base_user_locale.field_res_config_settings__time_format
#: model:ir.model.fields,help:base_user_locale.field_res_users__date_format
#: model:ir.model.fields,help:base_user_locale.field_res_users__decimal_point
#: model:ir.model.fields,help:base_user_locale.field_res_users__thousands_sep
#: model:ir.model.fields,help:base_user_locale.field_res_users__time_format
msgid ""
"See Settings > Translations > Languages and then click on any language to "
"see the Legends for supported Date and Time Formats and some examples"
msgstr ""
#. module: base_user_locale
#: model:ir.model.fields.selection,name:base_user_locale.selection__res_company__week_start__7
#: model:ir.model.fields.selection,name:base_user_locale.selection__res_users__week_start__7
msgid "Sunday"
msgstr ""
#. module: base_user_locale
#: model:ir.model.fields,field_description:base_user_locale.field_res_company__thousands_sep
#: model:ir.model.fields,field_description:base_user_locale.field_res_config_settings__thousands_sep
#: model:ir.model.fields,field_description:base_user_locale.field_res_users__thousands_sep
msgid "Thousands Separator"
msgstr ""
#. module: base_user_locale
#: model:ir.model.fields.selection,name:base_user_locale.selection__res_company__week_start__4
#: model:ir.model.fields.selection,name:base_user_locale.selection__res_users__week_start__4
msgid "Thursday"
msgstr ""
#. module: base_user_locale
#: model:ir.model.fields,field_description:base_user_locale.field_res_company__time_format
#: model:ir.model.fields,field_description:base_user_locale.field_res_config_settings__time_format
#: model:ir.model.fields,field_description:base_user_locale.field_res_users__time_format
msgid "Time Format"
msgstr ""
#. module: base_user_locale
#: model:ir.model.fields.selection,name:base_user_locale.selection__res_company__week_start__2
#: model:ir.model.fields.selection,name:base_user_locale.selection__res_users__week_start__2
msgid "Tuesday"
msgstr ""
#. module: base_user_locale
#: model:ir.model,name:base_user_locale.model_res_users
msgid "User"
msgstr ""
#. module: base_user_locale
#: model:ir.model.fields.selection,name:base_user_locale.selection__res_company__week_start__3
#: model:ir.model.fields.selection,name:base_user_locale.selection__res_users__week_start__3
msgid "Wednesday"
msgstr ""
#. module: base_user_locale
#: model:ir.model.fields,field_description:base_user_locale.field_res_company__week_start
#: model:ir.model.fields,field_description:base_user_locale.field_res_config_settings__week_start
#: model:ir.model.fields,field_description:base_user_locale.field_res_users__week_start
msgid "Week Start"
msgstr ""

View file

@ -0,0 +1,157 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * base_user_locale
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.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"
#. module: base_user_locale
#: model_terms:ir.ui.view,arch_db:base_user_locale.res_config_settings_view_form
msgid ""
"<span class=\"fa fa-lg fa-building-o\" title=\"Values set here are company-"
"specific.\" role=\"img\" aria-label=\"Values set here are company-"
"specific.\" groups=\"base.group_multi_company\"/>"
msgstr ""
#. module: base_user_locale
#: model:ir.model,name:base_user_locale.model_calendar_event
msgid "Calendar Event"
msgstr "Događaj na kalendaru"
#. module: base_user_locale
#: model:ir.model,name:base_user_locale.model_res_company
msgid "Companies"
msgstr "Kompanije"
#. module: base_user_locale
#: model:ir.model,name:base_user_locale.model_res_config_settings
msgid "Config Settings"
msgstr "Postavke"
#. module: base_user_locale
#: model_terms:ir.ui.view,arch_db:base_user_locale.res_config_settings_view_form
msgid "Configure global override of date format for all users."
msgstr "Konfiguriši globalno prepisivanje formata datuma za sve korisnike."
#. module: base_user_locale
#: model_terms:ir.ui.view,arch_db:base_user_locale.res_config_settings_view_form
msgid "Configure global override of time format for all users."
msgstr "Konfiguriši globalno prepisivanje formata vremena za sve korisnike."
#. module: base_user_locale
#: model_terms:ir.ui.view,arch_db:base_user_locale.res_config_settings_view_form
msgid "Configure global override of week start for all users."
msgstr "Konfiguriši globalno prepisivanje početka sedmice za sve korisnike."
#. module: base_user_locale
#: model:ir.model.fields,field_description:base_user_locale.field_res_company__date_format
#: model:ir.model.fields,field_description:base_user_locale.field_res_config_settings__date_format
#: model:ir.model.fields,field_description:base_user_locale.field_res_users__date_format
msgid "Date Format"
msgstr "Format datuma"
#. module: base_user_locale
#: model:ir.model.fields,field_description:base_user_locale.field_res_company__decimal_point
#: model:ir.model.fields,field_description:base_user_locale.field_res_config_settings__decimal_point
#: model:ir.model.fields,field_description:base_user_locale.field_res_users__decimal_point
msgid "Decimal Separator"
msgstr "Separator decimala"
#. module: base_user_locale
#: model:ir.model.fields.selection,name:base_user_locale.selection__res_company__week_start__5
#: model:ir.model.fields.selection,name:base_user_locale.selection__res_users__week_start__5
msgid "Friday"
msgstr "Petak"
#. module: base_user_locale
#: model_terms:ir.ui.view,arch_db:base_user_locale.res_config_settings_view_form
msgid "Locale"
msgstr "Regionalnost"
#. module: base_user_locale
#: model:ir.model.fields.selection,name:base_user_locale.selection__res_company__week_start__1
#: model:ir.model.fields.selection,name:base_user_locale.selection__res_users__week_start__1
msgid "Monday"
msgstr "Ponedjeljak"
#. module: base_user_locale
#: model:ir.model.fields.selection,name:base_user_locale.selection__res_company__week_start__6
#: model:ir.model.fields.selection,name:base_user_locale.selection__res_users__week_start__6
msgid "Saturday"
msgstr "Subota"
#. module: base_user_locale
#: model:ir.model.fields,help:base_user_locale.field_res_company__date_format
#: model:ir.model.fields,help:base_user_locale.field_res_company__decimal_point
#: model:ir.model.fields,help:base_user_locale.field_res_company__thousands_sep
#: model:ir.model.fields,help:base_user_locale.field_res_company__time_format
#: model:ir.model.fields,help:base_user_locale.field_res_config_settings__date_format
#: model:ir.model.fields,help:base_user_locale.field_res_config_settings__decimal_point
#: model:ir.model.fields,help:base_user_locale.field_res_config_settings__thousands_sep
#: model:ir.model.fields,help:base_user_locale.field_res_config_settings__time_format
#: model:ir.model.fields,help:base_user_locale.field_res_users__date_format
#: model:ir.model.fields,help:base_user_locale.field_res_users__decimal_point
#: model:ir.model.fields,help:base_user_locale.field_res_users__thousands_sep
#: model:ir.model.fields,help:base_user_locale.field_res_users__time_format
msgid ""
"See Settings > Translations > Languages and then click on any language to "
"see the Legends for supported Date and Time Formats and some examples"
msgstr ""
#. module: base_user_locale
#: model:ir.model.fields.selection,name:base_user_locale.selection__res_company__week_start__7
#: model:ir.model.fields.selection,name:base_user_locale.selection__res_users__week_start__7
msgid "Sunday"
msgstr "Nedjelja"
#. module: base_user_locale
#: model:ir.model.fields,field_description:base_user_locale.field_res_company__thousands_sep
#: model:ir.model.fields,field_description:base_user_locale.field_res_config_settings__thousands_sep
#: model:ir.model.fields,field_description:base_user_locale.field_res_users__thousands_sep
msgid "Thousands Separator"
msgstr "Separator hiljade"
#. module: base_user_locale
#: model:ir.model.fields.selection,name:base_user_locale.selection__res_company__week_start__4
#: model:ir.model.fields.selection,name:base_user_locale.selection__res_users__week_start__4
msgid "Thursday"
msgstr "Četvrtak"
#. module: base_user_locale
#: model:ir.model.fields,field_description:base_user_locale.field_res_company__time_format
#: model:ir.model.fields,field_description:base_user_locale.field_res_config_settings__time_format
#: model:ir.model.fields,field_description:base_user_locale.field_res_users__time_format
msgid "Time Format"
msgstr "Format vremena"
#. module: base_user_locale
#: model:ir.model.fields.selection,name:base_user_locale.selection__res_company__week_start__2
#: model:ir.model.fields.selection,name:base_user_locale.selection__res_users__week_start__2
msgid "Tuesday"
msgstr "Utorak"
#. module: base_user_locale
#: model:ir.model,name:base_user_locale.model_res_users
msgid "User"
msgstr "Korisnik"
#. module: base_user_locale
#: model:ir.model.fields.selection,name:base_user_locale.selection__res_company__week_start__3
#: model:ir.model.fields.selection,name:base_user_locale.selection__res_users__week_start__3
msgid "Wednesday"
msgstr "Srijeda"
#. module: base_user_locale
#: model:ir.model.fields,field_description:base_user_locale.field_res_company__week_start
#: model:ir.model.fields,field_description:base_user_locale.field_res_config_settings__week_start
#: model:ir.model.fields,field_description:base_user_locale.field_res_users__week_start
msgid "Week Start"
msgstr "Početak sedmice"

View file

@ -0,0 +1,169 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * base_user_locale
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2024-01-10 19:19+0000\n"
"Last-Translator: Ivorra78 <informatica@totmaterial.es>\n"
"Language-Team: none\n"
"Language: es\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"
"X-Generator: Weblate 4.17\n"
#. module: base_user_locale
#: model_terms:ir.ui.view,arch_db:base_user_locale.res_config_settings_view_form
msgid ""
"<span class=\"fa fa-lg fa-building-o\" title=\"Values set here are company-"
"specific.\" role=\"img\" aria-label=\"Values set here are company-"
"specific.\" groups=\"base.group_multi_company\"/>"
msgstr ""
"<span class=\"fa fa-lg fa-building-o\" title=\"Values set here are company-"
"specific.\" role=\"img\" aria-label=\"Values set here are company-specific.\""
" groups=\"base.group_multi_company\"/>"
#. module: base_user_locale
#: model:ir.model,name:base_user_locale.model_calendar_event
msgid "Calendar Event"
msgstr "Calendario de Eventos"
#. module: base_user_locale
#: model:ir.model,name:base_user_locale.model_res_company
msgid "Companies"
msgstr "Compañías"
#. module: base_user_locale
#: model:ir.model,name:base_user_locale.model_res_config_settings
msgid "Config Settings"
msgstr "Ajustes de Config"
#. module: base_user_locale
#: model_terms:ir.ui.view,arch_db:base_user_locale.res_config_settings_view_form
msgid "Configure global override of date format for all users."
msgstr ""
"Configurar la anulación global del formato de fecha para todos los usuarios."
#. module: base_user_locale
#: model_terms:ir.ui.view,arch_db:base_user_locale.res_config_settings_view_form
msgid "Configure global override of time format for all users."
msgstr ""
"Configurar la anulación global del formato de hora para todos los usuarios."
#. module: base_user_locale
#: model_terms:ir.ui.view,arch_db:base_user_locale.res_config_settings_view_form
msgid "Configure global override of week start for all users."
msgstr ""
"Configurar la anulación global del inicio de semana para todos los usuarios."
#. module: base_user_locale
#: model:ir.model.fields,field_description:base_user_locale.field_res_company__date_format
#: model:ir.model.fields,field_description:base_user_locale.field_res_config_settings__date_format
#: model:ir.model.fields,field_description:base_user_locale.field_res_users__date_format
msgid "Date Format"
msgstr "Formato de Fecha"
#. module: base_user_locale
#: model:ir.model.fields,field_description:base_user_locale.field_res_company__decimal_point
#: model:ir.model.fields,field_description:base_user_locale.field_res_config_settings__decimal_point
#: model:ir.model.fields,field_description:base_user_locale.field_res_users__decimal_point
msgid "Decimal Separator"
msgstr "Separador Decimal"
#. module: base_user_locale
#: model:ir.model.fields.selection,name:base_user_locale.selection__res_company__week_start__5
#: model:ir.model.fields.selection,name:base_user_locale.selection__res_users__week_start__5
msgid "Friday"
msgstr "Viernes"
#. module: base_user_locale
#: model_terms:ir.ui.view,arch_db:base_user_locale.res_config_settings_view_form
msgid "Locale"
msgstr "Local"
#. module: base_user_locale
#: model:ir.model.fields.selection,name:base_user_locale.selection__res_company__week_start__1
#: model:ir.model.fields.selection,name:base_user_locale.selection__res_users__week_start__1
msgid "Monday"
msgstr "Lunes"
#. module: base_user_locale
#: model:ir.model.fields.selection,name:base_user_locale.selection__res_company__week_start__6
#: model:ir.model.fields.selection,name:base_user_locale.selection__res_users__week_start__6
msgid "Saturday"
msgstr "Sábado"
#. module: base_user_locale
#: model:ir.model.fields,help:base_user_locale.field_res_company__date_format
#: model:ir.model.fields,help:base_user_locale.field_res_company__decimal_point
#: model:ir.model.fields,help:base_user_locale.field_res_company__thousands_sep
#: model:ir.model.fields,help:base_user_locale.field_res_company__time_format
#: model:ir.model.fields,help:base_user_locale.field_res_config_settings__date_format
#: model:ir.model.fields,help:base_user_locale.field_res_config_settings__decimal_point
#: model:ir.model.fields,help:base_user_locale.field_res_config_settings__thousands_sep
#: model:ir.model.fields,help:base_user_locale.field_res_config_settings__time_format
#: model:ir.model.fields,help:base_user_locale.field_res_users__date_format
#: model:ir.model.fields,help:base_user_locale.field_res_users__decimal_point
#: model:ir.model.fields,help:base_user_locale.field_res_users__thousands_sep
#: model:ir.model.fields,help:base_user_locale.field_res_users__time_format
msgid ""
"See Settings > Translations > Languages and then click on any language to "
"see the Legends for supported Date and Time Formats and some examples"
msgstr ""
"Consulte Configuración > Traducciones > Idiomas y, a continuación, haga clic "
"en cualquier idioma para ver las leyendas de los formatos de fecha y hora "
"admitidos y algunos ejemplos"
#. module: base_user_locale
#: model:ir.model.fields.selection,name:base_user_locale.selection__res_company__week_start__7
#: model:ir.model.fields.selection,name:base_user_locale.selection__res_users__week_start__7
msgid "Sunday"
msgstr "Domingo"
#. module: base_user_locale
#: model:ir.model.fields,field_description:base_user_locale.field_res_company__thousands_sep
#: model:ir.model.fields,field_description:base_user_locale.field_res_config_settings__thousands_sep
#: model:ir.model.fields,field_description:base_user_locale.field_res_users__thousands_sep
msgid "Thousands Separator"
msgstr "Separador de Miles"
#. module: base_user_locale
#: model:ir.model.fields.selection,name:base_user_locale.selection__res_company__week_start__4
#: model:ir.model.fields.selection,name:base_user_locale.selection__res_users__week_start__4
msgid "Thursday"
msgstr "Jueves"
#. module: base_user_locale
#: model:ir.model.fields,field_description:base_user_locale.field_res_company__time_format
#: model:ir.model.fields,field_description:base_user_locale.field_res_config_settings__time_format
#: model:ir.model.fields,field_description:base_user_locale.field_res_users__time_format
msgid "Time Format"
msgstr "Formato de Hora"
#. module: base_user_locale
#: model:ir.model.fields.selection,name:base_user_locale.selection__res_company__week_start__2
#: model:ir.model.fields.selection,name:base_user_locale.selection__res_users__week_start__2
msgid "Tuesday"
msgstr "Martes"
#. module: base_user_locale
#: model:ir.model,name:base_user_locale.model_res_users
msgid "User"
msgstr "Usuario"
#. module: base_user_locale
#: model:ir.model.fields.selection,name:base_user_locale.selection__res_company__week_start__3
#: model:ir.model.fields.selection,name:base_user_locale.selection__res_users__week_start__3
msgid "Wednesday"
msgstr "Miércoles"
#. module: base_user_locale
#: model:ir.model.fields,field_description:base_user_locale.field_res_company__week_start
#: model:ir.model.fields,field_description:base_user_locale.field_res_config_settings__week_start
#: model:ir.model.fields,field_description:base_user_locale.field_res_users__week_start
msgid "Week Start"
msgstr "Inicio de Semana"

View file

@ -0,0 +1,168 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * base_user_locale
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2023-12-31 19:35+0000\n"
"Last-Translator: mymage <stefano.consolaro@mymage.it>\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"
"X-Generator: Weblate 4.17\n"
#. module: base_user_locale
#: model_terms:ir.ui.view,arch_db:base_user_locale.res_config_settings_view_form
msgid ""
"<span class=\"fa fa-lg fa-building-o\" title=\"Values set here are company-"
"specific.\" role=\"img\" aria-label=\"Values set here are company-"
"specific.\" groups=\"base.group_multi_company\"/>"
msgstr ""
"<span class=\"fa fa-lg fa-building-o\" title=\"I valori impostati qui sono "
"specifici per azienda.\" role=\"img\" aria-label=\"I valori impostati qui "
"sono specifici per azienda.\" groups=\"base.group_multi_company\"/>"
#. module: base_user_locale
#: model:ir.model,name:base_user_locale.model_calendar_event
msgid "Calendar Event"
msgstr "Evento calendario"
#. module: base_user_locale
#: model:ir.model,name:base_user_locale.model_res_company
msgid "Companies"
msgstr "Aziende"
#. module: base_user_locale
#: model:ir.model,name:base_user_locale.model_res_config_settings
msgid "Config Settings"
msgstr "Impostazioni configurazione"
#. module: base_user_locale
#: model_terms:ir.ui.view,arch_db:base_user_locale.res_config_settings_view_form
msgid "Configure global override of date format for all users."
msgstr "Configura sovrascrittura globale del formato data per tutti gli utenti."
#. module: base_user_locale
#: model_terms:ir.ui.view,arch_db:base_user_locale.res_config_settings_view_form
msgid "Configure global override of time format for all users."
msgstr "Configura sovrascrittura globale del formato ora per tutti gli utenti."
#. module: base_user_locale
#: model_terms:ir.ui.view,arch_db:base_user_locale.res_config_settings_view_form
msgid "Configure global override of week start for all users."
msgstr ""
"Configura sovrascrittura globale del giorno iniziale della settimana per "
"tutti gli utenti."
#. module: base_user_locale
#: model:ir.model.fields,field_description:base_user_locale.field_res_company__date_format
#: model:ir.model.fields,field_description:base_user_locale.field_res_config_settings__date_format
#: model:ir.model.fields,field_description:base_user_locale.field_res_users__date_format
msgid "Date Format"
msgstr "Formato data"
#. module: base_user_locale
#: model:ir.model.fields,field_description:base_user_locale.field_res_company__decimal_point
#: model:ir.model.fields,field_description:base_user_locale.field_res_config_settings__decimal_point
#: model:ir.model.fields,field_description:base_user_locale.field_res_users__decimal_point
msgid "Decimal Separator"
msgstr "Separatore decimale"
#. module: base_user_locale
#: model:ir.model.fields.selection,name:base_user_locale.selection__res_company__week_start__5
#: model:ir.model.fields.selection,name:base_user_locale.selection__res_users__week_start__5
msgid "Friday"
msgstr "Venerdì"
#. module: base_user_locale
#: model_terms:ir.ui.view,arch_db:base_user_locale.res_config_settings_view_form
msgid "Locale"
msgstr "Locale"
#. module: base_user_locale
#: model:ir.model.fields.selection,name:base_user_locale.selection__res_company__week_start__1
#: model:ir.model.fields.selection,name:base_user_locale.selection__res_users__week_start__1
msgid "Monday"
msgstr "Lunedì"
#. module: base_user_locale
#: model:ir.model.fields.selection,name:base_user_locale.selection__res_company__week_start__6
#: model:ir.model.fields.selection,name:base_user_locale.selection__res_users__week_start__6
msgid "Saturday"
msgstr "Sabato"
#. module: base_user_locale
#: model:ir.model.fields,help:base_user_locale.field_res_company__date_format
#: model:ir.model.fields,help:base_user_locale.field_res_company__decimal_point
#: model:ir.model.fields,help:base_user_locale.field_res_company__thousands_sep
#: model:ir.model.fields,help:base_user_locale.field_res_company__time_format
#: model:ir.model.fields,help:base_user_locale.field_res_config_settings__date_format
#: model:ir.model.fields,help:base_user_locale.field_res_config_settings__decimal_point
#: model:ir.model.fields,help:base_user_locale.field_res_config_settings__thousands_sep
#: model:ir.model.fields,help:base_user_locale.field_res_config_settings__time_format
#: model:ir.model.fields,help:base_user_locale.field_res_users__date_format
#: model:ir.model.fields,help:base_user_locale.field_res_users__decimal_point
#: model:ir.model.fields,help:base_user_locale.field_res_users__thousands_sep
#: model:ir.model.fields,help:base_user_locale.field_res_users__time_format
msgid ""
"See Settings > Translations > Languages and then click on any language to "
"see the Legends for supported Date and Time Formats and some examples"
msgstr ""
"Vedere Impostazioni > Traduzioni > Lingue e poi fare clic su una lingua "
"qualsiasi per vedere le legende per i formati di data e tempo supportati e "
"alcuni esempi"
#. module: base_user_locale
#: model:ir.model.fields.selection,name:base_user_locale.selection__res_company__week_start__7
#: model:ir.model.fields.selection,name:base_user_locale.selection__res_users__week_start__7
msgid "Sunday"
msgstr "Domenica"
#. module: base_user_locale
#: model:ir.model.fields,field_description:base_user_locale.field_res_company__thousands_sep
#: model:ir.model.fields,field_description:base_user_locale.field_res_config_settings__thousands_sep
#: model:ir.model.fields,field_description:base_user_locale.field_res_users__thousands_sep
msgid "Thousands Separator"
msgstr "Separatore migliaia"
#. module: base_user_locale
#: model:ir.model.fields.selection,name:base_user_locale.selection__res_company__week_start__4
#: model:ir.model.fields.selection,name:base_user_locale.selection__res_users__week_start__4
msgid "Thursday"
msgstr "Giovedì"
#. module: base_user_locale
#: model:ir.model.fields,field_description:base_user_locale.field_res_company__time_format
#: model:ir.model.fields,field_description:base_user_locale.field_res_config_settings__time_format
#: model:ir.model.fields,field_description:base_user_locale.field_res_users__time_format
msgid "Time Format"
msgstr "Formato ora"
#. module: base_user_locale
#: model:ir.model.fields.selection,name:base_user_locale.selection__res_company__week_start__2
#: model:ir.model.fields.selection,name:base_user_locale.selection__res_users__week_start__2
msgid "Tuesday"
msgstr "Martedì"
#. module: base_user_locale
#: model:ir.model,name:base_user_locale.model_res_users
msgid "User"
msgstr "Utente"
#. module: base_user_locale
#: model:ir.model.fields.selection,name:base_user_locale.selection__res_company__week_start__3
#: model:ir.model.fields.selection,name:base_user_locale.selection__res_users__week_start__3
msgid "Wednesday"
msgstr "Mercoledì"
#. module: base_user_locale
#: model:ir.model.fields,field_description:base_user_locale.field_res_company__week_start
#: model:ir.model.fields,field_description:base_user_locale.field_res_config_settings__week_start
#: model:ir.model.fields,field_description:base_user_locale.field_res_users__week_start
msgid "Week Start"
msgstr "Inizio settimana"

View file

@ -0,0 +1,6 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from . import calendar_event
from . import res_company
from . import res_config_settings
from . import res_users

View file

@ -0,0 +1,19 @@
# Copyright 2019 Brainbean Apps (https://brainbeanapps.com)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import api, models
class CalendarEvent(models.Model):
_inherit = "calendar.event"
@api.model
def _get_date_formats(self):
format_date, format_time = super()._get_date_formats()
date_format = self.env.user.date_format or self.env.company.date_format
if date_format:
format_date = str(date_format)
time_format = self.env.user.time_format or self.env.company.time_format
if time_format:
format_time = str(time_format)
return (format_date, format_time)

View file

@ -0,0 +1,44 @@
# Copyright 2019 Brainbean Apps (https://brainbeanapps.com)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import fields, models
class ResCompany(models.Model):
_inherit = "res.company"
date_format = fields.Char(
help="See Settings > Translations > Languages and then "
"click on any language to see the Legends for "
"supported Date and Time Formats and some examples",
)
time_format = fields.Char(
help="See Settings > Translations > Languages and then "
"click on any language to see the Legends for "
"supported Date and Time Formats and some examples",
)
week_start = fields.Selection(
selection=[
("1", "Monday"),
("2", "Tuesday"),
("3", "Wednesday"),
("4", "Thursday"),
("5", "Friday"),
("6", "Saturday"),
("7", "Sunday"),
],
)
decimal_point = fields.Char(
string="Decimal Separator",
trim=False,
help="See Settings > Translations > Languages and then "
"click on any language to see the Legends for "
"supported Date and Time Formats and some examples",
)
thousands_sep = fields.Char(
string="Thousands Separator",
trim=False,
help="See Settings > Translations > Languages and then "
"click on any language to see the Legends for "
"supported Date and Time Formats and some examples",
)

View file

@ -0,0 +1,14 @@
# Copyright 2019 Brainbean Apps (https://brainbeanapps.com)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields, models
class ResConfigSettings(models.TransientModel):
_inherit = "res.config.settings"
date_format = fields.Char(related="company_id.date_format", readonly=False)
time_format = fields.Char(related="company_id.time_format", readonly=False)
week_start = fields.Selection(related="company_id.week_start", readonly=False)
decimal_point = fields.Char(related="company_id.decimal_point", readonly=False)
thousands_sep = fields.Char(related="company_id.thousands_sep", readonly=False)

View file

@ -0,0 +1,75 @@
# Copyright 2019 Brainbean Apps (https://brainbeanapps.com)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import fields, models
class ResUsers(models.Model):
_inherit = "res.users"
date_format = fields.Char(
help="See Settings > Translations > Languages and then "
"click on any language to see the Legends for "
"supported Date and Time Formats and some examples",
)
time_format = fields.Char(
help="See Settings > Translations > Languages and then "
"click on any language to see the Legends for "
"supported Date and Time Formats and some examples",
)
week_start = fields.Selection(
selection=[
("1", "Monday"),
("2", "Tuesday"),
("3", "Wednesday"),
("4", "Thursday"),
("5", "Friday"),
("6", "Saturday"),
("7", "Sunday"),
],
)
decimal_point = fields.Char(
string="Decimal Separator",
trim=False,
help="See Settings > Translations > Languages and then "
"click on any language to see the Legends for "
"supported Date and Time Formats and some examples",
)
thousands_sep = fields.Char(
string="Thousands Separator",
trim=False,
help="See Settings > Translations > Languages and then "
"click on any language to see the Legends for "
"supported Date and Time Formats and some examples",
)
@property
def SELF_READABLE_FIELDS(self):
base_user_locale_readable_fields = [
"date_format",
"time_format",
"week_start",
"decimal_point",
"thousands_sep",
]
return super().SELF_READABLE_FIELDS + base_user_locale_readable_fields
@property
def SELF_WRITEABLE_FIELDS(self):
base_user_locale_writeable_fields = [
"date_format",
"time_format",
"week_start",
"decimal_point",
"thousands_sep",
]
return super().SELF_WRITEABLE_FIELDS + base_user_locale_writeable_fields
def preference_save(self):
super().preference_save()
# Do a "full" reload instead of just a context_reload to apply locale
# user specific settings.
return {
"type": "ir.actions.client",
"tag": "reload",
}

View file

@ -0,0 +1,6 @@
* `CorporateHub <https://corporatehub.eu/>`__
* Alexey Pelykh <alexey.pelykh@corphub.eu>
* Miquel Raïch <miquel.raich@forgeflow.com>
* Lois Rilo <lois.rilo@forgeflow.com>

View file

@ -0,0 +1,6 @@
This module allows overriding following settings for user or company:
* Time format
* Date format
* First day of the week
* Decimal Separator
* Thousands Separator

View file

@ -0,0 +1,4 @@
To configure it at company level go to *Settings / General Settings* and search
the section *Locale*.
To configure it at user level go to your user preferences.

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

View file

@ -0,0 +1,451 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
<title>README.rst</title>
<style type="text/css">
/*
:Author: David Goodger (goodger@python.org)
:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
:Copyright: This stylesheet has been placed in the public domain.
Default cascading style sheet for the HTML output of Docutils.
Despite the name, some widely supported CSS2 features are used.
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
customize this style sheet.
*/
/* used to remove borders from tables and images */
.borderless, table.borderless td, table.borderless th {
border: 0 }
table.borderless td, table.borderless th {
/* Override padding for "table.docutils td" with "! important".
The right padding separates the table cells. */
padding: 0 0.5em 0 0 ! important }
.first {
/* Override more specific margin styles with "! important". */
margin-top: 0 ! important }
.last, .with-subtitle {
margin-bottom: 0 ! important }
.hidden {
display: none }
.subscript {
vertical-align: sub;
font-size: smaller }
.superscript {
vertical-align: super;
font-size: smaller }
a.toc-backref {
text-decoration: none ;
color: black }
blockquote.epigraph {
margin: 2em 5em ; }
dl.docutils dd {
margin-bottom: 0.5em }
object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
overflow: hidden;
}
/* Uncomment (and remove this text!) to get bold-faced definition list terms
dl.docutils dt {
font-weight: bold }
*/
div.abstract {
margin: 2em 5em }
div.abstract p.topic-title {
font-weight: bold ;
text-align: center }
div.admonition, div.attention, div.caution, div.danger, div.error,
div.hint, div.important, div.note, div.tip, div.warning {
margin: 2em ;
border: medium outset ;
padding: 1em }
div.admonition p.admonition-title, div.hint p.admonition-title,
div.important p.admonition-title, div.note p.admonition-title,
div.tip p.admonition-title {
font-weight: bold ;
font-family: sans-serif }
div.attention p.admonition-title, div.caution p.admonition-title,
div.danger p.admonition-title, div.error p.admonition-title,
div.warning p.admonition-title, .code .error {
color: red ;
font-weight: bold ;
font-family: sans-serif }
/* Uncomment (and remove this text!) to get reduced vertical space in
compound paragraphs.
div.compound .compound-first, div.compound .compound-middle {
margin-bottom: 0.5em }
div.compound .compound-last, div.compound .compound-middle {
margin-top: 0.5em }
*/
div.dedication {
margin: 2em 5em ;
text-align: center ;
font-style: italic }
div.dedication p.topic-title {
font-weight: bold ;
font-style: normal }
div.figure {
margin-left: 2em ;
margin-right: 2em }
div.footer, div.header {
clear: both;
font-size: smaller }
div.line-block {
display: block ;
margin-top: 1em ;
margin-bottom: 1em }
div.line-block div.line-block {
margin-top: 0 ;
margin-bottom: 0 ;
margin-left: 1.5em }
div.sidebar {
margin: 0 0 0.5em 1em ;
border: medium outset ;
padding: 1em ;
background-color: #ffffee ;
width: 40% ;
float: right ;
clear: right }
div.sidebar p.rubric {
font-family: sans-serif ;
font-size: medium }
div.system-messages {
margin: 5em }
div.system-messages h1 {
color: red }
div.system-message {
border: medium outset ;
padding: 1em }
div.system-message p.system-message-title {
color: red ;
font-weight: bold }
div.topic {
margin: 2em }
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
margin-top: 0.4em }
h1.title {
text-align: center }
h2.subtitle {
text-align: center }
hr.docutils {
width: 75% }
img.align-left, .figure.align-left, object.align-left, table.align-left {
clear: left ;
float: left ;
margin-right: 1em }
img.align-right, .figure.align-right, object.align-right, table.align-right {
clear: right ;
float: right ;
margin-left: 1em }
img.align-center, .figure.align-center, object.align-center {
display: block;
margin-left: auto;
margin-right: auto;
}
table.align-center {
margin-left: auto;
margin-right: auto;
}
.align-left {
text-align: left }
.align-center {
clear: both ;
text-align: center }
.align-right {
text-align: right }
/* reset inner alignment in figures */
div.align-right {
text-align: inherit }
/* div.align-center * { */
/* text-align: left } */
.align-top {
vertical-align: top }
.align-middle {
vertical-align: middle }
.align-bottom {
vertical-align: bottom }
ol.simple, ul.simple {
margin-bottom: 1em }
ol.arabic {
list-style: decimal }
ol.loweralpha {
list-style: lower-alpha }
ol.upperalpha {
list-style: upper-alpha }
ol.lowerroman {
list-style: lower-roman }
ol.upperroman {
list-style: upper-roman }
p.attribution {
text-align: right ;
margin-left: 50% }
p.caption {
font-style: italic }
p.credits {
font-style: italic ;
font-size: smaller }
p.label {
white-space: nowrap }
p.rubric {
font-weight: bold ;
font-size: larger ;
color: maroon ;
text-align: center }
p.sidebar-title {
font-family: sans-serif ;
font-weight: bold ;
font-size: larger }
p.sidebar-subtitle {
font-family: sans-serif ;
font-weight: bold }
p.topic-title {
font-weight: bold }
pre.address {
margin-bottom: 0 ;
margin-top: 0 ;
font: inherit }
pre.literal-block, pre.doctest-block, pre.math, pre.code {
margin-left: 2em ;
margin-right: 2em }
pre.code .ln { color: gray; } /* line numbers */
pre.code, code { background-color: #eeeeee }
pre.code .comment, code .comment { color: #5C6576 }
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
pre.code .literal.string, code .literal.string { color: #0C5404 }
pre.code .name.builtin, code .name.builtin { color: #352B84 }
pre.code .deleted, code .deleted { background-color: #DEB0A1}
pre.code .inserted, code .inserted { background-color: #A3D289}
span.classifier {
font-family: sans-serif ;
font-style: oblique }
span.classifier-delimiter {
font-family: sans-serif ;
font-weight: bold }
span.interpreted {
font-family: sans-serif }
span.option {
white-space: nowrap }
span.pre {
white-space: pre }
span.problematic, pre.problematic {
color: red }
span.section-subtitle {
/* font-size relative to parent (h1..h6 element) */
font-size: 80% }
table.citation {
border-left: solid 1px gray;
margin-left: 1px }
table.docinfo {
margin: 2em 4em }
table.docutils {
margin-top: 0.5em ;
margin-bottom: 0.5em }
table.footnote {
border-left: solid 1px black;
margin-left: 1px }
table.docutils td, table.docutils th,
table.docinfo td, table.docinfo th {
padding-left: 0.5em ;
padding-right: 0.5em ;
vertical-align: top }
table.docutils th.field-name, table.docinfo th.docinfo-name {
font-weight: bold ;
text-align: left ;
white-space: nowrap ;
padding-left: 0 }
/* "booktabs" style (no vertical lines) */
table.docutils.booktabs {
border: 0px;
border-top: 2px solid;
border-bottom: 2px solid;
border-collapse: collapse;
}
table.docutils.booktabs * {
border: 0px;
}
table.docutils.booktabs th {
border-bottom: thin solid;
text-align: left;
}
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
font-size: 100% }
ul.auto-toc {
list-style-type: none }
</style>
</head>
<body>
<div class="document">
<a class="reference external image-reference" href="https://odoo-community.org/get-involved?utm_source=readme">
<img alt="Odoo Community Association" src="https://odoo-community.org/readme-banner-image" />
</a>
<div class="section" id="user-locale-settings">
<h1>User Locale Settings</h1>
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:88c4ef438dac4a712e650cf04f2f670b843b122b32170d50148fc80ec2ee8da7
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<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/server-ux/tree/16.0/base_user_locale"><img alt="OCA/server-ux" src="https://img.shields.io/badge/github-OCA%2Fserver--ux-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/server-ux-16-0/server-ux-16-0-base_user_locale"><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/server-ux&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<dl class="docutils">
<dt>This module allows overriding following settings for user or company:</dt>
<dd><ul class="first last simple">
<li>Time format</li>
<li>Date format</li>
<li>First day of the week</li>
<li>Decimal Separator</li>
<li>Thousands Separator</li>
</ul>
</dd>
</dl>
<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="toc-entry-1">Usage</a></li>
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-2">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="toc-entry-3">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="toc-entry-4">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="toc-entry-5">Contributors</a></li>
<li><a class="reference internal" href="#maintainers" id="toc-entry-6">Maintainers</a></li>
</ul>
</li>
</ul>
</div>
<div class="section" id="usage">
<h2><a class="toc-backref" href="#toc-entry-1">Usage</a></h2>
<p>To configure it at company level go to <em>Settings / General Settings</em> and search
the section <em>Locale</em>.</p>
<p>To configure it at user level go to your user preferences.</p>
</div>
<div class="section" id="bug-tracker">
<h2><a class="toc-backref" href="#toc-entry-2">Bug Tracker</a></h2>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/server-ux/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 to smash it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/OCA/server-ux/issues/new?body=module:%20base_user_locale%0Aversion:%2016.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>
</div>
<div class="section" id="credits">
<h2><a class="toc-backref" href="#toc-entry-3">Credits</a></h2>
<div class="section" id="authors">
<h3><a class="toc-backref" href="#toc-entry-4">Authors</a></h3>
<ul class="simple">
<li>CorporateHub</li>
</ul>
</div>
<div class="section" id="contributors">
<h3><a class="toc-backref" href="#toc-entry-5">Contributors</a></h3>
<ul class="simple">
<li><a class="reference external" href="https://corporatehub.eu/">CorporateHub</a><ul>
<li>Alexey Pelykh &lt;<a class="reference external" href="mailto:alexey.pelykh&#64;corphub.eu">alexey.pelykh&#64;corphub.eu</a>&gt;</li>
</ul>
</li>
<li>Miquel Raïch &lt;<a class="reference external" href="mailto:miquel.raich&#64;forgeflow.com">miquel.raich&#64;forgeflow.com</a>&gt;</li>
<li>Lois Rilo &lt;<a class="reference external" href="mailto:lois.rilo&#64;forgeflow.com">lois.rilo&#64;forgeflow.com</a>&gt;</li>
</ul>
</div>
<div class="section" id="maintainers">
<h3><a class="toc-backref" href="#toc-entry-6">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/server-ux/tree/16.0/base_user_locale">OCA/server-ux</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>
</div>
</div>
</div>
</div>
</body>
</html>

View file

@ -0,0 +1,3 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from . import test_base_user_locale

View file

@ -0,0 +1,134 @@
# Copyright 2019 Brainbean Apps (https://brainbeanapps.com)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo.exceptions import AccessError
from odoo.tests.common import SavepointCase
from odoo.tools import mute_logger
from ..controllers.web_client import WebClient
class TestBaseUserLocale(SavepointCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
cls.ResCompany = cls.env["res.company"]
cls.ResUsers = cls.env["res.users"]
cls.CalendarEvent = cls.env["calendar.event"]
cls.code = "en_US"
if not cls.env["res.lang"]._lang_get_id(cls.code):
cls.env["res.lang"].load_lang(cls.code, "English (US)")
cls.company = cls.ResCompany.create({"name": "Company"})
cls.company.partner_id.lang = cls.code
cls.user = cls.ResUsers.with_context(no_reset_password=True).create(
{
"name": "User",
"login": "user",
"email": "user@example.com",
"company_id": cls.company.id,
"company_ids": [(4, cls.company.id)],
"lang": cls.code,
}
)
def test_uninstalled_lang(self):
uninstalled_lang = (
self.env["res.lang"]
.with_context(active_test=True)
.search([("active", "=", False)], limit=1)
)
if uninstalled_lang:
with self.assertRaises(ValueError):
self.ResUsers.with_context(no_reset_password=True).create(
{
"name": "User",
"login": "another user",
"email": "user@example.com",
"company_id": self.company.id,
"company_ids": [(4, self.company.id)],
"lang": uninstalled_lang.code,
}
)
def test_date_format(self):
self.user.env.company = self.user.company_id
self.assertEqual(
self.CalendarEvent.with_user(self.user)._get_date_formats()[0], "%m/%d/%Y"
)
lang_parameters = WebClient().get_user_lang_parameters(self.user)
self.assertEqual(lang_parameters, {})
self.company.date_format = "%d %b %Y"
self.assertEqual(
self.CalendarEvent.with_user(self.user)._get_date_formats()[0], "%d %b %Y"
)
lang_parameters = WebClient().get_user_lang_parameters(self.user)
self.assertEqual(lang_parameters, {"date_format": "%d %b %Y"})
self.user.date_format = "%d/%b/%Y"
self.assertEqual(
self.CalendarEvent.with_user(self.user)._get_date_formats()[0], "%d/%b/%Y"
)
lang_parameters = WebClient().get_user_lang_parameters(self.user)
self.assertEqual(lang_parameters, {"date_format": "%d/%b/%Y"})
def test_time_format(self):
self.user.env.company = self.user.company_id
self.assertEqual(
self.CalendarEvent.with_user(self.user)._get_date_formats()[1], "%H:%M:%S"
)
lang_parameters = WebClient().get_user_lang_parameters(self.user)
self.assertEqual(lang_parameters, {})
self.company.time_format = "%H.%M.%S"
self.assertEqual(
self.CalendarEvent.with_user(self.user)._get_date_formats()[1], "%H.%M.%S"
)
lang_parameters = WebClient().get_user_lang_parameters(self.user)
self.assertEqual(lang_parameters, {"time_format": "%H.%M.%S"})
self.user.time_format = "%I:%M%p"
self.assertEqual(
self.CalendarEvent.with_user(self.user)._get_date_formats()[1], "%I:%M%p"
)
lang_parameters = WebClient().get_user_lang_parameters(self.user)
self.assertEqual(lang_parameters, {"time_format": "%I:%M%p"})
def test_week_start(self):
self.user.env.company = self.user.company_id
lang_parameters = WebClient().get_user_lang_parameters(self.user)
self.assertEqual(lang_parameters, {})
self.company.week_start = "4"
lang_parameters = WebClient().get_user_lang_parameters(self.user)
self.assertEqual(lang_parameters, {"week_start": 4})
self.user.week_start = "2"
lang_parameters = WebClient().get_user_lang_parameters(self.user)
self.assertEqual(lang_parameters, {"week_start": 2})
@mute_logger("odoo.addons.base.models.ir_model")
def test_user_can_write_own_fields(self):
self.user.env.company = self.user.company_id
vals = {
"date_format": "%d/%b/%Y",
"time_format": "%H.%M.%S",
"week_start": "1",
"decimal_point": ".",
"thousands_sep": ",",
}
self.user.with_user(self.user.id).write(vals)
admin_with_user = self.env.ref("base.user_admin").with_user(self.user.id)
for field, value in vals.items():
with self.assertRaises(AccessError, msg=f"failed for field {field}"):
admin_with_user.write({field: value})

View file

@ -0,0 +1,117 @@
<?xml version="1.0" encoding="utf-8" ?>
<!--
Copyright 2019 Brainbean Apps (https://brainbeanapps.com)
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
-->
<odoo>
<record id="res_config_settings_view_form" model="ir.ui.view">
<field name="name">res.config.settings.view.form</field>
<field name="model">res.config.settings</field>
<field name="inherit_id" ref="base_setup.res_config_settings_view_form" />
<field name="arch" type="xml">
<xpath
expr="//div[hasclass('app_settings_block')][@data-key='general_settings']"
position="inside"
>
<h2>Locale</h2>
<div class="row mt16 o_settings_container" name="locale">
<div class="col-12 col-lg-6 o_setting_box">
<div class="o_setting_left_pane" />
<div class="o_setting_right_pane">
<label for="date_format" />
<span
class="fa fa-lg fa-building-o"
title="Values set here are company-specific."
role="img"
aria-label="Values set here are company-specific."
groups="base.group_multi_company"
/>
<div class="text-muted">
Configure global override of date format for all users.
</div>
<div class="content-group mt16">
<field name="date_format" nolabel="1" />
</div>
</div>
</div>
<div class="col-12 col-lg-6 o_setting_box">
<div class="o_setting_left_pane" />
<div class="o_setting_right_pane">
<label for="time_format" />
<span
class="fa fa-lg fa-building-o"
title="Values set here are company-specific."
role="img"
aria-label="Values set here are company-specific."
groups="base.group_multi_company"
/>
<div class="text-muted">
Configure global override of time format for all users.
</div>
<div class="content-group mt16">
<field name="time_format" nolabel="1" />
</div>
</div>
</div>
<div class="col-12 col-lg-6 o_setting_box">
<div class="o_setting_left_pane" />
<div class="o_setting_right_pane">
<label for="week_start" />
<span
class="fa fa-lg fa-building-o"
title="Values set here are company-specific."
role="img"
aria-label="Values set here are company-specific."
groups="base.group_multi_company"
/>
<div class="text-muted">
Configure global override of week start for all users.
</div>
<div class="content-group mt16">
<field name="week_start" nolabel="1" />
</div>
</div>
</div>
<div class="col-12 col-lg-6 o_setting_box">
<div class="o_setting_left_pane" />
<div class="o_setting_right_pane">
<label for="decimal_point" />
<span
class="fa fa-lg fa-building-o"
title="Values set here are company-specific."
role="img"
aria-label="Values set here are company-specific."
groups="base.group_multi_company"
/>
<div class="text-muted">
Configure global override of time format for all users.
</div>
<div class="content-group mt16">
<field name="decimal_point" nolabel="1" />
</div>
</div>
</div>
<div class="col-12 col-lg-6 o_setting_box">
<div class="o_setting_left_pane" />
<div class="o_setting_right_pane">
<label for="thousands_sep" />
<span
class="fa fa-lg fa-building-o"
title="Values set here are company-specific."
role="img"
aria-label="Values set here are company-specific."
groups="base.group_multi_company"
/>
<div class="text-muted">
Configure global override of time format for all users.
</div>
<div class="content-group mt16">
<field name="thousands_sep" nolabel="1" />
</div>
</div>
</div>
</div>
</xpath>
</field>
</record>
</odoo>

View file

@ -0,0 +1,36 @@
<?xml version="1.0" encoding="utf-8" ?>
<!--
Copyright 2019 Brainbean Apps (https://brainbeanapps.com)
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
-->
<odoo>
<record id="view_users_form_simple_modif" model="ir.ui.view">
<field name="name">res.users.preferences.form</field>
<field name="model">res.users</field>
<field name="inherit_id" ref="base.view_users_form_simple_modif" />
<field name="arch" type="xml">
<field name="tz" position="before">
<field
name="date_format"
attrs="{'invisible': [('lang', '=', False)]}"
/>
<field
name="time_format"
attrs="{'invisible': [('lang', '=', False)]}"
/>
<field
name="week_start"
attrs="{'invisible': [('lang', '=', False)]}"
/>
<field
name="decimal_point"
attrs="{'invisible': [('lang', '=', False)]}"
/>
<field
name="thousands_sep"
attrs="{'invisible': [('lang', '=', False)]}"
/>
</field>
</field>
</record>
</odoo>

View file

@ -0,0 +1,32 @@
# Architecture
```mermaid
flowchart TD
U[Users] -->|HTTP| V[Views and QWeb Templates]
V --> C[Controllers]
V --> W[Wizards Transient Models]
C --> M[Models and ORM]
W --> M
M --> R[Reports]
DX[Data XML] --> M
S[Security ACLs and Groups] -. enforces .-> M
subgraph Base_user_locale Module - base_user_locale
direction LR
M:::layer
W:::layer
C:::layer
V:::layer
R:::layer
S:::layer
DX:::layer
end
classDef layer fill:#eef8ff,stroke:#6ea8fe,stroke-width:1px
```
Notes
- Views include tree/form/kanban templates and report templates.
- Controllers provide website/portal routes when present.
- Wizards are UI flows implemented with `models.TransientModel`.
- Data XML loads data/demo records; Security defines groups and access.

View file

@ -0,0 +1,3 @@
# Configuration
Refer to Odoo settings for base_user_locale. Configure related models, access rights, and options as needed.

View file

@ -0,0 +1,17 @@
# Controllers
HTTP routes provided by this module.
```mermaid
sequenceDiagram
participant U as User/Client
participant C as Module Controllers
participant O as ORM/Views
U->>C: HTTP GET/POST (routes)
C->>O: ORM operations, render templates
O-->>U: HTML/JSON/PDF
```
Notes
- See files in controllers/ for route definitions.

View file

@ -0,0 +1,6 @@
# Dependencies
This addon depends on:
- [base_setup](../../odoo-bringout-oca-ocb-base_setup)
- [calendar](../../odoo-bringout-oca-ocb-calendar)

View file

@ -0,0 +1,4 @@
# FAQ
- Q: Which Odoo version? A: 16.0 (OCA/OCB packaged).
- Q: How to enable? A: Start server with --addon base_user_locale or install in UI.

View file

@ -0,0 +1,7 @@
# Install
```bash
pip install odoo-bringout-oca-server-ux-base_user_locale"
# or
uv pip install odoo-bringout-oca-server-ux-base_user_locale"
```

View file

@ -0,0 +1,15 @@
# Models
Detected core models and extensions in base_user_locale.
```mermaid
classDiagram
class calendar_event
class res_company
class res_config_settings
class res_users
```
Notes
- Classes show model technical names; fields omitted for brevity.
- Items listed under _inherit are extensions of existing models.

View file

@ -0,0 +1,6 @@
# Overview
Packaged Odoo addon: base_user_locale. Provides features documented in upstream Odoo 16 under this addon.
- Source: OCA/OCB 16.0, addon base_user_locale
- License: LGPL-3

View file

@ -0,0 +1,3 @@
# Reports
This module does not define custom reports.

View file

@ -0,0 +1,8 @@
# Security
This module does not define custom security rules or access controls beyond Odoo defaults.
Default Odoo security applies:
- Base user access through standard groups
- Model access inherited from dependencies
- No custom row-level security rules

View file

@ -0,0 +1,5 @@
# Troubleshooting
- Ensure Python and Odoo environment matches repo guidance.
- Check database connectivity and logs if startup fails.
- Validate that dependent addons listed in DEPENDENCIES.md are installed.

View file

@ -0,0 +1,7 @@
# Usage
Start Odoo including this addon (from repo root):
```bash
python3 scripts/nix_odoo_web_server.py --db-name mydb --addon base_user_locale
```

View file

@ -0,0 +1,3 @@
# Wizards
This module does not include UI wizards.

View file

@ -0,0 +1,43 @@
[project]
name = "odoo-bringout-oca-server-ux-base_user_locale"
version = "16.0.0"
description = "User Locale Settings - Odoo addon"
authors = [
{ name = "Ernad Husremovic", email = "hernad@bring.out.ba" }
]
dependencies = [
"odoo-bringout-oca-ocb-base_setup>=16.0.0",
"odoo-bringout-oca-ocb-calendar>=16.0.0",
"requests>=2.25.1"
]
readme = "README.md"
requires-python = ">= 3.11"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Office/Business",
]
[project.urls]
homepage = "https://github.com/bringout/0"
repository = "https://github.com/bringout/0"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.metadata]
allow-direct-references = true
[tool.hatch.build.targets.wheel]
packages = ["base_user_locale"]
[tool.rye]
managed = true
dev-dependencies = [
"pytest>=8.4.1",
]