MIG maintenance_equipment_charge For Odoo 12.0

This commit is contained in:
Bhoomi
2019-12-11 12:04:44 -05:00
parent 12ec70f490
commit 5c0e65ecdc
3 changed files with 8 additions and 9 deletions

View File

@@ -1,6 +1,6 @@
{ {
'name': 'Equipment Charges', 'name': 'Equipment Charges',
'version': '11.0.1.0.0', 'version': '12.0.1.0.0',
'author': 'Hibou Corp. <hello@hibou.io>', 'author': 'Hibou Corp. <hello@hibou.io>',
'category': 'Human Resources', 'category': 'Human Resources',
'summary': 'Record related equipment charges.', 'summary': 'Record related equipment charges.',

View File

@@ -5,7 +5,7 @@ class EquipmentChargeType(models.Model):
_name = 'maintenance.equipment.charge.type' _name = 'maintenance.equipment.charge.type'
name = fields.Char(string='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): class Equipment(models.Model):
@@ -42,5 +42,5 @@ class EquipmentCharge(models.Model):
employee_id = fields.Many2one('hr.employee', string='Employee') employee_id = fields.Many2one('hr.employee', string='Employee')
department_id = fields.Many2one('hr.department', string='Department') department_id = fields.Many2one('hr.department', string='Department')
qty = fields.Float(string='Quantity', default=1.0) 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') amount = fields.Float(string='Amount')

View File

@@ -31,12 +31,11 @@
<field name="employee_id"/> <field name="employee_id"/>
<field name="department_id"/> <field name="department_id"/>
<field name="type_id"/> <field name="type_id"/>
<separator/> <group expand="0" string="Group By">
<group expand='0' string='Group by...'> <filter string="Charge Type" name="groupby_type_id" domain="[]" context="{'group_by':'type_id'}"/>
<filter string='Charge Type' domain="[]" context="{'group_by': 'type_id'}"/> <filter string='Equipment' name="groupby_equipment_id" domain="[]" context="{'group_by': 'equipment_id'}"/>
<filter string='Equipment' domain="[]" context="{'group_by': 'equipment_id'}"/> <filter string='Employee' name="groupby_employee_id" domain="[]" context="{'group_by': 'employee_id'}"/>
<filter string='Employee' domain="[]" context="{'group_by': 'employee_id'}"/> <filter string='Department' name="groupby_department_id" domain="[]" context="{'group_by': 'department_id'}"/>
<filter string='Department' domain="[]" context="{'group_by': 'department_id'}"/>
</group> </group>
</search> </search>
</field> </field>