9b9e900dad5a54da0f4df37bb80898e063b0f0f1
Steps to reproduce: ------------------- - modify the company calendar to get an other value than 8 average hour per day; - add this calendar to two employees (A and B); - create a type of leave for the current company; - create an allocation for the employee A for this type with X hours without saving; - add the employee B; Issue: ------ The number of hours is modified. Cause: ------ There is an inconsistency between `_compute_number_of_hours_display` and `_compute_from_holiday_status_id` methods. In the `_compute_from_holiday_status_id` the number of hours is determined according to order: employee calendar --> company calendar --> constant (8 hours) In the `_compute_number_of_hours_display` the number of hours directly falls back on the constant if we don't find an employee for a type of leave that is employee. In the case of multiple employees, we will always use this constant, whereas we use the company calendar in the other method. Solution: --------- Keep the company calendar if you don't have an employee before falling back on a constant. opw-3617281 closes odoo/odoo#146730 X-original-commit: 55f24b4f07eaa4527559a2819e264b4809a6b21f Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com> Signed-off-by: Thomas Lefebvre (thle) <thle@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%