[ADD]GOLEM Activity Registration State : state on member card report

This commit is contained in:
Fabien BOURGEOIS 2018-08-02 18:34:02 +02:00
parent cce4cbccfc
commit cd4c0fc872
6 changed files with 54 additions and 157 deletions

View File

@ -19,7 +19,7 @@
'name': 'GOLEM Activity Session Member Registrations States',
'summary': 'GOLEM Activities Session Member Registration states',
'description': 'GOLEM Activities Session Member Registration states',
'version': '10.0.2.1.0',
'version': '10.0.2.2.0',
'category': 'GOLEM',
'author': 'Fabien Bourgeois',
'license': 'AGPL-3',
@ -27,5 +27,6 @@
'installable': True,
'depends': ['golem_activity_registration', 'golem_payment'],
'data': ['views/golem_activity_registration_views.xml',
'views/golem_member_views.xml']
'views/golem_member_views.xml',
'report/golem_member_card_templates.xml']
}

View File

@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-08-01 14:09+0000\n"
"PO-Revision-Date: 2018-08-01 16:13+0200\n"
"POT-Creation-Date: 2018-08-02 16:31+0000\n"
"PO-Revision-Date: 2018-08-02 18:33+0200\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@ -124,11 +124,6 @@ msgstr "If you validate draft registrations, they will be seen as confirmed."
msgid "Invoicing id"
msgstr "Invoicing id"
#. module: golem_activity_registration_state
#: model:ir.model.fields,field_description:golem_activity_registration_state.field_golem_activity_registration_invoicing_journal_id
msgid "Journal"
msgstr "Journal"
#. module: golem_activity_registration_state
#: model:ir.model.fields,field_description:golem_activity_registration_state.field_golem_activity_registration_invoicing___last_update
#: model:ir.model.fields,field_description:golem_activity_registration_state.field_golem_activity_registration_invoicing_line___last_update
@ -145,6 +140,11 @@ msgstr "Adhérent"
msgid "Note that you can't register activities if the member is new and not yet saved into the database."
msgstr "Notez que vous ne devez d'abord enregistrer la fiche d'un nouvel adhérent avant de pouvoir saisie ses activités."
#. module: golem_activity_registration_state
#: model:ir.model.fields,field_description:golem_activity_registration_state.field_golem_activity_registration_invoicing_journal_id
msgid "Payment method"
msgstr "Moyen"
#. module: golem_activity_registration_state
#: model:ir.model.fields,field_description:golem_activity_registration_state.field_golem_activity_registration_invoicing_schedule_id
msgid "Payment schedule"
@ -178,6 +178,7 @@ msgstr "Saison"
#. module: golem_activity_registration_state
#: model:ir.model.fields,field_description:golem_activity_registration_state.field_golem_activity_registration_invoicing_state
#: model:ir.model.fields,field_description:golem_activity_registration_state.field_golem_activity_registration_state
#: model:ir.ui.view,arch_db:golem_activity_registration_state.golem_member_card_template_inherit_golem_activity_resgitration_state
msgid "State"
msgstr "État"

View File

@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-08-01 14:09+0000\n"
"PO-Revision-Date: 2018-08-01 14:09+0000\n"
"POT-Creation-Date: 2018-08-02 16:31+0000\n"
"PO-Revision-Date: 2018-08-02 16:31+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@ -124,11 +124,6 @@ msgstr ""
msgid "Invoicing id"
msgstr ""
#. module: golem_activity_registration_state
#: model:ir.model.fields,field_description:golem_activity_registration_state.field_golem_activity_registration_invoicing_journal_id
msgid "Journal"
msgstr ""
#. module: golem_activity_registration_state
#: model:ir.model.fields,field_description:golem_activity_registration_state.field_golem_activity_registration_invoicing___last_update
#: model:ir.model.fields,field_description:golem_activity_registration_state.field_golem_activity_registration_invoicing_line___last_update
@ -145,6 +140,11 @@ msgstr ""
msgid "Note that you can't register activities if the member is new and not yet saved into the database."
msgstr ""
#. module: golem_activity_registration_state
#: model:ir.model.fields,field_description:golem_activity_registration_state.field_golem_activity_registration_invoicing_journal_id
msgid "Payment method"
msgstr ""
#. module: golem_activity_registration_state
#: model:ir.model.fields,field_description:golem_activity_registration_state.field_golem_activity_registration_invoicing_schedule_id
msgid "Payment schedule"
@ -178,6 +178,7 @@ msgstr ""
#. module: golem_activity_registration_state
#: model:ir.model.fields,field_description:golem_activity_registration_state.field_golem_activity_registration_invoicing_state
#: model:ir.model.fields,field_description:golem_activity_registration_state.field_golem_activity_registration_state
#: model:ir.ui.view,arch_db:golem_activity_registration_state.golem_member_card_template_inherit_golem_activity_resgitration_state
msgid "State"
msgstr ""

View File

@ -1,19 +0,0 @@
# -*- coding: utf-8 -*-
# Copyright 2016 Fabien Bourgeois <fabien@yaltik.com>
# Copyright 2018 Michel Dessenne <michel@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/>.
from . import golem_activity_registration

View File

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2018 Fabien Bourgeois <fabien@yaltik.com>
Copyright 2018 Michel Dessenne <michel@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_member_card_template_inherit_golem_activity_resgitration_state"
inherit_id="golem_member.golem_member_card_template">
<xpath expr="//table[@id='table_activity_ref']/thead/tr[1]" position="inside">
<th>State</th>
</xpath>
<xpath expr="//table[@id='table_activity_ref']/tbody/tr[1]" position="inside">
<td>
<span t-field="reg.state"/>
</td>
</xpath>
</template>
</odoo>

View File

@ -1,122 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2017 Fabien Bourgeois <fabien@yaltik.com>
Copyright 2018 Michel Dessenne <michel@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="activity" inherit_id="golem_member.report_golem_member_template">
<xpath expr="//th[@id='activity_inherit_th']" position="after">
<th>State</th>
<th>Price</th>
</xpath>
<xpath expr="//td[@id='activity_inherit_td']" position="after">
<td class="col-xs-2">
<span t-field="t.state" />
</td>
<td class="col-xs-2">
<span t-field="t.activity_price" t-field-options="{'widget': 'monetary',
'display_currency': o.currency_id}"/>
</td>
</xpath>
<xpath expr="//tr[@id='activity_inherit_price_sum']" position="before">
<t t-set="price_sum" t-value="0"/>
</xpath>
<xpath expr="//tr[@id='activity_inherit_price_sum']" position="inside">
<t t-set="price_sum" t-value="price_sum + t.activity_price"/>
</xpath>
<xpath expr="//tr[@id='activity_inherit_total']" position="replace">
<tfoot>
<tr>
<td><td><td><td><td><td><td>
<td>
<strong>
TOTAL
</strong>
</td>
<td>
<t t-esc="price_sum"
t-esc-options="{'widget': 'monetary',
'display_currency': o.currency_id}"/>
</td>
</td></td></td></td></td></td></td>
</tr>
</tfoot>
</xpath>
<xpath expr="//table[@id='table_activity_ref']" position="after">
<table class="table table-striped">
<thead>
<strong>Invoices</strong>
<tr>
<th>Activity</th>
<th>Date</th>
<th>State</th>
<th>Amount</th>
</tr>
</thead>
<tbody>
<t t-foreach="docs" t-as="o">
<tr t-foreach="o.activity_registration_ids" t-as="l">
<td class="col-xs-3">
<spam t-field="l.invoice_line_id.product_id" />
</td>
<td class="col-xs-3">
<spam t-field="l.invoice_id.date_invoice" />
</td>
<td class="col-xs-3">
<spam t-field="l.invoice_id.state" />
</td>
<td class="col-xs-3">
<spam t-field="l.invoice_line_id.price_subtotal"
t-field-options="{'widget': 'monetary',
'display_currency': o.currency_id}"/>
</td>
</tr>
</t>
</tbody>
</table>
<table class="table table-striped" >
<thead>
<strong>Payments</strong>
<tr>
<th>Invoice number</th>
<th>State</th>
</tr>
</thead>
<tbody>
<t t-foreach="docs" t-as="o">
<tr t-foreach="o.activity_registration_ids" t-as="l">
<td class="col-xs-6">
<spam t-field="l.invoice_id.number" />
</td>
<td class="col-xs-6">
<p t-foreach="l.invoice_id.payment_ids" t-as = "i" >
<t t-if="i.state not in ['draft']">
<span t-esc="i.state" />
</t>
</p>
</td>
</tr>
</t>
</tbody>
</table>
</xpath>
</template>
</odoo>