1220b3e6f8ec8f3d9cdb2300017084ed096f04ae
This commit avoids a traceback when trying to install hr_timesheet post to "hours" uom deletion. Steps ===== - Install module sale_management - In Settings > Sales > Product Catalog section, activate the option Units of Measure - Go to Units of Measure configuration menu - Remove the unit of measure "Hours" - Install hr_timesheet Issue ===== A traceback appears indicating: "Cannot update missing record 'uom.product_uom_hour'" Cause ===== Since https://github.com/odoo/odoo/commit/ab76c421c279b26195396b61e66b3e8853785226, deletion of system uom is prohibited. An exception exists for uom "Hours" that can be deleted without warning. This exception is removed inside hr_timesheet as this uom is needed in this module. However, it can still be deleted prior to hr_timesheet installation. When it is deleted, the installation of hr_timesheet raises a traceback as the data file hr_timesheet_data tries to access and update this record. Fix === Before updating the record uom "hours" in the data file, a call to a method ensure_iom_hours is made. This method recreate this uom if it does not exist in the database anymore. task-3551315 closes odoo/odoo#141572 X-original-commit: 0d520e5e7c4b8b17ab1865a3010bbce87a71ec62 Signed-off-by: Xavier Bol (xbo) <xbo@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%