Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[17.0][MIG] website_sale_cart_expire: Migration #923

Open
wants to merge 28 commits into
base: 17.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
82bdffc
[ADD] website_sale_cart_expire
ivantodorovich Aug 23, 2021
fb2cb08
[UPD] Update website_sale_cart_expire.pot
oca-travis Sep 21, 2021
7ff614b
[UPD] README.rst
OCA-git-bot Sep 21, 2021
db04017
[ADD] icon.png
OCA-git-bot Sep 21, 2021
286a2a8
[MIG] website_sale_cart_expire: Migration to 14.0
ioans73 Nov 15, 2021
bed9f49
[UPD] Update website_sale_cart_expire.pot
oca-travis Mar 25, 2022
bc62021
[UPD] README.rst
OCA-git-bot Mar 25, 2022
3f40ae3
[MIG] website_sale_cart_expire: Migration to 15.0
ivantodorovich Jun 10, 2022
410c18d
[FIX] website_sale_cart_expire: Don't cancel sent quotations
ivantodorovich Jul 15, 2022
23cd9ab
[FIX] website_sale_cart_expire: Don't cancel carts in payment
ivantodorovich Jul 15, 2022
bbcb18a
[FIX] Use savepoint and autocommit to avoid possible cron crash
ivantodorovich Jul 15, 2022
1ad9005
[IMP] website_sale_cart_expire: Display the cart expiration timer on …
ivantodorovich Jul 15, 2022
8cd8d76
[UPD] Update website_sale_cart_expire.pot
Oct 25, 2022
f28485a
[UPD] README.rst
OCA-git-bot Oct 25, 2022
c0830ba
[UPD] Update website_sale_cart_expire.pot
Dec 16, 2022
a060e6d
[MIG] website_sale_cart_expire: Migration to 16.0
Highcooley Apr 24, 2023
e5ed81f
[UPD] Update website_sale_cart_expire.pot
Jun 1, 2023
230abbc
[UPD] README.rst
OCA-git-bot Jun 1, 2023
4f7537c
Added translation using Weblate (Spanish)
Ivorra78 Aug 3, 2023
d5e8e53
Translated using Weblate (Spanish)
Ivorra78 Aug 3, 2023
f79cb1d
[UPD] README.rst
OCA-git-bot Sep 3, 2023
9712705
Update translation files
weblate Oct 10, 2023
b52bfed
[FIX] website_sale_cart_expire:
kanda999 Mar 22, 2024
4259d40
[BOT] post-merge updates
OCA-git-bot Apr 4, 2024
c8cde6d
Added translation using Weblate (Italian)
mymage May 8, 2024
1d408d5
Translated using Weblate (Italian)
mymage May 8, 2024
a3d6561
[IMP] website_sale_cart_expire: pre-commit auto fixes
Mantux11 May 10, 2024
42bb648
[17.0][MIG] website_sale_cart_expire: Migration
Mantux11 May 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
95 changes: 95 additions & 0 deletions website_sale_cart_expire/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
========================
Website Sale Cart Expire
========================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:4c846ae9d2828ae45e3719902ce2b99d3d25f11762c3e8691cce86bf74e9ac08
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fe--commerce-lightgray.png?logo=github
:target: https://github.com/OCA/e-commerce/tree/17.0/website_sale_cart_expire
:alt: OCA/e-commerce
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/e-commerce-17-0/e-commerce-17-0-website_sale_cart_expire
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/e-commerce&target_branch=17.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

Allows to automatically cancel carts without activity after a
configurable time.

**Table of contents**

.. contents::
:local:

Configuration
=============

Go to Website > Settings and set a delay for Expire Carts settings.

A cart expiration timer can be displayed on the website by enabling the
Cart Expiration Timer setting in the Customize menu.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/e-commerce/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/e-commerce/issues/new?body=module:%20website_sale_cart_expire%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
-------

* Camptocamp

Contributors
------------

- `Camptocamp <https://www.camptocamp.com>`__

- Iván Todorovich <ivan.todorovich@gmail.com>

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

.. |maintainer-ivantodorovich| image:: https://github.com/ivantodorovich.png?size=40px
:target: https://github.com/ivantodorovich
:alt: ivantodorovich

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-ivantodorovich|

This module is part of the `OCA/e-commerce <https://github.com/OCA/e-commerce/tree/17.0/website_sale_cart_expire>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
2 changes: 2 additions & 0 deletions website_sale_cart_expire/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import controllers
from . import models
25 changes: 25 additions & 0 deletions website_sale_cart_expire/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Copyright 2021 Camptocamp (http://www.camptocamp.com).
# @author Iván Todorovich <ivan.todorovich@gmail.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "Website Sale Cart Expire",
"summary": "Cancel carts without activity after a configurable time",
"version": "17.0.1.0.0",
"author": "Camptocamp, Odoo Community Association (OCA)",
"maintainers": ["ivantodorovich"],
"website": "https://github.com/OCA/e-commerce",
"license": "AGPL-3",
"category": "Website",
"depends": ["website_sale"],
"data": [
"data/ir_cron.xml",
"views/res_config_settings.xml",
"views/templates.xml",
],
"assets": {
"web.assets_frontend": [
"website_sale_cart_expire/static/src/js/website_sale_cart_expire.esm.js",
],
},
}
1 change: 1 addition & 0 deletions website_sale_cart_expire/controllers/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import main
22 changes: 22 additions & 0 deletions website_sale_cart_expire/controllers/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Copyright 2022 Camptocamp SA (https://www.camptocamp.com).
# @author Iván Todorovich <ivan.todorovich@camptocamp.com>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo import http
from odoo.http import request

from odoo.addons.website_sale.controllers.main import WebsiteSale


class WebsiteSaleCartExpire(WebsiteSale):
@http.route(
["/shop/cart/get_expire_date"],
type="json",
auth="public",
methods=["POST"],
website=True,
csrf=False,
)
def get_expire_date(self, **kw):
order = request.website.sale_get_order()
return order.cart_expire_date

Check warning on line 22 in website_sale_cart_expire/controllers/main.py

View check run for this annotation

Codecov / codecov/patch

website_sale_cart_expire/controllers/main.py#L21-L22

Added lines #L21 - L22 were not covered by tests
17 changes: 17 additions & 0 deletions website_sale_cart_expire/data/ir_cron.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8" ?>
<!--
Copyright 2021 Camptocamp (http://www.camptocamp.com).
@author Iván Todorovich <ivan.todorovich@gmail.com>
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->
<odoo noupdate="1">
<record id="ir_cron_cart_expire" model="ir.cron">
<field name="name">Website: Expire Carts</field>
<field name="model_id" ref="website.model_website" />
<field name="state">code</field>
<field name="code">model._scheduler_website_expire_cart(autocommit=True)</field>
<field name="interval_number">5</field>
<field name="interval_type">minutes</field>
<field name="numbercall">-1</field>
</record>
</odoo>
105 changes: 105 additions & 0 deletions website_sale_cart_expire/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * website_sale_cart_expire
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2023-08-03 20:09+0000\n"
"Last-Translator: Ivorra78 <informatica@totmaterial.es>\n"
"Language-Team: none\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.17\n"

#. module: website_sale_cart_expire
#: model_terms:ir.ui.view,arch_db:website_sale_cart_expire.res_config_settings_view_form
msgid ""
"<span class=\"o_form_label\">Expire Carts</span>\n"
" <span class=\"fa fa-lg fa-globe\" title=\"Values set "
"here are website-specific.\" groups=\"website.group_multi_website\"/>"
msgstr ""
"<span class=\"o_form_label\">Carro expirado</span>\n"
" <span class=\"fa fa-"
"lg fa-globe\" title=\"Values set here are website-specific.\" groups="
"\"website.group_multi_website\"/>"

#. module: website_sale_cart_expire
#: model_terms:ir.ui.view,arch_db:website_sale_cart_expire.res_config_settings_view_form
msgid "Automatically cancel carts without activity after a period of time"
msgstr ""
"Cancelar automáticamente carritos sin actividad después de un período de "
"tiempo"

#. module: website_sale_cart_expire
#: model:ir.model.fields,help:website_sale_cart_expire.field_res_config_settings__cart_expire_delay
#: model:ir.model.fields,help:website_sale_cart_expire.field_website__cart_expire_delay
msgid ""
"Automatically cancel website orders after the given time.\n"
"Set to 0 to disable this feature."
msgstr ""
"Cancelar automáticamente los pedidos del sitio web después del tiempo dado.\n"
"Establecer en 0 para desactivar esta función."

#. module: website_sale_cart_expire
#: model:ir.model.fields,field_description:website_sale_cart_expire.field_sale_order__cart_expire_date
msgid "Cart Expire Date"
msgstr "Fecha de caducidad del carro"

#. module: website_sale_cart_expire
#. odoo-python
#: code:addons/website_sale_cart_expire/models/website.py:0
#, python-format
msgid "Cart expired"
msgstr "Carro caducado"

#. module: website_sale_cart_expire
#: model_terms:ir.ui.view,arch_db:website_sale_cart_expire.res_config_settings_view_form
msgid "Cart is cancelled after"
msgstr "El carro ha sido cancelado después"

#. module: website_sale_cart_expire
#: model_terms:ir.ui.view,arch_db:website_sale_cart_expire.res_config_settings_view_form
msgid "Carts are cancelled after this delay."
msgstr "Los carros se cancelan después de este plazo."

#. module: website_sale_cart_expire
#: model:ir.model,name:website_sale_cart_expire.model_res_config_settings
msgid "Config Settings"
msgstr "Ajustes de Configuración"

#. module: website_sale_cart_expire
#: model:ir.model.fields,field_description:website_sale_cart_expire.field_res_config_settings__cart_expire_delay
#: model:ir.model.fields,field_description:website_sale_cart_expire.field_website__cart_expire_delay
msgid "Expire Delay"
msgstr "Expiración retardada"

#. module: website_sale_cart_expire
#: model:ir.model,name:website_sale_cart_expire.model_sale_order
msgid "Sales Order"
msgstr "Órdenes de venta"

#. module: website_sale_cart_expire
#: model:ir.model.fields,help:website_sale_cart_expire.field_sale_order__cart_expire_date
msgid "Technical field: The date this cart will automatically expire"
msgstr "Campo técnico: La fecha en que este carro caducará automáticamente"

#. module: website_sale_cart_expire
#: model:ir.model,name:website_sale_cart_expire.model_website
msgid "Website"
msgstr "Página Web"

#. module: website_sale_cart_expire
#: model:ir.actions.server,name:website_sale_cart_expire.ir_cron_cart_expire_ir_actions_server
#: model:ir.cron,cron_name:website_sale_cart_expire.ir_cron_cart_expire
msgid "Website: Expire Carts"
msgstr "Página web: Carros caducados"

#. module: website_sale_cart_expire
#: model_terms:ir.ui.view,arch_db:website_sale_cart_expire.res_config_settings_view_form
msgid "hours."
msgstr "horas."
103 changes: 103 additions & 0 deletions website_sale_cart_expire/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * website_sale_cart_expire
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2024-05-08 07:46+0000\n"
"Last-Translator: mymage <stefano.consolaro@mymage.it>\n"
"Language-Team: none\n"
"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.17\n"

#. module: website_sale_cart_expire
#: model_terms:ir.ui.view,arch_db:website_sale_cart_expire.res_config_settings_view_form
msgid ""
"<span class=\"o_form_label\">Expire Carts</span>\n"
" <span class=\"fa fa-lg fa-globe\" title=\"Values set here are website-specific.\" groups=\"website.group_multi_website\"/>"
msgstr ""
"<span class=\"o_form_label\">Carrelli in scadenza</span>\n"
" <span class=\"fa fa-lg fa-globe\" title=\"I valori "
"impostati qui sono specifici per sito web.\" groups=\"website."
"group_multi_website\"/>"

#. module: website_sale_cart_expire
#: model_terms:ir.ui.view,arch_db:website_sale_cart_expire.res_config_settings_view_form
msgid "Automatically cancel carts without activity after a period of time"
msgstr ""
"Annulla automaticamente i carrelli senza attività dopo un periodo di tempo"

#. module: website_sale_cart_expire
#: model:ir.model.fields,help:website_sale_cart_expire.field_res_config_settings__cart_expire_delay
#: model:ir.model.fields,help:website_sale_cart_expire.field_website__cart_expire_delay
msgid ""
"Automatically cancel website orders after the given time.\n"
"Set to 0 to disable this feature."
msgstr ""
"Annulla automaticamente ordini sito web dopo un certo periodo di tempo.\n"
"Impostare a 0 per disabilitare questa opzione."

#. module: website_sale_cart_expire
#: model:ir.model.fields,field_description:website_sale_cart_expire.field_sale_order__cart_expire_date
msgid "Cart Expire Date"
msgstr "Data scadenza carrello"

#. module: website_sale_cart_expire
#. odoo-python
#: code:addons/website_sale_cart_expire/models/website.py:0
#, python-format
msgid "Cart expired"
msgstr "Carrello scaduto"

#. module: website_sale_cart_expire
#: model_terms:ir.ui.view,arch_db:website_sale_cart_expire.res_config_settings_view_form
msgid "Cart is cancelled after"
msgstr "Il carrello viene annullato dopo"

#. module: website_sale_cart_expire
#: model_terms:ir.ui.view,arch_db:website_sale_cart_expire.res_config_settings_view_form
msgid "Carts are cancelled after this delay."
msgstr "I carrelli vengono annullati dopo questo ritardo."

#. module: website_sale_cart_expire
#: model:ir.model,name:website_sale_cart_expire.model_res_config_settings
msgid "Config Settings"
msgstr "Impostazioni configurazione"

#. module: website_sale_cart_expire
#: model:ir.model.fields,field_description:website_sale_cart_expire.field_res_config_settings__cart_expire_delay
#: model:ir.model.fields,field_description:website_sale_cart_expire.field_website__cart_expire_delay
msgid "Expire Delay"
msgstr "Ritardo scadenza"

#. module: website_sale_cart_expire
#: model:ir.model,name:website_sale_cart_expire.model_sale_order
msgid "Sales Order"
msgstr "Ordine di vendita"

#. module: website_sale_cart_expire
#: model:ir.model.fields,help:website_sale_cart_expire.field_sale_order__cart_expire_date
msgid "Technical field: The date this cart will automatically expire"
msgstr "Campo tecnico: la data in cui questo carrello scade automaticamente"

#. module: website_sale_cart_expire
#: model:ir.model,name:website_sale_cart_expire.model_website
msgid "Website"
msgstr "Sito web"

#. module: website_sale_cart_expire
#: model:ir.actions.server,name:website_sale_cart_expire.ir_cron_cart_expire_ir_actions_server
#: model:ir.cron,cron_name:website_sale_cart_expire.ir_cron_cart_expire
msgid "Website: Expire Carts"
msgstr "Sito web: scadenza carrelli"

#. module: website_sale_cart_expire
#: model_terms:ir.ui.view,arch_db:website_sale_cart_expire.res_config_settings_view_form
msgid "hours."
msgstr "ore."
Loading
Loading