[ADD]GOLEM Activity Registration Payment : add invoicing on member card template

This commit is contained in:
Fabien BOURGEOIS 2018-08-02 18:36:01 +02:00
parent cd4c0fc872
commit 245ef22c80
4 changed files with 230 additions and 7 deletions

View File

@ -19,7 +19,7 @@
'name': 'GOLEM Activity Member Registration Payments', 'name': 'GOLEM Activity Member Registration Payments',
'summary': 'GOLEM Activities Member Registration Payments', 'summary': 'GOLEM Activities Member Registration Payments',
'description': 'GOLEM Activities Member Registration Payments', 'description': 'GOLEM Activities Member Registration Payments',
'version': '10.0.0.2.0', 'version': '10.0.0.3.0',
'category': 'GOLEM', 'category': 'GOLEM',
'author': 'Fabien Bourgeois', 'author': 'Fabien Bourgeois',
'license': 'AGPL-3', 'license': 'AGPL-3',
@ -28,5 +28,6 @@
'depends': ['golem_activity_registration_state', 'golem_payment'], 'depends': ['golem_activity_registration_state', 'golem_payment'],
'data': ['views/golem_member_views.xml', 'data': ['views/golem_member_views.xml',
'views/golem_activity_registration_views.xml', 'views/golem_activity_registration_views.xml',
'report/golem_member_card_templates.xml',
'wizard/golem_activity_registration_invoicing.xml'] 'wizard/golem_activity_registration_invoicing.xml']
} }

View File

@ -6,8 +6,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Odoo Server 10.0\n" "Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-08-01 16:18+0000\n" "POT-Creation-Date: 2018-08-02 16:31+0000\n"
"PO-Revision-Date: 2018-08-01 18:19+0200\n" "PO-Revision-Date: 2018-08-02 18:35+0200\n"
"Last-Translator: <>\n" "Last-Translator: <>\n"
"Language-Team: \n" "Language-Team: \n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
@ -28,6 +28,11 @@ msgstr "* L'état \"Brouillon\" est utilisé lorsqu'un utilisateur est en train
"* L'état 'Payé' est affecté automatiquement lorsque la facture est payée. Les écritures correspondantes dans les journaux peuvent ou non être lettrées.\n" "* L'état 'Payé' est affecté automatiquement lorsque la facture est payée. Les écritures correspondantes dans les journaux peuvent ou non être lettrées.\n"
"* L'état \"Annulé\" est utilisé lorsque l'utilisateur annule la facture." "* L'état \"Annulé\" est utilisé lorsque l'utilisateur annule la facture."
#. module: golem_activity_registration_payment
#: model:ir.ui.view,arch_db:golem_activity_registration_payment.golem_member_card_template_inherit_golem_activity_resgitration_payment
msgid "<span style=\"padding-right: 5px;\">Total</span>"
msgstr "<span style=\"padding-right: 5px;\">Total</span>"
#. module: golem_activity_registration_payment #. module: golem_activity_registration_payment
#: model:ir.ui.view,arch_db:golem_activity_registration_payment.golem_activity_registration_invoicing_view_form #: model:ir.ui.view,arch_db:golem_activity_registration_payment.golem_activity_registration_invoicing_view_form
msgid "Activities and Prices" msgid "Activities and Prices"
@ -41,6 +46,7 @@ msgstr "Toutes les inscriptions confirmées ont déjà été facturées."
#. module: golem_activity_registration_payment #. module: golem_activity_registration_payment
#: model:ir.model.fields,field_description:golem_activity_registration_payment.field_golem_activity_registration_invoice_line_price #: model:ir.model.fields,field_description:golem_activity_registration_payment.field_golem_activity_registration_invoice_line_price
#: model:ir.ui.view,arch_db:golem_activity_registration_payment.golem_member_card_template_inherit_golem_activity_resgitration_payment
msgid "Amount" msgid "Amount"
msgstr "Montant" msgstr "Montant"
@ -81,6 +87,11 @@ msgstr "Créé le"
msgid "Currency" msgid "Currency"
msgstr "Devise" msgstr "Devise"
#. module: golem_activity_registration_payment
#: model:ir.ui.view,arch_db:golem_activity_registration_payment.golem_member_card_template_inherit_golem_activity_resgitration_payment
msgid "Date"
msgstr "Date "
#. module: golem_activity_registration_payment #. module: golem_activity_registration_payment
#: model:ir.ui.view,arch_db:golem_activity_registration_payment.golem_activity_registration_invoicing_view_form #: model:ir.ui.view,arch_db:golem_activity_registration_payment.golem_activity_registration_invoicing_view_form
msgid "Display invoice" msgid "Display invoice"
@ -94,7 +105,7 @@ msgstr "Afficher les paiements"
#. module: golem_activity_registration_payment #. module: golem_activity_registration_payment
#: model:ir.ui.view,arch_db:golem_activity_registration_payment.golem_activity_registration_search_inherit_payment #: model:ir.ui.view,arch_db:golem_activity_registration_payment.golem_activity_registration_search_inherit_payment
msgid "Draft Invoice" msgid "Draft Invoice"
msgstr "Facture Brouillon" msgstr "Facture brouillon"
#. module: golem_activity_registration_payment #. module: golem_activity_registration_payment
#: model:ir.model,name:golem_activity_registration_payment.model_golem_activity_registration #: model:ir.model,name:golem_activity_registration_payment.model_golem_activity_registration
@ -146,6 +157,7 @@ msgstr "Si vous lancez la facturation des inscriptions en attente, un assistant
#. module: golem_activity_registration_payment #. module: golem_activity_registration_payment
#: model:ir.ui.view,arch_db:golem_activity_registration_payment.golem_activity_registration_form_inherit_payment #: model:ir.ui.view,arch_db:golem_activity_registration_payment.golem_activity_registration_form_inherit_payment
#: model:ir.ui.view,arch_db:golem_activity_registration_payment.golem_activity_registration_search_inherit_payment #: model:ir.ui.view,arch_db:golem_activity_registration_payment.golem_activity_registration_search_inherit_payment
#: model:ir.ui.view,arch_db:golem_activity_registration_payment.golem_member_card_template_inherit_golem_activity_resgitration_payment
msgid "Invoice" msgid "Invoice"
msgstr "Facture" msgstr "Facture"
@ -159,6 +171,11 @@ msgstr "Référence de la facture"
msgid "Invoice line" msgid "Invoice line"
msgstr "Ligne de facturation" msgstr "Ligne de facturation"
#. module: golem_activity_registration_payment
#: model:ir.ui.view,arch_db:golem_activity_registration_payment.golem_activity_registration_state_member_card_template_inherit_golem_activity_resgitration_payment
msgid "Invoice line price"
msgstr "Montant facturé"
#. module: golem_activity_registration_payment #. module: golem_activity_registration_payment
#: model:ir.ui.view,arch_db:golem_activity_registration_payment.golem_registration_state_member_form_inherit_registration_payment #: model:ir.ui.view,arch_db:golem_activity_registration_payment.golem_registration_state_member_form_inherit_registration_payment
msgid "Invoice pending registrations" msgid "Invoice pending registrations"
@ -167,7 +184,12 @@ msgstr "Inscriptions en attente de facturation"
#. module: golem_activity_registration_payment #. module: golem_activity_registration_payment
#: model:ir.ui.view,arch_db:golem_activity_registration_payment.golem_activity_registration_state_tree_inherit_payment #: model:ir.ui.view,arch_db:golem_activity_registration_payment.golem_activity_registration_state_tree_inherit_payment
msgid "Invoice state" msgid "Invoice state"
msgstr "Invoice state" msgstr "État de facturation"
#. module: golem_activity_registration_payment
#: model:ir.ui.view,arch_db:golem_activity_registration_payment.golem_member_card_template_inherit_golem_activity_resgitration_payment
msgid "Invoices"
msgstr "Factures"
#. module: golem_activity_registration_payment #. module: golem_activity_registration_payment
#: model:ir.ui.view,arch_db:golem_activity_registration_payment.golem_activity_registration_form_inherit_payment #: model:ir.ui.view,arch_db:golem_activity_registration_payment.golem_activity_registration_form_inherit_payment
@ -186,6 +208,11 @@ msgstr "Dernière mise à jour par"
msgid "Last Updated on" msgid "Last Updated on"
msgstr "Dernière mise à jour le" msgstr "Dernière mise à jour le"
#. module: golem_activity_registration_payment
#: model:ir.ui.view,arch_db:golem_activity_registration_payment.golem_member_card_template_inherit_golem_activity_resgitration_payment
msgid "Method"
msgstr "Moyen"
#. module: golem_activity_registration_payment #. module: golem_activity_registration_payment
#: model:ir.ui.view,arch_db:golem_activity_registration_payment.golem_activity_registration_search_inherit_payment #: model:ir.ui.view,arch_db:golem_activity_registration_payment.golem_activity_registration_search_inherit_payment
msgid "Opened Invoice" msgid "Opened Invoice"
@ -201,6 +228,11 @@ msgstr "Facture Payée"
msgid "Payment method" msgid "Payment method"
msgstr "Moyen de paiement" msgstr "Moyen de paiement"
#. module: golem_activity_registration_payment
#: model:ir.ui.view,arch_db:golem_activity_registration_payment.golem_member_card_template_inherit_golem_activity_resgitration_payment
msgid "Payments"
msgstr "Paiements"
#. module: golem_activity_registration_payment #. module: golem_activity_registration_payment
#: model:ir.ui.view,arch_db:golem_activity_registration_payment.golem_activity_registration_invoicing_view_form #: model:ir.ui.view,arch_db:golem_activity_registration_payment.golem_activity_registration_invoicing_view_form
msgid "Please confirm activity prices and choose a payment schedule if needed." msgid "Please confirm activity prices and choose a payment schedule if needed."
@ -213,6 +245,16 @@ msgstr "Merci de confirmer les coûts des activités et de choisir, si souhaité
msgid "Registration invoicing" msgid "Registration invoicing"
msgstr "Facturation des inscriptions" msgstr "Facturation des inscriptions"
#. module: golem_activity_registration_payment
#: model:ir.ui.view,arch_db:golem_activity_registration_payment.golem_member_card_template_inherit_golem_activity_resgitration_payment
msgid "Residual"
msgstr "Restant"
#. module: golem_activity_registration_payment
#: model:ir.ui.view,arch_db:golem_activity_registration_payment.golem_member_card_template_inherit_golem_activity_resgitration_payment
msgid "State"
msgstr "État"
#. module: golem_activity_registration_payment #. module: golem_activity_registration_payment
#: model:ir.model.fields,field_description:golem_activity_registration_payment.field_golem_activity_registration_invoice_state #: model:ir.model.fields,field_description:golem_activity_registration_payment.field_golem_activity_registration_invoice_state
msgid "Status" msgid "Status"

View File

@ -6,8 +6,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Odoo Server 10.0\n" "Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-08-01 16:18+0000\n" "POT-Creation-Date: 2018-08-02 16:31+0000\n"
"PO-Revision-Date: 2018-08-01 16:18+0000\n" "PO-Revision-Date: 2018-08-02 16:31+0000\n"
"Last-Translator: <>\n" "Last-Translator: <>\n"
"Language-Team: \n" "Language-Team: \n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
@ -24,6 +24,11 @@ msgid " * The 'Draft' status is used when a user is encoding a new and unconfirm
" * The 'Cancelled' status is used when user cancel invoice." " * The 'Cancelled' status is used when user cancel invoice."
msgstr "" msgstr ""
#. module: golem_activity_registration_payment
#: model:ir.ui.view,arch_db:golem_activity_registration_payment.golem_member_card_template_inherit_golem_activity_resgitration_payment
msgid "<span style=\"padding-right: 5px;\">Total</span>"
msgstr ""
#. module: golem_activity_registration_payment #. module: golem_activity_registration_payment
#: model:ir.ui.view,arch_db:golem_activity_registration_payment.golem_activity_registration_invoicing_view_form #: model:ir.ui.view,arch_db:golem_activity_registration_payment.golem_activity_registration_invoicing_view_form
msgid "Activities and Prices" msgid "Activities and Prices"
@ -37,6 +42,7 @@ msgstr ""
#. module: golem_activity_registration_payment #. module: golem_activity_registration_payment
#: model:ir.model.fields,field_description:golem_activity_registration_payment.field_golem_activity_registration_invoice_line_price #: model:ir.model.fields,field_description:golem_activity_registration_payment.field_golem_activity_registration_invoice_line_price
#: model:ir.ui.view,arch_db:golem_activity_registration_payment.golem_member_card_template_inherit_golem_activity_resgitration_payment
msgid "Amount" msgid "Amount"
msgstr "" msgstr ""
@ -77,6 +83,11 @@ msgstr ""
msgid "Currency" msgid "Currency"
msgstr "" msgstr ""
#. module: golem_activity_registration_payment
#: model:ir.ui.view,arch_db:golem_activity_registration_payment.golem_member_card_template_inherit_golem_activity_resgitration_payment
msgid "Date"
msgstr ""
#. module: golem_activity_registration_payment #. module: golem_activity_registration_payment
#: model:ir.ui.view,arch_db:golem_activity_registration_payment.golem_activity_registration_invoicing_view_form #: model:ir.ui.view,arch_db:golem_activity_registration_payment.golem_activity_registration_invoicing_view_form
msgid "Display invoice" msgid "Display invoice"
@ -142,6 +153,7 @@ msgstr ""
#. module: golem_activity_registration_payment #. module: golem_activity_registration_payment
#: model:ir.ui.view,arch_db:golem_activity_registration_payment.golem_activity_registration_form_inherit_payment #: model:ir.ui.view,arch_db:golem_activity_registration_payment.golem_activity_registration_form_inherit_payment
#: model:ir.ui.view,arch_db:golem_activity_registration_payment.golem_activity_registration_search_inherit_payment #: model:ir.ui.view,arch_db:golem_activity_registration_payment.golem_activity_registration_search_inherit_payment
#: model:ir.ui.view,arch_db:golem_activity_registration_payment.golem_member_card_template_inherit_golem_activity_resgitration_payment
msgid "Invoice" msgid "Invoice"
msgstr "" msgstr ""
@ -155,6 +167,11 @@ msgstr ""
msgid "Invoice line" msgid "Invoice line"
msgstr "" msgstr ""
#. module: golem_activity_registration_payment
#: model:ir.ui.view,arch_db:golem_activity_registration_payment.golem_activity_registration_state_member_card_template_inherit_golem_activity_resgitration_payment
msgid "Invoice line price"
msgstr ""
#. module: golem_activity_registration_payment #. module: golem_activity_registration_payment
#: model:ir.ui.view,arch_db:golem_activity_registration_payment.golem_registration_state_member_form_inherit_registration_payment #: model:ir.ui.view,arch_db:golem_activity_registration_payment.golem_registration_state_member_form_inherit_registration_payment
msgid "Invoice pending registrations" msgid "Invoice pending registrations"
@ -165,6 +182,11 @@ msgstr ""
msgid "Invoice state" msgid "Invoice state"
msgstr "" msgstr ""
#. module: golem_activity_registration_payment
#: model:ir.ui.view,arch_db:golem_activity_registration_payment.golem_member_card_template_inherit_golem_activity_resgitration_payment
msgid "Invoices"
msgstr ""
#. module: golem_activity_registration_payment #. module: golem_activity_registration_payment
#: model:ir.ui.view,arch_db:golem_activity_registration_payment.golem_activity_registration_form_inherit_payment #: model:ir.ui.view,arch_db:golem_activity_registration_payment.golem_activity_registration_form_inherit_payment
msgid "Invoicing" msgid "Invoicing"
@ -182,6 +204,11 @@ msgstr ""
msgid "Last Updated on" msgid "Last Updated on"
msgstr "" msgstr ""
#. module: golem_activity_registration_payment
#: model:ir.ui.view,arch_db:golem_activity_registration_payment.golem_member_card_template_inherit_golem_activity_resgitration_payment
msgid "Method"
msgstr ""
#. module: golem_activity_registration_payment #. module: golem_activity_registration_payment
#: model:ir.ui.view,arch_db:golem_activity_registration_payment.golem_activity_registration_search_inherit_payment #: model:ir.ui.view,arch_db:golem_activity_registration_payment.golem_activity_registration_search_inherit_payment
msgid "Opened Invoice" msgid "Opened Invoice"
@ -197,6 +224,11 @@ msgstr ""
msgid "Payment method" msgid "Payment method"
msgstr "" msgstr ""
#. module: golem_activity_registration_payment
#: model:ir.ui.view,arch_db:golem_activity_registration_payment.golem_member_card_template_inherit_golem_activity_resgitration_payment
msgid "Payments"
msgstr ""
#. module: golem_activity_registration_payment #. module: golem_activity_registration_payment
#: model:ir.ui.view,arch_db:golem_activity_registration_payment.golem_activity_registration_invoicing_view_form #: model:ir.ui.view,arch_db:golem_activity_registration_payment.golem_activity_registration_invoicing_view_form
msgid "Please confirm activity prices and choose a payment schedule if needed." msgid "Please confirm activity prices and choose a payment schedule if needed."
@ -209,6 +241,16 @@ msgstr ""
msgid "Registration invoicing" msgid "Registration invoicing"
msgstr "" msgstr ""
#. module: golem_activity_registration_payment
#: model:ir.ui.view,arch_db:golem_activity_registration_payment.golem_member_card_template_inherit_golem_activity_resgitration_payment
msgid "Residual"
msgstr ""
#. module: golem_activity_registration_payment
#: model:ir.ui.view,arch_db:golem_activity_registration_payment.golem_member_card_template_inherit_golem_activity_resgitration_payment
msgid "State"
msgstr ""
#. module: golem_activity_registration_payment #. module: golem_activity_registration_payment
#: model:ir.model.fields,field_description:golem_activity_registration_payment.field_golem_activity_registration_invoice_state #: model:ir.model.fields,field_description:golem_activity_registration_payment.field_golem_activity_registration_invoice_state
msgid "Status" msgid "Status"

View File

@ -0,0 +1,138 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2018 Fabien Bourgeois <fabien@yaltik.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<odoo>
<template id="golem_activity_registration_state_member_card_template_inherit_golem_activity_resgitration_payment"
inherit_id="golem_activity_registration_state.golem_member_card_template_inherit_golem_activity_resgitration_state">
<xpath expr="//table[@id='table_activity_ref']/thead/tr[1]" position="inside">
<th class="text-right">Invoice line price</th>
</xpath>
<xpath expr="//table[@id='table_activity_ref']/tbody/tr[1]" position="inside">
<td class="text-right">
<span t-field="reg.invoice_line_price"
t-field-options="{'widget': 'monetary', 'display_currency': reg.currency_id}"/>
</td>
</xpath>
</template>
<template id="golem_member_card_template_inherit_golem_activity_resgitration_payment"
inherit_id="golem_member.golem_member_card_template">
<xpath expr="//table[@id='table_activity_ref']/tbody" position="before">
<tfoot>
<tr>
<td class="text-right" colspan="8">
<strong>
<span style="padding-right: 5px;">Total</span>
<span t-esc="sum(member.activity_registration_ids.mapped('invoice_line_id.price_subtotal'))"
t-esc-options="{'widget': 'monetary', 'display_currency': member.currency_id}" />
</strong>
</td>
</tr>
</tfoot>
</xpath>
<xpath expr="//div[@id='page_report_member']" position="inside">
<!-- <p style="page-break-before:always;"> </p> -->
<div id="page_report_invoicing" class="row">
<h3>Invoices</h3>
<table id="table_activity_ref" class="table table-striped">
<thead>
<tr>
<th>Invoice</th>
<th>Date</th>
<th>State</th>
<th class="text-right">Amount</th>
<th class="text-right">Residual</th>
</tr>
</thead>
<tfoot>
<tr>
<td class="text-right" colspan="5">
<strong>
<span style="padding-right: 5px;">Total</span>
<span t-esc="sum(member.activity_registration_ids.mapped('invoice_line_id.invoice_id.amount_total'))"
t-esc-options="{'widget': 'monetary', 'display_currency': member.currency_id}" />
</strong>
</td>
</tr>
</tfoot>
<tbody>
<tr t-foreach="member.activity_registration_ids.mapped('invoice_line_id.invoice_id')" t-as="inv">
<td>
<span t-field="inv.display_name" />
</td>
<td>
<span t-field="inv.date_invoice" />
</td>
<td>
<span t-field="inv.state" />
</td>
<td class="text-right">
<span t-field="inv.amount_total" />
</td>
<td class="text-right">
<span t-field="inv.residual" />
</td>
</tr>
</tbody>
</table>
<h3>Payments</h3>
<table id="table_activity_ref" class="table table-striped">
<thead>
<tr>
<th>Date</th>
<th>Method</th>
<th>State</th>
<th class="text-right">Amount</th>
</tr>
</thead>
<t t-set="invoices" t-value="member.activity_registration_ids.mapped('invoice_line_id.invoice_id')" />
<tfoot>
<tr>
<td class="text-right" colspan="5">
<strong>
<span style="padding-right: 5px;">Total</span>
<span t-esc="sum(invoices.mapped('payment_ids.amount'))"
t-esc-options="{'widget': 'monetary', 'display_currency': member.currency_id}" />
</strong>
</td>
</tr>
</tfoot>
<tbody>
<tr t-foreach="invoices.mapped('payment_ids')" t-as="payment">
<td>
<span t-field="payment.payment_date" />
</td>
<td>
<span t-field="payment.journal_id.name" />
</td>
<td>
<span t-field="payment.state" />
</td>
<td class="text-right">
<span t-field="payment.amount" />
</td>
</tr>
</tbody>
</table>
</div>
</xpath>
</template>
</odoo>