diff --git a/setup/website_sale_exception/odoo/addons/website_sale_exception b/setup/website_sale_exception/odoo/addons/website_sale_exception new file mode 120000 index 0000000000..89604f79b3 --- /dev/null +++ b/setup/website_sale_exception/odoo/addons/website_sale_exception @@ -0,0 +1 @@ +../../../../website_sale_exception \ No newline at end of file diff --git a/setup/website_sale_exception/setup.py b/setup/website_sale_exception/setup.py new file mode 100644 index 0000000000..28c57bb640 --- /dev/null +++ b/setup/website_sale_exception/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +) diff --git a/test-requirements.txt b/test-requirements.txt new file mode 100644 index 0000000000..73724d4421 --- /dev/null +++ b/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 diff --git a/website_sale_exception/README.rst b/website_sale_exception/README.rst new file mode 100644 index 0000000000..1e16ab2cd7 --- /dev/null +++ b/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 `_. +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 `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* ADHOC + +Contributors +~~~~~~~~~~~~ + +* Katherine Zaoral + +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 `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/website_sale_exception/__init__.py b/website_sale_exception/__init__.py new file mode 100644 index 0000000000..7b3b84b718 --- /dev/null +++ b/website_sale_exception/__init__.py @@ -0,0 +1,2 @@ +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) +from . import models diff --git a/website_sale_exception/__manifest__.py b/website_sale_exception/__manifest__.py new file mode 100644 index 0000000000..1509826651 --- /dev/null +++ b/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", +} diff --git a/website_sale_exception/i18n/ca.po b/website_sale_exception/i18n/ca.po new file mode 100644 index 0000000000..9177abe76c --- /dev/null +++ b/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 \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" diff --git a/website_sale_exception/i18n/es.po b/website_sale_exception/i18n/es.po new file mode 100644 index 0000000000..f4d2414c4b --- /dev/null +++ b/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 \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" diff --git a/website_sale_exception/i18n/fr.po b/website_sale_exception/i18n/fr.po new file mode 100644 index 0000000000..4383919889 --- /dev/null +++ b/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 \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" diff --git a/website_sale_exception/i18n/nl.po b/website_sale_exception/i18n/nl.po new file mode 100644 index 0000000000..e994454f70 --- /dev/null +++ b/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 \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" diff --git a/website_sale_exception/i18n/website_sale_exception.pot b/website_sale_exception/i18n/website_sale_exception.pot new file mode 100644 index 0000000000..b6478e8864 --- /dev/null +++ b/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 "" + diff --git a/website_sale_exception/models/__init__.py b/website_sale_exception/models/__init__.py new file mode 100644 index 0000000000..03bc1ad290 --- /dev/null +++ b/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 diff --git a/website_sale_exception/models/sale.py b/website_sale_exception/models/sale.py new file mode 100644 index 0000000000..190a5da23f --- /dev/null +++ b/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() diff --git a/website_sale_exception/readme/CONTRIBUTORS.rst b/website_sale_exception/readme/CONTRIBUTORS.rst new file mode 100644 index 0000000000..bbbe5ec2a7 --- /dev/null +++ b/website_sale_exception/readme/CONTRIBUTORS.rst @@ -0,0 +1 @@ +* Katherine Zaoral diff --git a/website_sale_exception/readme/DESCRIPTION.rst b/website_sale_exception/readme/DESCRIPTION.rst new file mode 100644 index 0000000000..c48668e5cd --- /dev/null +++ b/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. diff --git a/website_sale_exception/static/description/icon.png b/website_sale_exception/static/description/icon.png new file mode 100644 index 0000000000..3a0328b516 Binary files /dev/null and b/website_sale_exception/static/description/icon.png differ diff --git a/website_sale_exception/static/description/index.html b/website_sale_exception/static/description/index.html new file mode 100644 index 0000000000..e252c5280a --- /dev/null +++ b/website_sale_exception/static/description/index.html @@ -0,0 +1,419 @@ + + + + + + +Website Sale Exception + + + +
+

Website Sale Exception

+ + +

Beta License: AGPL-3 OCA/e-commerce Translate me on Weblate Try me on Runbot

+

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

+ +
+

Bug Tracker

+

Bugs are tracked on GitHub 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.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • ADHOC
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

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 project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ +