From 1b991d72c0bdbf21fd34db01c8a40bbc8932996c Mon Sep 17 00:00:00 2001
From: jordan <jordan@le-filament.com>
Date: Tue, 8 Feb 2022 11:36:02 +0100
Subject: [PATCH] [fix] button return cotiz instead of invoice
---
models/scop_cotisation_idf.py | 10 +++++-----
models/scop_invoice_idf.py | 2 +-
views/scop_cotisation_idf.xml | 2 +-
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/models/scop_cotisation_idf.py b/models/scop_cotisation_idf.py
index 0e84521..e6ed81f 100644
--- a/models/scop_cotisation_idf.py
+++ b/models/scop_cotisation_idf.py
@@ -213,19 +213,19 @@ class ScopCotisationsIDF(models.Model):
'res_id': self.invoice_id.id
}
- def action_show_partner_invoice_idf(self):
+ def action_show_partner_contribution_idf(self):
form_view = self.env.ref(
- 'cgscop_invoice_idf.view_scop_invoice_idf_form').id
+ 'cgscop_invoice_idf.view_scop_cotisation_idf_form').id
tree_view = self.env.ref(
- 'cgscop_invoice_idf.view_scop_invoice_idf_tree').id
+ 'cgscop_invoice_idf.view_scop_cotisation_idf_tree').id
return {
'type': 'ir.actions.act_window',
- 'name': 'Factures IDF - ' + self.partner_id.name,
+ 'name': 'Cotisations IDF - ' + self.partner_id.name,
'views': [
[tree_view, "tree"], [form_view, "form"]
],
'view_mode': 'form',
- 'res_model': 'scop.invoice.idf',
+ 'res_model': 'scop.cotisation.idf',
'target': 'current',
'domain': [('partner_id', '=', self.partner_id.id)]
}
diff --git a/models/scop_invoice_idf.py b/models/scop_invoice_idf.py
index ea9f14c..a8cc05d 100644
--- a/models/scop_invoice_idf.py
+++ b/models/scop_invoice_idf.py
@@ -198,7 +198,7 @@ class ScopInvoiceIDF(models.Model):
def action_show_partner_invoice_idf(self):
form_view = self.env.ref(
- 'cgscop_invoice_idf.view_scop_invoice_idf_form').id
+ 'cgscop_invoice_idf.view_scop_invoice_idf_form').id
tree_view = self.env.ref(
'cgscop_invoice_idf.view_scop_invoice_idf_tree').id
return {
diff --git a/views/scop_cotisation_idf.xml b/views/scop_cotisation_idf.xml
index 4451e66..20f1172 100644
--- a/views/scop_cotisation_idf.xml
+++ b/views/scop_cotisation_idf.xml
@@ -52,7 +52,7 @@
<form string="Cotisations IDF">
<sheet>
<div class="oe_button_box" name="button_box">
- <button name="action_show_partner_invoice_idf" type="object" class="oe_stat_button" icon="fa-puzzle-piece">En cours</button>
+ <button name="action_show_partner_contribution_idf" type="object" class="oe_stat_button" icon="fa-puzzle-piece">En cours</button>
<button name="action_show_payments" type="object" class="oe_stat_button" icon="fa-eur"
attrs="{'invisible': ['|', ('type', '!=', 'inv'), ('payments_ids', '=', False)]}">Paiements</button>
<button name="action_show_invoice" type="object" class="oe_stat_button" icon="fa-calculator"
--
GitLab