c023a4f065a4ac86bed65d6c4d13bf5d75dd14bc
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>
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
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%