Skip to content
Snippets Groups Projects
Commit 36a8a72d authored by Touati Djamel (otd)'s avatar Touati Djamel (otd)
Browse files

[FIX] sale,sale_project: delete service tracking for non service product


Steps to reproduce the product:
- Create a new product:
- Select “Service” type
- Go to the Sales tab:
    - Select "Create a task in an existing project" in the `service
    tracking` field
     - the `project` field becomes visible
- Change the Type of the product to “Consumable”
- Try to save

Problem:
The field `project` remains visible and as it is a required field,
we have to fill it in before being able to save the product.
While it is a feature only for service-type products

Solution:
- The `project` field is based on the `service_tracking` field
to become invisible or not. So when the product is not of service type,
we must remove the tracking service so that the project field
becomes invisible.

- Prevent the user from changing the type of products already used in
a sale order

opw-2858064

closes odoo/odoo#93280

X-original-commit: 8c12a8de
Signed-off-by: default avatarDjamel Touati (otd) <otd@odoo.com>
Signed-off-by: default avatarLaurent Stukkens (ltu) <ltu@odoo.com>
parent 56f9b764
Branches
Tags
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment