-
-
Notifications
You must be signed in to change notification settings - Fork 497
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by pedrobaeza
- Loading branch information
Showing
86 changed files
with
8,293 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
================================== | ||
Website Sale Checkout Skip Payment | ||
================================== | ||
|
||
.. | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! This file is generated by oca-gen-addon-readme !! | ||
!! changes will be overwritten. !! | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! source digest: sha256:3de24d166114754c15354d2c27aaa2bbd6d079a96579511cea904f5731764ddf | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
.. |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/18.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-18-0/e-commerce-18-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=18.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 *Quotation 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:%2018.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 | ||
- Pilar Vargas | ||
|
||
- 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/18.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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
from . import models | ||
from . import controllers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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": "18.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/**/*", | ||
], | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 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) | ||
order = request.env["sale.order"].sudo().browse(order_id) | ||
try: | ||
order.with_context(mark_so_as_sent=True)._send_order_confirmation_mail() | ||
except Exception: | ||
return request.render( | ||
"website_sale_checkout_skip_payment.confirmation_order_error" | ||
) | ||
# This could not finish (e.g.: sale_financial_risk exceeded) | ||
order.action_confirm() | ||
request.website.sale_reset() | ||
values = self._prepare_shop_payment_confirmation_values(order) | ||
return request.render("website_sale.confirmation", values) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
# 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 | ||
#. odoo-python | ||
#: code:addons/website_sale_checkout_skip_payment/models/website.py:0 | ||
#, python-format | ||
msgid "Our team will check your order and send you payment information soon." | ||
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 "" |
Oops, something went wrong.