-
- Downloads
[FIX] hr_timesheet: timesheet uom fallback when AAL's company is False
Current behaviour: When creating a timesheet, if in the vals passed the AAL doesn't have a company (possible since it's not required), then the `uom` of the timesheet is False, which doesn't make sense. Expected behaviour: The timesheet `uom` should fallback on the uom of the company of the project. Steps to reproduce: - Install hr_timesheet, Accounting - Activate the AAL in the settings - Create a project with an AAL - Remove the company on the AAL of the project - In that project create a task and log some timesheet. - `uom` field should be empty Reason for the problem: When setting the `product_uom_id` in the vals when creating/writing a timesheet, we just take the `project_time_mode_id` on the company linked to the AAL. The problem is that the company on an AAL is not a required field, so it can be `False`, leading the setting the val for `product_uom_id` to `False`. Fix: In case the AAL has no company, we get the `uom` from the company linked to the project. Affected versions: - 14.0 - 15.0 - saas-15.2 - 16.0 - saas-16.1 - saas-16.2 - master opw-3245671 closes odoo/odoo#117259 X-original-commit: b39642bf Signed-off-by:Xavier Bol (xbo) <xbo@odoo.com> Signed-off-by:
Piryns Victor (pivi) <pivi@odoo.com>
Please register or sign in to comment