[MIG] maintenance_timesheet: migrate to 17.0

This commit is contained in:
Milan
2024-11-04 17:14:38 +01:00
parent 4ce1885b5a
commit 43f4080548
3 changed files with 4 additions and 2 deletions

View File

@@ -1,6 +1,6 @@
{
'name': 'Equipment Timesheets',
'version': '16.0.1.0.0',
'version': '17.0.1.0.0',
'author': 'Hibou Corp. <hello@hibou.io>',
'category': 'Human Resources',
'summary': 'Record time on maintenance requests.',

View File

@@ -31,6 +31,8 @@ class MaintenanceRequest(models.Model):
help="Computed using the sum of the maintenance work done.")
remaining_hours = fields.Float(compute='_hours_get', store=True, string='Remaining Hours',
help="Total remaining time.")
department_id = fields.Many2one('hr.department')
@api.model
def create(self, values):

View File

@@ -31,7 +31,7 @@
<field name="inherit_id" ref="maintenance_notebook.hr_equipment_request_view_form_notebook"/>
<field name="arch" type="xml">
<xpath expr="//notebook" position="inside">
<page string="Timesheets" attrs="{'invisible': [('project_id', '=', False)]}">
<page string="Timesheets" invisible="not project_id">
<field name="timesheet_ids" context="{'default_project_id': project_id}">
<tree editable="bottom" string="Timesheet Activities" default_order="date">
<field name="date"/>