From a9be9063b0f4c36f87bae746f68e72d84cec0325 Mon Sep 17 00:00:00 2001
From: jordan <jordan@le-filament.com>
Date: Wed, 5 Jan 2022 16:07:35 +0100
Subject: [PATCH] [fix] remove too restricted domain on invoice in form view

---
 views/scop_cotisation_idf.xml | 5 ++---
 views/scop_invoice_idf.xml    | 5 ++---
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/views/scop_cotisation_idf.xml b/views/scop_cotisation_idf.xml
index cc13b3e..6ead489 100644
--- a/views/scop_cotisation_idf.xml
+++ b/views/scop_cotisation_idf.xml
@@ -84,10 +84,9 @@
                                 <field name="currency_id" invisible="1"/>
                                 <field name="credit" widget="monetary" string="Montant" attrs="{'invisible': [('type', '=', 'inv')]}"/>
                                 <field name="debit" widget="monetary" string="Montant" attrs="{'invisible': [('type', '!=', 'inv')]}"/>
-                                <field name="amount_residual" widget="monetary"
-                                       attrs="{'invisible': [('type', '!=', 'inv')]}"/>
+                                <field name="amount_residual" widget="monetary" attrs="{'invisible': [('type', '!=', 'inv')]}"/>
                                 <field name="invoice_id"
-                                       domain="[('partner_id', '=', partner_id), ('type', '=', 'inv'), ('amount_residual', '>', 0)]"
+                                       domain="[('partner_id', '=', partner_id), ('type', '=', 'inv')]"
                                        options="{'no_create': True, 'no_edit': True}"
                                        attrs="{'invisible': [('type', '=', 'inv')]}"
                                        help="Les cotisations disponibles sont celles liées à la coop pour lesquelles le reste à payer est positif."/>
diff --git a/views/scop_invoice_idf.xml b/views/scop_invoice_idf.xml
index 5a43fda..ff125ec 100644
--- a/views/scop_invoice_idf.xml
+++ b/views/scop_invoice_idf.xml
@@ -80,10 +80,9 @@
                                 <field name="currency_id" invisible="1"/>
                                 <field name="credit" widget="monetary" string="Montant" attrs="{'invisible': [('type', '=', 'inv')]}"/>
                                 <field name="debit" widget="monetary" string="Montant" attrs="{'invisible': [('type', '!=', 'inv')]}"/>
-                                <field name="amount_residual" widget="monetary"
-                                       attrs="{'invisible': [('type', '!=', 'inv')]}"/>
+                                <field name="amount_residual" widget="monetary" attrs="{'invisible': [('type', '!=', 'inv')]}"/>
                                 <field name="invoice_id"
-                                       domain="[('partner_id', '=', partner_id), ('type', '=', 'inv'), ('amount_residual', '>', 0)]"
+                                       domain="[('partner_id', '=', partner_id), ('type', '=', 'inv')]"
                                        options="{'no_create': True, 'no_edit': True}"
                                        attrs="{'invisible': [('type', '=', 'inv')]}"
                                        help="Les factures disponibles sont celles liées à la coop pour lesquelles le reste à payer est positif."/>
-- 
GitLab