# -*- coding: utf-8 -*- ######################################################################### # # # Copyright (C) 2015 Agile Business Group # # # # This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU Affero General Public License as # # published by the Free Software Foundation, either version 3 of the # # License, or (at your option) any later version. # # # # This program is distributed in the hope that it will be useful, # # but WITHOUT ANY WARRANTY; without even the implied warranty of # # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # # GNU Affero General Public Licensefor more details. # # # # You should have received a copy of the # # GNU Affero General Public License # # along with this program. If not, see . # # # ######################################################################### from openerp import fields, models class mrp_repair(models.Model): _inherit = 'mrp.repair' user_id = fields.Many2one('res.users', 'User', default=lambda self: self.env.user, help="Person in charge for the repair") date_repair = fields.Datetime('Repair Date', default=fields.Datetime.now, help="Date of the repair, this field" "and user_id defines the calendar")