949ea5ff7b4002b06cb6b564599f80d9859300e1
Before this commit, when the user creates a SO with a service product
which does not generate a task or a project, the analytic account is not
set on the new SO. Then even if the user creates a task and add timesheets
for this product in this SO, the compute_timesheet_ids gives 0
timesheets in the sale.order model because the SO is not linked to an
analytic account.
This commit removes this condition and directly searches the timesheets
linked to the SO and thus provides the correct number of timesheets for it.
This bug is appeared from this commit: dc9ef81ab2
Steps to reproduce:
1. Create a SO and add a SOL with 'Service on Timesheet'
2. Confirm the SO
3. Create a task in project for the same customer than the SO or a
project with no customer set.
4. Add the customer of the SO in the task if it is not already the case.
5. Add the SOL in the task and add a timesheet.
6. Go to /my/orders
7. Select the SO that you have created and in this view, normally, you
should have the View Timesheets buttons on the left side.
Current behaviour:
The 'View Timesheets' button does not appear in the view because the
compute_timesheet_ids from the SO return no timesheets for it.
Expected behaviour:
The button should be visible in the view because we have a timesheet for
this SO.
closes odoo/odoo#67770
Signed-off-by: Yannick Tivisse (yti) <yti@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%