Abderraouf Ghrissi (abgh) e9225d52af [FIX] project_timesheet_holidays: generate timesheets from leaves
Description of the bug:
timesheets are not being generated when validating time off

Steps to reproduce:
- activate Time Off setting
- timeoff type form: choose a project and a task
- create and validate a leave request with the type modified in
previous step
- no timesheets added

Source:
in task 3279188, leave validation function was replaced from
_timesheet_create_lines to _validate_leave_request, this one
checks if the company of the selected project of the leave type is
equal to the company of the type or env.company.
if not, we don't generate timesheets even if the project/task are set.

Solution:
leave type form:
- generate timesheets have a True default value
- in the absence of a company, we display the 'generate timesheets'
(in debug mode) and hide the project/task fields.
=> when the company is removed, project/task will be removed thanks
to the compute method, you can only change them manually if the company
is set.

When generating timesheets from leave validation, we refer to the project/task
set in the company of the employee if no company is set in the leave type.

task-3576751

closes odoo/odoo#140383

X-original-commit: eccefab
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-11-04 00:38:26 +00:00
2023-10-27 08:36:16 +00:00
2023-11-02 21:02:44 +00:00
2023-11-03 07:34:59 +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%