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

[Added] 17.0 module #984

Open
wants to merge 3 commits into
base: 17.0
Choose a base branch
from
Open
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
103 changes: 103 additions & 0 deletions website_sale_checkout_skip_payment/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
==================================
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/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:

#. 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.

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:%2016.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 <martin.wilderoth@linserv.se>
* `Studio73 <https://www.studio73.es>`_:

* Miguel Gandia <miguel@studio73.es>

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 <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": "17.0.0.0.1",
"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
32 changes: 32 additions & 0 deletions website_sale_checkout_skip_payment/controllers/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# 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.addons.website_sale.controllers.main import WebsiteSale

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


class CheckoutSkipPaymentWebsite(WebsiteSale):

@http.route('/shop/payment/validate/skip', type='http', auth="public", website=True, sitemap=False)
def shop_payment_skip(self, sale_order_id=None, **post):

if not sale_order_id:
return request.redirect('/shop')
else:
sale_order_ids = sale_order_id.split(',')
vals = {}

for order_id in sale_order_ids:
order = request.env['sale.order'].sudo().browse(int(order_id))

if not order.partner_id.skip_website_checkout_payment:
return request.redirect('/shop')

if order.exists() and order.state not in ('sale', 'done', 'cancel'):
order.with_context(send_email=True).with_user(SUPERUSER_ID).action_quotation_send()
vals = {'order_name': order.name}
request.session['skip_payment_vals'] = vals
return request.redirect('/shop/confirmation')
115 changes: 115 additions & 0 deletions website_sale_checkout_skip_payment/i18n/am.po
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 <transbot@odoo-community.org>, 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 <carlos.roca@tecnativa.com>\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 ""
Loading
Loading