diff --git a/website_payment_recurring_donations/__init__.py b/website_payment_recurring_donations/__init__.py old mode 100755 new mode 100644 diff --git a/website_payment_recurring_donations/__manifest__.py b/website_payment_recurring_donations/__manifest__.py old mode 100755 new mode 100644 index ea14704..c64b9df --- a/website_payment_recurring_donations/__manifest__.py +++ b/website_payment_recurring_donations/__manifest__.py @@ -3,6 +3,8 @@ { "name": "Recurring donations", "version": "16.0.1.0.0", + "author": "Onestein", + "website": "https://www.onestein.nl", "category": "Website", "license": "LGPL-3", "summary": "Recurring donations", diff --git a/website_payment_recurring_donations/controllers/__init__.py b/website_payment_recurring_donations/controllers/__init__.py old mode 100755 new mode 100644 diff --git a/website_payment_recurring_donations/controllers/portal.py b/website_payment_recurring_donations/controllers/portal.py old mode 100755 new mode 100644 diff --git a/website_payment_recurring_donations/data/donation_data.xml b/website_payment_recurring_donations/data/donation_data.xml old mode 100755 new mode 100644 diff --git a/website_payment_recurring_donations/i18n/nl.po b/website_payment_recurring_donations/i18n/nl.po old mode 100755 new mode 100644 diff --git a/website_payment_recurring_donations/models/__init__.py b/website_payment_recurring_donations/models/__init__.py old mode 100755 new mode 100644 diff --git a/website_payment_recurring_donations/models/payment_transaction.py b/website_payment_recurring_donations/models/payment_transaction.py old mode 100755 new mode 100644 index b960698..e003c4c --- a/website_payment_recurring_donations/models/payment_transaction.py +++ b/website_payment_recurring_donations/models/payment_transaction.py @@ -8,14 +8,12 @@ class PaymentTransaction(models.Model): _inherit = "payment.transaction" donation_frequency = fields.Selection( - [("onetime", "One Time"), ("monthly", "Monthly")], string="Donation Frequency" + [("onetime", "One Time"), ("monthly", "Monthly")] ) recurring_donation_provider_reference = fields.Char( "Provider Reference For Recurring Donation" ) - is_recurring_donation_terminated = fields.Boolean( - "Is Recurring Donation Terminated" - ) + is_recurring_donation_terminated = fields.Boolean() def _send_donation_email( self, is_internal_notification=False, comment=None, recipient_email=None diff --git a/website_payment_recurring_donations/static/src/js/website_payment_form.js b/website_payment_recurring_donations/static/src/js/website_payment_form.js deleted file mode 100755 index 6f6c20a..0000000 --- a/website_payment_recurring_donations/static/src/js/website_payment_form.js +++ /dev/null @@ -1,15 +0,0 @@ -/** @odoo-module **/ -/* Copyright 2023 Onestein - Anjeel Haria - * License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). */ - -import checkoutForm from 'payment.checkout_form'; - -checkoutForm.include({ - _prepareTransactionRouteParams: function (code, paymentOptionId, flow) { - const transactionRouteParams = this._super(...arguments); - return $('.o_donation_payment_form').length ? { - ...transactionRouteParams, - 'donation_frequency':this.$('input[name="donation_frequency"]:checked').val(), - } : transactionRouteParams; - }, -}); diff --git a/website_payment_recurring_donations/static/src/snippets/s_donation/000.js b/website_payment_recurring_donations/static/src/snippets/s_donation/000.js deleted file mode 100755 index 24008ad..0000000 --- a/website_payment_recurring_donations/static/src/snippets/s_donation/000.js +++ /dev/null @@ -1,18 +0,0 @@ -/** @odoo-module **/ -/* Copyright 2023 Onestein - Anjeel Haria - * License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). */ - -import publicWidget from 'web.public.widget'; -const DonationSnippet = publicWidget.registry.DonationSnippet; -DonationSnippet.include({ - events: _.extend({}, DonationSnippet.prototype.events, { - 'click .donation_frequency': '_onClickDonationFrequency', - }), - - _onClickDonationFrequency(ev){ - const $button = $(ev.currentTarget); - this.$('.donation_frequency').parent('label').removeClass('active'); - $button.parent('label').addClass('active'); - }, - -}); diff --git a/website_payment_recurring_donations/static/src/snippets/s_donation/000.scss b/website_payment_recurring_donations/static/src/snippets/s_donation/000.scss old mode 100755 new mode 100644 diff --git a/website_payment_recurring_donations/views/donation_templates.xml b/website_payment_recurring_donations/views/donation_templates.xml old mode 100755 new mode 100644 diff --git a/website_payment_recurring_donations/views/payment_transaction_view.xml b/website_payment_recurring_donations/views/payment_transaction_view.xml old mode 100755 new mode 100644 diff --git a/website_payment_recurring_donations/views/res_partner_view.xml b/website_payment_recurring_donations/views/res_partner_view.xml old mode 100755 new mode 100644 diff --git a/website_payment_recurring_donations/views/snippets/s_donation.xml b/website_payment_recurring_donations/views/snippets/s_donation.xml old mode 100755 new mode 100644 index 8e91fee..b2bcb8d --- a/website_payment_recurring_donations/views/snippets/s_donation.xml +++ b/website_payment_recurring_donations/views/snippets/s_donation.xml @@ -26,13 +26,13 @@ - + Donation 000 JS web.assets_frontend - website_payment_recurring_donations/static/src/snippets/s_donation/000.js + website_payment_recurring_donations/static/src/snippets/s_donation/000.esm.js - + Donation 000 SCSS web.assets_frontend website_payment_recurring_donations/static/src/snippets/s_donation/000.scss diff --git a/website_payment_recurring_donations_mollie/__init__.py b/website_payment_recurring_donations_mollie/__init__.py old mode 100755 new mode 100644 diff --git a/website_payment_recurring_donations_mollie/__manifest__.py b/website_payment_recurring_donations_mollie/__manifest__.py old mode 100755 new mode 100644 index fed0ddd..9857082 --- a/website_payment_recurring_donations_mollie/__manifest__.py +++ b/website_payment_recurring_donations_mollie/__manifest__.py @@ -3,6 +3,8 @@ { "name": "Recurring donations using Mollie Subscriptions", "version": "16.0.1.0.0", + "author": "Onestein", + "website": "https://www.onestein.nl", "category": "Website", "license": "LGPL-3", "summary": "Recurring donations using Mollie Subscriptions", diff --git a/website_payment_recurring_donations_mollie/i18n/nl.po b/website_payment_recurring_donations_mollie/i18n/nl.po old mode 100755 new mode 100644 index 5d899a5..dd4e23d --- a/website_payment_recurring_donations_mollie/i18n/nl.po +++ b/website_payment_recurring_donations_mollie/i18n/nl.po @@ -4,10 +4,10 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 15.0\n" +"Project-Id-Version: Odoo Server 16.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-09-22 13:53+0000\n" -"PO-Revision-Date: 2023-09-22 13:53+0000\n" +"POT-Creation-Date: 2024-04-22 07:13+0000\n" +"PO-Revision-Date: 2024-04-22 07:13+0000\n" "Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -16,18 +16,53 @@ msgstr "" "Plural-Forms: \n" #. module: website_payment_recurring_donations_mollie +#: model:ir.model,name:website_payment_recurring_donations_mollie.model_res_partner +msgid "Contact" +msgstr "" + +#. module: website_payment_recurring_donations_mollie +#: model:ir.model.fields,field_description:website_payment_recurring_donations_mollie.field_res_partner__mollie_customer_id +msgid "Mollie Customer ID" +msgstr "Mollie Klant ID" + +#. module: website_payment_recurring_donations_mollie +#. odoo-python +#: code:addons/website_payment_recurring_donations_mollie/models/payment_transaction.py:0 +#: code:addons/website_payment_recurring_donations_mollie/models/payment_transaction.py:0 +#, python-format +msgid "Mollie customer or subscription not found" +msgstr "Mollie klant of abonnement niet gevonden" + +#. module: website_payment_recurring_donations_mollie +#. odoo-python +#: code:addons/website_payment_recurring_donations_mollie/models/payment_transaction.py:0 #: code:addons/website_payment_recurring_donations_mollie/models/payment_transaction.py:0 #, python-format msgid "Mollie: canceled due to status: %s" msgstr "Mollie: geannuleerd vanwege status: %s" +#. module: website_payment_recurring_donations_mollie +#: model:ir.model,name:website_payment_recurring_donations_mollie.model_payment_provider +msgid "Payment Provider" +msgstr "Betaaldienstaanbieder" + #. module: website_payment_recurring_donations_mollie #: model:ir.model,name:website_payment_recurring_donations_mollie.model_payment_transaction msgid "Payment Transaction" msgstr "Betalingstransactie" #. module: website_payment_recurring_donations_mollie +#. odoo-python +#: code:addons/website_payment_recurring_donations_mollie/models/payment_transaction.py:0 #: code:addons/website_payment_recurring_donations_mollie/models/payment_transaction.py:0 #, python-format msgid "Received data with invalid payment status: %s" msgstr "Gegevens ontvangen met ongeldige betalingsstatus: %s" + +#. module: website_payment_recurring_donations_mollie +#. odoo-python +#: code:addons/website_payment_recurring_donations_mollie/models/payment_transaction.py:0 +#: code:addons/website_payment_recurring_donations_mollie/models/payment_transaction.py:0 +#, python-format +msgid "The recurring donation on mollie has been terminated on %s." +msgstr "The herhalende donatie via Mollie is gestopt op %s." diff --git a/website_payment_recurring_donations_mollie/models/__init__.py b/website_payment_recurring_donations_mollie/models/__init__.py old mode 100755 new mode 100644 diff --git a/website_payment_recurring_donations_mollie/models/payment_provider.py b/website_payment_recurring_donations_mollie/models/payment_provider.py old mode 100755 new mode 100644 diff --git a/website_payment_recurring_donations_mollie/models/payment_transaction.py b/website_payment_recurring_donations_mollie/models/payment_transaction.py old mode 100755 new mode 100644 index 6fbbb99..d2fa001 --- a/website_payment_recurring_donations_mollie/models/payment_transaction.py +++ b/website_payment_recurring_donations_mollie/models/payment_transaction.py @@ -170,10 +170,10 @@ def action_terminate_recurring_donation(self): subscription.get("canceledAt")[0:19], "%Y-%m-%dT%H:%M:%S" ) msg = _( - "The recurring donation on mollie has been terminated on %s" - % (canceled_date) + "The recurring donation on mollie has been terminated on %s.", + canceled_date, ) - self.sudo().message_post(body=msg) + self.sudo().message_post(body=f"{msg}") except Exception: _logger.info(_("Mollie customer or subscription not found")) # marking all related payment transactions for recurring donations having same provider reference as terminated. diff --git a/website_payment_recurring_donations_mollie/models/res_partner.py b/website_payment_recurring_donations_mollie/models/res_partner.py old mode 100755 new mode 100644 diff --git a/website_payment_recurring_donations_mollie/views/res_partner_view.xml b/website_payment_recurring_donations_mollie/views/res_partner_view.xml old mode 100755 new mode 100644