-
-
Notifications
You must be signed in to change notification settings - Fork 506
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
[13.0][MIG] date_range #95
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
Currently translated at 89.1% (41 of 46 strings) Translation: server-ux-11.0/server-ux-11.0-date_range Translate-URL: https://translation.odoo-community.org/projects/server-ux-11-0/server-ux-11-0-date_range/ar/
If any module adds a required field on company, module fails. Executing it on post_install, there's no problem.
Currently translated at 82.6% (38 of 46 strings) Translation: server-ux-11.0/server-ux-11.0-date_range Translate-URL: https://translation.odoo-community.org/projects/server-ux-11-0/server-ux-11-0-date_range/da/
Updated by Update PO files to match POT (msgmerge) hook in Weblate.
Currently translated at 100.0% (46 of 46 strings) Translation: server-ux-12.0/server-ux-12.0-date_range Translate-URL: https://translation.odoo-community.org/projects/server-ux-12-0/server-ux-12-0-date_range/it/
Currently translated at 100.0% (46 of 46 strings) Translation: server-ux-12.0/server-ux-12.0-date_range Translate-URL: https://translation.odoo-community.org/projects/server-ux-12-0/server-ux-12-0-date_range/pt/
@lmignon These onchanges are not good to be replaced by a compute, because these onchanges are conditional. The computes in v13 only work when they are not conditional and always end filling the field. Moreover, the constrains already are a warranty. I think this PR is ready as it is. Just test it functionally. |
Error #95 (comment) still reproducible in Runbot. It's caused by the call to method |
It's weird. In v12 the |
And I just noticed: when opening the web console of the browser, I get: |
ab21b6a
to
a6922ee
Compare
wip. help wanted for javascript thing. |
ec73b8d
to
7f61b56
Compare
@lmignon finally converted the onchanges to computes 😉 |
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.
// this._rpc({ | ||
// model: 'date.range', | ||
// method: 'search_read', | ||
// fields: ['name', 'date_start', 'date_end'], | ||
// context: this.context, | ||
// domain: ['type_id', '=', parseInt(type_id, 10)]] | ||
// }).done(this.proxy('on_range_type_selected')); |
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.
@mreficent This code must be removed id it's no more needed
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 added this code expressly to indicate what should be the way to fix the javascript error, this code should replace the next two lines. I put commented instead because it's not correct yet.
// this._rpc({ | ||
// model: 'date.range.type', | ||
// method: 'search_read', | ||
// fields: ['name'], | ||
// context: this.context, | ||
// }).done(this.proxy('add_date_range_types_operator')); |
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.
@mreficent This code must be removed id it's no more needed
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 added this code expressly to indicate what should be the way to fix the javascript error, this code should replace the next two lines. I put commented instead because it's not correct yet.
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.
@mreficent Is this PR therefore still a WIP?
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.
It's stated in #95 (comment).
7f61b56
to
855dcef
Compare
@mreficent I've fixed the JS, rebased the branch on 13.0 and fixed pre-commit issues in #99. It was not possible to PR your branch with mine due to the rebase. Can I close this one? Everything is working now |
He is today on holidays, but I think there's no problem on that while you preserve his commit for proper attribution. We are all working in the same goal, which is having this migrated 😃 I dare to close it in advance. |
@pedrobaeza of course the commit history is preserved 😏 I close it. |
Yeah, I don't doubt about that coming from you. That's why I closed it directly. |
Standard migration.