Stefan-Calin Crainiciuc (stcc) 56813501ea [FIX] hr_timesheet: correctly propagates project
Steps to reproduce:

- Create 2 projects: 'Project1' and 'Project2'
- Enable sub-tasks
- In Project1 create a task, name it '1'.
- In task 1 add a subtask, name it '1:1'.
- In task 1:1 add another subtask, name it '1:1:1'.
- Go to Timesheet app > add lines for each task.
- The lines display name are "Project1 / 1", ...
- Go back to task 1, edit the task project to Project2 and save.
- The subtasks will have their project_id also set to Project2.
- Go to Timesheet app.

Issue:
Tasks 1 and 1:1 will have their display names updated to "Project2 / 1"
and "Project2 / 1:1". However, task 1:1:1 is displayed as
"Project1 / 1:1:1", meaning it's project_id was never updated.

This happens because of the way changed fields propagate to immediate
children, but not to grandchildren, which is intended behaviour.

Solution:

`_compute_project_id` is also called onchange, meaning that we can use it
to update account lines with an outdated project value with the new value.

opw-3018301

closes odoo/odoo#109352

X-original-commit: 91b42c806ce2029d9ef678d145ced3138e35bec0
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Signed-off-by: Stefan-Calin Crainiciuc (stcc) <stcc@odoo.com>
2023-01-07 09:39:00 +01:00
2022-12-13 17:03:17 +01:00
2023-01-03 13:16:02 +01:00
2023-01-06 14:31:50 +01:00
2023-01-03 13:16:02 +01:00
…
…
…
2023-01-03 13:16:02 +01:00
2023-01-03 13:16:02 +01: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%