diff --git a/golem_resource_pack/__manifest__.py b/golem_resource_pack/__manifest__.py index df0fe6c..25d251c 100644 --- a/golem_resource_pack/__manifest__.py +++ b/golem_resource_pack/__manifest__.py @@ -20,7 +20,7 @@ 'name': 'GOLEM resources pack', 'summary': 'GOLEM resources pack', 'description': ''' GOLEM resources pack ''', - 'version': '10.0.0.0.5', + 'version': '10.0.0.0.6', 'category': 'GOLEM', 'author': 'Youssef El Ouahby, Fabien Bourgeois', 'license': 'AGPL-3', @@ -29,5 +29,6 @@ 'depends': ['golem_resource'], 'data': ['views/golem_resource_pack_views.xml', 'wizard/golem_pack_rejection_views.xml', + 'wizard/golem_pack_quick_reservation_views.xml', 'security/ir.model.access.csv'] } diff --git a/golem_resource_pack/models/golem_resource_pack.py b/golem_resource_pack/models/golem_resource_pack.py index 5fba353..f997ac4 100644 --- a/golem_resource_pack/models/golem_resource_pack.py +++ b/golem_resource_pack/models/golem_resource_pack.py @@ -52,6 +52,18 @@ class GolemResourcePack(models.Model): reservation_count = fields.Integer(compute='_compute_reservation_count') rejection_reason = fields.Text(readonly=True, track_visibility='onchange') + @api.multi + def quick_reservation(self): + """ Quick Reservation Creating""" + self.ensure_one() + pack_id = self[0] + return {'name' : _('Reservations Creating'), + 'type' : 'ir.actions.act_window', + 'res_model' : 'golem.pack.quick.reservation.wizard', + 'context': {'default_pack_id': pack_id.id}, + 'view_mode': 'form', + 'target': 'new'} + @api.depends('reservation_ids') def _compute_reservation_count(self): for pack in self: diff --git a/golem_resource_pack/views/golem_resource_pack_views.xml b/golem_resource_pack/views/golem_resource_pack_views.xml index 096a3fb..b3a38e6 100644 --- a/golem_resource_pack/views/golem_resource_pack_views.xml +++ b/golem_resource_pack/views/golem_resource_pack_views.xml @@ -61,8 +61,15 @@ along with this program. If not, see . + + + + +