Skip to content

Conversation

@alexis-via
Copy link
Contributor

Migrate from v17 to v18
Add fields in sale.report (improvement made in a separate commit)

Alexis de Lattre and others added 30 commits February 18, 2025 14:06
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/
OCA-git-bot and others added 17 commits February 18, 2025 14:06
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
@alexis-via alexis-via force-pushed the 18-mig-sale_start_end_dates branch from 4492c86 to 8bd210b Compare February 18, 2025 13:07
@rvalyi
Copy link
Member

rvalyi commented Feb 18, 2025

@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:

  • the AGPL OCA ecosystem keeps growing massively, it's not a big deal if we relicense a few trivial modules to LGPL from time to time, in fact I would say it's natural that very simple modules become a permissive commodity. In the meantime our AGPL ecosystem keeps making a pressure for an open source ecosystem for more added value modules.
  • trivial modules like account_invoice_start_end_dates are simply copied in non open source modules whenever people need it. Nobody will discover it, the OCA or the authors won't get any license infrigement compensation. But if such module had a permissive license instead, the adoption would be larger, that would help the maintenance and grow the open source ecosystem overall.

@rousseldenis
Copy link
Contributor

/ocabot migration sale_start_end_dates

{
"name": "Sale Start End Dates",
"version": "17.0.1.0.0",
"version": "18.0.1.0.0",
Copy link
Contributor

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(
_(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
_(
self.env._(

res = {"warning": {}}
for line in self:
if line.number_of_days < 0:
res["warning"]["title"] = _("Wrong number of days")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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"] = _(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
res["warning"]["message"] = _(
res["warning"]["message"] = self.env._(

Comment on lines +123 to +124
_("Missing End Date for sale order line with Product '%s'.")
% (line.product_id.display_name)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
_("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)

Comment on lines +128 to +132
_(
"Missing Start Date for sale order line with "
"Product '%s'."
)
% (line.product_id.display_name)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
_(
"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(
_(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
_(
self.env._(

@rousseldenis
Copy link
Contributor

@alexis-via

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.