mirror of
https://gitlab.com/hibou-io/hibou-odoo/suite.git
synced 2025-01-20 12:37:31 +02:00
Finish backport to 10.0
This commit is contained in:
@@ -13,6 +13,7 @@ Adds Timesheets to Maintenance Requests to record time and labor costs.
|
||||
'website': 'https://hibou.io/',
|
||||
'depends': [
|
||||
'maintenance_notebook',
|
||||
'hr_maintenance',
|
||||
'hr_department_project',
|
||||
'hr_timesheet',
|
||||
],
|
||||
|
||||
@@ -5,7 +5,6 @@ class AnalyticLine(models.Model):
|
||||
_inherit = 'account.analytic.line'
|
||||
|
||||
maintenance_request_id = fields.Many2one('maintenance.request')
|
||||
employee_id = fields.Many2one('hr.employee', string="Employee")
|
||||
|
||||
|
||||
class MaintenanceEquipment(models.Model):
|
||||
@@ -17,7 +16,6 @@ class MaintenanceEquipment(models.Model):
|
||||
action['domain'] = [('equipment_id', '=', self.id)]
|
||||
action['context'] = {
|
||||
'default_equipment_id': self.id,
|
||||
'default_employee_id': self.employee_id.id,
|
||||
'default_department_id': self.department_id.id,
|
||||
}
|
||||
return action
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<field name="model">maintenance.request</field>
|
||||
<field name="inherit_id" ref="hr_maintenance.maintenance_request_view_form_inherit_hr"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='employee_id']" position="after">
|
||||
<xpath expr="//field[@name='category_id']" position="after">
|
||||
<field name="department_id"/>
|
||||
<field name="project_id"/>
|
||||
</xpath>
|
||||
@@ -36,8 +36,7 @@
|
||||
<field name="timesheet_ids" context="{'default_project_id': project_id}">
|
||||
<tree editable="bottom" string="Timesheet Activities" default_order="date">
|
||||
<field name="date"/>
|
||||
<field name="user_id" invisible="1"/>
|
||||
<field name="employee_id" required="1"/>
|
||||
<field name="user_id" required="1"/>
|
||||
<field name="name"/>
|
||||
<field name="unit_amount" string="Duration" widget="float_time"/>
|
||||
<field name="project_id" invisible="1"/>
|
||||
|
||||
Reference in New Issue
Block a user