27 lines
1.0 KiB
Python
27 lines
1.0 KiB
Python
from odoo import models, fields
|
||
|
||
class OwsEquipment(models.Model):
|
||
_name = 'ows.equipment'
|
||
_description = 'Werkstattgerät'
|
||
_order = 'name'
|
||
|
||
name = fields.Char('Name', required=True)
|
||
description = fields.Text('Beschreibung')
|
||
purchase_date = fields.Date('Anschaffungsdatum')
|
||
purchase_price = fields.Float('Kaufpreis (€)')
|
||
location = fields.Char('Lagerort / Standort')
|
||
status = fields.Selection([
|
||
('ok', 'Betriebsbereit'),
|
||
('repair_needed', 'Reparaturbedürftig'),
|
||
('out_of_order', 'Außer Betrieb'),
|
||
('defect', 'Defekt'),
|
||
], string='Zustand', default='ok')
|
||
safety_level = fields.Selection([
|
||
('green', 'Grün – keine Einweisung'),
|
||
('yellow', 'Gelb – kurze Einweisung'),
|
||
('red', 'Rot – intensive Einweisung'),
|
||
], string='Sicherheitsampel')
|
||
image = fields.Binary('Bild', attachment=True)
|
||
document_ids = fields.Many2many('ir.attachment', string='Dokumente')
|
||
# machine_area_id = fields.Many2one('ows.machine.area', string='Bereich')
|