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

10.0 porting website_sale_checkout_skip_payment #203

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
86 changes: 86 additions & 0 deletions website_sale_checkout_skip_payment/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
==================================
Website Sale Checkout Skip Payment
==================================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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/10.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-10-0/e-commerce-10-0-website_sale_checkout_skip_payment
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/113/10.0
:alt: Try me on Runbot

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

This module allows 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:

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

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 smashing it by providing a detailed and welcomed
`feedback <https://github.com/OCA/e-commerce/issues/new?body=module:%20website_sale_checkout_skip_payment%0Aversion:%2010.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
~~~~~~~~~~~~

* Sergio Teruel <sergio.teruel@tecnativa.com>
* David Vidal <david.vidal@tecnativa.com>
* Lorenzo Battistini <https://github.com/eLBati>

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/10.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.
4 changes: 4 additions & 0 deletions website_sale_checkout_skip_payment/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# -*- coding: utf-8 -*-

from . import models
from . import controllers
24 changes: 24 additions & 0 deletions website_sale_checkout_skip_payment/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# -*- coding: utf-8 -*-
# Copyright 2017 Sergio Teruel <sergio.teruel@tecnativa.com>
# Copyright 2017 David Vidal <david.vidal@tecnativa.com>
# 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': '10.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',
],
}
3 changes: 3 additions & 0 deletions website_sale_checkout_skip_payment/controllers/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# -*- coding: utf-8 -*-

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 @@
# -*- coding: utf-8 -*-
# Copyright 2017 Sergio Teruel <sergio.teruel@tecnativa.com>
# Copyright 2017 David Vidal <david.vidal@tecnativa.com>
# 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 CheckoutSkipPayment(WebsiteSale):

@http.route()
def payment(self, **post):
if not request.website.checkout_skip_payment:
return super(CheckoutSkipPayment, self).payment(**post)
order = request.website.sale_get_order()
if order.force_quotation_send():
# Clean session, then redirect to the confirmation page
request.website.sale_reset()
return request.redirect('/shop/confirmation')
else:
return request.render(
'website_sale_skip_payment.confirmation_order_error')

@http.route()
def payment_get_status(self, sale_order_id, **post):
# When skip payment step, the transaction does not exist so only render
# the waiting message in ajax json call
if not request.website.checkout_skip_payment:
return super(CheckoutSkipPayment, self).payment_get_status(
sale_order_id, **post)
return {
'recall': False,
'message': request.env['ir.ui.view'].render_template(
'website_sale_checkout_skip_payment.order_state_message'),
}
58 changes: 58 additions & 0 deletions website_sale_checkout_skip_payment/i18n/am.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * website_sale_checkout_skip_payment
#
# Translators:
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-08-15 03:01+0000\n"
"PO-Revision-Date: 2017-08-15 03:01+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n"
"Language-Team: Amharic (https://www.transifex.com/oca/teams/23907/am/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: am\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"

#. module: website_sale_checkout_skip_payment
#: model: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.ui.view,arch_db:website_sale_checkout_skip_payment.confirmation
msgid ""
"Our team will check your order and send you payment\n"
" information soon."
msgstr ""

#. module: website_sale_checkout_skip_payment
#: model:ir.model,name:website_sale_checkout_skip_payment.model_res_partner
msgid "Partner"
msgstr "ተባባሪ"

#. module: website_sale_checkout_skip_payment
#: model: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
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 ""
58 changes: 58 additions & 0 deletions website_sale_checkout_skip_payment/i18n/ar.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * website_sale_checkout_skip_payment
#
# Translators:
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-08-15 03:01+0000\n"
"PO-Revision-Date: 2017-08-15 03:01+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n"
"Language-Team: Arabic (https://www.transifex.com/oca/teams/23907/ar/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: ar\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"

#. module: website_sale_checkout_skip_payment
#: model: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.ui.view,arch_db:website_sale_checkout_skip_payment.confirmation
msgid ""
"Our team will check your order and send you payment\n"
" information soon."
msgstr ""

#. module: website_sale_checkout_skip_payment
#: model:ir.model,name:website_sale_checkout_skip_payment.model_res_partner
msgid "Partner"
msgstr "الشريك"

#. module: website_sale_checkout_skip_payment
#: model: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
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 "الموقع"
58 changes: 58 additions & 0 deletions website_sale_checkout_skip_payment/i18n/bg.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * website_sale_checkout_skip_payment
#
# Translators:
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-08-15 03:01+0000\n"
"PO-Revision-Date: 2017-08-15 03:01+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n"
"Language-Team: Bulgarian (https://www.transifex.com/oca/teams/23907/bg/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: bg\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. module: website_sale_checkout_skip_payment
#: model: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.ui.view,arch_db:website_sale_checkout_skip_payment.confirmation
msgid ""
"Our team will check your order and send you payment\n"
" information soon."
msgstr ""

#. module: website_sale_checkout_skip_payment
#: model:ir.model,name:website_sale_checkout_skip_payment.model_res_partner
msgid "Partner"
msgstr "Партньор"

#. module: website_sale_checkout_skip_payment
#: model: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
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 "Уебсайт"
58 changes: 58 additions & 0 deletions website_sale_checkout_skip_payment/i18n/bs.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * website_sale_checkout_skip_payment
#
# Translators:
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-08-15 03:01+0000\n"
"PO-Revision-Date: 2017-08-15 03:01+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n"
"Language-Team: Bosnian (https://www.transifex.com/oca/teams/23907/bs/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: bs\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"

#. module: website_sale_checkout_skip_payment
#: model: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.ui.view,arch_db:website_sale_checkout_skip_payment.confirmation
msgid ""
"Our team will check your order and send you payment\n"
" information soon."
msgstr ""

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

#. module: website_sale_checkout_skip_payment
#: model: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
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 "Web stranica"
Loading