mirror of
https://github.com/bringout/oca-technical.git
synced 2026-04-18 21:32:00 +02:00
Initial commit: OCA Technical packages (595 packages)
This commit is contained in:
commit
2cc02aac6e
24950 changed files with 2318079 additions and 0 deletions
|
|
@ -0,0 +1,34 @@
|
|||
# Copyright (C) 2010 Savoir-faire Linux (<http://www.savoirfairelinux.com>).
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class MgmtsystemHazard(models.Model):
|
||||
"""Hazards of the health and safety management system"""
|
||||
|
||||
_name = "mgmtsystem.hazard"
|
||||
_description = __doc__
|
||||
_inherit = ["mail.thread"]
|
||||
|
||||
name = fields.Char(required=True, translate=True)
|
||||
type_id = fields.Many2one("mgmtsystem.hazard.type", "Type", required=True)
|
||||
hazard_id = fields.Many2one("mgmtsystem.hazard.hazard", "Hazard", required=True)
|
||||
origin_id = fields.Many2one("mgmtsystem.hazard.origin", "Origin", required=True)
|
||||
department_id = fields.Many2one("hr.department", "Department", required=True)
|
||||
responsible_user_id = fields.Many2one("res.users", "Responsible", required=True)
|
||||
analysis_date = fields.Date("Date", required=True)
|
||||
probability_id = fields.Many2one("mgmtsystem.hazard.probability", "Probability")
|
||||
severity_id = fields.Many2one("mgmtsystem.hazard.severity", "Severity")
|
||||
usage_id = fields.Many2one("mgmtsystem.hazard.usage", "Occupation / Usage")
|
||||
acceptability = fields.Boolean()
|
||||
justification = fields.Text()
|
||||
control_measure_ids = fields.One2many(
|
||||
"mgmtsystem.hazard.control_measure", "hazard_id", "Control Measures"
|
||||
)
|
||||
test_ids = fields.One2many(
|
||||
"mgmtsystem.hazard.test", "hazard_id", "Implementation Tests"
|
||||
)
|
||||
company_id = fields.Many2one(
|
||||
"res.company", "Company", default=lambda s: s.env.user.company_id
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue