diff --git a/abandoned_carts/README.rst b/abandoned_carts/README.rst index f218c29..ab4f360 100644 --- a/abandoned_carts/README.rst +++ b/abandoned_carts/README.rst @@ -7,7 +7,7 @@ Abandoned Carts !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:36086800288d4ccd5baaf3ede4a2092f0189410265752e244f869ab966c41b6e + !! source digest: sha256:b2bb1241a503d410a6cd3968a08bfd8862738faaa20fb4bc813277877c2afa0d !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png @@ -48,7 +48,7 @@ This module identifies orders as abandoned (and to be deleted) if all of the fol These orders will be displayed in "Abandoned orders" and can be deleted manually. Customers, which have -`"lead = 0" and "meetings = 0" and "is_employee = false" and "helpdesk_tickets = 0" and "newsletter_subscriptions = 0" and "phonecalls = 0" and "orders = 0" and "account moves = 0" and "tasks = 0" and "portal or user account = 0" and "parent_id = NULL" and "is_company = false" and "create_uid = system_user"` +`"lead = 0" and "meetings = 0" and "is_employee = false" and "helpdesk_tickets = 0" and "newsletter_subscriptions = 0" and "phonecalls = 0" and "orders = 0" and "account moves = 0" and "tasks = 0" and "portal or user account = 0" and "parent_id = NULL" and "is_company = false" and "create_uid = system_user" and "payment_transaction = 0"` will be displayed in "Abandoned customers" and can be deleted manually. diff --git a/abandoned_carts/readme/DESCRIPTION.rst b/abandoned_carts/readme/DESCRIPTION.rst index 46affa9..8fd432d 100644 --- a/abandoned_carts/readme/DESCRIPTION.rst +++ b/abandoned_carts/readme/DESCRIPTION.rst @@ -18,7 +18,7 @@ This module identifies orders as abandoned (and to be deleted) if all of the fol These orders will be displayed in "Abandoned orders" and can be deleted manually. Customers, which have -`"lead = 0" and "meetings = 0" and "is_employee = false" and "helpdesk_tickets = 0" and "newsletter_subscriptions = 0" and "phonecalls = 0" and "orders = 0" and "account moves = 0" and "tasks = 0" and "portal or user account = 0" and "parent_id = NULL" and "is_company = false" and "create_uid = system_user"` +`"lead = 0" and "meetings = 0" and "is_employee = false" and "helpdesk_tickets = 0" and "newsletter_subscriptions = 0" and "phonecalls = 0" and "orders = 0" and "account moves = 0" and "tasks = 0" and "portal or user account = 0" and "parent_id = NULL" and "is_company = false" and "create_uid = system_user" and "payment_transaction = 0"` will be displayed in "Abandoned customers" and can be deleted manually. diff --git a/abandoned_carts/static/description/index.html b/abandoned_carts/static/description/index.html index a02a26b..4736137 100644 --- a/abandoned_carts/static/description/index.html +++ b/abandoned_carts/static/description/index.html @@ -367,7 +367,7 @@

Abandoned Carts

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:36086800288d4ccd5baaf3ede4a2092f0189410265752e244f869ab966c41b6e +!! source digest: sha256:b2bb1241a503d410a6cd3968a08bfd8862738faaa20fb4bc813277877c2afa0d !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

Beta License: AGPL-3 OCA/odoo-modules Translate me on Weblate Try me on Runboat

This module allows to delete Quotations and related partner records when those are older than a definable retention period.

@@ -383,7 +383,7 @@

Algorithm

(“state = draft” or “state = sent”) and “website_id is set” and “(current_time - create_date) < abandoned_carts.order_retention_period” and “create_uid = system_user”

These orders will be displayed in “Abandoned orders” and can be deleted manually.

Customers, which have -“lead = 0” and “meetings = 0” and “is_employee = false” and “helpdesk_tickets = 0” and “newsletter_subscriptions = 0” and “phonecalls = 0” and “orders = 0” and “account moves = 0” and “tasks = 0” and “portal or user account = 0” and “parent_id = NULL” and “is_company = false” and “create_uid = system_user”

+“lead = 0” and “meetings = 0” and “is_employee = false” and “helpdesk_tickets = 0” and “newsletter_subscriptions = 0” and “phonecalls = 0” and “orders = 0” and “account moves = 0” and “tasks = 0” and “portal or user account = 0” and “parent_id = NULL” and “is_company = false” and “create_uid = system_user” and “payment_transaction = 0”

will be displayed in “Abandoned customers” and can be deleted manually.

Child partner records (e.g. delivery addresses) of deleted records will remain and don’t get deleted implicitly. However, in subsequent executions they may fulfill all criteria and get deleted too.

A cron job can be configured to delete abandoned orders and abandoned customers automatically.

diff --git a/abandoned_carts/wizard/customer.py b/abandoned_carts/wizard/customer.py index 3c85358..23fcabb 100644 --- a/abandoned_carts/wizard/customer.py +++ b/abandoned_carts/wizard/customer.py @@ -98,6 +98,9 @@ def set_fix_customer(self): where gid = (select id from res_groups where id=%s) and uid=ru.id ) and + NOT EXISTS ( + SELECT 1 FROM payment_transaction pt WHERE pt.partner_id = p.id + ) and p.parent_id is NULL and p.is_company = False and p.customer_rank > 0 and diff --git a/payment_bitcoin/models/bitcoin.py b/payment_bitcoin/models/bitcoin.py index 62c9859..578a329 100644 --- a/payment_bitcoin/models/bitcoin.py +++ b/payment_bitcoin/models/bitcoin.py @@ -180,7 +180,7 @@ def cnvrt_list_to_string(self, ldata): return ", ".join([str(data) for data in ldata]) @api.model - def cron_bitcoin_payment_reconciliation(self): + def cron_bitcoin_payment_reconciliation(self): # noqa: C901 acquirer_obj = self.env["payment.acquirer"].search( [("provider", "=", "bitcoin")] ) @@ -437,7 +437,7 @@ class BitcoinRate(models.Model): ) @api.model - def get_rate( + def get_rate( # noqa: C901 self, order_id=False, order_ref=False, invoice_id=False, invoice_ref=False ): # function returns bitcoin rate and address for the order currency diff --git a/payment_bitcoin/static/src/js/bitcoin.js b/payment_bitcoin/static/src/js/bitcoin.js index ae1d455..94483fc 100644 --- a/payment_bitcoin/static/src/js/bitcoin.js +++ b/payment_bitcoin/static/src/js/bitcoin.js @@ -1,4 +1,6 @@ odoo.define("payment_bitcoin.bitcoin", function (require) { + "use strict"; + var ajax = require("web.ajax"); var core = require("web.core"); var _t = core._t; @@ -25,7 +27,9 @@ odoo.define("payment_bitcoin.bitcoin", function (require) { order_ref: $order_ref, }).then(function (data) { if (data === false) { + /* eslint-disable no-alert */ alert(_t("Payment method Bitcoin is currently unavailable.")); + /* eslint-enable no-alert */ $(ev.currentTarget) .find('input[name="o_payment_radio"]') .attr("disabled", "disabled"); diff --git a/payment_bitcoin/static/src/js/countdown.js b/payment_bitcoin/static/src/js/countdown.js index 3010fb5..5c42590 100644 --- a/payment_bitcoin/static/src/js/countdown.js +++ b/payment_bitcoin/static/src/js/countdown.js @@ -1,4 +1,6 @@ odoo.define("payment_bitcoin.duration", function (require) { + "use strict"; + var publicWidget = require("web.public.widget"); publicWidget.registry.reloadDuration = publicWidget.Widget.extend({