mirror of
https://gitlab.com/hibou-io/hibou-odoo/suite.git
synced 2025-01-20 12:37:31 +02:00
MIG maintenance_equipment_charge For Odoo 12.0
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
'name': 'Equipment Charges',
|
||||
'version': '11.0.1.0.0',
|
||||
'version': '12.0.1.0.0',
|
||||
'author': 'Hibou Corp. <hello@hibou.io>',
|
||||
'category': 'Human Resources',
|
||||
'summary': 'Record related equipment charges.',
|
||||
|
||||
@@ -5,7 +5,7 @@ class EquipmentChargeType(models.Model):
|
||||
_name = 'maintenance.equipment.charge.type'
|
||||
|
||||
name = fields.Char(string='Charge Type')
|
||||
uom_id = fields.Many2one('product.uom', string='Charge UOM')
|
||||
uom_id = fields.Many2one('uom.uom', string='Charge UOM')
|
||||
|
||||
|
||||
class Equipment(models.Model):
|
||||
@@ -42,5 +42,5 @@ class EquipmentCharge(models.Model):
|
||||
employee_id = fields.Many2one('hr.employee', string='Employee')
|
||||
department_id = fields.Many2one('hr.department', string='Department')
|
||||
qty = fields.Float(string='Quantity', default=1.0)
|
||||
uom_id = fields.Many2one('product.uom', related='type_id.uom_id')
|
||||
uom_id = fields.Many2one('uom.uom', related='type_id.uom_id')
|
||||
amount = fields.Float(string='Amount')
|
||||
|
||||
@@ -31,12 +31,11 @@
|
||||
<field name="employee_id"/>
|
||||
<field name="department_id"/>
|
||||
<field name="type_id"/>
|
||||
<separator/>
|
||||
<group expand='0' string='Group by...'>
|
||||
<filter string='Charge Type' domain="[]" context="{'group_by': 'type_id'}"/>
|
||||
<filter string='Equipment' domain="[]" context="{'group_by': 'equipment_id'}"/>
|
||||
<filter string='Employee' domain="[]" context="{'group_by': 'employee_id'}"/>
|
||||
<filter string='Department' domain="[]" context="{'group_by': 'department_id'}"/>
|
||||
<group expand="0" string="Group By">
|
||||
<filter string="Charge Type" name="groupby_type_id" domain="[]" context="{'group_by':'type_id'}"/>
|
||||
<filter string='Equipment' name="groupby_equipment_id" domain="[]" context="{'group_by': 'equipment_id'}"/>
|
||||
<filter string='Employee' name="groupby_employee_id" domain="[]" context="{'group_by': 'employee_id'}"/>
|
||||
<filter string='Department' name="groupby_department_id" domain="[]" context="{'group_by': 'department_id'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
|
||||
Reference in New Issue
Block a user