Skip to content
Extraits de code Groupes Projets
Valider 61a8ef4d rédigé par Benjamin - Le Filament's avatar Benjamin - Le Filament
Parcourir les fichiers

sync branch merge branch '14.0' into 14.0-new-process-adh

parents 3f0d2e16 8861fb5b
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -33,7 +33,8 @@ class AccountPaymentOrder(models.Model): ...@@ -33,7 +33,8 @@ class AccountPaymentOrder(models.Model):
def _compute_bank_line_amount(self): def _compute_bank_line_amount(self):
for po in self: for po in self:
po.bank_line_amount = sum(po.bank_line_ids.mapped("amount_currency")) po.bank_line_amount = sum(po.payment_ids.filtered(
lambda p: not p.reversed_entry_id).mapped("amount_total_signed"))
def _compute_attachment_ids(self): def _compute_attachment_ids(self):
Attachment = self.env["ir.attachment"] Attachment = self.env["ir.attachment"]
...@@ -125,8 +126,7 @@ class AccountPaymentOrder(models.Model): ...@@ -125,8 +126,7 @@ class AccountPaymentOrder(models.Model):
except Exception: except Exception:
raise UserError( raise UserError(
_( _(
"Aucun modèle d'e-mail n'a été trouvé pour envoyer un " "Aucun modèle d'e-mail n'a été trouvé."
"e-mail à la DIRECCTE"
) )
) )
# Get partners # Get partners
......
...@@ -25,6 +25,7 @@ class ResPartner(models.Model): ...@@ -25,6 +25,7 @@ class ResPartner(models.Model):
contribution_type.append(self.env.ref("cgscop_partner.riga_14399")) contribution_type.append(self.env.ref("cgscop_partner.riga_14399"))
if self.is_federation_com: if self.is_federation_com:
contribution_type.append(self.env.ref("cgscop_partner.riga_14398")) contribution_type.append(self.env.ref("cgscop_partner.riga_14398"))
if self.is_federation_cae: # TODO: Mettre à jour avec is_federation_cae après la maj des périodes par la CG
if self.cae:
contribution_type.append(self.env.ref("cgscop_partner.cotiz_fede_cae")) contribution_type.append(self.env.ref("cgscop_partner.cotiz_fede_cae"))
return contribution_type return contribution_type
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
</div> </div>
</xpath> </xpath>
<!-- Sheet Buttons --> <!-- Sheet Buttons -->
<xpath expr="//field[@name='bank_line_count']" position="after"> <xpath expr="//field[@name='payment_count']" position="after">
<field name="payment_line_amount" /> <field name="payment_line_amount" />
<field name="bank_line_amount" /> <field name="bank_line_amount" />
<button <button
...@@ -119,39 +119,28 @@ ...@@ -119,39 +119,28 @@
<!-- Affichage des fichers XML --> <!-- Affichage des fichers XML -->
<xpath expr="//notebook" position="inside"> <xpath expr="//notebook" position="inside">
<page name="attachments" string="Fichiers de prélèvements"> <page name="attachments" string="Fichiers de prélèvements">
<field name="attachment_ids"> <field name="attachment_ids" readonly="1" mode="tree">
<tree> <tree create="0" edit="0">
<field name="create_date" /> <field name="create_date" />
<field name="name" /> <field name="name" />
<field name="type" /> <field name="type" />
<field name="datas" filename="datas_fname" /> <field name="datas" filename="name" widget="binary" />
<field name="create_uid" /> <field name="create_uid" />
<!-- <button-->
<!-- name="download_sdd_file"-->
<!-- type="object"-->
<!-- string="Télécharger le fichier"-->
<!-- class="btn-sm btn-o-info"-->
<!-- />-->
</tree> </tree>
<form> <form>
<h1><field name="name"/></h1> <h1><field name="name"/></h1>
<group> <group>
<group> <group>
<field <field name="datas" filename="name" attrs="{'invisible':[('type','=','url')]}" string="Télécharger le fichier"/>
name="datas" <field name="name" invisible="1" attrs="{'invisible':[('type','=','url')]}" class="oe_inline oe_right"/>
filename="name" <field name="url" widget="url" attrs="{'invisible':[('type','=','binary')]}"/>
attrs="{'invisible':[('type','=','url')]}" <field name="mimetype" groups="base.group_no_one"/>
string="Télécharger le fichier"
/>
<field
name="name"
invisible="1"
attrs="{'invisible':[('type','=','url')]}"
class="oe_inline oe_right"
/>
<field
name="url"
widget="url"
attrs="{'invisible':[('type','=','binary')]}"
/>
<field
name="mimetype"
groups="base.group_no_one"
/>
<field name="type"/> <field name="type"/>
</group> </group>
<group> <group>
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter