Skip to content

Commit

Permalink
Merge branch '16.0' into PR-JournalSubtype-AllowedJournals
Browse files Browse the repository at this point in the history
  • Loading branch information
tarteo authored Apr 30, 2024
2 parents 84f65a6 + 0134f3e commit 5c82b25
Show file tree
Hide file tree
Showing 26 changed files with 57 additions and 19 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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(
Expand Down
Empty file modified website_payment_recurring_donations/__init__.py
100755 → 100644
Empty file.
2 changes: 2 additions & 0 deletions website_payment_recurring_donations/__manifest__.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Empty file modified website_payment_recurring_donations/controllers/__init__.py
100755 → 100644
Empty file.
Empty file modified website_payment_recurring_donations/controllers/portal.py
100755 → 100644
Empty file.
Empty file modified website_payment_recurring_donations/data/donation_data.xml
100755 → 100644
Empty file.
Empty file modified website_payment_recurring_donations/i18n/nl.po
100755 → 100644
Empty file.
Empty file modified website_payment_recurring_donations/models/__init__.py
100755 → 100644
Empty file.
6 changes: 2 additions & 4 deletions website_payment_recurring_donations/models/payment_transaction.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 ? {
Expand Down
File renamed without changes.
Empty file.
Empty file.
Empty file.
Empty file modified website_payment_recurring_donations/views/res_partner_view.xml
100755 → 100644
Empty file.
6 changes: 3 additions & 3 deletions website_payment_recurring_donations/views/snippets/s_donation.xml
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@
</xpath>
</template>

<record id="website_payment_recurring_donations.s_donation_000_js" model="ir.asset">
<record id="s_donation_000_js" model="ir.asset">
<field name="name">Donation 000 JS</field>
<field name="bundle">web.assets_frontend</field>
<field name="path">website_payment_recurring_donations/static/src/snippets/s_donation/000.js</field>
<field name="path">website_payment_recurring_donations/static/src/snippets/s_donation/000.esm.js</field>
</record>

<record id="website_payment_recurring_donations.s_donation_000_scss" model="ir.asset">
<record id="s_donation_000_scss" model="ir.asset">
<field name="name">Donation 000 SCSS</field>
<field name="bundle">web.assets_frontend</field>
<field name="path">website_payment_recurring_donations/static/src/snippets/s_donation/000.scss</field>
Expand Down
Empty file modified website_payment_recurring_donations_mollie/__init__.py
100755 → 100644
Empty file.
2 changes: 2 additions & 0 deletions website_payment_recurring_donations_mollie/__manifest__.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
41 changes: 38 additions & 3 deletions website_payment_recurring_donations_mollie/i18n/nl.po
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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."
Empty file modified website_payment_recurring_donations_mollie/models/__init__.py
100755 → 100644
Empty file.
Empty file.
6 changes: 3 additions & 3 deletions website_payment_recurring_donations_mollie/models/payment_transaction.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,10 @@ def action_terminate_recurring_donation(self):
subscription.get("canceledAt")[0:19], "%Y-%m-%dT%H:%M:%S"
)
msg = _(
"<b>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"<b>{msg}</b>")
except Exception:
_logger.info(_("Mollie customer or subscription not found"))
# marking all related payment transactions for recurring donations having same provider reference as terminated.
Expand Down
Empty file.
Empty file.

0 comments on commit 5c82b25

Please sign in to comment.