diff --git a/golem_resource/__manifest__.py b/golem_resource/__manifest__.py index 7d2daa2..25a50fc 100644 --- a/golem_resource/__manifest__.py +++ b/golem_resource/__manifest__.py @@ -20,7 +20,7 @@ 'name': 'GOLEM non-profit resources', 'summary': 'GOLEM resources management', 'description': ''' GOLEM resources management ''', - 'version': '10.0.1.13.1', + 'version': '10.0.1.13.2', 'category': 'GOLEM', 'author': 'Youssef El Ouahby, Fabien Bourgeois', 'license': 'AGPL-3', @@ -32,5 +32,6 @@ 'views/golem_resource_reservation_views.xml', 'views/golem_resource_timetable_views.xml', 'wizard/golem_reservation_rejection_views.xml', - 'security/ir.model.access.csv'] + 'security/ir.model.access.csv', + 'views/product_template_views.xml'] } diff --git a/golem_resource/models/__init__.py b/golem_resource/models/__init__.py index d3aab06..af90c20 100644 --- a/golem_resource/models/__init__.py +++ b/golem_resource/models/__init__.py @@ -19,4 +19,5 @@ from . import golem_resource_type, \ golem_resource_timetable, \ golem_resource, \ - golem_resource_reservation + golem_resource_reservation, \ + product_template diff --git a/golem_resource/models/product_template.py b/golem_resource/models/product_template.py new file mode 100644 index 0000000..641acb2 --- /dev/null +++ b/golem_resource/models/product_template.py @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- + +# Copyright 2018 Youssef El Ouahby +# Copyright 2018 Fabien Bourgeois +# +# 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 License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . + +""" Product Template """ + +from odoo import models, fields + +class ProductTemplate(models.Model): + """ Product Template Resource Adaptation """ + _inherit = "product.template" + + resource_ids = fields.One2many('golem.resource', 'product_tmpl_id') diff --git a/golem_resource/views/product_template_views.xml b/golem_resource/views/product_template_views.xml new file mode 100644 index 0000000..89cb3dd --- /dev/null +++ b/golem_resource/views/product_template_views.xml @@ -0,0 +1,33 @@ + + + + + + + product.template.inherit.resource.search + product.template + + + + + + + + +