Skip to content

Commit

Permalink
Merge 2fcdec8 into 6ee090d
Browse files Browse the repository at this point in the history
  • Loading branch information
sergio-teruel committed Oct 28, 2019
2 parents 6ee090d + 2fcdec8 commit 58aeac5
Show file tree
Hide file tree
Showing 79 changed files with 4,563 additions and 0 deletions.
71 changes: 71 additions & 0 deletions website_sale_checkout_skip_payment/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
.. image:: https://img.shields.io/badge/license-LGPL--3-blue.svg
:target: https://www.gnu.org/licenses/lgpl.html
:alt: License: LGPL-3

==================================
Website Sale Checkout Skip Payment
==================================

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.

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.

Usage
=====

To use this module, you need to:

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

.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot
:target: https://runbot.odoo-community.org/runbot/113/11.0


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 smash it by providing detailed and welcomed feedback.

Credits
=======

Images
------

* Odoo Community Association:
`Icon <https://github.com/OCA/maintainer-tools/blob/master/template/module/static/description/icon.svg>`_.

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

* Sergio Teruel <sergio.teruel@tecnativa.com>
* David Vidal <david.vidal@tecnativa.com>
* Martin Wilderoth <martin.wilderoth@linserv.se>

Maintainer
----------

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

This module is maintained by the OCA.

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.

To contribute to this module, please visit https://odoo-community.org.
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
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 @@
# 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': '12.0.1.0.0',
'category': 'Website',
'website': 'https://www.tecnativa.com',
'author': 'Tecnativa, Odoo Community Association (OCA)',
'license': 'LGPL-3',
'application': False,
'installable': True,
'depends': [
'website_sale',
],
'data': [
'views/assets.xml',
'views/website_sale_skip_payment.xml',
'views/website_sale_template.xml',
'views/partner_view.xml',
],
}
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
36 changes: 36 additions & 0 deletions website_sale_checkout_skip_payment/controllers/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# 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_get_status(self, sale_order_id, **post):
# When skip payment step, the transaction not exists 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': True,
'message': request.website._render(
'website_sale_checkout_skip_payment.order_state_message'),
}

@http.route()
def payment_confirmation(self, **post):
if not request.website.checkout_skip_payment:
return super().payment_confirmation(**post)
order = request.env['sale.order'].sudo().browse(
request.session.get('sale_last_order_id'))
order.action_confirm()
if not order.force_quotation_send():
return request.render(
'website_sale_skip_payment.confirmation_order_error')
request.website.sale_reset()
return request.render("website_sale.confirmation", {'order': order})
67 changes: 67 additions & 0 deletions website_sale_checkout_skip_payment/i18n/am.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# 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"
"Language: am\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"

#. 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.model,name:website_sale_checkout_skip_payment.model_res_partner
msgid "Contact"
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.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.ui.view,arch_db:website_sale_checkout_skip_payment.order_state_message
msgid "Your order is waiting manual confirmation."
msgstr ""

#~ msgid "Partner"
#~ msgstr "ተባባሪ"
68 changes: 68 additions & 0 deletions website_sale_checkout_skip_payment/i18n/ar.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# 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"
"Language: ar\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \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.model,name:website_sale_checkout_skip_payment.model_res_partner
msgid "Contact"
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.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.ui.view,arch_db:website_sale_checkout_skip_payment.order_state_message
msgid "Your order is waiting manual confirmation."
msgstr ""

#~ msgid "Partner"
#~ msgstr "الشريك"
67 changes: 67 additions & 0 deletions website_sale_checkout_skip_payment/i18n/bg.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# 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"
"Language: bg\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"

#. 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.model,name:website_sale_checkout_skip_payment.model_res_partner
msgid "Contact"
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.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.ui.view,arch_db:website_sale_checkout_skip_payment.order_state_message
msgid "Your order is waiting manual confirmation."
msgstr ""

#~ msgid "Partner"
#~ msgstr "Партньор"

0 comments on commit 58aeac5

Please sign in to comment.