-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
[18.0][MIG] sale_start_end_dates #3505
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
base: 18.0
Are you sure you want to change the base?
Conversation
Replace openerp by odoo in import declarations
Currently translated at 100,0% (16 of 16 strings) Translation: sale-workflow-10.0/sale-workflow-10.0-sale_start_end_dates Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-10-0/sale-workflow-10-0-sale_start_end_dates/nl_NL/
Updated by Update PO files to match POT (msgmerge) hook in Weblate.
Convert readme to new subdir format
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: sale-workflow-12.0/sale-workflow-12.0-sale_start_end_dates Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-12-0/sale-workflow-12-0-sale_start_end_dates/
Currently translated at 26.7% (4 of 15 strings) Translation: sale-workflow-12.0/sale-workflow-12.0-sale_start_end_dates Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-12-0/sale-workflow-12-0-sale_start_end_dates/pt/
Currently translated at 100.0% (15 of 15 strings) Translation: sale-workflow-16.0/sale-workflow-16.0-sale_start_end_dates Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-16-0/sale-workflow-16-0-sale_start_end_dates/es/
Currently translated at 71.4% (10 of 14 strings) Translation: sale-workflow-16.0/sale-workflow-16.0-sale_start_end_dates Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-16-0/sale-workflow-16-0-sale_start_end_dates/it/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: sale-workflow-16.0/sale-workflow-16.0-sale_start_end_dates Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-16-0/sale-workflow-16-0-sale_start_end_dates/
Currently translated at 53.3% (8 of 15 strings) Translation: sale-workflow-16.0/sale-workflow-16.0-sale_start_end_dates Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-16-0/sale-workflow-16-0-sale_start_end_dates/it/
Currently translated at 100.0% (15 of 15 strings) Translation: sale-workflow-16.0/sale-workflow-16.0-sale_start_end_dates Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-16-0/sale-workflow-16-0-sale_start_end_dates/es/
Currently translated at 66.6% (10 of 15 strings) Translation: sale-workflow-16.0/sale-workflow-16.0-sale_start_end_dates Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-16-0/sale-workflow-16-0-sale_start_end_dates/it/
Currently translated at 100.0% (15 of 15 strings) Translation: sale-workflow-16.0/sale-workflow-16.0-sale_start_end_dates Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-16-0/sale-workflow-16-0-sale_start_end_dates/it/
Currently translated at 100.0% (15 of 15 strings) Translation: sale-workflow-16.0/sale-workflow-16.0-sale_start_end_dates Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-16-0/sale-workflow-16-0-sale_start_end_dates/it/
In tests: use setUpClass(cls), stop using demo data and several code cleanup
Inherit standalone sale.order.line views
4492c86 to
8bd210b
Compare
|
@alexis-via I take the opportunity to remind this demand from @sbidoul to move the account_invoice_start_end_dates dependency to LGPL OCA/account-closing#300 which IMHO would be a great move for such a small utility module. My personal opinion on this is:
|
|
/ocabot migration sale_start_end_dates |
| { | ||
| "name": "Sale Start End Dates", | ||
| "version": "17.0.1.0.0", | ||
| "version": "18.0.1.0.0", |
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.
@alexis-via Could you put this change in migration commit ? Thanks
| and order.default_start_date > order.default_end_date | ||
| ): | ||
| raise ValidationError( | ||
| _( |
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.
| _( | |
| self.env._( |
| res = {"warning": {}} | ||
| for line in self: | ||
| if line.number_of_days < 0: | ||
| res["warning"]["title"] = _("Wrong number of days") |
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.
| res["warning"]["title"] = _("Wrong number of days") | |
| res["warning"]["title"] = self.env._("Wrong number of days") |
| for line in self: | ||
| if line.number_of_days < 0: | ||
| res["warning"]["title"] = _("Wrong number of days") | ||
| res["warning"]["message"] = _( |
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.
| res["warning"]["message"] = _( | |
| res["warning"]["message"] = self.env._( |
| _("Missing End Date for sale order line with Product '%s'.") | ||
| % (line.product_id.display_name) |
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.
| _("Missing End Date for sale order line with Product '%s'.") | |
| % (line.product_id.display_name) | |
| self.env._("Missing End Date for sale order line with Product '%s'.", line.product_id.display_name) |
| _( | ||
| "Missing Start Date for sale order line with " | ||
| "Product '%s'." | ||
| ) | ||
| % (line.product_id.display_name) |
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.
| _( | |
| "Missing Start Date for sale order line with " | |
| "Product '%s'." | |
| ) | |
| % (line.product_id.display_name) | |
| self.env._( | |
| "Missing Start Date for sale order line with " | |
| "Product '%s'.", | |
| line.product_id.display_name | |
| ) |
| ) | ||
| if line.start_date > line.end_date: | ||
| raise ValidationError( | ||
| _( |
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.
| _( | |
| self.env._( |
Migrate from v17 to v18
Add fields in sale.report (improvement made in a separate commit)