Skip to content
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

[17.0] sale_start_end_dates : start_date is also created by rental module from odoo #3369

Open
CanMik opened this issue Oct 22, 2024 · 1 comment
Labels

Comments

@CanMik
Copy link

CanMik commented Oct 22, 2024

Module

sale_start_end_dates

Describe the bug

With Odoo 17, in the module sale_renting there is identical field "start_date", "end_date", these fields are datetime fields

To Reproduce

Affected versions: 17.0

Steps to reproduce the behavior:

  1. Install sale_renting
  2. Go into Renting module
  3. Create a product that can be rented
  4. Create a sale_order with a rentable product
  5. You've got an error
    File "/usr/lib/python3/dist-packages/odoo/addons/sale_stock_renting/models/sale_order_line.py", line 98, in
    keyfunc = lambda line_id: (max(lines_grouping_key[line_id][0], now), lines_grouping_key[line_id][1], lines_grouping_key[line_id][2])
    TypeError: '>' not supported between instances of 'datetime.datetime' and 'bool'

Expected behavior
Chanege the type of start_date & end_date and complete compatibility with sale_renting module.

@CanMik CanMik added the bug label Oct 22, 2024
@CanMik
Copy link
Author

CanMik commented Oct 22, 2024

Forgot to mention that this module has a link with "Account Invoice Start End Dates".
In Odoo 17 there is two new fields that invalided the module "account_invoice_start_end_dates" -> deferred_start_date and deferred_end_sate.

So it needs to update this feature "Upon invoice creation, the values of the start/end dates of the sale order line are copied to the start/end dates of invoice lines."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant