diff --git a/models/scop_cotisation_aura.py b/models/scop_cotisation_aura.py index 23a8655bec3a78c75605f25fce62a9237deb77fd..769541fabe0e0edfce996e14c80b6ec6636d3f4a 100755 --- a/models/scop_cotisation_aura.py +++ b/models/scop_cotisation_aura.py @@ -444,9 +444,6 @@ class ScopCotisationAura(models.Model): ('type_id', '=', 'lm'), ('is_qualified', '=', True) ], order='create_date desc', limit=1) - if len(liasse_id) > 1: - print(member.name) - print(member.id) return liasse_id # ------------------------------------------------------ diff --git a/views/report_cotisation_aura.xml b/views/report_cotisation_aura.xml index d48288f1324de711eba232a656eb822d1dcc447e..53e0ca93bff3427619fc944169947d8dcea79a86 100644 --- a/views/report_cotisation_aura.xml +++ b/views/report_cotisation_aura.xml @@ -8,13 +8,13 @@ <template id="scop_report_cotisation_aura" inherit_id="cgscop_account.scop_report_invoice_document"> <xpath expr="//div[@name='hook_page']" position="after"> <div t-elif="o.type == 'out_invoice' and o.journal_id == o.company_id.contribution_journal_id and o.company_id.is_contribution_aura" - class="page mt32" style="text-align: justify;"> - <div id="informations" class="mt32 mb32" style="font-size: 14px; text-align: justify"> + class="page" style="text-align: justify;"> + <div id="informations" class="mt16 mb16" style="font-size: 13px; text-align: justify"> <div class="col-12"> <h2 t-if="o.state == 'draft'"> Brouillon </h2> - <p style="font-size: 16px;"> + <p style="font-size: 15px;"> <strong> Appel de cotisation Union Régionale AURA <span t-esc="str(o.year)"/><br/> N°<span t-field="o.number"/> @@ -86,7 +86,7 @@ <p> Nous vous prions d’agréer, Madame, Monsieur, l’expression de nos sincères salutations. </p> - <p class="mt32"> + <p class="mt16"> Isabelle TREFFOT, <br/> Responsable administratif et financier. diff --git a/wizard/scop_cotisation_aura_wizard.py b/wizard/scop_cotisation_aura_wizard.py index a208235db45c3367b3f79ae5dd193453c7d8424b..81b7d023b0d266f2d8aced2202accf0b51ffc357 100644 --- a/wizard/scop_cotisation_aura_wizard.py +++ b/wizard/scop_cotisation_aura_wizard.py @@ -43,15 +43,18 @@ class ScopCotisationWizard(models.TransientModel): def onchange_domain_partner_ids(self): if self.type == 'selected': id_cotisation_aura = self.env.context['id_cotisation_aura'] - invoiced_members_ids = self.cotisation_aura_id.browse( - id_cotisation_aura).invoice_ids.mapped('partner_id') + member_invoiced_ids = self.cotisation_aura_id.browse(id_cotisation_aura).invoice_ids.mapped('partner_id') + member_to_invoice_ids = self.cotisation_aura_id.browse( + id_cotisation_aura).get_new_members() - member_invoiced_ids + print(member_to_invoice_ids) res = {'domain': { 'partner_ids': [ ('ur_id', '=', self.env.user.company_id.ur_id.id), - ('is_company', '=', True), - ('id', 'not in', invoiced_members_ids.mapped('id'))] - }} + ('is_cooperative', '=', True), + ('id', 'in', member_to_invoice_ids.ids)] + } + } return res # ------------------------------------------------------