From 3c4ba1beae987c8ba9327e70c3ab3a2ce4f313bd Mon Sep 17 00:00:00 2001 From: Fabien BOURGEOIS Date: Tue, 30 Jul 2019 08:53:17 +0200 Subject: [PATCH] [FIX]GOLEM Activity Registration : correct invoice view --- golem_activity_registration_payment/__manifest__.py | 4 ++-- .../wizard/golem_activity_registration_invoicing.py | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/golem_activity_registration_payment/__manifest__.py b/golem_activity_registration_payment/__manifest__.py index cac2e1a..4bb60a7 100644 --- a/golem_activity_registration_payment/__manifest__.py +++ b/golem_activity_registration_payment/__manifest__.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# Copyright 2018 Fabien Bourgeois +# Copyright 2018-2019 Fabien Bourgeois # Copyright 2018 Youssef El Ouahby # # This program is free software: you can redistribute it and/or modify @@ -20,7 +20,7 @@ 'name': 'GOLEM Activity Member Registration Payments', 'summary': 'GOLEM Activities Member Registration Payments', 'description': 'GOLEM Activities Member Registration Payments', - 'version': '10.0.0.7.0', + 'version': '10.0.0.7.1', 'category': 'GOLEM', 'author': 'Fabien Bourgeois', 'license': 'AGPL-3', diff --git a/golem_activity_registration_payment/wizard/golem_activity_registration_invoicing.py b/golem_activity_registration_payment/wizard/golem_activity_registration_invoicing.py index 726529a..9e68c18 100644 --- a/golem_activity_registration_payment/wizard/golem_activity_registration_invoicing.py +++ b/golem_activity_registration_payment/wizard/golem_activity_registration_invoicing.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# Copyright 2017-2018 Fabien Bourgeois +# Copyright 2017-2019 Fabien Bourgeois # Copyright 2018 Youssef El Ouahby # # This program is free software: you can redistribute it and/or modify @@ -156,10 +156,14 @@ class GolemActivityRegistrationInvoicing(models.TransientModel): if not self.invoice_id: uerr = _('There is no generated invoice.') raise UserError(uerr) + search_view_id = self.env.ref('account.view_account_invoice_filter') + form_view_id = self.env.ref('account.invoice_form') + tree_view_ref = self.env.ref('account.invoice_tree', False) return { 'type': 'ir.actions.act_window', 'name': _('Generated invoice'), - 'view_mode': 'form,tree', + 'view_mode': 'form', + 'view_id': form_view_id.id, 'res_model': 'account.invoice', 'res_id': self[0].invoice_id.id }