Skip to content

Commit

Permalink
Merge branch '18.0' into 18.0-mig-base_tier_validation
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinkhao authored Jan 13, 2025
2 parents a85f05c + 085f11d commit 67c2806
Show file tree
Hide file tree
Showing 123 changed files with 35,746 additions and 15 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ Available addons
----------------
addon | version | maintainers | summary
--- | --- | --- | ---
[base_technical_features](base_technical_features/) | 18.0.1.0.0 | | Access to technical features without activating debug mode
[base_technical_features](base_technical_features/) | 18.0.1.0.1 | | Access to technical features without activating debug mode
[date_range](date_range/) | 18.0.1.0.0 | [![lmignon](https://github.com/lmignon.png?size=30px)](https://github.com/lmignon) | Manage all kind of date range
[developer_menu](developer_menu/) | 18.0.1.0.0 | [![bealdav](https://github.com/bealdav.png?size=30px)](https://github.com/bealdav) | Menu Shortcut for developer usage

[//]: # (end addons)
Expand Down
13 changes: 7 additions & 6 deletions base_technical_features/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Technical features group
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:45ae813218ac52837b72da8555803615f685ef923cc9a181a4f6ec792e29b9f2
!! source digest: sha256:870929d6e856325ac8f6236a55822c1eb5fe950d07880eff43293d023145643a
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
Expand Down Expand Up @@ -85,18 +85,19 @@ Authors
Contributors
------------

- Stefan Rijnhart <[email protected]>
- Jeroen Evens <[email protected]>
- Jim Hoefnagels <[email protected]>
- Khoi (Kien Kim) <[email protected]>
- Stefan Rijnhart <[email protected]>
- Jeroen Evens <[email protected]>
- Jim Hoefnagels <[email protected]>
- Khoi (Kien Kim) <[email protected]>
- Tris Doan <[email protected]>

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

The migration of this module from 17.0 to 18.0 was financially supported
by:

- Camptocamp.
- Camptocamp.

Maintainers
-----------
Expand Down
2 changes: 1 addition & 1 deletion base_technical_features/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{
"name": "Technical features group",
"summary": "Access to technical features without activating debug mode",
"version": "18.0.1.0.0",
"version": "18.0.1.0.1",
"category": "Usability",
"website": "https://github.com/OCA/server-ux",
"author": "Opener B.V., Odoo Community Association (OCA)",
Expand Down
12 changes: 7 additions & 5 deletions base_technical_features/models/base.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# © 2016 Opener B.V. (<https://opener.am>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

import re

from lxml import etree

from odoo import api, models
Expand All @@ -13,13 +15,13 @@ class Base(models.AbstractModel):
def _get_view(self, view_id=None, view_type="form", **options):
arch, view = super()._get_view(view_id=view_id, view_type=view_type, **options)
arch_str = etree.tostring(arch, encoding="unicode")
# Replace "base.group_no_one" with
# "base.group_no_one, base_technical_features.group_technical_features"
# Append base_technical_features.group_technical_features
# This adds additional access to elements that were restricted to
# "base.group_no_one"
arch_str = arch_str.replace(
"base.group_no_one",
"base.group_no_one,base_technical_features.group_technical_features",
arch_str = re.sub(
r"(!?)base\.group_no_one",
r"\1base.group_no_one,\1base_technical_features.group_technical_features",
arch_str,
)
arch = etree.fromstring(arch_str)

Expand Down
1 change: 1 addition & 0 deletions base_technical_features/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
- Jeroen Evens \<<[email protected]>\>
- Jim Hoefnagels \<<[email protected]>\>
- Khoi (Kien Kim) \<<[email protected]>\>
- Tris Doan \<<[email protected]>\>
3 changes: 2 additions & 1 deletion base_technical_features/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ <h1 class="title">Technical features group</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:45ae813218ac52837b72da8555803615f685ef923cc9a181a4f6ec792e29b9f2
!! source digest: sha256:870929d6e856325ac8f6236a55822c1eb5fe950d07880eff43293d023145643a
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<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/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/server-ux/tree/18.0/base_technical_features"><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-18-0/server-ux-18-0-base_technical_features"><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=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<div class="section" id="access-to-technical-features-without-activating-debug-mode">
Expand Down Expand Up @@ -424,6 +424,7 @@ <h1>Contributors</h1>
<li>Jeroen Evens &lt;<a class="reference external" href="mailto:jeroen.evens&#64;dynapps.be">jeroen.evens&#64;dynapps.be</a>&gt;</li>
<li>Jim Hoefnagels &lt;<a class="reference external" href="mailto:jim.hoefnagels&#64;dynapps.be">jim.hoefnagels&#64;dynapps.be</a>&gt;</li>
<li>Khoi (Kien Kim) &lt;<a class="reference external" href="mailto:khoikk&#64;trobz.com">khoikk&#64;trobz.com</a>&gt;</li>
<li>Tris Doan &lt;<a class="reference external" href="mailto:tridm&#64;trobz.com">tridm&#64;trobz.com</a>&gt;</li>
</ul>
</div>
<div class="section" id="other-credits">
Expand Down
189 changes: 189 additions & 0 deletions date_range/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,189 @@
==========
Date Range
==========

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:26156f1d5b0f8d700a7fa2a8a81ce509bfa25d8eb261aefc72986f03e59ee04a
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Mature-brightgreen.png
:target: https://odoo-community.org/page/development-status
:alt: Mature
.. |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--ux-lightgray.png?logo=github
:target: https://github.com/OCA/server-ux/tree/18.0/date_range
: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-18-0/server-ux-18-0-date_range
: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=18.0
:alt: Try me on Runboat

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

This module lets you define global date ranges that can be used to
filter your values in tree views.

It also provides a mixin model for developers that extends the model's
search view so that date ranges can be search as any relational field.

**Table of contents**

.. contents::
:local:

Installation
============

The addon use the daterange method from postgres. This method is
supported as of postgresql 9.2

Configuration
=============

For regular usage, see Usage below. This section is to clarify optional
functionality to developers.

To configure a model to use the Many2one style search field, make the
model inherit from \`date.range.search.mixin\`:

::

class AccountMove(models.Model):
_name = "account.move"
_inherit = ["account.move", "date.range.search.mixin"]

This will make a Period field show up in the search view:

|search_view|

By default, the mixin works on the date field. If you want the mixin to
work on a field with a different name, you can set a property on your
model:

::

_date_range_search_field = "invoice_date"

.. |search_view| image:: https://raw.githubusercontent.com/OCA/server-ux/18.0/date_range/static/description/date_range_many2one_search_field.png

Usage
=====

To configure this module, you need to:

- Go to Settings > Technical > Date ranges > Date Range Types where you
can create types of date ranges.

|image1|

- Go to Settings > Technical > Date ranges > Date Ranges where you can
create date ranges.

|image2|

It's also possible to launch a wizard from the 'Generate Date Ranges'
menu.

|image3|

The wizard is useful to generate recurring periods. Set an end date
or enter the number of ranges to create.

|image4|

- Your date ranges are now available in the search filter for any date
or datetime fields

Date range types are proposed as a filter operator

|image5|

Once a type is selected, date ranges of this type are porposed as a
filter value

|image6|

And the dates specified into the date range are used to filter your
result.

|image7|

- You can configure date range types with default values for the
generation wizard on the Generation tab. In the same tab you can also
configure date range types for auto-generation. New ranges for types
configured for this are generated by a scheduled task that runs
daily.

|image8|

.. |image1| image:: https://raw.githubusercontent.com/OCA/server-ux/18.0/date_range/static/description/date_range_type_create.png
.. |image2| image:: https://raw.githubusercontent.com/OCA/server-ux/18.0/date_range/static/description/date_range_create.png
.. |image3| image:: https://raw.githubusercontent.com/OCA/server-ux/18.0/date_range/static/description/date_range_wizard.png
.. |image4| image:: https://raw.githubusercontent.com/OCA/server-ux/18.0/date_range/static/description/date_range_wizard_result.png
.. |image5| image:: https://raw.githubusercontent.com/OCA/server-ux/18.0/date_range/static/description/date_range_type_as_filter.png
.. |image6| image:: https://raw.githubusercontent.com/OCA/server-ux/18.0/date_range/static/description/date_range_as_filter.png
.. |image7| image:: https://raw.githubusercontent.com/OCA/server-ux/18.0/date_range/static/description/date_range_as_filter_result.png
.. |image8| image:: https://raw.githubusercontent.com/OCA/server-ux/18.0/date_range/static/description/date_range_type_autogeneration.png

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:%20date_range%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

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

Credits
=======

Authors
-------

* ACSONE SA/NV

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

- Laurent Mignon <[email protected]>
- Alexis de Lattre <[email protected]>
- Miquel Raïch <[email protected]>
- Andrea Stirpe <[email protected]>
- Stefan Rijnhart <[email protected]>
- David Ramia <<@ramiadavid>>
- Son Ho <[email protected]>
- Bert Van Groenendael <[email protected]>

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-lmignon| image:: https://github.com/lmignon.png?size=40px
:target: https://github.com/lmignon
:alt: lmignon

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

|maintainer-lmignon|

This module is part of the `OCA/server-ux <https://github.com/OCA/server-ux/tree/18.0/date_range>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
2 changes: 2 additions & 0 deletions date_range/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import models
from . import wizard
27 changes: 27 additions & 0 deletions date_range/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Copyright 2016 ACSONE SA/NV (<http://acsone.eu>)
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
{
"name": "Date Range",
"summary": "Manage all kind of date range",
"version": "18.0.1.0.0",
"category": "Uncategorized",
"website": "https://github.com/OCA/server-ux",
"author": "ACSONE SA/NV, Odoo Community Association (OCA)",
"license": "LGPL-3",
"installable": True,
"depends": ["web"],
"data": [
"data/ir_cron_data.xml",
"security/ir.model.access.csv",
"security/date_range_security.xml",
"views/date_range_view.xml",
"wizard/date_range_generator.xml",
],
"assets": {
"web.assets_backend": [
"date_range/static/src/js/*",
],
},
"development_status": "Mature",
"maintainers": ["lmignon"],
}
12 changes: 12 additions & 0 deletions date_range/data/ir_cron_data.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo noupdate="1">
<record model="ir.cron" id="ir_cron_autocreate">
<field name="name">Auto-generate date ranges</field>
<field name="interval_number">1</field>
<field name="interval_type">days</field>
<field name="active">True</field>
<field name="model_id" ref="model_date_range_type" />
<field name="state">code</field>
<field name="code">model.autogenerate_ranges()</field>
</record>
</odoo>
Empty file added date_range/i18n/.empty
Empty file.
Loading

0 comments on commit 67c2806

Please sign in to comment.