mirror of
https://gitlab.com/hibou-io/hibou-odoo/suite.git
synced 2025-01-20 12:37:31 +02:00
Merge branch 'mig/18.0/maintenance_purchase_detail' into '18.0'
WIP: mig/18.0/maintenance_purchase_detail into 18.0 See merge request hibou-io/hibou-odoo/suite!1732
This commit is contained in:
24
maintenance_purchase_detail/README.rst
Normal file
24
maintenance_purchase_detail/README.rst
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
***********************************
|
||||||
|
Hibou - Maintenance Purchase Detail
|
||||||
|
***********************************
|
||||||
|
|
||||||
|
Record purchase date and details on Equipments.
|
||||||
|
|
||||||
|
For more information and add-ons, visit `Hibou.io <https://hibou.io/>`_.
|
||||||
|
|
||||||
|
=============
|
||||||
|
Main Features
|
||||||
|
=============
|
||||||
|
|
||||||
|
Adds the following fields to Maintenance Equipment:
|
||||||
|
|
||||||
|
* Purchase Date
|
||||||
|
* Purchase Condition (dropdown)
|
||||||
|
* Purchase Note
|
||||||
|
|
||||||
|
=======
|
||||||
|
License
|
||||||
|
=======
|
||||||
|
|
||||||
|
Please see `LICENSE <https://github.com/hibou-io/hibou-odoo-suite/blob/master/LICENSE>`_.
|
||||||
|
Copyright Hibou Corp. 2018
|
||||||
1
maintenance_purchase_detail/__init__.py
Normal file
1
maintenance_purchase_detail/__init__.py
Normal file
@@ -0,0 +1 @@
|
|||||||
|
from . import models
|
||||||
22
maintenance_purchase_detail/__manifest__.py
Normal file
22
maintenance_purchase_detail/__manifest__.py
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
{
|
||||||
|
'name': 'Equipment Purchase Detail',
|
||||||
|
'version': '18.0.1.0.0',
|
||||||
|
'author': 'Hibou Corp. <hello@hibou.io>',
|
||||||
|
'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,
|
||||||
|
}
|
||||||
1
maintenance_purchase_detail/models/__init__.py
Normal file
1
maintenance_purchase_detail/models/__init__.py
Normal file
@@ -0,0 +1 @@
|
|||||||
|
from . import maintenance
|
||||||
13
maintenance_purchase_detail/models/maintenance.py
Normal file
13
maintenance_purchase_detail/models/maintenance.py
Normal file
@@ -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')
|
||||||
15
maintenance_purchase_detail/views/maintenance_views.xml
Normal file
15
maintenance_purchase_detail/views/maintenance_views.xml
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<odoo>
|
||||||
|
<record model="ir.ui.view" id="hr_equipment_view_form_inherited">
|
||||||
|
<field name="name">equipment.form.inherited</field>
|
||||||
|
<field name="model">maintenance.equipment</field>
|
||||||
|
<field name="inherit_id" ref="maintenance.hr_equipment_view_form"/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<xpath expr="//field[@name='warranty_date']" position="after">
|
||||||
|
<field name="purchase_date"/>
|
||||||
|
<field name="purchase_condition"/>
|
||||||
|
<field name="purchase_note"/>
|
||||||
|
</xpath>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
</odoo>
|
||||||
Reference in New Issue
Block a user