Skip to content

Commit

Permalink
Merge commit 'refs/pull/694/head' of https://github.com/oca/e-commerce
Browse files Browse the repository at this point in the history
…into 16.0-3450
  • Loading branch information
docker-odoo committed Aug 26, 2023
2 parents 0c1bc4d + b76091f commit 9b22e5a
Show file tree
Hide file tree
Showing 17 changed files with 641 additions and 0 deletions.
6 changes: 6 additions & 0 deletions setup/website_sale_exception/setup.py
@@ -0,0 +1,6 @@
import setuptools

setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
2 changes: 2 additions & 0 deletions test-requirements.txt
@@ -0,0 +1,2 @@
odoo-addon-base-exception @ git+https://github.com/OCA/server-tools.git@refs/pull/2463/head#subdirectory=setup/base_exception
odoo-addon-sale-exception @ git+https://github.com/OCA/sale-workflow.git@refs/pull/2266/head#subdirectory=setup/sale_exception
73 changes: 73 additions & 0 deletions website_sale_exception/README.rst
@@ -0,0 +1,73 @@
======================
Website Sale Exception
======================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! 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-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fe--commerce-lightgray.png?logo=github
:target: https://github.com/OCA/e-commerce/tree/12.0/website_sale_exception
: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-12-0/e-commerce-12-0-website_sale_exception
: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/12.0
:alt: Try me on Runbot

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

This module allows to pass a website sale from draft state to sent if there are exeptions that do not let to continue to done state. This is required to close the website sale order after the sale order has been confirmed and the payment has been received. This way the user can create a new sale order from the website without overwriting the last one and without losing the payment information.

**Table of contents**

.. contents::
:local:

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_exception%0Aversion:%2012.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
~~~~~~~

* ADHOC

Contributors
~~~~~~~~~~~~

* Katherine Zaoral <kz@adhoc.com.ar>

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/12.0/website_sale_exception>`_ 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_exception/__init__.py
@@ -0,0 +1,2 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
from . import models
12 changes: 12 additions & 0 deletions website_sale_exception/__manifest__.py
@@ -0,0 +1,12 @@
# Copyright 2020 ADHOC
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Website Sale Exception",
"summary": "Support for sale exceptions on website",
"version": "16.0.1.0.0",
"category": "Generic Modules/Sale",
"author": "ADHOC, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/e-commerce",
"depends": ["website_sale", "sale_exception"],
"license": "AGPL-3",
}
22 changes: 22 additions & 0 deletions website_sale_exception/i18n/ca.po
@@ -0,0 +1,22 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * website_sale_exception
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2021-01-20 17:44+0000\n"
"Last-Translator: claudiagn <claudia.gargallo@qubiq.es>\n"
"Language-Team: none\n"
"Language: ca\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"
"X-Generator: Weblate 4.3.2\n"

#. module: website_sale_exception
#: model:ir.model,name:website_sale_exception.model_sale_order
msgid "Sale Order"
msgstr "Comanda de venda"
22 changes: 22 additions & 0 deletions website_sale_exception/i18n/es.po
@@ -0,0 +1,22 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * website_sale_exception
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2020-11-03 13:08+0000\n"
"Last-Translator: claudiagn <claudia.gargallo@qubiq.es>\n"
"Language-Team: none\n"
"Language: es\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"
"X-Generator: Weblate 3.10\n"

#. module: website_sale_exception
#: model:ir.model,name:website_sale_exception.model_sale_order
msgid "Sale Order"
msgstr "Pedido de venta"
22 changes: 22 additions & 0 deletions website_sale_exception/i18n/fr.po
@@ -0,0 +1,22 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * website_sale_exception
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2020-11-23 15:36+0000\n"
"Last-Translator: Yann Papouin <y.papouin@dec-industrie.com>\n"
"Language-Team: none\n"
"Language: fr\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"
"X-Generator: Weblate 3.10\n"

#. module: website_sale_exception
#: model:ir.model,name:website_sale_exception.model_sale_order
msgid "Sale Order"
msgstr "Commande client"
22 changes: 22 additions & 0 deletions website_sale_exception/i18n/nl.po
@@ -0,0 +1,22 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * website_sale_exception
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2020-12-15 17:19+0000\n"
"Last-Translator: Bosd <c5e2fd43-d292-4c90-9d1f-74ff3436329a@anonaddy.me>\n"
"Language-Team: none\n"
"Language: nl\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"
"X-Generator: Weblate 4.3.2\n"

#. module: website_sale_exception
#: model:ir.model,name:website_sale_exception.model_sale_order
msgid "Sale Order"
msgstr "Verkooporder"
20 changes: 20 additions & 0 deletions website_sale_exception/i18n/website_sale_exception.pot
@@ -0,0 +1,20 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * website_sale_exception
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: website_sale_exception
#: model:ir.model,name:website_sale_exception.model_sale_order
msgid "Sale Order"
msgstr ""

2 changes: 2 additions & 0 deletions website_sale_exception/models/__init__.py
@@ -0,0 +1,2 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
from . import sale
14 changes: 14 additions & 0 deletions website_sale_exception/models/sale.py
@@ -0,0 +1,14 @@
# Copyright 2020 ADHOC
from odoo import models


class SaleOrder(models.Model):

_inherit = "sale.order"

def action_confirm(self):
if self.detect_exceptions():
website_draft = self.filtered(lambda o: o.state == "draft" and o.website_id)
if website_draft:
website_draft.action_quotation_sent()
return super().action_confirm()
1 change: 1 addition & 0 deletions website_sale_exception/readme/CONTRIBUTORS.rst
@@ -0,0 +1 @@
* Katherine Zaoral <kz@adhoc.com.ar>
1 change: 1 addition & 0 deletions website_sale_exception/readme/DESCRIPTION.rst
@@ -0,0 +1 @@
This module allows to pass a website sale from draft state to sent if there are exeptions that do not let to continue to done state. This is required to close the website sale order after the sale order has been confirmed and the payment has been received. This way the user can create a new sale order from the website without overwriting the last one and without losing the payment information.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 9b22e5a

Please sign in to comment.