diff --git a/stock_picking_cancel_confirm/__init__.py b/stock_picking_cancel_confirm/__init__.py new file mode 100644 index 000000000..02c244eef --- /dev/null +++ b/stock_picking_cancel_confirm/__init__.py @@ -0,0 +1,4 @@ +# Copyright 2020 Ecosoft Co., Ltd. (http://ecosoft.co.th) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from . import model diff --git a/stock_picking_cancel_confirm/__manifest__.py b/stock_picking_cancel_confirm/__manifest__.py new file mode 100644 index 000000000..d7f73fa8c --- /dev/null +++ b/stock_picking_cancel_confirm/__manifest__.py @@ -0,0 +1,15 @@ +# Copyright 2020 Ecosoft Co., Ltd. (http://ecosoft.co.th) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +{ + "name": "Stock Picking Cancel Confirm", + "version": "14.0.1.0.0", + "author": "Ecosoft,Odoo Community Association (OCA)", + "category": "Usability", + "license": "AGPL-3", + "website": "https://github.com/OCA/stock-logistics-warehouse", + "depends": ["base_cancel_confirm", "stock"], + "auto_install": False, + "installable": True, + "maintainers": ["kittiu"], +} diff --git a/stock_picking_cancel_confirm/model/__init__.py b/stock_picking_cancel_confirm/model/__init__.py new file mode 100644 index 000000000..cd20242ea --- /dev/null +++ b/stock_picking_cancel_confirm/model/__init__.py @@ -0,0 +1,4 @@ +# Copyright 2020 Ecosoft Co., Ltd. (http://ecosoft.co.th) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from . import stock_picking diff --git a/stock_picking_cancel_confirm/model/stock_picking.py b/stock_picking_cancel_confirm/model/stock_picking.py new file mode 100644 index 000000000..83f37d28b --- /dev/null +++ b/stock_picking_cancel_confirm/model/stock_picking.py @@ -0,0 +1,15 @@ +# Copyright 2020 Ecosoft Co., Ltd. (http://ecosoft.co.th) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). +from odoo import models + + +class StockPicking(models.Model): + _name = "stock.picking" + _inherit = ["stock.picking", "base.cancel.confirm"] + + _has_cancel_reason = "optional" # ["no", "optional", "required"] + + def action_cancel(self): + if not self.filtered("cancel_confirm"): + return self.open_cancel_confirm_wizard() + return super().action_cancel() diff --git a/stock_picking_cancel_confirm/readme/CONTRIBUTORS.rst b/stock_picking_cancel_confirm/readme/CONTRIBUTORS.rst new file mode 100644 index 000000000..6ce956d96 --- /dev/null +++ b/stock_picking_cancel_confirm/readme/CONTRIBUTORS.rst @@ -0,0 +1 @@ +* Kitti U. diff --git a/stock_picking_cancel_confirm/readme/DESCRIPTION.rst b/stock_picking_cancel_confirm/readme/DESCRIPTION.rst new file mode 100644 index 000000000..5095dadd6 --- /dev/null +++ b/stock_picking_cancel_confirm/readme/DESCRIPTION.rst @@ -0,0 +1 @@ +When user click to cancel stock picking, a confirmation wizard will be show, with reason as optional. diff --git a/stock_picking_cancel_confirm/static/description/icon.png b/stock_picking_cancel_confirm/static/description/icon.png new file mode 100644 index 000000000..3a0328b51 Binary files /dev/null and b/stock_picking_cancel_confirm/static/description/icon.png differ diff --git a/stock_picking_cancel_confirm/static/description/index.html b/stock_picking_cancel_confirm/static/description/index.html new file mode 100644 index 000000000..b8d2ded74 --- /dev/null +++ b/stock_picking_cancel_confirm/static/description/index.html @@ -0,0 +1,435 @@ + + + + + + +Sale Cancel Reason + + + +
+

Sale Cancel Reason

+ + +

Beta License: AGPL-3 OCA/sale-workflow Translate me on Weblate Try me on Runbot

+

When a sale order is canceled, a reason must be given, +it is chosen from a configured list.

+

Table of contents

+ +
+

Usage

+

To use this module, you need to:

+
    +
  • Click at “Cancel Order” button from a sales order which state equal +to Draft, Quotation or Sales Order
  • +
  • A wizard will show a list of cancel reasons
  • +
  • Choose a reason and confirm cancellation, the reason will be stamped in the sales order
  • +
+
+
+

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

+
    +
  • Camptocamp
  • +
+
+
+

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

+

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

+
+
+
+ +