Xavier BOL (xbo) c023a4f065 [FIX] sale_project: display the SO related of the project
Before this commit, when the project has no SO set in its model and it
has a task with a SO set. When the user clicks on the Sales Order stat
button shown in project form or the project update. He sees a form view
of `sale.order` to create a new record because the action does not give
the id of the Sales Order related. Indeed, we give the id of the SO set
on the project if we found only one SO related to the project.

This commit fixes the issue by given the id of the SO related to allow
the user to see the SO related to the project.

Steps to reproduce:
==================
1) Create a project A with allow_billable set to `True`.
2) Create a Quotation for a customer C with a SOL containing service
product and confirm it to create a SO.
3) Create a task in the project A and set the customer C to this task
and set the SOL of the SO created in the step 2.
4) Go to the project update of the project A
5) Click on the 'x Sales Orders' stat button.

Expected Behaviour:
==================
The user should see the SO related to the project, that is the one
selected in the related task.

Actual Behaviour:
================
The user sees an empty form view of `sale.order` to create a SO because
no SO is found.

Part of task-2710808

Closes #81940

closes odoo/odoo#82284

X-original-commit: de702d921a321a8b783af020538ceaf4ef3af10f
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-01-05 17:12:05 +00:00
2022-01-04 20:16:47 +00:00
2021-10-21 19:09:48 +00:00
…
2015-09-08 17:58:38 +02:00
2021-11-04 10:21:58 +00:00
2021-10-07 17:59:53 +00:00
2021-12-09 14:36:58 +00:00
2021-10-21 19:09:48 +00:00

Build Status Tech Doc Help Nightly Builds

Odoo

Odoo is a suite of web based open source business apps.

The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...

Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.

Getting started with Odoo

For a standard installation please follow the Setup instructions from the documentation.

To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials

S
Description
No description provided
Readme LGPL-3.0
3.4 GiB
Languages
Python 49.6%
JavaScript 47.8%
SCSS 2%
CSS 0.3%
HTML 0.2%