[FIX]GOLEM Family Membership : ensure customer views, not supplier on invoices

This commit is contained in:
Fabien BOURGEOIS 2018-11-01 19:50:56 +01:00
parent 78238bd562
commit 3bdc141dad
2 changed files with 3 additions and 2 deletions

View File

@ -20,7 +20,7 @@
'name': 'GOLEM Family Memberships', 'name': 'GOLEM Family Memberships',
'summary': 'GOLEM Family Membership Management', 'summary': 'GOLEM Family Membership Management',
'description': 'GOLEM Family Membership Management', 'description': 'GOLEM Family Membership Management',
'version': '10.0.0.1.3', 'version': '10.0.0.1.4',
'category': 'GOLEM', 'category': 'GOLEM',
'author': 'Fabien Bourgeois, Youssef ELOUAHBY', 'author': 'Fabien Bourgeois, Youssef ELOUAHBY',
'license': 'AGPL-3', 'license': 'AGPL-3',

View File

@ -79,6 +79,7 @@ class GolemMembershipInvoice(models.TransientModel):
search_view_id = self.env.ref('account.view_account_invoice_filter') search_view_id = self.env.ref('account.view_account_invoice_filter')
form_view_id = self.env.ref('account.invoice_form') form_view_id = self.env.ref('account.invoice_form')
tree_view_ref = self.env.ref('account.invoice_tree', False)
return { return {
'domain': [('id', 'in', invoice_list)], 'domain': [('id', 'in', invoice_list)],
'name': 'Membership Invoices', 'name': 'Membership Invoices',
@ -86,6 +87,6 @@ class GolemMembershipInvoice(models.TransientModel):
'view_mode': 'tree,form', 'view_mode': 'tree,form',
'res_model': 'account.invoice', 'res_model': 'account.invoice',
'type': 'ir.actions.act_window', 'type': 'ir.actions.act_window',
'views': [(False, 'tree'), (form_view_id.id, 'form')], 'views': [(tree_view_ref.id, 'tree'), (form_view_id.id, 'form')],
'search_view_id': search_view_id.id 'search_view_id': search_view_id.id
} }