Skip to content
Snippets Groups Projects
Commit 61a8ef4d authored by Benjamin - Le Filament's avatar Benjamin - Le Filament
Browse files

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

parents 3f0d2e16 8861fb5b
No related branches found
No related tags found
No related merge requests found
......@@ -33,7 +33,8 @@ class AccountPaymentOrder(models.Model):
def _compute_bank_line_amount(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):
Attachment = self.env["ir.attachment"]
......@@ -125,8 +126,7 @@ class AccountPaymentOrder(models.Model):
except Exception:
raise UserError(
_(
"Aucun modèle d'e-mail n'a été trouvé pour envoyer un "
"e-mail à la DIRECCTE"
"Aucun modèle d'e-mail n'a été trouvé."
)
)
# Get partners
......
......@@ -25,6 +25,7 @@ class ResPartner(models.Model):
contribution_type.append(self.env.ref("cgscop_partner.riga_14399"))
if self.is_federation_com:
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"))
return contribution_type
......@@ -78,7 +78,7 @@
</div>
</xpath>
<!-- 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="bank_line_amount" />
<button
......@@ -119,44 +119,33 @@
<!-- Affichage des fichers XML -->
<xpath expr="//notebook" position="inside">
<page name="attachments" string="Fichiers de prélèvements">
<field name="attachment_ids">
<tree>
<field name="attachment_ids" readonly="1" mode="tree">
<tree create="0" edit="0">
<field name="create_date" />
<field name="name" />
<field name="type" />
<field name="datas" filename="datas_fname" />
<field name="datas" filename="name" widget="binary" />
<field name="create_uid" />
<!-- <button-->
<!-- name="download_sdd_file"-->
<!-- type="object"-->
<!-- string="Télécharger le fichier"-->
<!-- class="btn-sm btn-o-info"-->
<!-- />-->
</tree>
<form>
<h1><field name="name" /></h1>
<h1><field name="name"/></h1>
<group>
<group>
<field
name="datas"
filename="name"
attrs="{'invisible':[('type','=','url')]}"
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="datas" filename="name" attrs="{'invisible':[('type','=','url')]}" 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"/>
</group>
<group>
<field name="create_uid" />
<field name="create_date" />
<field name="create_uid"/>
<field name="create_date"/>
</group>
</group>
</form>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment