-
-
Notifications
You must be signed in to change notification settings - Fork 614
[19.0][MIG] date_range: Migration to 19.0 #1181
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
Conversation
* [ADD] Basic structure for the new date range module * [IMP] Add a basic description into the README * [IMP] Basic implementation * [IMP] First working implementation * [IMP] Improve datamodel * [ADD] Add basic tests for date.range * [PEP8] * [PYLINT] * [DEL] Remove unused code * [IMP] Remove unsused dependencies into the JS * [IMP] Better operator label for date range * [DEL] Remove unused file * [IMP] Better user experience by showing the select input only once empty * [FIX]Try to fix tests that fails only on travis by adding an explicit cast on the daterange methods parameters * [FIX]Try to fix tests that fails only on travis by adding an explicit cast on the daterange methods parameters * [FIX]Try to fix tests that fails only on travis by using postgresql 9.4 * [FIX]Try with postgresql 9.2 since the daterange method has appeared in 9.2 * [IMP] Add a limitation into the module description to warm about the minimal version of postgresql to use * [IMP]Add multi-company rules * [IMP]Remove unused files * [FIX] Add missing brackets into JS * [FIX] Overlap detection when company_id is False * [IMP] Add default order for date.range * [IMP] Add date range generator * [FIX] OE compatibility * [FIX] Travis * [IMP] Code cleanup and improves test coverage * [FIX] Add missing dependency on 'web' * [PYLINT] remove unused import * [FIX] Add missing copyright * [FIX] Limits are included into the range * [IMP][date_range] Security * [IMP] Improve module description * [IMP] Spelling
* Improve 'name' for generator wizard ir.rule should be active by default * Don't auto-add '-' after prefix when generating date ranges via wizard * code fine tuning suggested by Sylvain Garancher
If any module adds a required field on company, module fails. Executing it on post_install, there's no problem.
Pylint-odoo is not able to detect properly whitelisted odoo's dependencies if an isort configuration file is present into the directory. Therefore the check fails by complaining that the dateutil dependecy is not declared into the manifest. A fix could have been to declare the dependency into the manifest . Unfortunately, in this case, a warning will be issued by runbot complaining that the python external dependency dateutil should be replaced by it's PyPI package name. Unfortunalely, if we put the Pypi package name into the external dependencies, pylint fails again since it's not able to play with PyPI distribution names. The workaround is to temporarily disable this check into pylint. I every case, all the pre-commit files will be reset once pylint will be fixed
We can't assign an empty recordset in a computed writable for a required field for
triggering DB fault, as previously this we get an akward error no in current
ORM status:
ERROR: operator does not exist: integer = boolean
LINE 12: AND dt.type_id=false;
^
HINT: No operator matches the given name and argument types. You might need to add explicit type casts.
so let's simply trigger in this case the check of the company consistency, which is
legit and the final expected result.
I have added an extra test for testing the company consistency the other way around.
Because ev.target.value is a string and the range ids are integers, comparison was always false, so the first range values were always used.
Currently translated at 100.0% (71 of 71 strings) Translation: server-ux-17.0/server-ux-17.0-date_range Translate-URL: https://translation.odoo-community.org/projects/server-ux-17-0/server-ux-17-0-date_range/zh_CN/
Currently translated at 100.0% (71 of 71 strings) Translation: server-ux-17.0/server-ux-17.0-date_range Translate-URL: https://translation.odoo-community.org/projects/server-ux-17-0/server-ux-17-0-date_range/it/
Currently translated at 100.0% (71 of 71 strings) Translation: server-ux-17.0/server-ux-17.0-date_range Translate-URL: https://translation.odoo-community.org/projects/server-ux-17-0/server-ux-17-0-date_range/es_AR/
For example during Odoo Studio editing the DomainSelector is not initialized before TreeEditor, which causes `env.domain` to be undefined
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: server-ux-18.0/server-ux-18.0-date_range Translate-URL: https://translation.odoo-community.org/projects/server-ux-18-0/server-ux-18-0-date_range/
Currently translated at 100.0% (70 of 70 strings) Translation: server-ux-18.0/server-ux-18.0-date_range Translate-URL: https://translation.odoo-community.org/projects/server-ux-18-0/server-ux-18-0-date_range/it/
Currently translated at 100.0% (70 of 70 strings) Translation: server-ux-18.0/server-ux-18.0-date_range Translate-URL: https://translation.odoo-community.org/projects/server-ux-18-0/server-ux-18-0-date_range/it/
Currently translated at 92.8% (65 of 70 strings) Translation: server-ux-18.0/server-ux-18.0-date_range Translate-URL: https://translation.odoo-community.org/projects/server-ux-18-0/server-ux-18-0-date_range/tr/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR migrates the date_range module from version 18.0 to version 19.0. The migration primarily involves adding new translation files for various languages and creating the necessary module initialization and data files.
- Migration of the date_range module to Odoo 19.0
- Addition of translation files for 31 languages (ko, ja, it, id, hu, hr_HR, hr, hi, he, gl_ES, gl, fr_FR, fr_CH, fr_CA, fr, fi, fa, eu, and others)
- Creation of core module files including manifest, initialization, and cron data
Reviewed Changes
Copilot reviewed 48 out of 116 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| date_range/i18n/*.po | Translation files added for multiple languages supporting the date_range module |
| date_range/data/ir_cron_data.xml | Cron job configuration for auto-generating date ranges |
| date_range/manifest.py | Module manifest defining metadata, dependencies, and assets for version 19.0.1.0.0 |
| date_range/init.py | Module initialization importing models and wizard components |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
11df449 to
9069de5
Compare
|
/ocabot migration announcement |
|
Sorry @rov-adhoc you are not allowed to mark the addon to be migrated. To do so you must either have push permissions on the repository, or be a declared maintainer of all modified addons. If you wish to adopt an addon and become it's maintainer, open a pull request to add your GitHub login to the |
bd11b83 to
d3579e2
Compare
d3579e2 to
a5f6bfa
Compare
cav-adhoc
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @rov-adhoc,
While testing this module, I encountered an OWL error that seems to affect the expected behavior in the current implementation.
You can find a recording of the test and the issue reproduction here: Screencastify video.
I’ve reviewed the code and suggested some potential changes that could help address or prevent this issue.
Please take a look when you have a moment and let me know if you’d like me to provide additional context or assist with further testing.
Thank you for your time and collaboration!
Best regards,
| formatValue, | ||
| normalizeValue, | ||
| treeFromDomain, | ||
| } from "@web/core/tree_editor/condition_tree"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
treeFromDomain changed to constructTreeFromDomain in this Odoo commit odoo/odoo@b41cf83
I think you should replace this for
import { constructTreeFromDomain } from "@web/core/tree_editor/construct_tree_from_domain";
import { constructExpressionFromTree } from "@web/core/tree_editor/construct_expression_from_tree";
| export function treeFromDomainDateRange(domain, options = {}) { | ||
| return createDateRangeOperators(treeFromDomain(domain, options)); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you should replace treeFromDomain for
function expressionFromDomain(domain, options) {
const tree = constructTreeFromDomain(domain);
return constructExpressionFromTree(tree, options);
}
like here odoo/odoo@7b413b0#diff-219c35c62e84270ac955e365a8e0700a801e79781f23c01b7eacaad6470c5e35R21 to keep the options parameter
No description provided.