diff --git a/README.md b/README.md index 0affd1a2d81..5f4e4ade203 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,7 @@ addon | version | maintainers | summary [base_sequence_option](base_sequence_option/) | 15.0.1.0.0 | [![kittiu](https://github.com/kittiu.png?size=30px)](https://github.com/kittiu) | Alternative sequence options for specific models [base_sparse_field_list_support](base_sparse_field_list_support/) | 15.0.1.0.0 | | add list support to convert_to_cache() [base_technical_user](base_technical_user/) | 15.0.1.0.0 | | Add a technical user parameter on the company +[base_time_parameter](base_time_parameter/) | 15.0.1.0.0 | [![appstogrow](https://github.com/appstogrow.png?size=30px)](https://github.com/appstogrow) [![nimarosa](https://github.com/nimarosa.png?size=30px)](https://github.com/nimarosa) | Time dependent parameters Adds the feature to define parameters with time based versions. [base_time_window](base_time_window/) | 15.0.1.0.0 | | Base model to handle time windows [base_translation_field_label](base_translation_field_label/) | 15.0.1.0.0 | [![GuillemCForgeFlow](https://github.com/GuillemCForgeFlow.png?size=30px)](https://github.com/GuillemCForgeFlow) | Shows the field label and optionally hides the Translated field value. [base_view_inheritance_extension](base_view_inheritance_extension/) | 15.0.2.0.2 | | Adds more operators for view inheritance diff --git a/base_changeset/i18n/base_changeset.pot b/base_changeset/i18n/base_changeset.pot index 9f60bfb3357..3d0fa5582a8 100644 --- a/base_changeset/i18n/base_changeset.pot +++ b/base_changeset/i18n/base_changeset.pot @@ -195,6 +195,8 @@ msgstr "" #: model:ir.model.fields,field_description:base_changeset.field_base_multi_image_owner__changeset_change_ids #: model:ir.model.fields,field_description:base_changeset.field_base_partner_merge_automatic_wizard__changeset_change_ids #: model:ir.model.fields,field_description:base_changeset.field_base_partner_merge_line__changeset_change_ids +#: model:ir.model.fields,field_description:base_changeset.field_base_time_parameter__changeset_change_ids +#: model:ir.model.fields,field_description:base_changeset.field_base_time_parameter_version__changeset_change_ids #: model:ir.model.fields,field_description:base_changeset.field_base_update_translations__changeset_change_ids #: model:ir.model.fields,field_description:base_changeset.field_bus_bus__changeset_change_ids #: model:ir.model.fields,field_description:base_changeset.field_bus_presence__changeset_change_ids @@ -644,6 +646,8 @@ msgstr "" #: model:ir.model.fields,field_description:base_changeset.field_base_multi_image_owner__changeset_ids #: model:ir.model.fields,field_description:base_changeset.field_base_partner_merge_automatic_wizard__changeset_ids #: model:ir.model.fields,field_description:base_changeset.field_base_partner_merge_line__changeset_ids +#: model:ir.model.fields,field_description:base_changeset.field_base_time_parameter__changeset_ids +#: model:ir.model.fields,field_description:base_changeset.field_base_time_parameter_version__changeset_ids #: model:ir.model.fields,field_description:base_changeset.field_base_update_translations__changeset_ids #: model:ir.model.fields,field_description:base_changeset.field_bus_bus__changeset_ids #: model:ir.model.fields,field_description:base_changeset.field_bus_presence__changeset_ids @@ -1080,6 +1084,8 @@ msgstr "" #: model:ir.model.fields,field_description:base_changeset.field_base_multi_image_owner__count_pending_changeset_changes #: model:ir.model.fields,field_description:base_changeset.field_base_partner_merge_automatic_wizard__count_pending_changeset_changes #: model:ir.model.fields,field_description:base_changeset.field_base_partner_merge_line__count_pending_changeset_changes +#: model:ir.model.fields,field_description:base_changeset.field_base_time_parameter__count_pending_changeset_changes +#: model:ir.model.fields,field_description:base_changeset.field_base_time_parameter_version__count_pending_changeset_changes #: model:ir.model.fields,field_description:base_changeset.field_base_update_translations__count_pending_changeset_changes #: model:ir.model.fields,field_description:base_changeset.field_bus_bus__count_pending_changeset_changes #: model:ir.model.fields,field_description:base_changeset.field_bus_presence__count_pending_changeset_changes @@ -1509,6 +1515,8 @@ msgstr "" #: model:ir.model.fields,field_description:base_changeset.field_base_multi_image_owner__count_pending_changesets #: model:ir.model.fields,field_description:base_changeset.field_base_partner_merge_automatic_wizard__count_pending_changesets #: model:ir.model.fields,field_description:base_changeset.field_base_partner_merge_line__count_pending_changesets +#: model:ir.model.fields,field_description:base_changeset.field_base_time_parameter__count_pending_changesets +#: model:ir.model.fields,field_description:base_changeset.field_base_time_parameter_version__count_pending_changesets #: model:ir.model.fields,field_description:base_changeset.field_base_update_translations__count_pending_changesets #: model:ir.model.fields,field_description:base_changeset.field_bus_bus__count_pending_changesets #: model:ir.model.fields,field_description:base_changeset.field_bus_presence__count_pending_changesets @@ -2351,6 +2359,8 @@ msgstr "" #: model:ir.model.fields,field_description:base_changeset.field_base_multi_image_owner__user_can_see_changeset #: model:ir.model.fields,field_description:base_changeset.field_base_partner_merge_automatic_wizard__user_can_see_changeset #: model:ir.model.fields,field_description:base_changeset.field_base_partner_merge_line__user_can_see_changeset +#: model:ir.model.fields,field_description:base_changeset.field_base_time_parameter__user_can_see_changeset +#: model:ir.model.fields,field_description:base_changeset.field_base_time_parameter_version__user_can_see_changeset #: model:ir.model.fields,field_description:base_changeset.field_base_update_translations__user_can_see_changeset #: model:ir.model.fields,field_description:base_changeset.field_bus_bus__user_can_see_changeset #: model:ir.model.fields,field_description:base_changeset.field_bus_presence__user_can_see_changeset diff --git a/base_changeset/i18n/ca.po b/base_changeset/i18n/ca.po index 8ffb65ab6e4..2eec031cd0f 100644 --- a/base_changeset/i18n/ca.po +++ b/base_changeset/i18n/ca.po @@ -198,6 +198,8 @@ msgstr "" #: model:ir.model.fields,field_description:base_changeset.field_base_multi_image_owner__changeset_change_ids #: model:ir.model.fields,field_description:base_changeset.field_base_partner_merge_automatic_wizard__changeset_change_ids #: model:ir.model.fields,field_description:base_changeset.field_base_partner_merge_line__changeset_change_ids +#: model:ir.model.fields,field_description:base_changeset.field_base_time_parameter__changeset_change_ids +#: model:ir.model.fields,field_description:base_changeset.field_base_time_parameter_version__changeset_change_ids #: model:ir.model.fields,field_description:base_changeset.field_base_update_translations__changeset_change_ids #: model:ir.model.fields,field_description:base_changeset.field_bus_bus__changeset_change_ids #: model:ir.model.fields,field_description:base_changeset.field_bus_presence__changeset_change_ids @@ -647,6 +649,8 @@ msgstr "" #: model:ir.model.fields,field_description:base_changeset.field_base_multi_image_owner__changeset_ids #: model:ir.model.fields,field_description:base_changeset.field_base_partner_merge_automatic_wizard__changeset_ids #: model:ir.model.fields,field_description:base_changeset.field_base_partner_merge_line__changeset_ids +#: model:ir.model.fields,field_description:base_changeset.field_base_time_parameter__changeset_ids +#: model:ir.model.fields,field_description:base_changeset.field_base_time_parameter_version__changeset_ids #: model:ir.model.fields,field_description:base_changeset.field_base_update_translations__changeset_ids #: model:ir.model.fields,field_description:base_changeset.field_bus_bus__changeset_ids #: model:ir.model.fields,field_description:base_changeset.field_bus_presence__changeset_ids @@ -1083,6 +1087,8 @@ msgstr "" #: model:ir.model.fields,field_description:base_changeset.field_base_multi_image_owner__count_pending_changeset_changes #: model:ir.model.fields,field_description:base_changeset.field_base_partner_merge_automatic_wizard__count_pending_changeset_changes #: model:ir.model.fields,field_description:base_changeset.field_base_partner_merge_line__count_pending_changeset_changes +#: model:ir.model.fields,field_description:base_changeset.field_base_time_parameter__count_pending_changeset_changes +#: model:ir.model.fields,field_description:base_changeset.field_base_time_parameter_version__count_pending_changeset_changes #: model:ir.model.fields,field_description:base_changeset.field_base_update_translations__count_pending_changeset_changes #: model:ir.model.fields,field_description:base_changeset.field_bus_bus__count_pending_changeset_changes #: model:ir.model.fields,field_description:base_changeset.field_bus_presence__count_pending_changeset_changes @@ -1512,6 +1518,8 @@ msgstr "" #: model:ir.model.fields,field_description:base_changeset.field_base_multi_image_owner__count_pending_changesets #: model:ir.model.fields,field_description:base_changeset.field_base_partner_merge_automatic_wizard__count_pending_changesets #: model:ir.model.fields,field_description:base_changeset.field_base_partner_merge_line__count_pending_changesets +#: model:ir.model.fields,field_description:base_changeset.field_base_time_parameter__count_pending_changesets +#: model:ir.model.fields,field_description:base_changeset.field_base_time_parameter_version__count_pending_changesets #: model:ir.model.fields,field_description:base_changeset.field_base_update_translations__count_pending_changesets #: model:ir.model.fields,field_description:base_changeset.field_bus_bus__count_pending_changesets #: model:ir.model.fields,field_description:base_changeset.field_bus_presence__count_pending_changesets @@ -2357,6 +2365,8 @@ msgstr "" #: model:ir.model.fields,field_description:base_changeset.field_base_multi_image_owner__user_can_see_changeset #: model:ir.model.fields,field_description:base_changeset.field_base_partner_merge_automatic_wizard__user_can_see_changeset #: model:ir.model.fields,field_description:base_changeset.field_base_partner_merge_line__user_can_see_changeset +#: model:ir.model.fields,field_description:base_changeset.field_base_time_parameter__user_can_see_changeset +#: model:ir.model.fields,field_description:base_changeset.field_base_time_parameter_version__user_can_see_changeset #: model:ir.model.fields,field_description:base_changeset.field_base_update_translations__user_can_see_changeset #: model:ir.model.fields,field_description:base_changeset.field_bus_bus__user_can_see_changeset #: model:ir.model.fields,field_description:base_changeset.field_bus_presence__user_can_see_changeset diff --git a/base_changeset/i18n/es.po b/base_changeset/i18n/es.po index e2fbcc024b9..0d226fbdd93 100644 --- a/base_changeset/i18n/es.po +++ b/base_changeset/i18n/es.po @@ -201,6 +201,8 @@ msgstr "Conjunto de cambios" #: model:ir.model.fields,field_description:base_changeset.field_base_multi_image_owner__changeset_change_ids #: model:ir.model.fields,field_description:base_changeset.field_base_partner_merge_automatic_wizard__changeset_change_ids #: model:ir.model.fields,field_description:base_changeset.field_base_partner_merge_line__changeset_change_ids +#: model:ir.model.fields,field_description:base_changeset.field_base_time_parameter__changeset_change_ids +#: model:ir.model.fields,field_description:base_changeset.field_base_time_parameter_version__changeset_change_ids #: model:ir.model.fields,field_description:base_changeset.field_base_update_translations__changeset_change_ids #: model:ir.model.fields,field_description:base_changeset.field_bus_bus__changeset_change_ids #: model:ir.model.fields,field_description:base_changeset.field_bus_presence__changeset_change_ids @@ -650,6 +652,8 @@ msgstr "Validaciones del conjunto de cambios" #: model:ir.model.fields,field_description:base_changeset.field_base_multi_image_owner__changeset_ids #: model:ir.model.fields,field_description:base_changeset.field_base_partner_merge_automatic_wizard__changeset_ids #: model:ir.model.fields,field_description:base_changeset.field_base_partner_merge_line__changeset_ids +#: model:ir.model.fields,field_description:base_changeset.field_base_time_parameter__changeset_ids +#: model:ir.model.fields,field_description:base_changeset.field_base_time_parameter_version__changeset_ids #: model:ir.model.fields,field_description:base_changeset.field_base_update_translations__changeset_ids #: model:ir.model.fields,field_description:base_changeset.field_bus_bus__changeset_ids #: model:ir.model.fields,field_description:base_changeset.field_bus_presence__changeset_ids @@ -1086,6 +1090,8 @@ msgstr "Companía" #: model:ir.model.fields,field_description:base_changeset.field_base_multi_image_owner__count_pending_changeset_changes #: model:ir.model.fields,field_description:base_changeset.field_base_partner_merge_automatic_wizard__count_pending_changeset_changes #: model:ir.model.fields,field_description:base_changeset.field_base_partner_merge_line__count_pending_changeset_changes +#: model:ir.model.fields,field_description:base_changeset.field_base_time_parameter__count_pending_changeset_changes +#: model:ir.model.fields,field_description:base_changeset.field_base_time_parameter_version__count_pending_changeset_changes #: model:ir.model.fields,field_description:base_changeset.field_base_update_translations__count_pending_changeset_changes #: model:ir.model.fields,field_description:base_changeset.field_bus_bus__count_pending_changeset_changes #: model:ir.model.fields,field_description:base_changeset.field_bus_presence__count_pending_changeset_changes @@ -1515,6 +1521,8 @@ msgstr "Contar los cambios del conjunto de cambios pendientes" #: model:ir.model.fields,field_description:base_changeset.field_base_multi_image_owner__count_pending_changesets #: model:ir.model.fields,field_description:base_changeset.field_base_partner_merge_automatic_wizard__count_pending_changesets #: model:ir.model.fields,field_description:base_changeset.field_base_partner_merge_line__count_pending_changesets +#: model:ir.model.fields,field_description:base_changeset.field_base_time_parameter__count_pending_changesets +#: model:ir.model.fields,field_description:base_changeset.field_base_time_parameter_version__count_pending_changesets #: model:ir.model.fields,field_description:base_changeset.field_base_update_translations__count_pending_changesets #: model:ir.model.fields,field_description:base_changeset.field_bus_bus__count_pending_changesets #: model:ir.model.fields,field_description:base_changeset.field_bus_presence__count_pending_changesets @@ -2373,6 +2381,8 @@ msgstr "" #: model:ir.model.fields,field_description:base_changeset.field_base_multi_image_owner__user_can_see_changeset #: model:ir.model.fields,field_description:base_changeset.field_base_partner_merge_automatic_wizard__user_can_see_changeset #: model:ir.model.fields,field_description:base_changeset.field_base_partner_merge_line__user_can_see_changeset +#: model:ir.model.fields,field_description:base_changeset.field_base_time_parameter__user_can_see_changeset +#: model:ir.model.fields,field_description:base_changeset.field_base_time_parameter_version__user_can_see_changeset #: model:ir.model.fields,field_description:base_changeset.field_base_update_translations__user_can_see_changeset #: model:ir.model.fields,field_description:base_changeset.field_bus_bus__user_can_see_changeset #: model:ir.model.fields,field_description:base_changeset.field_bus_presence__user_can_see_changeset diff --git a/base_changeset/i18n/it.po b/base_changeset/i18n/it.po index 0e66bebd314..ce115ceb64f 100644 --- a/base_changeset/i18n/it.po +++ b/base_changeset/i18n/it.po @@ -198,6 +198,8 @@ msgstr "" #: model:ir.model.fields,field_description:base_changeset.field_base_multi_image_owner__changeset_change_ids #: model:ir.model.fields,field_description:base_changeset.field_base_partner_merge_automatic_wizard__changeset_change_ids #: model:ir.model.fields,field_description:base_changeset.field_base_partner_merge_line__changeset_change_ids +#: model:ir.model.fields,field_description:base_changeset.field_base_time_parameter__changeset_change_ids +#: model:ir.model.fields,field_description:base_changeset.field_base_time_parameter_version__changeset_change_ids #: model:ir.model.fields,field_description:base_changeset.field_base_update_translations__changeset_change_ids #: model:ir.model.fields,field_description:base_changeset.field_bus_bus__changeset_change_ids #: model:ir.model.fields,field_description:base_changeset.field_bus_presence__changeset_change_ids @@ -647,6 +649,8 @@ msgstr "" #: model:ir.model.fields,field_description:base_changeset.field_base_multi_image_owner__changeset_ids #: model:ir.model.fields,field_description:base_changeset.field_base_partner_merge_automatic_wizard__changeset_ids #: model:ir.model.fields,field_description:base_changeset.field_base_partner_merge_line__changeset_ids +#: model:ir.model.fields,field_description:base_changeset.field_base_time_parameter__changeset_ids +#: model:ir.model.fields,field_description:base_changeset.field_base_time_parameter_version__changeset_ids #: model:ir.model.fields,field_description:base_changeset.field_base_update_translations__changeset_ids #: model:ir.model.fields,field_description:base_changeset.field_bus_bus__changeset_ids #: model:ir.model.fields,field_description:base_changeset.field_bus_presence__changeset_ids @@ -1083,6 +1087,8 @@ msgstr "Azienda" #: model:ir.model.fields,field_description:base_changeset.field_base_multi_image_owner__count_pending_changeset_changes #: model:ir.model.fields,field_description:base_changeset.field_base_partner_merge_automatic_wizard__count_pending_changeset_changes #: model:ir.model.fields,field_description:base_changeset.field_base_partner_merge_line__count_pending_changeset_changes +#: model:ir.model.fields,field_description:base_changeset.field_base_time_parameter__count_pending_changeset_changes +#: model:ir.model.fields,field_description:base_changeset.field_base_time_parameter_version__count_pending_changeset_changes #: model:ir.model.fields,field_description:base_changeset.field_base_update_translations__count_pending_changeset_changes #: model:ir.model.fields,field_description:base_changeset.field_bus_bus__count_pending_changeset_changes #: model:ir.model.fields,field_description:base_changeset.field_bus_presence__count_pending_changeset_changes @@ -1512,6 +1518,8 @@ msgstr "" #: model:ir.model.fields,field_description:base_changeset.field_base_multi_image_owner__count_pending_changesets #: model:ir.model.fields,field_description:base_changeset.field_base_partner_merge_automatic_wizard__count_pending_changesets #: model:ir.model.fields,field_description:base_changeset.field_base_partner_merge_line__count_pending_changesets +#: model:ir.model.fields,field_description:base_changeset.field_base_time_parameter__count_pending_changesets +#: model:ir.model.fields,field_description:base_changeset.field_base_time_parameter_version__count_pending_changesets #: model:ir.model.fields,field_description:base_changeset.field_base_update_translations__count_pending_changesets #: model:ir.model.fields,field_description:base_changeset.field_bus_bus__count_pending_changesets #: model:ir.model.fields,field_description:base_changeset.field_bus_presence__count_pending_changesets @@ -2357,6 +2365,8 @@ msgstr "" #: model:ir.model.fields,field_description:base_changeset.field_base_multi_image_owner__user_can_see_changeset #: model:ir.model.fields,field_description:base_changeset.field_base_partner_merge_automatic_wizard__user_can_see_changeset #: model:ir.model.fields,field_description:base_changeset.field_base_partner_merge_line__user_can_see_changeset +#: model:ir.model.fields,field_description:base_changeset.field_base_time_parameter__user_can_see_changeset +#: model:ir.model.fields,field_description:base_changeset.field_base_time_parameter_version__user_can_see_changeset #: model:ir.model.fields,field_description:base_changeset.field_base_update_translations__user_can_see_changeset #: model:ir.model.fields,field_description:base_changeset.field_bus_bus__user_can_see_changeset #: model:ir.model.fields,field_description:base_changeset.field_bus_presence__user_can_see_changeset diff --git a/base_time_parameter/README.rst b/base_time_parameter/README.rst new file mode 100644 index 00000000000..8a8284f5cba --- /dev/null +++ b/base_time_parameter/README.rst @@ -0,0 +1,164 @@ +============== +Time Parameter +============== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:b19c48105a6e8ffe0fdf23f4eccc9c87307e294547717716678ea9ddd8a5bd6a + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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/licence-LGPL--3-blue.png + :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html + :alt: License: LGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--tools-lightgray.png?logo=github + :target: https://github.com/OCA/server-tools/tree/15.0/base_time_parameter + :alt: OCA/server-tools +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/server-tools-15-0/server-tools-15-0-base_time_parameter + :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-tools&target_branch=15.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +A value may change over time. +With this module you may set starting dates and values. + +**Table of contents** + +.. contents:: + :local: + +Configuration +============= + +The user needs the access right "Manage Time Parameters". + +Usage +===== + +Menu: "Settings/Technical/Time Parameters" + +Create a parameter with different versions (start date and value). + +If model_id is empty, any model/record may get the time parameter. + +The value may be a text or reference. + +Get the value like this: + +.. code-block:: python + + # Pass no date: using today's date + value = model.get_time_parameter("parameter_code_or_name") + # Pass a date or datetime + value = model.get_time_parameter("parameter_code_or_name", date=datetime.datetime.now())) + # Pass the name of a date/datetime field of the record + value = record.get_time_parameter("parameter_code_or_name", "date") + +Example of implementation in another module +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Payroll implementation: + +* Menu "Payroll/Configuration/Time Parameters" only shows hr.payslip parameters. +* New parameters will be hr.payslip parameters. +* By default, the model_id field is hidden in the form. + +.. code-block:: XML + + + Time Parameters + base.time.parameter + tree,form + + + + + +Reference field implementatiton: + +.. code-block:: python + + from odoo import fields, models + + + class TimeParameterVersion(models.Model): + _inherit = "base.time.parameter.version" + + value_reference = fields.Reference( + selection_add=[("account.account", "Account")], + ) + +Bug Tracker +=========== + +Bugs are tracked on `GitHub 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 `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* Nimarosa +* appstogrow + +Contributors +~~~~~~~~~~~~ + +* Nimarosa (Nicolas Rodriguez) +* appstogrow (Henrik Norlin) +* ExoSoftware (André Leite) + +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-appstogrow| image:: https://github.com/appstogrow.png?size=40px + :target: https://github.com/appstogrow + :alt: appstogrow +.. |maintainer-nimarosa| image:: https://github.com/nimarosa.png?size=40px + :target: https://github.com/nimarosa + :alt: nimarosa + +Current `maintainers `__: + +|maintainer-appstogrow| |maintainer-nimarosa| + +This module is part of the `OCA/server-tools `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/base_time_parameter/__init__.py b/base_time_parameter/__init__.py new file mode 100644 index 00000000000..8ce5e091284 --- /dev/null +++ b/base_time_parameter/__init__.py @@ -0,0 +1,4 @@ +# Author Copyright (C) 2022 Nimarosa (Nicolas Rodriguez) (). +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from . import models diff --git a/base_time_parameter/__manifest__.py b/base_time_parameter/__manifest__.py new file mode 100644 index 00000000000..c0128a75ef6 --- /dev/null +++ b/base_time_parameter/__manifest__.py @@ -0,0 +1,28 @@ +# Author Copyright (C) 2022 Nimarosa (Nicolas Rodriguez) (). +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +{ + "name": "Time Parameter", + "version": "15.0.1.0.0", + "summary": """ + Time dependent parameters + Adds the feature to define parameters + with time based versions. + """, + "license": "LGPL-3", + "author": "Nimarosa, appstogrow, Odoo Community Association (OCA)", + "website": "https://github.com/OCA/server-tools", + "maintainers": ["appstogrow", "nimarosa"], + "category": "Technical", + "depends": [ + "base", + ], + "data": [ + "security/security.xml", + "security/ir.model.access.csv", + "views/base_time_parameter_views.xml", + "views/base_time_parameter_version_views.xml", + ], + "development_status": "Beta", + "installable": True, +} diff --git a/base_time_parameter/i18n/base_time_dependent_parameter.pot b/base_time_parameter/i18n/base_time_dependent_parameter.pot new file mode 100644 index 00000000000..64570c893e0 --- /dev/null +++ b/base_time_parameter/i18n/base_time_dependent_parameter.pot @@ -0,0 +1,160 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * base_time_dependent_parameter +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 14.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_time_dependent_parameter +#: model:ir.model,name:base_time_dependent_parameter.model_base +msgid "Base" +msgstr "" + +#. module: base_time_dependent_parameter +#: model:ir.model.fields,field_description:base_time_dependent_parameter.field_base_time_parameter__code +#: model:ir.model.fields,field_description:base_time_dependent_parameter.field_base_time_parameter_value__code +msgid "Code" +msgstr "" + +#. module: base_time_dependent_parameter +#: model:ir.model.fields,field_description:base_time_dependent_parameter.field_base_time_parameter__company_id +#: model:ir.model.fields,field_description:base_time_dependent_parameter.field_base_time_parameter_value__company_id +msgid "Company" +msgstr "" + +#. module: base_time_dependent_parameter +#: model:ir.model.fields,field_description:base_time_dependent_parameter.field_base_time_parameter__country_id +#: model:ir.model.fields,field_description:base_time_dependent_parameter.field_base_time_parameter_value__country_id +msgid "Country" +msgstr "" + +#. module: base_time_dependent_parameter +#: model:ir.model.fields,field_description:base_time_dependent_parameter.field_base_time_parameter__create_uid +#: model:ir.model.fields,field_description:base_time_dependent_parameter.field_base_time_parameter_value__create_uid +msgid "Created by" +msgstr "" + +#. module: base_time_dependent_parameter +#: model:ir.model.fields,field_description:base_time_dependent_parameter.field_base_time_parameter__create_date +#: model:ir.model.fields,field_description:base_time_dependent_parameter.field_base_time_parameter_value__create_date +msgid "Created on" +msgstr "" + +#. module: base_time_dependent_parameter +#: model:ir.model.fields,field_description:base_time_dependent_parameter.field_base_time_parameter_value__date_from +msgid "Date From" +msgstr "" + +#. module: base_time_dependent_parameter +#: model:ir.model.fields,field_description:base_time_dependent_parameter.field_base_time_parameter__description +#: model_terms:ir.ui.view,arch_db:base_time_dependent_parameter.base_time_parameter_view_form +msgid "Description" +msgstr "" + +#. module: base_time_dependent_parameter +#: model:ir.model.fields,field_description:base_time_dependent_parameter.field_base_time_parameter__display_name +#: model:ir.model.fields,field_description:base_time_dependent_parameter.field_base_time_parameter_value__display_name +msgid "Display Name" +msgstr "" + +#. module: base_time_dependent_parameter +#: model:ir.model.fields,field_description:base_time_dependent_parameter.field_base_time_parameter__id +#: model:ir.model.fields,field_description:base_time_dependent_parameter.field_base_time_parameter_value__id +msgid "ID" +msgstr "" + +#. module: base_time_dependent_parameter +#: model:ir.model.fields,field_description:base_time_dependent_parameter.field_base_time_parameter____last_update +#: model:ir.model.fields,field_description:base_time_dependent_parameter.field_base_time_parameter_value____last_update +msgid "Last Modified on" +msgstr "" + +#. module: base_time_dependent_parameter +#: model:ir.model.fields,field_description:base_time_dependent_parameter.field_base_time_parameter__write_uid +#: model:ir.model.fields,field_description:base_time_dependent_parameter.field_base_time_parameter_value__write_uid +msgid "Last Updated by" +msgstr "" + +#. module: base_time_dependent_parameter +#: model:ir.model.fields,field_description:base_time_dependent_parameter.field_base_time_parameter__write_date +#: model:ir.model.fields,field_description:base_time_dependent_parameter.field_base_time_parameter_value__write_date +msgid "Last Updated on" +msgstr "" + +#. module: base_time_dependent_parameter +#: model:res.groups,name:base_time_dependent_parameter.group_time_parameter +msgid "Manage Time Parameters" +msgstr "" + +#. module: base_time_dependent_parameter +#: code:addons/base_time_dependent_parameter/models/base_time_parameter.py:0 +#, python-format +msgid "No rule parameter with code '%s' was found for date %s" +msgstr "" + +#. module: base_time_dependent_parameter +#: model:ir.model.fields,field_description:base_time_dependent_parameter.field_base_time_parameter__name +msgid "Parameter Name" +msgstr "" + +#. module: base_time_dependent_parameter +#: model:ir.model.fields,field_description:base_time_dependent_parameter.field_base_time_parameter_value__parameter_value +msgid "Parameter Value" +msgstr "" + +#. module: base_time_dependent_parameter +#: model:ir.model.fields,help:base_time_dependent_parameter.field_base_time_parameter_value__parameter_value +msgid "Python Code" +msgstr "" + +#. module: base_time_dependent_parameter +#: model:ir.model.fields,field_description:base_time_dependent_parameter.field_base_time_parameter__smart_search +#: model:ir.model.fields,field_description:base_time_dependent_parameter.field_base_time_parameter_value__smart_search +msgid "Smart Search" +msgstr "" + +#. module: base_time_dependent_parameter +#: model_terms:ir.ui.view,arch_db:base_time_dependent_parameter.base_time_parameter_view_form +msgid "Time Dependent Parameter" +msgstr "" + +#. module: base_time_dependent_parameter +#: model:ir.actions.act_window,name:base_time_dependent_parameter.base_time_parameter_action +#: model:ir.ui.menu,name:base_time_dependent_parameter.menu_action_base_time_parameter +msgid "Time Dependent Parameters" +msgstr "" + +#. module: base_time_dependent_parameter +#: model:ir.model,name:base_time_dependent_parameter.model_base_time_parameter +#: model:ir.model.fields,field_description:base_time_dependent_parameter.field_base_time_parameter_value__time_parameter_id +msgid "Time Parameter" +msgstr "" + +#. module: base_time_dependent_parameter +#: model:ir.model,name:base_time_dependent_parameter.model_base_time_parameter_value +msgid "Time Parameter Value" +msgstr "" + +#. module: base_time_dependent_parameter +#: model:ir.model.constraint,message:base_time_dependent_parameter.constraint_base_time_parameter_value__unique +msgid "Two rules parameters with the same code cannot start the same day" +msgstr "" + +#. module: base_time_dependent_parameter +#: model:ir.model.constraint,message:base_time_dependent_parameter.constraint_base_time_parameter__unique +msgid "Two time parameters cannot have the same code." +msgstr "" + +#. module: base_time_dependent_parameter +#: model:ir.model.fields,field_description:base_time_dependent_parameter.field_base_time_parameter__parameter_version_ids +#: model_terms:ir.ui.view,arch_db:base_time_dependent_parameter.base_time_parameter_view_form +msgid "Versions" +msgstr "" diff --git a/base_time_parameter/i18n/base_time_parameter.pot b/base_time_parameter/i18n/base_time_parameter.pot new file mode 100644 index 00000000000..70d113261e9 --- /dev/null +++ b/base_time_parameter/i18n/base_time_parameter.pot @@ -0,0 +1,233 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * base_time_parameter +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 15.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_time_parameter +#: model:ir.model.constraint,message:base_time_parameter.constraint_base_time_parameter_version__unique +msgid "A parameter cannot have two versions starting the same day." +msgstr "" + +#. module: base_time_parameter +#: model:ir.model,name:base_time_parameter.model_base +msgid "Base" +msgstr "" + +#. module: base_time_parameter +#: model:ir.model.fields.selection,name:base_time_parameter.selection__base_time_parameter__type__boolean +msgid "Boolean (True/False)" +msgstr "" + +#. module: base_time_parameter +#: model:ir.model.fields,field_description:base_time_parameter.field_base_time_parameter__code +#: model:ir.model.fields,field_description:base_time_parameter.field_base_time_parameter_version__code +msgid "Code" +msgstr "" + +#. module: base_time_parameter +#: model:ir.model.fields,field_description:base_time_parameter.field_base_time_parameter__company_id +#: model:ir.model.fields,field_description:base_time_parameter.field_base_time_parameter_version__company_id +msgid "Company" +msgstr "" + +#. module: base_time_parameter +#: model:ir.model.fields,field_description:base_time_parameter.field_base_time_parameter__country_id +#: model:ir.model.fields,field_description:base_time_parameter.field_base_time_parameter_version__country_id +msgid "Country" +msgstr "" + +#. module: base_time_parameter +#: model:ir.model.fields,field_description:base_time_parameter.field_base_time_parameter__create_uid +#: model:ir.model.fields,field_description:base_time_parameter.field_base_time_parameter_version__create_uid +msgid "Created by" +msgstr "" + +#. module: base_time_parameter +#: model:ir.model.fields,field_description:base_time_parameter.field_base_time_parameter__create_date +#: model:ir.model.fields,field_description:base_time_parameter.field_base_time_parameter_version__create_date +msgid "Created on" +msgstr "" + +#. module: base_time_parameter +#: model:ir.model.fields.selection,name:base_time_parameter.selection__base_time_parameter__type__date +msgid "Date" +msgstr "" + +#. module: base_time_parameter +#: model:ir.model.fields,field_description:base_time_parameter.field_base_time_parameter_version__date_from +msgid "Date From" +msgstr "" + +#. module: base_time_parameter +#: model:ir.model.fields,field_description:base_time_parameter.field_base_time_parameter__description +#: model_terms:ir.ui.view,arch_db:base_time_parameter.base_time_parameter_view_form +msgid "Description" +msgstr "" + +#. module: base_time_parameter +#: model:ir.model.fields,field_description:base_time_parameter.field_base_time_parameter__display_name +#: model:ir.model.fields,field_description:base_time_parameter.field_base_time_parameter_version__display_name +msgid "Display Name" +msgstr "" + +#. module: base_time_parameter +#: code:addons/base_time_parameter/models/base_time_parameter_version.py:0 +#, python-format +msgid "Error occurred while validating date: %s" +msgstr "" + +#. module: base_time_parameter +#: code:addons/base_time_parameter/models/base_time_parameter_version.py:0 +#, python-format +msgid "Error occurred while validating float: %s" +msgstr "" + +#. module: base_time_parameter +#: code:addons/base_time_parameter/models/base_time_parameter_version.py:0 +#, python-format +msgid "Error occurred while validating integer: %s" +msgstr "" + +#. module: base_time_parameter +#: code:addons/base_time_parameter/models/base_time_parameter_version.py:0 +#, python-format +msgid "Error occurred while validating json: %s" +msgstr "" + +#. module: base_time_parameter +#: model:ir.model.fields,help:base_time_parameter.field_base_time_parameter__model_id +msgid "Filter by model (e.g. hr.payslip)" +msgstr "" + +#. module: base_time_parameter +#: model:ir.model.fields.selection,name:base_time_parameter.selection__base_time_parameter__type__float +msgid "Floating point number" +msgstr "" + +#. module: base_time_parameter +#: model:ir.model.fields,field_description:base_time_parameter.field_base_time_parameter__id +#: model:ir.model.fields,field_description:base_time_parameter.field_base_time_parameter_version__id +msgid "ID" +msgstr "" + +#. module: base_time_parameter +#: model:ir.model.fields.selection,name:base_time_parameter.selection__base_time_parameter__type__integer +msgid "Integer number" +msgstr "" + +#. module: base_time_parameter +#: model:ir.model.fields.selection,name:base_time_parameter.selection__base_time_parameter__type__json +msgid "JSON" +msgstr "" + +#. module: base_time_parameter +#: model:ir.model.fields,field_description:base_time_parameter.field_base_time_parameter____last_update +#: model:ir.model.fields,field_description:base_time_parameter.field_base_time_parameter_version____last_update +msgid "Last Modified on" +msgstr "" + +#. module: base_time_parameter +#: model:ir.model.fields,field_description:base_time_parameter.field_base_time_parameter__write_uid +#: model:ir.model.fields,field_description:base_time_parameter.field_base_time_parameter_version__write_uid +msgid "Last Updated by" +msgstr "" + +#. module: base_time_parameter +#: model:ir.model.fields,field_description:base_time_parameter.field_base_time_parameter__write_date +#: model:ir.model.fields,field_description:base_time_parameter.field_base_time_parameter_version__write_date +msgid "Last Updated on" +msgstr "" + +#. module: base_time_parameter +#: model:res.groups,name:base_time_parameter.group_time_parameter +msgid "Manage Time Parameters" +msgstr "" + +#. module: base_time_parameter +#: model:ir.model.fields,field_description:base_time_parameter.field_base_time_parameter__model_id +#: model_terms:ir.ui.view,arch_db:base_time_parameter.base_time_parameter_view_search +msgid "Model" +msgstr "" + +#. module: base_time_parameter +#: code:addons/base_time_parameter/models/base_time_parameter.py:0 +#, python-format +msgid "" +"No parameter for model '%(model_name)s', code '%(code)s', date %(date)s" +msgstr "" + +#. module: base_time_parameter +#: model:ir.model.fields,field_description:base_time_parameter.field_base_time_parameter__name +msgid "Parameter Name" +msgstr "" + +#. module: base_time_parameter +#: model:ir.model.fields.selection,name:base_time_parameter.selection__base_time_parameter__type__record +msgid "Record" +msgstr "" + +#. module: base_time_parameter +#: model:ir.model.fields,field_description:base_time_parameter.field_base_time_parameter__record_model +msgid "Record Model" +msgstr "" + +#. module: base_time_parameter +#: model:ir.model.fields,field_description:base_time_parameter.field_base_time_parameter_version__value_reference +msgid "Reference Value" +msgstr "" + +#. module: base_time_parameter +#: model:ir.model.fields.selection,name:base_time_parameter.selection__base_time_parameter__type__string +msgid "Text" +msgstr "" + +#. module: base_time_parameter +#: model:ir.model,name:base_time_parameter.model_base_time_parameter +#: model:ir.model.fields,field_description:base_time_parameter.field_base_time_parameter_version__parameter_id +#: model_terms:ir.ui.view,arch_db:base_time_parameter.base_time_parameter_view_form +msgid "Time Parameter" +msgstr "" + +#. module: base_time_parameter +#: model:ir.model,name:base_time_parameter.model_base_time_parameter_version +msgid "Time Parameter Version" +msgstr "" + +#. module: base_time_parameter +#: model:ir.actions.act_window,name:base_time_parameter.base_time_parameter_action +#: model:ir.ui.menu,name:base_time_parameter.base_time_parameter_menu +msgid "Time Parameters" +msgstr "" + +#. module: base_time_parameter +#: model:ir.model.constraint,message:base_time_parameter.constraint_base_time_parameter__unique +msgid "Two time parameters cannot have the same code." +msgstr "" + +#. module: base_time_parameter +#: model:ir.model.fields,field_description:base_time_parameter.field_base_time_parameter__type +#: model:ir.model.fields,field_description:base_time_parameter.field_base_time_parameter_version__type +msgid "Type" +msgstr "" + +#. module: base_time_parameter +#: model:ir.model.fields,field_description:base_time_parameter.field_base_time_parameter_version__value +msgid "Value" +msgstr "" + +#. module: base_time_parameter +#: model:ir.actions.act_window,name:base_time_parameter.base_time_parameter_version_action +#: model:ir.model.fields,field_description:base_time_parameter.field_base_time_parameter__version_ids +#: model_terms:ir.ui.view,arch_db:base_time_parameter.base_time_parameter_view_form +msgid "Versions" +msgstr "" diff --git a/base_time_parameter/i18n/pt.po b/base_time_parameter/i18n/pt.po new file mode 100644 index 00000000000..1ad09c90c94 --- /dev/null +++ b/base_time_parameter/i18n/pt.po @@ -0,0 +1,219 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * base_time_parameter +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 14.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2023-01-07 19:45+0000\n" +"Last-Translator: Pedro Castro Silva \n" +"Language-Team: none\n" +"Language: pt\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.14.1\n" + +#. module: base_time_parameter +#: model:ir.model.constraint,message:base_time_parameter.constraint_base_time_parameter_version__unique +msgid "A parameter cannot have two versions starting the same day." +msgstr "Um parâmetro não pode ter duas versões a começar no mesmo dia." + +#. module: base_time_parameter +#: model:ir.model,name:base_time_parameter.model_base +msgid "Base" +msgstr "" + +#. module: base_time_parameter +#: model:ir.model.fields.selection,name:base_time_parameter.selection__base_time_parameter__type__boolean +msgid "Boolean (True/False)" +msgstr "Booleano (Verdadeiro/Falso)" + +#. module: base_time_parameter +#: model:ir.model.fields,field_description:base_time_parameter.field_base_time_parameter__code +#: model:ir.model.fields,field_description:base_time_parameter.field_base_time_parameter_version__code +msgid "Code" +msgstr "Código" + +#. module: base_time_parameter +#: model:ir.model.fields,field_description:base_time_parameter.field_base_time_parameter__company_id +#: model:ir.model.fields,field_description:base_time_parameter.field_base_time_parameter_version__company_id +msgid "Company" +msgstr "Empresa" + +#. module: base_time_parameter +#: model:ir.model.fields,field_description:base_time_parameter.field_base_time_parameter__country_id +#: model:ir.model.fields,field_description:base_time_parameter.field_base_time_parameter_version__country_id +msgid "Country" +msgstr "País" + +#. module: base_time_parameter +#: model:ir.model.fields,field_description:base_time_parameter.field_base_time_parameter__create_uid +#: model:ir.model.fields,field_description:base_time_parameter.field_base_time_parameter_version__create_uid +msgid "Created by" +msgstr "Criado por" + +#. module: base_time_parameter +#: model:ir.model.fields,field_description:base_time_parameter.field_base_time_parameter__create_date +#: model:ir.model.fields,field_description:base_time_parameter.field_base_time_parameter_version__create_date +msgid "Created on" +msgstr "Criado em" + +#. module: base_time_parameter +#: model:ir.model.fields.selection,name:base_time_parameter.selection__base_time_parameter__type__date +msgid "Date" +msgstr "Data" + +#. module: base_time_parameter +#: model:ir.model.fields,field_description:base_time_parameter.field_base_time_parameter_version__date_from +msgid "Date From" +msgstr "Data Inicial" + +#. module: base_time_parameter +#: model:ir.model.fields,field_description:base_time_parameter.field_base_time_parameter__description +#: model_terms:ir.ui.view,arch_db:base_time_parameter.base_time_parameter_view_form +msgid "Description" +msgstr "Descrição" + +#. module: base_time_parameter +#: model:ir.model.fields,field_description:base_time_parameter.field_base_time_parameter__display_name +#: model:ir.model.fields,field_description:base_time_parameter.field_base_time_parameter_version__display_name +msgid "Display Name" +msgstr "Nome a Exibir" + +#. module: base_time_parameter +#: model:ir.model.fields,help:base_time_parameter.field_base_time_parameter__model_id +msgid "Filter by model (e.g. hr.payslip)" +msgstr "Filtrar por modelo (p. ex. hr.payslip)" + +#. module: base_time_parameter +#: model:ir.model.fields.selection,name:base_time_parameter.selection__base_time_parameter__type__float +msgid "Floating point number" +msgstr "Número de vírgula flutuante" + +#. module: base_time_parameter +#: model:ir.model.fields,field_description:base_time_parameter.field_base_time_parameter__id +#: model:ir.model.fields,field_description:base_time_parameter.field_base_time_parameter_version__id +msgid "ID" +msgstr "" + +#. module: base_time_parameter +#: model:ir.model.fields.selection,name:base_time_parameter.selection__base_time_parameter__type__integer +msgid "Integer number" +msgstr "Número inteiro" + +#. module: base_time_parameter +#: model:ir.model.fields.selection,name:base_time_parameter.selection__base_time_parameter__type__json +msgid "JSON" +msgstr "" + +#. module: base_time_parameter +#: model:ir.model.fields,field_description:base_time_parameter.field_base_time_parameter____last_update +#: model:ir.model.fields,field_description:base_time_parameter.field_base_time_parameter_version____last_update +msgid "Last Modified on" +msgstr "Última Modificação em" + +#. module: base_time_parameter +#: model:ir.model.fields,field_description:base_time_parameter.field_base_time_parameter__write_uid +#: model:ir.model.fields,field_description:base_time_parameter.field_base_time_parameter_version__write_uid +msgid "Last Updated by" +msgstr "Última Atualização por" + +#. module: base_time_parameter +#: model:ir.model.fields,field_description:base_time_parameter.field_base_time_parameter__write_date +#: model:ir.model.fields,field_description:base_time_parameter.field_base_time_parameter_version__write_date +msgid "Last Updated on" +msgstr "Última Atualização em" + +#. module: base_time_parameter +#: model:res.groups,name:base_time_parameter.group_time_parameter +msgid "Manage Time Parameters" +msgstr "Gerir Parâmetros Temporais" + +#. module: base_time_parameter +#: model:ir.model.fields,field_description:base_time_parameter.field_base_time_parameter__model_id +#: model_terms:ir.ui.view,arch_db:base_time_parameter.base_time_parameter_view_search +msgid "Model" +msgstr "Modelo" + +#. module: base_time_parameter +#: code:addons/base_time_parameter/models/base_time_parameter.py:0 +#, python-format +msgid "" +"No parameter for model '%(model_name)s', code '%(code)s', date %(date)s" +msgstr "" +"Nenhum parâmetro para o modelo '%(model_name)s', código '%(code)s', data " +"%(date)s" + +#. module: base_time_parameter +#: model:ir.model.fields,field_description:base_time_parameter.field_base_time_parameter__name +msgid "Parameter Name" +msgstr "Nome do Parâmetro" + +#. module: base_time_parameter +#: model:ir.model.fields.selection,name:base_time_parameter.selection__base_time_parameter__type__reference +msgid "Reference" +msgstr "Referência" + +#. module: base_time_parameter +#: model:ir.model.fields.selection,name:base_time_parameter.selection__base_time_parameter__type__reference_id +msgid "Reference ID" +msgstr "ID Referência" + +#. module: base_time_parameter +#: model:ir.model.fields,field_description:base_time_parameter.field_base_time_parameter_version__value_reference +msgid "Reference Value" +msgstr "Valor da Referência" + +#. module: base_time_parameter +#: model:ir.model.fields,field_description:base_time_parameter.field_base_time_parameter__smart_search +#: model:ir.model.fields,field_description:base_time_parameter.field_base_time_parameter_version__smart_search +msgid "Smart Search" +msgstr "Pesquisa Inteligente" + +#. module: base_time_parameter +#: model:ir.model.fields.selection,name:base_time_parameter.selection__base_time_parameter__type__string +msgid "Text" +msgstr "Texto" + +#. module: base_time_parameter +#: model:ir.model,name:base_time_parameter.model_base_time_parameter +#: model:ir.model.fields,field_description:base_time_parameter.field_base_time_parameter_version__parameter_id +#: model_terms:ir.ui.view,arch_db:base_time_parameter.base_time_parameter_view_form +msgid "Time Parameter" +msgstr "Parâmetro Temporal" + +#. module: base_time_parameter +#: model:ir.model,name:base_time_parameter.model_base_time_parameter_version +msgid "Time Parameter Version" +msgstr "Versão do Parâmetro Temporal" + +#. module: base_time_parameter +#: model:ir.actions.act_window,name:base_time_parameter.base_time_parameter_action +#: model:ir.ui.menu,name:base_time_parameter.menu_action_base_time_parameter +msgid "Time Parameters" +msgstr "Parâmetros Temporais" + +#. module: base_time_parameter +#: model:ir.model.constraint,message:base_time_parameter.constraint_base_time_parameter__unique +msgid "Two time parameters cannot have the same code." +msgstr "Dois parâmetros temporais não podem ter o mesmo código." + +#. module: base_time_parameter +#: model:ir.model.fields,field_description:base_time_parameter.field_base_time_parameter__type +#: model:ir.model.fields,field_description:base_time_parameter.field_base_time_parameter_version__type +msgid "Type" +msgstr "Tipo" + +#. module: base_time_parameter +#: model:ir.model.fields,field_description:base_time_parameter.field_base_time_parameter_version__value +msgid "Value" +msgstr "Valor" + +#. module: base_time_parameter +#: model:ir.model.fields,field_description:base_time_parameter.field_base_time_parameter__version_ids +#: model_terms:ir.ui.view,arch_db:base_time_parameter.base_time_parameter_view_form +msgid "Versions" +msgstr "Versões" diff --git a/base_time_parameter/models/__init__.py b/base_time_parameter/models/__init__.py new file mode 100644 index 00000000000..ac767df0a4f --- /dev/null +++ b/base_time_parameter/models/__init__.py @@ -0,0 +1,6 @@ +# Author Copyright (C) 2022 Nimarosa (Nicolas Rodriguez) (). +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from . import base +from . import base_time_parameter +from . import base_time_parameter_version diff --git a/base_time_parameter/models/base.py b/base_time_parameter/models/base.py new file mode 100644 index 00000000000..81b0a7252a5 --- /dev/null +++ b/base_time_parameter/models/base.py @@ -0,0 +1,23 @@ +# Author Copyright (C) 2022 Nimarosa (Nicolas Rodriguez) (). +# Author Copyright (C) 2022 Appstogrow (Henrik Norlin) (henrik@appstogrow.co). +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +import datetime + +from odoo import models + + +class Base(models.AbstractModel): + _inherit = "base" + + def get_time_parameter(self, code, date=None, raise_if_not_found=True, get="value"): + if type(date) is str: + # Get the date/datetime from a field on the record + date = getattr(self, date) + if type(date) is datetime.datetime: + date = date.date() + assert type(date) is datetime.date or date is None, "Wrong date" + + return self.env["base.time.parameter"]._get_from_model_code_date( + self._name, code, date, raise_if_not_found=False, get=get + ) diff --git a/base_time_parameter/models/base_time_parameter.py b/base_time_parameter/models/base_time_parameter.py new file mode 100644 index 00000000000..5294f3789a6 --- /dev/null +++ b/base_time_parameter/models/base_time_parameter.py @@ -0,0 +1,120 @@ +# Author Copyright (C) 2022 Nimarosa (Nicolas Rodriguez) (). +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +import json +from datetime import datetime + +from odoo import _, api, fields, models +from odoo.exceptions import UserError + + +class TimeParameter(models.Model): + _name = "base.time.parameter" + _description = "Time Parameter" + + name = fields.Char(string="Parameter Name") + code = fields.Char() + description = fields.Text() + company_id = fields.Many2one( + "res.company", + string="Company", + default=lambda self: self.env.company, + ) + country_id = fields.Many2one( + "res.country", + string="Country", + default=lambda self: self.env.company.country_id, + ) + model_id = fields.Many2one( + "ir.model", + string="Model", + help="Filter by model (e.g. hr.payslip)", + ) + type = fields.Selection( + [ + ("boolean", "Boolean (True/False)"), + ("date", "Date"), + ("float", "Floating point number"), + ("integer", "Integer number"), + ("json", "JSON"), + ("record", "Record"), + ("string", "Text"), + ], + required=True, + default="float", + index=True, + ) + record_model = fields.Selection([]) + version_ids = fields.One2many( + "base.time.parameter.version", "parameter_id", string=("Versions") + ) + + @api.model + def _get_from_model_code_date( + self, model_name, code, date=None, raise_if_not_found=True, get="value" + ): + # Filter on company, model, code/name + model = self.env["ir.model"].search([("model", "=", model_name)]) + domain = [ + "&", + ("company_id", "in", (self.env.company.id, False)), + "&", + ("model_id", "in", (model.id, False)), + "|", + ("code", "=", code), + "&", + ("code", "=", False), + ("name", "=", code), + ] + parameter = self.env["base.time.parameter"].search(domain) + if parameter: + value = parameter._get(date, get=get) + if value: + return value + # No value + if not raise_if_not_found: + return + # Raise error + model_name = model.name + raise UserError( + _("No parameter for model '%(model_name)s', code '%(code)s', date %(date)s") + % (model_name, code, date) + ) + + def _get(self, date=None, get="value"): + self.ensure_one() + if not date: + date = fields.Date.today() + versions = self.version_ids.filtered(lambda v: v.date_from <= date).sorted( + key=lambda v: v.date_from, reverse=True + ) + if not versions: + return False + version = versions[0] + if get == "value": + if self.type == "boolean": + return version.value == "True" and True or False + elif self.type == "date": + return datetime.strptime(version.value, "%Y-%m-%d").date() + elif self.type == "float": + return float(version.value) + elif self.type == "integer": + return int(version.value) + elif self.type == "json": + return json.loads(version.value) + elif self.type == "reference": + return version.value_reference + elif self.type == "reference_id": + return version.value_reference and version.value_reference.id or 0 + elif self.type == "string": + return version.value + elif get == "date": + return version.date_from + + _sql_constraints = [ + ( + "_unique", + "unique (code, company_id)", + "Two time parameters cannot have the same code.", + ), + ] diff --git a/base_time_parameter/models/base_time_parameter_version.py b/base_time_parameter/models/base_time_parameter_version.py new file mode 100644 index 00000000000..b2e469c7b25 --- /dev/null +++ b/base_time_parameter/models/base_time_parameter_version.py @@ -0,0 +1,92 @@ +# Author Copyright (C) 2022 Nimarosa (Nicolas Rodriguez) (). +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). +import json +import logging +from datetime import datetime + +from odoo import _, api, fields, models + +_logger = logging.getLogger(__name__) + + +def _validate_boolean(value): + if value.lower() in ("true", "1"): + return "True" + elif value.lower() in ("false", "0"): + return "False" + + +def _validate_date(value, date_format): + date_formats = [date_format, "%Y-%m-%d"] + for date_format in date_formats: + try: + return datetime.strptime(value, date_format).strftime("%Y-%m-%d") + except ValueError as e: + _logger.debug(_("Error occurred while validating date: %s", str(e))) + + +def _validate_float(value): + try: + return str(float(value)) + except ValueError as e: + _logger.debug(_("Error occurred while validating float: %s", str(e))) + + +def _validate_integer(value): + try: + return str(int(round(float(value)))) + except ValueError as e: + _logger.debug(_("Error occurred while validating integer: %s", str(e))) + + +def _validate_json(value): + try: + json.loads(value) + return value + except ValueError as e: + _logger.debug(_("Error occurred while validating json: %s", str(e))) + + +class TimeParameterVersion(models.Model): + _name = "base.time.parameter.version" + _description = "Time Parameter Version" + _order = "date_from desc" + + parameter_id = fields.Many2one( + "base.time.parameter", + required=True, + ondelete="cascade", + string="Time Parameter", + ) + country_id = fields.Many2one(related="parameter_id.country_id") + company_id = fields.Many2one(related="parameter_id.company_id", store=True) + code = fields.Char(related="parameter_id.code", store=True, readonly=True) + date_from = fields.Date(required=True) + type = fields.Selection(related="parameter_id.type") + value = fields.Char() + value_reference = fields.Reference(string="Reference Value", selection=[]) + + _sql_constraints = [ + ( + "_unique", + "unique (parameter_id, date_from)", + "A parameter cannot have two versions starting the same day.", + ), + ] + + @api.onchange("value") + def _onchange_value(self): + if self.value: + if self.type == "date": + date_format = ( + self.env["res.lang"] + .search([("code", "=", self.env.user.lang)]) + .ensure_one() + .date_format + ) + self.value = _validate_date(self.value, date_format) + elif self.type == "string": + pass + else: + method = "_validate_{}".format(self.type) + self.value = globals()[method](self.value) diff --git a/base_time_parameter/readme/CONFIGURE.rst b/base_time_parameter/readme/CONFIGURE.rst new file mode 100644 index 00000000000..b3837751574 --- /dev/null +++ b/base_time_parameter/readme/CONFIGURE.rst @@ -0,0 +1 @@ +The user needs the access right "Manage Time Parameters". diff --git a/base_time_parameter/readme/CONTRIBUTORS.rst b/base_time_parameter/readme/CONTRIBUTORS.rst new file mode 100644 index 00000000000..75721629796 --- /dev/null +++ b/base_time_parameter/readme/CONTRIBUTORS.rst @@ -0,0 +1,3 @@ +* Nimarosa (Nicolas Rodriguez) +* appstogrow (Henrik Norlin) +* ExoSoftware (André Leite) diff --git a/base_time_parameter/readme/DESCRIPTION.rst b/base_time_parameter/readme/DESCRIPTION.rst new file mode 100644 index 00000000000..266e71953cd --- /dev/null +++ b/base_time_parameter/readme/DESCRIPTION.rst @@ -0,0 +1,2 @@ +A value may change over time. +With this module you may set starting dates and values. diff --git a/base_time_parameter/readme/USAGE.rst b/base_time_parameter/readme/USAGE.rst new file mode 100644 index 00000000000..101d4d08e4b --- /dev/null +++ b/base_time_parameter/readme/USAGE.rst @@ -0,0 +1,64 @@ +Menu: "Settings/Technical/Time Parameters" + +Create a parameter with different versions (start date and value). + +If model_id is empty, any model/record may get the time parameter. + +The value may be a text or reference. + +Get the value like this: + +.. code-block:: python + + # Pass no date: using today's date + value = model.get_time_parameter("parameter_code_or_name") + # Pass a date or datetime + value = model.get_time_parameter("parameter_code_or_name", date=datetime.datetime.now())) + # Pass the name of a date/datetime field of the record + value = record.get_time_parameter("parameter_code_or_name", "date") + +Example of implementation in another module +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Payroll implementation: + +* Menu "Payroll/Configuration/Time Parameters" only shows hr.payslip parameters. +* New parameters will be hr.payslip parameters. +* By default, the model_id field is hidden in the form. + +.. code-block:: XML + + + Time Parameters + base.time.parameter + tree,form + + + + + +Reference field implementatiton: + +.. code-block:: python + + from odoo import fields, models + + + class TimeParameterVersion(models.Model): + _inherit = "base.time.parameter.version" + + value_reference = fields.Reference( + selection_add=[("account.account", "Account")], + ) diff --git a/base_time_parameter/security/ir.model.access.csv b/base_time_parameter/security/ir.model.access.csv new file mode 100644 index 00000000000..f005f7213af --- /dev/null +++ b/base_time_parameter/security/ir.model.access.csv @@ -0,0 +1,3 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_base_time_parameter,Time Parameter,model_base_time_parameter,group_time_parameter,1,1,1,1 +access_base_time_parameter_version,Time Parameter Version,model_base_time_parameter_version,group_time_parameter,1,1,1,1 diff --git a/base_time_parameter/security/security.xml b/base_time_parameter/security/security.xml new file mode 100644 index 00000000000..cc062df4e9d --- /dev/null +++ b/base_time_parameter/security/security.xml @@ -0,0 +1,22 @@ + + + Manage Time Parameters + + + + Time Parameter: multi-company + + + + [('company_id', 'in', company_ids)] + + + + Time Parameter Version: multi-company + + + + [('company_id', 'in', company_ids)] + + + diff --git a/base_time_parameter/static/description/icon.png b/base_time_parameter/static/description/icon.png new file mode 100644 index 00000000000..3a0328b516c Binary files /dev/null and b/base_time_parameter/static/description/icon.png differ diff --git a/base_time_parameter/static/description/index.html b/base_time_parameter/static/description/index.html new file mode 100644 index 00000000000..09b34914132 --- /dev/null +++ b/base_time_parameter/static/description/index.html @@ -0,0 +1,495 @@ + + + + + + +Time Parameter + + + +
+

Time Parameter

+ + +

Beta License: LGPL-3 OCA/server-tools Translate me on Weblate Try me on Runboat

+

A value may change over time. +With this module you may set starting dates and values.

+

Table of contents

+ +
+

Configuration

+

The user needs the access right “Manage Time Parameters”.

+
+
+

Usage

+

Menu: “Settings/Technical/Time Parameters”

+

Create a parameter with different versions (start date and value).

+

If model_id is empty, any model/record may get the time parameter.

+

The value may be a text or reference.

+

Get the value like this:

+
+# Pass no date: using today's date
+value = model.get_time_parameter("parameter_code_or_name")
+# Pass a date or datetime
+value = model.get_time_parameter("parameter_code_or_name", date=datetime.datetime.now()))
+# Pass the name of a date/datetime field of the record
+value = record.get_time_parameter("parameter_code_or_name", "date")
+
+
+

Example of implementation in another module

+

Payroll implementation:

+
    +
  • Menu “Payroll/Configuration/Time Parameters” only shows hr.payslip parameters.
  • +
  • New parameters will be hr.payslip parameters.
  • +
  • By default, the model_id field is hidden in the form.
  • +
+
+<record id="base_time_parameter_action" model="ir.actions.act_window">
+    <field name="name">Time Parameters</field>
+    <field name="res_model">base.time.parameter</field>
+    <field name="view_mode">tree,form</field>
+    <field
+        name="domain"
+        eval="[('model_id', '=', ref('payroll.model_hr_payslip'))]"
+    />
+    <field
+        name="context"
+        eval="{'default_model_id': ref('payroll.model_hr_payslip')}"
+    />
+</record>
+<menuitem
+    id="menu_action_base_time_parameter"
+    action="base_time_parameter_action"
+    name="Time Parameters"
+    parent="payroll_menu_configuration"
+    sequence="35"
+/>
+
+

Reference field implementatiton:

+
+from odoo import fields, models
+
+
+class TimeParameterVersion(models.Model):
+    _inherit = "base.time.parameter.version"
+
+    value_reference = fields.Reference(
+        selection_add=[("account.account", "Account")],
+    )
+
+
+
+
+

Bug Tracker

+

Bugs are tracked on GitHub 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.

+

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

+
+
+

Credits

+
+

Authors

+
    +
  • Nimarosa
  • +
  • appstogrow
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

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.

+

Current maintainers:

+

appstogrow nimarosa

+

This module is part of the OCA/server-tools project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + diff --git a/base_time_parameter/static/icon.png b/base_time_parameter/static/icon.png new file mode 100644 index 00000000000..3a0328b516c Binary files /dev/null and b/base_time_parameter/static/icon.png differ diff --git a/base_time_parameter/tests/__init__.py b/base_time_parameter/tests/__init__.py new file mode 100644 index 00000000000..22bb6314481 --- /dev/null +++ b/base_time_parameter/tests/__init__.py @@ -0,0 +1 @@ +from . import test_time_parameter diff --git a/base_time_parameter/tests/test_time_parameter.py b/base_time_parameter/tests/test_time_parameter.py new file mode 100644 index 00000000000..b0532b663a4 --- /dev/null +++ b/base_time_parameter/tests/test_time_parameter.py @@ -0,0 +1,167 @@ +from datetime import date, datetime + +from odoo.tests.common import TransactionCase + +WRONG_MODEL = "Value is None because of wrong model" +DONALD_TRUMP = "The value is 'Donald Trump'" +JOE_BIDEN = "The value is 'Joe Biden'" + + +class TestTimeParameter(TransactionCase): + def setUp(self): + super(TestTimeParameter, self).setUp() + + self.boolean_parameter = self.env["base.time.parameter"].create( + { + "code": "TEST_BOOLEAN", + "type": "boolean", + "version_ids": [ + (0, 0, {"date_from": date(2022, 1, 1), "value": "True"}), + (0, 0, {"date_from": date(2023, 1, 1), "value": "False"}), + ], + } + ) + self.date_parameter = self.env["base.time.parameter"].create( + { + "code": "TEST_DATE", + "type": "date", + "version_ids": [ + (0, 0, {"date_from": date(2022, 1, 1), "value": "2022-12-31"}), + ], + } + ) + self.float_parameter = self.env["base.time.parameter"].create( + { + "code": "TEST_FLOAT", + "type": "float", + "version_ids": [ + (0, 0, {"date_from": date(2022, 1, 1), "value": "-12.5"}), + ], + } + ) + self.integer_parameter = self.env["base.time.parameter"].create( + { + "code": "TEST_INTEGER", + "type": "integer", + "version_ids": [ + (0, 0, {"date_from": date(2022, 1, 1), "value": "123"}), + ], + } + ) + self.json_parameter = self.env["base.time.parameter"].create( + { + "code": "TEST_JSON", + "type": "json", + "version_ids": [ + (0, 0, {"date_from": date(2022, 1, 1), "value": '{"key": "val"}'}), + ], + } + ) + # testing parameter "code" and "name" together with "string" value + self.code_string_parameter = self.env["base.time.parameter"].create( + { + "code": "TEST_CODE_STRING", + "type": "string", + "version_ids": [ + (0, 0, {"date_from": date(2022, 1, 1), "value": "CODE_STRING"}) + ], + } + ) + self.name_string_us_parameter = self.env["base.time.parameter"].create( + { + "name": "US President", + "type": "string", + "model_id": self.env.ref("base.model_res_country").id, + "version_ids": [ + (0, 0, {"date_from": date(2017, 1, 20), "value": "Donald Trump"}), + (0, 0, {"date_from": date(2021, 1, 20), "value": "Joe Biden"}), + ], + } + ) + + def test_00_get(self): + value = self.boolean_parameter._get(date(1999, 1, 1)) + self.assertEqual(value, False, "The value is False") + + value = self.boolean_parameter._get(date(2022, 12, 1)) + self.assertEqual(value, True, "Value is boolean True") + value = self.boolean_parameter._get(date(2023, 12, 1)) + self.assertEqual(value, False, "Value is boolean False") + + value = self.date_parameter._get(date(2023, 1, 1)) + self.assertEqual(value, date(2022, 12, 31), "Value is the date Dec. 31, 2022") + + value = self.float_parameter._get(date(2023, 1, 1)) + self.assertEqual(value, -12.5, "Value is float -12.5") + + value = self.integer_parameter._get(date(2023, 1, 1)) + self.assertEqual(value, 123, "Value is integer 123") + + value = self.json_parameter._get(date(2023, 1, 1)) + self.assertEqual(value, {"key": "val"}, 'Value is json {"key": "val"}') + + # Cannot test reference here, since the selection is an empty list. + # Reference is tested in account_time_parameter. + + value = self.code_string_parameter._get() # date=now() + self.assertEqual(value, "CODE_STRING", "The value is 'CODE_STRING'") + + value = self.name_string_us_parameter._get() # date=now() + self.assertEqual(value, "Joe Biden", JOE_BIDEN) + + def test_01_get_from_model_code_date(self): + value = self.env["base.time.parameter"]._get_from_model_code_date( + "res.partner", "US President", raise_if_not_found=False + ) + self.assertIsNone(value, WRONG_MODEL) + + value = self.env["base.time.parameter"]._get_from_model_code_date( + "res.country", "US President", raise_if_not_found=False + ) + self.assertEqual(value, "Joe Biden", JOE_BIDEN) + + def test_02_base_get_time_parameter(self): + + # TEST MODEL + + value = self.env["res.partner"].get_time_parameter( + "US President", raise_if_not_found=False + ) + self.assertIsNone(value, WRONG_MODEL) + + # TEST DATE + + # no date + value = self.env["res.country"].get_time_parameter( + "US President", raise_if_not_found=False + ) + self.assertEqual(value, "Joe Biden", JOE_BIDEN) + # date + value = self.env["res.country"].get_time_parameter( + "US President", date(2018, 1, 1), raise_if_not_found=False + ) + self.assertEqual(value, "Donald Trump", DONALD_TRUMP) + # datetime + value = self.env["res.country"].get_time_parameter( + "US President", datetime.now(), raise_if_not_found=False + ) + self.assertEqual(value, "Joe Biden", JOE_BIDEN) + # string + self.env.ref("base.us").name = "UNITED STATES" + value = self.env.ref("base.us").get_time_parameter( + "US President", "write_date", raise_if_not_found=False + ) + self.assertEqual(value, "Joe Biden", JOE_BIDEN) + + # TEST GET + + # get="date" + date1 = self.env["res.country"].get_time_parameter( + "TEST_JSON", date(2022, 12, 1), raise_if_not_found=False, get="date" + ) + self.assertEqual(date1, date(2022, 1, 1), "Start date is Jan. 1, 2022") + # get="value" + value = self.env["res.country"].get_time_parameter( + "TEST_JSON", date(2022, 12, 1), raise_if_not_found=False, get="value" + ) + self.assertEqual(value, {"key": "val"}, 'Value is json {"key": "val"}') diff --git a/base_time_parameter/views/base_time_parameter_version_views.xml b/base_time_parameter/views/base_time_parameter_version_views.xml new file mode 100644 index 00000000000..cb318dbcfee --- /dev/null +++ b/base_time_parameter/views/base_time_parameter_version_views.xml @@ -0,0 +1,38 @@ + + + + base.time.parameter.version.tree + base.time.parameter.version + + + + + + + + + + + + + base.time.parameter.version.search + base.time.parameter.version + + + + + + + + Versions + base.time.parameter.version + + tree,form + [('parameter_id', '=', active_id)] + {'search_default_parameter_id': active_id} + + + diff --git a/base_time_parameter/views/base_time_parameter_views.xml b/base_time_parameter/views/base_time_parameter_views.xml new file mode 100644 index 00000000000..d0048064ec1 --- /dev/null +++ b/base_time_parameter/views/base_time_parameter_views.xml @@ -0,0 +1,129 @@ + + + + + base.time.parameter.form + base.time.parameter + 20 + +
+ + + + + + + + + + + + + + + + + + + + +
+
+
+ + base.time.parameter.form hide model + base.time.parameter + + primary + 10 + + + 1 + + + + + + + base.time.parameter.tree + base.time.parameter + + + + + + + + + + + + + + base.time.parameter.search + base.time.parameter + + + + + + + + + + + + Time Parameters + base.time.parameter + tree,form + + + + + tree + + + + + form + + + + + +
diff --git a/setup/_metapackage/VERSION.txt b/setup/_metapackage/VERSION.txt index 541591ea85f..c0975c1ff7b 100644 --- a/setup/_metapackage/VERSION.txt +++ b/setup/_metapackage/VERSION.txt @@ -1 +1 @@ -15.0.20231103.0 \ No newline at end of file +15.0.20231202.0 \ No newline at end of file diff --git a/setup/_metapackage/setup.py b/setup/_metapackage/setup.py index ef96b2366f1..391957dbdfc 100644 --- a/setup/_metapackage/setup.py +++ b/setup/_metapackage/setup.py @@ -26,6 +26,7 @@ 'odoo-addon-base_sequence_option>=15.0dev,<15.1dev', 'odoo-addon-base_sparse_field_list_support>=15.0dev,<15.1dev', 'odoo-addon-base_technical_user>=15.0dev,<15.1dev', + 'odoo-addon-base_time_parameter>=15.0dev,<15.1dev', 'odoo-addon-base_time_window>=15.0dev,<15.1dev', 'odoo-addon-base_translation_field_label>=15.0dev,<15.1dev', 'odoo-addon-base_view_inheritance_extension>=15.0dev,<15.1dev', diff --git a/setup/base_time_parameter/odoo/addons/base_time_parameter b/setup/base_time_parameter/odoo/addons/base_time_parameter new file mode 120000 index 00000000000..eec7dd05dcf --- /dev/null +++ b/setup/base_time_parameter/odoo/addons/base_time_parameter @@ -0,0 +1 @@ +../../../../base_time_parameter \ No newline at end of file diff --git a/setup/base_time_parameter/setup.py b/setup/base_time_parameter/setup.py new file mode 100644 index 00000000000..28c57bb6403 --- /dev/null +++ b/setup/base_time_parameter/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +)