Adding fields to resources and reservation : Validation

This commit is contained in:
eloyoussef 2018-02-13 14:00:16 +01:00
parent 602a6a778d
commit b389be7bbc

View File

@ -18,9 +18,7 @@
from odoo import models, fields, api, _, exceptions from odoo import models, fields, api, _, exceptions
import logging
_logger = logging.getLogger(__name__)
#modèle de base : ressources #modèle de base : ressources
class GolemResources(models.Model): class GolemResources(models.Model):
""" GOLEM Resources """ """ GOLEM Resources """
@ -29,6 +27,7 @@ class GolemResources(models.Model):
name = fields.Char(required=True) name = fields.Char(required=True)
active = fields.Boolean(default=True) active = fields.Boolean(default=True)
validation_required = fields.Boolean(default=True)
resource_type = fields.Many2one("golem.resourcetype") resource_type = fields.Many2one("golem.resourcetype")
resource_responsible = fields.Many2one("res.partner") resource_responsible = fields.Many2one("res.partner")
article_link = fields.Many2one("product.template") article_link = fields.Many2one("product.template")
@ -61,6 +60,8 @@ class GolemReservation(models.Model):
('draft', "Draft"), ('draft', "Draft"),
('confirmed', "Confirmed"), ('confirmed', "Confirmed"),
('canceled', "Canceled"), ('canceled', "Canceled"),
('validated', "Validated"),
('rejected', "Rejected"),
], default='draft') ], default='draft')
@api.multi @api.multi