[ADD]GOLEM Activity Registration : invoicing, payment wizard

* Add invoicing information on registration ;
* Enhance payment wizard by better naming journal.
This commit is contained in:
Fabien BOURGEOIS 2018-08-01 18:14:45 +02:00
parent 6e778399ef
commit 7b022c6623
6 changed files with 94 additions and 8 deletions

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:10+0000\n"
"PO-Revision-Date: 2018-08-01 16:15+0200\n"
"POT-Creation-Date: 2018-08-01 16:18+0000\n"
"PO-Revision-Date: 2018-08-01 18:19+0200\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@ -39,6 +39,11 @@ msgstr "Activités et tarifs"
msgid "All confirmed registrations had already been invoiced."
msgstr "Toutes les inscriptions confirmées ont déjà été facturées."
#. module: golem_activity_registration_payment
#: model:ir.model.fields,field_description:golem_activity_registration_payment.field_golem_activity_registration_invoice_line_price
msgid "Amount"
msgstr "Montant"
#. module: golem_activity_registration_payment
#: model:ir.ui.view,arch_db:golem_activity_registration_payment.golem_activity_registration_search_inherit_payment
msgid "By invoice state"
@ -71,6 +76,11 @@ msgstr "Créé par"
msgid "Created on"
msgstr "Créé le"
#. module: golem_activity_registration_payment
#: model:ir.model.fields,field_description:golem_activity_registration_payment.field_golem_activity_registration_currency_id
msgid "Currency"
msgstr "Devise"
#. module: golem_activity_registration_payment
#: model:ir.ui.view,arch_db:golem_activity_registration_payment.golem_activity_registration_invoicing_view_form
msgid "Display invoice"
@ -123,11 +133,22 @@ msgstr "Paiements générés"
msgid "Has invoicable registrations ?"
msgstr "A des inscriptions à facturer ?"
#. module: golem_activity_registration_payment
#: model:ir.ui.view,arch_db:golem_activity_registration_payment.golem_activity_registration_invoicing_view_form
msgid "If the service user wants to pay with several payment methods, please validate with the main one, go to the payments and change journal on those needed."
msgstr "Si l'usager souhaite payer avec différents modes de paiement, merci de valider en sélectionnant le moyen principal, puis affichez les paiements et modifiez ceux impactés."
#. module: golem_activity_registration_payment
#: model:ir.ui.view,arch_db:golem_activity_registration_payment.golem_registration_state_member_form_inherit_registration_payment
msgid "If you confirmed registrations not already invoiced, you'll get a wizard to assist you for invoice creation."
msgstr "Si vous lancez la facturation des inscriptions en attente, un assistant vous proposera de créer une facture."
#. 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_search_inherit_payment
msgid "Invoice"
msgstr "Facture"
#. module: golem_activity_registration_payment
#: model:ir.model.fields,field_description:golem_activity_registration_payment.field_golem_activity_registration_invoice_id
msgid "Invoice Reference"
@ -148,6 +169,11 @@ msgstr "Inscriptions en attente de facturation"
msgid "Invoice state"
msgstr "Invoice state"
#. module: golem_activity_registration_payment
#: model:ir.ui.view,arch_db:golem_activity_registration_payment.golem_activity_registration_form_inherit_payment
msgid "Invoicing"
msgstr "Facturation"
#. module: golem_activity_registration_payment
#: model:ir.model.fields,field_description:golem_activity_registration_payment.field_golem_activity_registration_invoicing_line_write_uid
#: model:ir.model.fields,field_description:golem_activity_registration_payment.field_golem_activity_registration_invoicing_write_uid
@ -170,6 +196,11 @@ msgstr "Facture Ouverte"
msgid "Paid Invoice"
msgstr "Facture Payée"
#. module: golem_activity_registration_payment
#: model:ir.ui.view,arch_db:golem_activity_registration_payment.golem_activity_registration_invoicing_view_form
msgid "Payment method"
msgstr "Moyen de paiement"
#. module: golem_activity_registration_payment
#: 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."

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-01 16:18+0000\n"
"PO-Revision-Date: 2018-08-01 16:18+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@ -35,6 +35,11 @@ msgstr ""
msgid "All confirmed registrations had already been invoiced."
msgstr ""
#. module: golem_activity_registration_payment
#: model:ir.model.fields,field_description:golem_activity_registration_payment.field_golem_activity_registration_invoice_line_price
msgid "Amount"
msgstr ""
#. module: golem_activity_registration_payment
#: model:ir.ui.view,arch_db:golem_activity_registration_payment.golem_activity_registration_search_inherit_payment
msgid "By invoice state"
@ -67,6 +72,11 @@ msgstr ""
msgid "Created on"
msgstr ""
#. module: golem_activity_registration_payment
#: model:ir.model.fields,field_description:golem_activity_registration_payment.field_golem_activity_registration_currency_id
msgid "Currency"
msgstr ""
#. module: golem_activity_registration_payment
#: model:ir.ui.view,arch_db:golem_activity_registration_payment.golem_activity_registration_invoicing_view_form
msgid "Display invoice"
@ -119,11 +129,22 @@ msgstr ""
msgid "Has invoicable registrations ?"
msgstr ""
#. module: golem_activity_registration_payment
#: model:ir.ui.view,arch_db:golem_activity_registration_payment.golem_activity_registration_invoicing_view_form
msgid "If the service user wants to pay with several payment methods, please validate with the main one, go to the payments and change journal on those needed."
msgstr ""
#. module: golem_activity_registration_payment
#: model:ir.ui.view,arch_db:golem_activity_registration_payment.golem_registration_state_member_form_inherit_registration_payment
msgid "If you confirmed registrations not already invoiced, you'll get a wizard to assist you for invoice creation."
msgstr ""
#. 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_search_inherit_payment
msgid "Invoice"
msgstr ""
#. module: golem_activity_registration_payment
#: model:ir.model.fields,field_description:golem_activity_registration_payment.field_golem_activity_registration_invoice_id
msgid "Invoice Reference"
@ -144,6 +165,11 @@ msgstr ""
msgid "Invoice state"
msgstr ""
#. module: golem_activity_registration_payment
#: model:ir.ui.view,arch_db:golem_activity_registration_payment.golem_activity_registration_form_inherit_payment
msgid "Invoicing"
msgstr ""
#. module: golem_activity_registration_payment
#: model:ir.model.fields,field_description:golem_activity_registration_payment.field_golem_activity_registration_invoicing_line_write_uid
#: model:ir.model.fields,field_description:golem_activity_registration_payment.field_golem_activity_registration_invoicing_write_uid
@ -166,6 +192,11 @@ msgstr ""
msgid "Paid Invoice"
msgstr ""
#. module: golem_activity_registration_payment
#: model:ir.ui.view,arch_db:golem_activity_registration_payment.golem_activity_registration_invoicing_view_form
msgid "Payment method"
msgstr ""
#. module: golem_activity_registration_payment
#: 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."

View File

@ -26,6 +26,8 @@ class GolemActivityRegistration(models.Model):
invoice_line_id = fields.Many2one('account.invoice.line',
string='Invoice line',
ondelete='set null')
currency_id = fields.Many2one(related='invoice_line_id.currency_id')
invoice_line_price = fields.Monetary(related='invoice_line_id.price_subtotal')
invoice_id = fields.Many2one(related='invoice_line_id.invoice_id')
invoice_state = fields.Selection(related='invoice_line_id.invoice_id.state',
store=True)

View File

@ -18,6 +18,26 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<odoo>
<data>
<!-- Form -->
<record id="golem_activity_registration_form_inherit_payment"
model="ir.ui.view">
<field name="name">Activity Registration form adaptations</field>
<field name="model">golem.activity.registration</field>
<field name="inherit_id"
ref="golem_activity_registration.golem_activity_registration_form" />
<field name="arch" type="xml">
<group name="subscription" position="after">
<group name="invoicing" string="Invoicing">
<field name="invoice_line_id" invisible="1" />
<field name="currency_id" invisible="1" />
<field name="invoice_line_price" readonly="1" />
<field name="invoice_state" />
<field name="invoice_id" string="Invoice" />
</group>
</group>
</field>
</record>
<!-- Tree -->
<record id="golem_activity_registration_state_tree_inherit_payment" model="ir.ui.view">
<field name="name">Activity Registration State Tree adaptations</field>
@ -40,7 +60,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
ref="golem_activity_registration_state.golem_activity_registration_search_inherit_state" />
<field name="arch" type="xml">
<field name="activity_id" position="after">
<field name="invoice_id" />
<field name="invoice_id" string="Invoice" />
</field>
<filter name="state_canceled" position="after">
<separator />

View File

@ -54,7 +54,7 @@ class GolemActivityRegistrationInvoicing(models.TransientModel):
help='If no schedule is selected, only the '
'invoice will be create. Otherwise, draft '
'payments will be generated.')
journal_id = fields.Many2one('account.journal', 'Journal',
journal_id = fields.Many2one('account.journal', string='Payment method',
domain=[('type', 'in', ('bank', 'cash'))],
ondelete='cascade')
invoice_id = fields.Many2one('account.invoice', string='Generated invoice',

View File

@ -39,11 +39,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<field name="price" sum="Total" />
</tree>
</field>
<field name="schedule_id" />
<field name="journal_id"
<field name="schedule_id" context="{'default_season_id': season_id}" />
<field name="journal_id" string="Payment method"
options="{'no_create': True}"
attrs="{'invisible': [('schedule_id', '=', False)],
'required': [('schedule_id', '!=', False)]}" />
</group>
<p states="init">If the service user wants to pay with several payment methods, please validate with the main one, go to the payments and change journal on those needed.</p>
<p states="final">
Congratulations, activities had been confirmed and invoiced.
</p>