diff --git a/maintenance_purchase_detail/README.rst b/maintenance_purchase_detail/README.rst new file mode 100644 index 00000000..0e081b44 --- /dev/null +++ b/maintenance_purchase_detail/README.rst @@ -0,0 +1,26 @@ +*********************************** +Hibou - Maintenance Purchase Detail +*********************************** + +Record purchase date and details on Equipments. + +For more information and add-ons, visit `Hibou.io `_. + +============= +Main Features +============= + +Adds the following fields to Maintenance Equipment: + +* Purchase Date +* Purchase Condition (dropdown) +* Purchase Note + +Additionally, adds a smart button to archive Equipments. + +======= +License +======= + +Please see `LICENSE `_. +Copyright Hibou Corp. 2018 \ No newline at end of file diff --git a/maintenance_purchase_detail/__init__.py b/maintenance_purchase_detail/__init__.py new file mode 100644 index 00000000..0650744f --- /dev/null +++ b/maintenance_purchase_detail/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/maintenance_purchase_detail/__manifest__.py b/maintenance_purchase_detail/__manifest__.py new file mode 100644 index 00000000..e688ea32 --- /dev/null +++ b/maintenance_purchase_detail/__manifest__.py @@ -0,0 +1,22 @@ +{ + 'name': 'Equipment Purchase Detail', + 'version': '11.0.1.0.0', + 'author': 'Hibou Corp. ', + 'category': 'Human Resources', + 'summary': 'Record purchase date and details on Equipments.', + 'description': """ +Equipment Purchase Detail +========================= + +Adds fields for purchase date, and condition on the Equipment form. +""", + 'website': 'https://hibou.io/', + 'depends': [ + 'maintenance', + ], + 'data': [ + 'views/maintenance_views.xml', + ], + 'installable': True, + 'auto_install': False, +} diff --git a/maintenance_purchase_detail/models/__init__.py b/maintenance_purchase_detail/models/__init__.py new file mode 100644 index 00000000..12bf298f --- /dev/null +++ b/maintenance_purchase_detail/models/__init__.py @@ -0,0 +1 @@ +from . import maintenance diff --git a/maintenance_purchase_detail/models/maintenance.py b/maintenance_purchase_detail/models/maintenance.py new file mode 100644 index 00000000..cdf73d09 --- /dev/null +++ b/maintenance_purchase_detail/models/maintenance.py @@ -0,0 +1,13 @@ +from odoo import api, fields, models + + +class MaintenanceEquipment(models.Model): + _inherit = 'maintenance.equipment' + + purchase_date = fields.Date(string='Purchase Date') + purchase_condition = fields.Selection([ + ('new', 'New'), + ('used', 'Used'), + ('other', 'Other'), + ], string='Purchase Condition') + purchase_note = fields.Text(string='Purchase Note') diff --git a/maintenance_purchase_detail/views/maintenance_views.xml b/maintenance_purchase_detail/views/maintenance_views.xml new file mode 100644 index 00000000..5a2a9777 --- /dev/null +++ b/maintenance_purchase_detail/views/maintenance_views.xml @@ -0,0 +1,20 @@ + + + + equipment.form.inherited + maintenance.equipment + + + + + + + + + + + + + \ No newline at end of file