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

[FW][FIX] sale_timesheet: search by invoice (portal) #163720

Commits on Apr 29, 2024

  1. [FIX] sale_timesheet: search by invoice (portal)

    Steps to reproduce:
    -------------------
    - create a product:
    	- service
    	- based on timesheets
    	- create a project and task on order
    - create an order with this product
    - confirm the order
    
    - open an helpdesk ticket for the same customer
    - select the previous created sale order item
    - create a timesheet for this helpdesk ticket
    
    - from the sale order, create the invoice
    - confirm the invoice
    
    - go to the invoice and click on preview
    - click on view timesheets
    
    --> we have the correct timesheet (OK)
    
    - go to the task and create a timesheet
    - create the second invoice from the sale order
    
    - go to the second invoice and click on preview
    - click on view timesheets
    
    --> we have the two timesheets which is wrong (KO)
    
    Cause:
    ------
    When we build the domain to search for timesheets linked to an invoice,
    we add an `OR` domain which takes into account timesheets linked
    to helpdesk tickets (and on the same sale order line).
    
    Solution:
    ---------
    When searching by invoice, it is necessary to look for timesheets
    in the helpdesk tickets, but making sure that they are not linked
    to an invoice that may not be the one requested in the search.
    
    opw-3865963
    
    X-original-commit: 5aaaae5
    thle-odoo committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    314d468 View commit details
    Browse the repository at this point in the history