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

[MIG] website_sale_exception: Migration to 16.0 #865

Open
wants to merge 18 commits into
base: 16.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
6 changes: 6 additions & 0 deletions setup/website_sale_exception/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import setuptools

setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
76 changes: 76 additions & 0 deletions website_sale_exception/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
======================
Website Sale Exception
======================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:bc51a231a57fd967851a6751e5e1e15d70b503bdcfcff96174c1163ea751fc04
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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/16.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-16-0/e-commerce-16-0-website_sale_exception
: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=16.0
:alt: Try me on Runboat

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

* 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/16.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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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": "Website",
"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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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()

Check warning on line 13 in website_sale_exception/models/sale.py

View check run for this annotation

Codecov / codecov/patch

website_sale_exception/models/sale.py#L13

Added line #L13 was not covered by tests
return super().action_confirm()
1 change: 1 addition & 0 deletions website_sale_exception/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* Katherine Zaoral <kz@adhoc.com.ar>
1 change: 1 addition & 0 deletions website_sale_exception/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading