[FIX]GOLEM Activity Registration : correct invoice view

This commit is contained in:
Fabien BOURGEOIS 2019-07-30 08:53:17 +02:00
parent 9f36b0a365
commit 3c4ba1beae
2 changed files with 8 additions and 4 deletions

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Copyright 2018 Fabien Bourgeois <fabien@yaltik.com>
# Copyright 2018-2019 Fabien Bourgeois <fabien@yaltik.com>
# Copyright 2018 Youssef El Ouahby <youssef@yaltik.com>
#
# 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',

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Copyright 2017-2018 Fabien Bourgeois <fabien@yaltik.com>
# Copyright 2017-2019 Fabien Bourgeois <fabien@yaltik.com>
# Copyright 2018 Youssef El Ouahby <youssef@yaltik.com>
#
# 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
}