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

Conversation

fw-bot
Copy link
Contributor

@fw-bot fw-bot commented Apr 29, 2024

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

Forward-Port-Of: #163617
Forward-Port-Of: #162960

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
@robodoo
Copy link
Contributor

robodoo commented Apr 29, 2024

@C3POdoo C3POdoo added the OE the report is linked to a support ticket (opw-...) label Apr 29, 2024
@fw-bot
Copy link
Contributor Author

fw-bot commented Apr 29, 2024

This PR targets saas-16.4 and is part of the forward-port chain. Further PRs will be created up to master.

More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port

@robodoo robodoo added the forwardport This PR was created by @fw-bot label Apr 29, 2024
robodoo pushed a commit that referenced this pull request Apr 29, 2024
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

closes #163720

X-original-commit: 5aaaae5
Related: odoo/enterprise#61645
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
@robodoo robodoo closed this Apr 29, 2024
@fw-bot fw-bot deleted the saas-16.4-15.0-opw-3865963-filter_timesheet_invoice-thle-0RA7-fw branch May 13, 2024 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
forwardport This PR was created by @fw-bot OE the report is linked to a support ticket (opw-...)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants