-
-
Notifications
You must be signed in to change notification settings - Fork 621
[18.0][IMP] date_range: Set multicompanies support for the date.range model #1172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Andrii9090
wants to merge
1
commit into
OCA:18.0
Choose a base branch
from
moduon:18.0-imp-date_range-multi_companies
base: 18.0
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -29,7 +29,7 @@ Date Range | |
| |badge1| |badge2| |badge3| |badge4| |badge5| | ||
|
|
||
| This module lets you define global date ranges that can be used to | ||
| filter your values in tree views. | ||
| filter your values in list 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. | ||
|
|
@@ -79,50 +79,49 @@ 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. | ||
| - Go to Settings > Technical > Date ranges > Date Range Types where you | ||
| can create types of date ranges. | ||
|
|
||
| |image1| | ||
| |image1| | ||
|
|
||
| - Go to Settings > Technical > Date ranges > Date Ranges where you can | ||
| create date ranges. | ||
| - Go to Settings > Technical > Date ranges > Date Ranges where you can | ||
| create date ranges. | ||
|
|
||
| |image2| | ||
| |image2| | ||
|
|
||
| It's also possible to launch a wizard from the 'Generate Date Ranges' | ||
| menu. | ||
| It's also possible to launch a wizard from the 'Generate Date Ranges' | ||
| menu. | ||
|
|
||
| |image3| | ||
| |image3| | ||
|
|
||
| The wizard is useful to generate recurring periods. Set an end date | ||
| or enter the number of ranges to create. | ||
| The wizard is useful to generate recurring periods. Set an end date or | ||
| enter the number of ranges to create. | ||
|
|
||
| |image4| | ||
| |image4| | ||
|
|
||
| - Your date ranges are now available in the search filter for any date | ||
| or datetime fields | ||
| - 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 | ||
| Date range types are proposed as a filter operator | ||
|
|
||
| |image5| | ||
| |image5| | ||
|
|
||
| Once a type is selected, date ranges of this type are porposed as a | ||
| filter value | ||
| Once a type is selected, date ranges of this type are porposed as a | ||
| filter value | ||
|
|
||
| |image6| | ||
| |image6| | ||
|
|
||
| And the dates specified into the date range are used to filter your | ||
| result. | ||
| And the dates specified into the date range are used to filter your | ||
| result. | ||
|
|
||
| |image7| | ||
| |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. | ||
| - 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| | ||
| |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 | ||
|
|
@@ -154,14 +153,16 @@ Authors | |
| 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]> | ||
| - 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]> | ||
| - Andrii Kompaniiets <[email protected]> | ||
| - Rafael Blasco <[email protected]> | ||
|
|
||
| Maintainers | ||
| ----------- | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| from openupgradelib import openupgrade | ||
|
|
||
|
|
||
| @openupgrade.migrate() | ||
| def migrate(env, version): | ||
| openupgrade.delete_sql_constraint_safely( | ||
| env, "date_range", "date_range", "date_range_uniq" | ||
| ) | ||
| openupgrade.m2o_to_x2m( | ||
| env.cr, env["date.range"], "date_range", "company_ids", "company_id" | ||
| ) | ||
| env.cr.execute( | ||
| "UPDATE ir_rule SET domain_force = %s WHERE name = %s", | ||
| ( | ||
| "['|',('company_ids', 'in', company_ids),('company_ids','=',False)]", | ||
| "Date Range multi-company", | ||
| ), | ||
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,3 +6,5 @@ | |
| - David Ramia \<<@ramiadavid>\> | ||
| - Son Ho \<<[email protected]>\> | ||
| - Bert Van Groenendael \<<[email protected]>\> | ||
| - Andrii Kompaniiets \<<[email protected]>\> | ||
| - Rafael Blasco \<<[email protected]>\> | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| This module lets you define global date ranges that can be used to | ||
| filter your values in tree views. | ||
| filter your values in list 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.