oca-ocb-hr/odoo-bringout-oca-ocb-hr_timesheet/hr_timesheet/models/uom_uom.py
Ernad Husremovic e1d89e11e3 19.0 vanilla
2026-03-09 09:31:00 +01:00

20 lines
647 B
Python

# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import fields, models
class UomUom(models.Model):
_inherit = 'uom.uom'
def _unprotected_uom_xml_ids(self):
# Override
# When timesheet App is installed, we also need to protect the hour UoM
# from deletion (and warn in case of modification)
return [
"product_uom_dozen",
"product_uom_pack_6",
]
# widget used in the webclient when this unit is the one used to encode timesheets.
timesheet_widget = fields.Char("Widget", export_string_translation=False)