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_checkout_skip_payment #962

Open
wants to merge 59 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
59 commits
Select commit Hold shift + click to select a range
eaf3f68
[9.0][WIP] website_sale_checkout_skip_payment: New module to skip pay…
sergio-teruel Jul 25, 2017
45ff6f8
[IMP] website_sale_checkout_skip_payment: Texts + code
chienandalu Jul 31, 2017
afc6254
OCA Transbot updated translations from Transifex
oca-transbot Aug 19, 2017
a2179fd
Porting website_sale_checkout_skip_payment to 10.0
eLBati Sep 4, 2017
3710696
[MIG] website_sale_checkout_skip_payment: Migration to 11.0
larmar Dec 24, 2017
e437e3a
[9.0][FIX] website_sale_checkout_skip_paymen: Message error in checko…
sergio-teruel Dec 20, 2017
6b35a00
Removed git
larmar Dec 25, 2017
2ffb4a2
Translated using Weblate (Italian)
paolovalier Dec 28, 2018
18d2d16
Translated using Weblate (Spanish)
mvrodriguez Feb 4, 2019
7a6d370
Translated using Weblate (Spanish)
mvrodriguez Feb 4, 2019
77f8955
[MIG] website_sale_checkout_skip_payment: Migration to v12.0
sergio-teruel Oct 24, 2019
ee40f09
[IMP] website_sale_checkout_skip_payment: black, isort, prettier
Tardo Jan 30, 2020
726de54
[MIG] website_sale_checkout_skip_payment: Migration to 13.0
Tardo Jan 30, 2020
e64aed4
Translated using Weblate (Dutch)
bosd Dec 15, 2020
188958c
Translated using Weblate (Catalan)
claudiagn Feb 25, 2021
6e73ab2
Translated using Weblate (Spanish)
claudiagn Feb 25, 2021
62266fc
[IMP] website_sale_checkout_skip_payment: Changes on Confirm Order Bu…
CarlosRoca13 May 18, 2021
6412118
[FIX] website_sale_checkout_skip_payment: Error when client is public…
CarlosRoca13 May 20, 2021
12c8f3b
[IMP] website_sale_checkout_skip_payment: black, isort, prettier
ferran-S73 Aug 30, 2021
7419916
[14.0][MIG] website_sale_checkout_skip_payment: Migration to V14
ferran-S73 Aug 30, 2021
8b49fec
Translated using Weblate (Spanish (Argentina))
ibuioli Oct 20, 2021
bbdcf36
[MIG] website_sale_checkout_skip_payment: Migration to 15.0
rajpatel2240-odoo Apr 20, 2022
bd89bbb
[FIX] website_sale_checkout_skip_payment: CacheMiss error when sessio…
tarteo Jul 8, 2020
543ebb6
[FIX] website_sale_checkout_skip_payment: Fix tests
CarlosRoca13 May 31, 2022
1495b45
[UPD] Update website_sale_checkout_skip_payment.pot
Sep 5, 2022
7e1db10
[UPD] README.rst
OCA-git-bot Sep 5, 2022
a00c690
Translated using Weblate (Portuguese)
pedrocs-exo Dec 14, 2022
95bc660
Translated using Weblate (Italian)
francesco-ooops Feb 1, 2023
1ca5555
[15.0][IMP] website_sale_checkout_skip_payment: hide payment message
miguel-S73 Feb 15, 2023
84df36a
[UPD] README.rst
OCA-git-bot Feb 15, 2023
29ad9ef
website_sale_checkout_skip_payment 15.0.1.1.0
OCA-git-bot Feb 15, 2023
d4a6321
[FIX] website_sale_checkout_skip_payment: Increase priority to avoid …
sergio-teruel Feb 22, 2023
e961637
website_sale_checkout_skip_payment 15.0.1.2.0
OCA-git-bot Feb 23, 2023
62ce6cd
[TYPO] in README.rst
yvaucher May 3, 2023
b03d439
[UPD] README.rst
OCA-git-bot May 3, 2023
ac260b2
[IMP] : pre-commit stuff
kisuka May 22, 2023
73e8d4e
[MIG] website_sale_checkout_skip_payment: Migration to 16.0
kisuka May 22, 2023
b501d52
Removed old test for website_sale_checkout_skip_payment
kisuka Jul 19, 2023
45e1ade
[UPD] Update website_sale_checkout_skip_payment.pot
Aug 30, 2023
1a6afd7
[UPD] README.rst
OCA-git-bot Aug 30, 2023
c95f643
[UPD] README.rst
OCA-git-bot Sep 3, 2023
44f1be2
Update translation files
weblate Sep 3, 2023
7335f8b
Translated using Weblate (Spanish (Argentina))
ibuioli Sep 4, 2023
2f70369
Translated using Weblate (Spanish)
Ivorra78 Sep 5, 2023
0843d63
[FIX] website_sale_checkout_skip_payment: Fix test by adding the vat
pilarvargas-tecnativa Sep 11, 2023
3c532b9
[BOT] post-merge updates
OCA-git-bot Sep 25, 2023
d237d66
Update translation files
weblate Oct 10, 2023
8509e26
[IMP] website_sale_checkout_skip_payment: test performance improvement
josep-tecnativa Oct 18, 2023
0a5e20a
[BOT] post-merge updates
OCA-git-bot Oct 23, 2023
09e8ad5
Translated using Weblate (French)
remi-filament Nov 30, 2023
beee138
[FIX] website_sale_checkout_skip_payment: Addapt changes set on payme…
CarlosRoca13 Nov 30, 2023
7facf74
[BOT] post-merge updates
OCA-git-bot Dec 5, 2023
6a055a9
Translated using Weblate (Italian)
mymage May 7, 2024
5fa01b3
Translated using Weblate (Portuguese (Brazil))
May 29, 2024
39b7e81
Translated using Weblate (Swedish)
jakobkrabbe Jun 19, 2024
30f8693
[FIX] website_sale_checkout_skip_payment: Fix wrong confirmation method.
pilarvargas-tecnativa Jul 30, 2024
1fecf3a
[BOT] post-merge updates
OCA-git-bot Jul 31, 2024
da8aac8
[IMP] website_sale_checkout_skip_payment: pre-commit auto fixes
alexeirivera87 Aug 5, 2024
768e629
[MIG] website_sale_checkout_skip_payment: Migration to 17.0
alexeirivera87 Aug 5, 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
104 changes: 104 additions & 0 deletions website_sale_checkout_skip_payment/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
==================================
Website Sale Checkout Skip Payment
==================================

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

.. |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-LGPL--3-blue.png
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
:alt: License: LGPL-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_checkout_skip_payment
: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_checkout_skip_payment
: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|

This module allows to logged users to checkout with no payment step. At
the end of the checkout proccess the quotation is sent to the user email
address and set to *Qoutation Sent* state.

**Table of contents**

.. contents::
:local:

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

To configure this module, you need to:

1. Go to *Sales > Customers > Sales and Purchases > Sale*
2. Set on *Skip Website Checkout Payment* so this partner will override
the payment step on website sales.

Usage
=====

To use this module, you need to:

1. Go to *Website > shop* and perform a checkout.

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_checkout_skip_payment%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
-------

* Tecnativa

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

- `Tecnativa <https://www.tecnativa.com>`__

- Sergio Teruel
- David Vidal
- Alexandre Díaz
- Carlos Roca

- Martin Wilderoth <[email protected]>
- `Studio73 <https://www.studio73.es>`__:

- Miguel Gandia <[email protected]>

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.

This module is part of the `OCA/e-commerce <https://github.com/OCA/e-commerce/tree/17.0/website_sale_checkout_skip_payment>`_ 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_checkout_skip_payment/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import models
from . import controllers
27 changes: 27 additions & 0 deletions website_sale_checkout_skip_payment/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Copyright 2017 Sergio Teruel <[email protected]>
# Copyright 2017 David Vidal <[email protected]>
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).

{
"name": "Website Sale Checkout Skip Payment",
"summary": "Skip payment for logged users in checkout process",
"version": "17.0.1.0.0",
"category": "Website",
"website": "https://github.com/OCA/e-commerce",
"author": "Tecnativa, Odoo Community Association (OCA)",
"license": "LGPL-3",
"application": False,
"installable": True,
"depends": ["website_sale"],
"data": [
"views/website_sale_skip_payment.xml",
"views/website_sale_template.xml",
"views/partner_view.xml",
"views/res_config_settings_views.xml",
],
"assets": {
"web.assets_tests": [
"website_sale_checkout_skip_payment/static/tests/**/*",
],
},
}
1 change: 1 addition & 0 deletions website_sale_checkout_skip_payment/controllers/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import main
37 changes: 37 additions & 0 deletions website_sale_checkout_skip_payment/controllers/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Copyright 2017 Sergio Teruel <[email protected]>
# Copyright 2017 David Vidal <[email protected]>
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).

from odoo import SUPERUSER_ID, http
from odoo.http import request

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


class CheckoutSkipPaymentWebsite(WebsiteSale):
def _get_shop_payment_values(self, order, **kwargs):
values = super()._get_shop_payment_values(order, **kwargs)
partner = values.get("partner")
if partner.skip_website_checkout_payment:
values["hide_payment_button"] = True
return values

@http.route()
def shop_payment_confirmation(self, **post):
"""When we skip the payment, we'll just confirm the order and send the proper
confirmation message"""
order_id = request.session.get("sale_last_order_id")
if not request.website.checkout_skip_payment or not order_id:
return super().shop_payment_confirmation(**post)

Check warning on line 25 in website_sale_checkout_skip_payment/controllers/main.py

View check run for this annotation

Codecov / codecov/patch

website_sale_checkout_skip_payment/controllers/main.py#L25

Added line #L25 was not covered by tests
order = request.env["sale.order"].sudo().browse(order_id)
try:
order.with_context(send_email=True, mark_so_as_sent=True).with_user(
SUPERUSER_ID
).action_confirm()
except Exception:
return request.render(

Check warning on line 32 in website_sale_checkout_skip_payment/controllers/main.py

View check run for this annotation

Codecov / codecov/patch

website_sale_checkout_skip_payment/controllers/main.py#L31-L32

Added lines #L31 - L32 were not covered by tests
"website_sale_checkout_skip_payment.confirmation_order_error"
)
request.website.sale_reset()
values = self._prepare_shop_payment_confirmation_values(order)
return request.render("website_sale.confirmation", values)
108 changes: 108 additions & 0 deletions website_sale_checkout_skip_payment/i18n/am.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * website_sale_checkout_skip_payment
#
# Translators:
# OCA Transbot <[email protected]>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-05-18 10:04+0000\n"
"PO-Revision-Date: 2021-05-18 12:12+0200\n"
"Last-Translator: Carlos <[email protected]>\n"
"Language-Team: Amharic (https://www.transifex.com/oca/teams/23907/am/)\n"
"Language: am\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
"X-Generator: Poedit 2.0.6\n"

#. module: website_sale_checkout_skip_payment
#: model_terms:ir.ui.view,arch_db:website_sale_checkout_skip_payment.payment
msgid ""
"<i class=\"fa fa-chevron-left\"/>\n"
" Return to Cart"
msgstr ""

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

#. module: website_sale_checkout_skip_payment
#: model_terms:ir.ui.view,arch_db:website_sale_checkout_skip_payment.payment
msgid "<span>Confirm <span class=\"fa fa-chevron-right\"/></span>"
msgstr ""

#. module: website_sale_checkout_skip_payment
#: model_terms:ir.ui.view,arch_db:website_sale_checkout_skip_payment.confirmation_order_error
msgid ""
"<strong>Error!</strong> An error occurred trying to\n"
" confirm the sale order."
msgstr ""

#. module: website_sale_checkout_skip_payment
#: model:ir.model.fields,field_description:website_sale_checkout_skip_payment.field_website__checkout_skip_payment
msgid "Checkout Skip Payment"
msgstr ""

#. module: website_sale_checkout_skip_payment
#: model:ir.model,name:website_sale_checkout_skip_payment.model_res_config_settings
msgid "Config Settings"
msgstr ""

#. module: website_sale_checkout_skip_payment
#: model_terms:ir.ui.view,arch_db:website_sale_checkout_skip_payment.cart
#: model_terms:ir.ui.view,arch_db:website_sale_checkout_skip_payment.short_cart_summary
msgid "Confirm"
msgstr ""

#. module: website_sale_checkout_skip_payment
#: model:ir.model,name:website_sale_checkout_skip_payment.model_res_partner
msgid "Contact"
msgstr ""

#. module: website_sale_checkout_skip_payment
#: model_terms:ir.ui.view,arch_db:website_sale_checkout_skip_payment.res_config_settings_view_form
msgid "Message shown to the user when the purchase is finished"
msgstr ""

#. module: website_sale_checkout_skip_payment
#: model_terms:ir.ui.view,arch_db:website_sale_checkout_skip_payment.res_config_settings_view_form
msgid "Sale Checkout Skip Message"
msgstr ""

#. module: website_sale_checkout_skip_payment
#: model_terms:ir.ui.view,arch_db:website_sale_checkout_skip_payment.confirmation_order_error
msgid "Shop - Confirmation - Error"
msgstr ""

#. module: website_sale_checkout_skip_payment
#: model:ir.model.fields,field_description:website_sale_checkout_skip_payment.field_res_partner__skip_website_checkout_payment
#: model:ir.model.fields,field_description:website_sale_checkout_skip_payment.field_res_users__skip_website_checkout_payment
msgid "Skip Website Checkout Payment"
msgstr ""

#. module: website_sale_checkout_skip_payment
#: model:ir.model,name:website_sale_checkout_skip_payment.model_website
msgid "Website"
msgstr ""

#. module: website_sale_checkout_skip_payment
#: model:ir.model.fields,field_description:website_sale_checkout_skip_payment.field_res_config_settings__website_sale_checkout_skip_message
msgid "Website Sale Checkout Skip Message"
msgstr ""

#. module: website_sale_checkout_skip_payment
#: model:ir.model.fields,field_description:website_sale_checkout_skip_payment.field_website__website_sale_checkout_skip_message
msgid "Website Sale SKip Message"
msgstr ""

#. module: website_sale_checkout_skip_payment
#: model_terms:ir.ui.view,arch_db:website_sale_checkout_skip_payment.order_state_message
msgid "Your order is waiting manual confirmation."
msgstr ""
109 changes: 109 additions & 0 deletions website_sale_checkout_skip_payment/i18n/ar.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * website_sale_checkout_skip_payment
#
# Translators:
# OCA Transbot <[email protected]>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-05-18 10:04+0000\n"
"PO-Revision-Date: 2021-05-18 12:12+0200\n"
"Last-Translator: Carlos <[email protected]>\n"
"Language-Team: Arabic (https://www.transifex.com/oca/teams/23907/ar/)\n"
"Language: ar\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 "
"&& n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n"
"X-Generator: Poedit 2.0.6\n"

#. module: website_sale_checkout_skip_payment
#: model_terms:ir.ui.view,arch_db:website_sale_checkout_skip_payment.payment
msgid ""
"<i class=\"fa fa-chevron-left\"/>\n"
" Return to Cart"
msgstr ""

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

#. module: website_sale_checkout_skip_payment
#: model_terms:ir.ui.view,arch_db:website_sale_checkout_skip_payment.payment
msgid "<span>Confirm <span class=\"fa fa-chevron-right\"/></span>"
msgstr ""

#. module: website_sale_checkout_skip_payment
#: model_terms:ir.ui.view,arch_db:website_sale_checkout_skip_payment.confirmation_order_error
msgid ""
"<strong>Error!</strong> An error occurred trying to\n"
" confirm the sale order."
msgstr ""

#. module: website_sale_checkout_skip_payment
#: model:ir.model.fields,field_description:website_sale_checkout_skip_payment.field_website__checkout_skip_payment
msgid "Checkout Skip Payment"
msgstr ""

#. module: website_sale_checkout_skip_payment
#: model:ir.model,name:website_sale_checkout_skip_payment.model_res_config_settings
msgid "Config Settings"
msgstr ""

#. module: website_sale_checkout_skip_payment
#: model_terms:ir.ui.view,arch_db:website_sale_checkout_skip_payment.cart
#: model_terms:ir.ui.view,arch_db:website_sale_checkout_skip_payment.short_cart_summary
msgid "Confirm"
msgstr ""

#. module: website_sale_checkout_skip_payment
#: model:ir.model,name:website_sale_checkout_skip_payment.model_res_partner
msgid "Contact"
msgstr ""

#. module: website_sale_checkout_skip_payment
#: model_terms:ir.ui.view,arch_db:website_sale_checkout_skip_payment.res_config_settings_view_form
msgid "Message shown to the user when the purchase is finished"
msgstr ""

#. module: website_sale_checkout_skip_payment
#: model_terms:ir.ui.view,arch_db:website_sale_checkout_skip_payment.res_config_settings_view_form
msgid "Sale Checkout Skip Message"
msgstr ""

#. module: website_sale_checkout_skip_payment
#: model_terms:ir.ui.view,arch_db:website_sale_checkout_skip_payment.confirmation_order_error
msgid "Shop - Confirmation - Error"
msgstr ""

#. module: website_sale_checkout_skip_payment
#: model:ir.model.fields,field_description:website_sale_checkout_skip_payment.field_res_partner__skip_website_checkout_payment
#: model:ir.model.fields,field_description:website_sale_checkout_skip_payment.field_res_users__skip_website_checkout_payment
msgid "Skip Website Checkout Payment"
msgstr ""

#. module: website_sale_checkout_skip_payment
#: model:ir.model,name:website_sale_checkout_skip_payment.model_website
msgid "Website"
msgstr "الموقع"

#. module: website_sale_checkout_skip_payment
#: model:ir.model.fields,field_description:website_sale_checkout_skip_payment.field_res_config_settings__website_sale_checkout_skip_message
msgid "Website Sale Checkout Skip Message"
msgstr ""

#. module: website_sale_checkout_skip_payment
#: model:ir.model.fields,field_description:website_sale_checkout_skip_payment.field_website__website_sale_checkout_skip_message
msgid "Website Sale SKip Message"
msgstr ""

#. module: website_sale_checkout_skip_payment
#: model_terms:ir.ui.view,arch_db:website_sale_checkout_skip_payment.order_state_message
msgid "Your order is waiting manual confirmation."
msgstr ""
Loading
Loading