diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d223c5c..5e18d72 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -41,13 +41,13 @@ jobs: run: oca_init_test_database env: ADDONS_DIR: .,oca,third-party - EXCLUDE: mail_tracking,website_sale_subscription_restrict_cart,l10n_nl_rgs,l10n_nl_rgs_account_financial_report,l10n_nl_rgs_asset,l10n_nl_rgs_mis_report,connector_jira_servicedesk,connector_jira,account_statement_import_file_reconcile_oca,membership_subscription_prorate_variable_period,membership_subscription,membership_prorate,web_leaflet_technical,website_cache_control,account_reconcile_oca,membership_variable_period,base_user_role,account_invoice_constraint_chronology,queue_job,auth_signup_verify_email,base_municipality,argocd_capacity,membership_prorate_variable_period,argocd_website,l10n_nl_account_tax_unece,auditlog,product_contract,subscription_oca,account_banking_mandate_contact,account_banking_sepa_credit_transfer,hr_expense_remove_mobile_link,website_sale_analytics_matomo,mrp_multi_level,mrp_planned_order_matrix,mrp_warehouse_calendar,partner_country_default_nl,partner_external_map,base_menu_visibility_restriction,partner_firstname,password_security,contract,l10n_nl_tax_statement,l10n_nl_xaf_auditfile_export,mass_mailing_partner,mis_builder,website_local_font,helpdesk_mgmt,base_vat_optional_vies,mis_builder_budget + EXCLUDE: mail_tracking,website_sale_subscription_restrict_cart,l10n_nl_rgs,l10n_nl_rgs_account_financial_report,l10n_nl_rgs_asset,l10n_nl_rgs_mis_report,connector_jira_servicedesk,connector_jira,account_statement_import_file_reconcile_oca,membership_subscription_prorate_variable_period,membership_subscription,membership_prorate,web_leaflet_technical,website_cache_control,account_reconcile_oca,membership_variable_period,base_user_role,account_invoice_constraint_chronology,queue_job,auth_signup_verify_email,base_municipality,argocd_capacity,membership_prorate_variable_period,argocd_website,l10n_nl_account_tax_unece,auditlog,product_contract,subscription_oca,account_banking_mandate_contact,account_banking_sepa_credit_transfer,hr_expense_remove_mobile_link,website_sale_analytics_matomo,mrp_multi_level,mrp_planned_order_matrix,mrp_warehouse_calendar,partner_country_default_nl,partner_external_map,base_menu_visibility_restriction,partner_firstname,password_security,contract,l10n_nl_tax_statement,l10n_nl_xaf_auditfile_export,mass_mailing_partner,mis_builder,website_local_font,helpdesk_mgmt,base_vat_optional_vies,mis_builder_budget,nextcloud_odoo_sync ODOO_VERSION: "16.0" - name: Run tests run: oca_run_tests env: ADDONS_DIR: .,oca,third-party - EXCLUDE: mail_tracking,website_sale_subscription_restrict_cart,l10n_nl_rgs,l10n_nl_rgs_account_financial_report,l10n_nl_rgs_asset,l10n_nl_rgs_mis_report,connector_jira_servicedesk,connector_jira,account_statement_import_file_reconcile_oca,membership_subscription_prorate_variable_period,membership_subscription,membership_prorate,web_leaflet_technical,website_cache_control,account_reconcile_oca,membership_variable_period,base_user_role,account_invoice_constraint_chronology,queue_job,auth_signup_verify_email,base_municipality,argocd_capacity,membership_prorate_variable_period,argocd_website,l10n_nl_account_tax_unece,auditlog,product_contract,subscription_oca,account_banking_mandate_contact,account_banking_sepa_credit_transfer,hr_expense_remove_mobile_link,website_sale_analytics_matomo,mrp_multi_level,mrp_planned_order_matrix,mrp_warehouse_calendar,partner_country_default_nl,partner_external_map,base_menu_visibility_restriction,partner_firstname,password_security,contract,l10n_nl_tax_statement,l10n_nl_xaf_auditfile_export,mass_mailing_partner,mis_builder,website_local_font,helpdesk_mgmt,base_vat_optional_vies,mis_builder_budget + EXCLUDE: mail_tracking,website_sale_subscription_restrict_cart,l10n_nl_rgs,l10n_nl_rgs_account_financial_report,l10n_nl_rgs_asset,l10n_nl_rgs_mis_report,connector_jira_servicedesk,connector_jira,account_statement_import_file_reconcile_oca,membership_subscription_prorate_variable_period,membership_subscription,membership_prorate,web_leaflet_technical,website_cache_control,account_reconcile_oca,membership_variable_period,base_user_role,account_invoice_constraint_chronology,queue_job,auth_signup_verify_email,base_municipality,argocd_capacity,membership_prorate_variable_period,argocd_website,l10n_nl_account_tax_unece,auditlog,product_contract,subscription_oca,account_banking_mandate_contact,account_banking_sepa_credit_transfer,hr_expense_remove_mobile_link,website_sale_analytics_matomo,mrp_multi_level,mrp_planned_order_matrix,mrp_warehouse_calendar,partner_country_default_nl,partner_external_map,base_menu_visibility_restriction,partner_firstname,password_security,contract,l10n_nl_tax_statement,l10n_nl_xaf_auditfile_export,mass_mailing_partner,mis_builder,website_local_font,helpdesk_mgmt,base_vat_optional_vies,mis_builder_budget,nextcloud_odoo_sync ODOO_VERSION: "16.0" - name: Prepare report run: coverage xml -o coverage.xml --data-file .coverage diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e127082..c061545 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -18,8 +18,8 @@ exclude: | readme/.*\.(rst|md)$| # You don't usually want a bot to modify your legal texts (LICENSE.*|COPYING.*)| - # Emesa: prevent "not used from manifest" for indirectly loaded test data - custom/addons/([^/]+)/test_data/ + # Temporary modules + nextcloud_odoo_sync/ default_language_version: python: python3 node: "16.17.0" diff --git a/membership_prorate_variable_period/tests/test_membership_prorate_variable_period.py b/membership_prorate_variable_period/tests/test_membership_prorate_variable_period.py index 53ec9b2..0c164b0 100644 --- a/membership_prorate_variable_period/tests/test_membership_prorate_variable_period.py +++ b/membership_prorate_variable_period/tests/test_membership_prorate_variable_period.py @@ -63,7 +63,7 @@ def test_create_invoice_membership_product_prorate_fixed(self): def test_create_invoice_membership_product_prorate_week(self): invoice = self.create_invoice("2015-01-01") # It's thursday - self.assertAlmostEqual(invoice.invoice_line_ids[0].quantity, 0.43, 2) + self.assertAlmostEqual(invoice.invoice_line_ids[0].quantity, 0.57, 2) self.assertTrue(self.partner.member_lines) self.assertEqual(self.partner.member_lines[0].state, "waiting") self.assertEqual( @@ -77,7 +77,7 @@ def test_create_invoice_membership_product_prorate_week(self): def test_create_invoice_membership_product_prorate_month(self): self.product.membership_interval_unit = "months" invoice = self.create_invoice("2015-04-15") - self.assertAlmostEqual(invoice.invoice_line_ids[0].quantity, 0.5, 2) + self.assertAlmostEqual(invoice.invoice_line_ids[0].quantity, 0.53, 2) self.assertTrue(self.partner.member_lines) self.assertEqual(self.partner.member_lines[0].state, "waiting") self.assertEqual( 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.esm.js old mode 100755 new mode 100644 similarity index 92% rename from website_payment_recurring_donations/static/src/js/website_payment_form.js rename to website_payment_recurring_donations/static/src/js/website_payment_form.esm.js index 6f6c20a..771b909 --- a/website_payment_recurring_donations/static/src/js/website_payment_form.js +++ b/website_payment_recurring_donations/static/src/js/website_payment_form.esm.js @@ -5,6 +5,7 @@ import checkoutForm from 'payment.checkout_form'; checkoutForm.include({ + // eslint-disable-next-line no-unused-vars _prepareTransactionRouteParams: function (code, paymentOptionId, flow) { const transactionRouteParams = this._super(...arguments); return $('.o_donation_payment_form').length ? { 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.esm.js old mode 100755 new mode 100644 similarity index 100% rename from website_payment_recurring_donations/static/src/snippets/s_donation/000.js rename to website_payment_recurring_donations/static/src/snippets/s_donation/000.esm.js 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