Skip to content
Extraits de code Groupes Projets
Valider 7dfbe127 rédigé par jordan's avatar jordan
Parcourir les fichiers

[update] bordereau report v1

parent a821ee02
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -20,5 +20,6 @@
"views/scop_cotisation_cg.xml",
"views/union_regionale.xml",
"wizard/scop_cotisation_cg_wizard.xml",
"report/report_scop_bordereau.xml",
]
}
......@@ -174,10 +174,6 @@ class Bordereau(models.Model):
for bordereau in self:
bordereau.validate_cotiz_cg()
bordereau.state = 'validated'
# TODO : Use this function to calculate échéances des paiements for pdf
if bordereau.payment_term_id:
totlines = bordereau.payment_term_id.with_context(
currency_id=self.base_cotisation_cg.company_currency_id.id).compute(bordereau.amount_total_cotiz, bordereau.date_cotisation)[0]
@api.multi
def action_bordereau_paid(self):
......
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<template id="report_bordereau_document">
<t t-call="web.external_layout">
<div class="page">
<h2>
Appel de cotisation 2020
</h2>
<h3>
Paris, le 12/03/2020
</h3>
<h3>
N° adhérent : <t t-esc="o.partner_id.member_number_int"/><br/>
Union régionale <t t-esc="o.partner_ur_id.name"/>
</h3>
<t t-set="address">
<address t-field="o.partner_id" t-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": True}' />
</t>
<t t-set="move_line_ids" t-value="o.get_bordereau_move_line()"/>
<table>
<tr>
<td>Date de prélèvement</td>
<td>Montant</td>
</tr>
<t t-foreach="move_line_ids" t-as="line">
<tr>
<td>
<span t-esc="line[0]"/>
</td>
<td>
<span t-esc="line[1]"/>
</td>
</tr>
</t>
</table>
</div>
</t>
</template>
<template id="report_bordereau">
<t t-call="web.html_container">
<t t-foreach="docs" t-as="o">
<t t-call="cgscop_cotisation_cg.report_bordereau_document"/>
</t>
</t>
</template>
<!-- QWeb Reports -->
<report
id="cgscop_bordereau_report"
model="scop.bordereau"
string="CG Scop - Bordereau"
report_type="qweb-html"
name="cgscop_cotisation_cg.report_bordereau"
file="cgscop_cotisation_cg.report_bordereau"
menu="False"
/>
</data>
</odoo>
......@@ -15,6 +15,7 @@
<button name="validate_bordereau" string="Valider le bordereau" type="object" states="new"/>
<button name="add_cotiz" string="Ajouter une ligne de cotisation" type="object" states="new"/>
<button name="action_bordereau_paid" string="Passer le bordereau à payé" type="object" states="validated"/>
<button name="print_bordereau" string="Imprimer" type="object" states="validated,paid"/>
</header>
<sheet>
<div class="oe_title">
......
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