Skip to content
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
89 changes: 89 additions & 0 deletions purchase_request_cancel_confirm/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

===============================
Purchase Request Cancel Confirm
===============================

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

.. |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/license-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%2Fpurchase--workflow-lightgray.png?logo=github
:target: https://github.com/OCA/purchase-workflow/tree/19.0/purchase_request_cancel_confirm
:alt: OCA/purchase-workflow
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/purchase-workflow-19-0/purchase-workflow-19-0-purchase_request_cancel_confirm
: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/purchase-workflow&target_branch=19.0
:alt: Try me on Runboat

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

When user click to cancel purchase request, a confirmation wizard will
be show, with reason as optional.

**Table of contents**

.. contents::
:local:

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/purchase-workflow/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/purchase-workflow/issues/new?body=module:%20purchase_request_cancel_confirm%0Aversion:%2019.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
-------

* Ecosoft

Contributors
------------

- Kitti U. <kittiu@ecosoft.co.th>

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.

.. |maintainer-kittiu| image:: https://github.com/kittiu.png?size=40px
:target: https://github.com/kittiu
:alt: kittiu

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-kittiu|

This module is part of the `OCA/purchase-workflow <https://github.com/OCA/purchase-workflow/tree/19.0/purchase_request_cancel_confirm>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
3 changes: 3 additions & 0 deletions purchase_request_cancel_confirm/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from . import model
15 changes: 15 additions & 0 deletions purchase_request_cancel_confirm/__manifest__.py
Original file line number Diff line number Diff line change
@@ -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": "Purchase Request Cancel Confirm",
"version": "19.0.1.0.0",
"author": "Ecosoft, Odoo Community Association (OCA)",
"category": "Usability",
"license": "AGPL-3",
"website": "https://github.com/OCA/purchase-workflow",
"depends": ["base_cancel_confirm", "purchase_request"],
"auto_install": False,
"installable": True,
"maintainers": ["kittiu"],
}
43 changes: 43 additions & 0 deletions purchase_request_cancel_confirm/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * purchase_request_cancel_confirm
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 15.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2024-01-11 13:36+0000\n"
"Last-Translator: Ivorra78 <informatica@totmaterial.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 4.17\n"

#. module: purchase_request_cancel_confirm
#: model:ir.model.fields,help:purchase_request_cancel_confirm.field_purchase_request__cancel_confirm
msgid "A flag signify that this document is confirmed for cancellation"
msgstr ""
"Una bandera significa que este documento está confirmado para su anulación"

#. module: purchase_request_cancel_confirm
#: model:ir.model.fields,help:purchase_request_cancel_confirm.field_purchase_request__cancel_reason
msgid "An optional cancel reason"
msgstr "Un motivo de cancelación opcional"

#. module: purchase_request_cancel_confirm
#: model:ir.model.fields,field_description:purchase_request_cancel_confirm.field_purchase_request__cancel_confirm
msgid "Cancel Confirmed"
msgstr "Cancelar Confirmado"

#. module: purchase_request_cancel_confirm
#: model:ir.model.fields,field_description:purchase_request_cancel_confirm.field_purchase_request__cancel_reason
msgid "Cancel Reason"
msgstr "Cancelar Razón"

#. module: purchase_request_cancel_confirm
#: model:ir.model,name:purchase_request_cancel_confirm.model_purchase_request
msgid "Purchase Request"
msgstr "Solicitud de Compra"
42 changes: 42 additions & 0 deletions purchase_request_cancel_confirm/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * purchase_request_cancel_confirm
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 18.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2025-08-02 16:25+0000\n"
"Last-Translator: mymage <stefano.consolaro@mymage.it>\n"
"Language-Team: none\n"
"Language: it\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 5.10.4\n"

#. module: purchase_request_cancel_confirm
#: model:ir.model.fields,help:purchase_request_cancel_confirm.field_purchase_request__cancel_confirm
msgid "A flag signify that this document is confirmed for cancellation"
msgstr "Una spunta indica che questo documento è confermato per l'annullamento"

#. module: purchase_request_cancel_confirm
#: model:ir.model.fields,help:purchase_request_cancel_confirm.field_purchase_request__cancel_reason
msgid "An optional cancel reason"
msgstr "Un motivo di annullamento opzionale"

#. module: purchase_request_cancel_confirm
#: model:ir.model.fields,field_description:purchase_request_cancel_confirm.field_purchase_request__cancel_confirm
msgid "Cancel Confirmed"
msgstr "Annullamento confermato"

#. module: purchase_request_cancel_confirm
#: model:ir.model.fields,field_description:purchase_request_cancel_confirm.field_purchase_request__cancel_reason
msgid "Cancel Reason"
msgstr "Causale annullamento"

#. module: purchase_request_cancel_confirm
#: model:ir.model,name:purchase_request_cancel_confirm.model_purchase_request
msgid "Purchase Request"
msgstr "Richiesta di acquisto"
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * purchase_request_cancel_confirm
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 18.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: purchase_request_cancel_confirm
#: model:ir.model.fields,help:purchase_request_cancel_confirm.field_purchase_request__cancel_confirm
msgid "A flag signify that this document is confirmed for cancellation"
msgstr ""

#. module: purchase_request_cancel_confirm
#: model:ir.model.fields,help:purchase_request_cancel_confirm.field_purchase_request__cancel_reason
msgid "An optional cancel reason"
msgstr ""

#. module: purchase_request_cancel_confirm
#: model:ir.model.fields,field_description:purchase_request_cancel_confirm.field_purchase_request__cancel_confirm
msgid "Cancel Confirmed"
msgstr ""

#. module: purchase_request_cancel_confirm
#: model:ir.model.fields,field_description:purchase_request_cancel_confirm.field_purchase_request__cancel_reason
msgid "Cancel Reason"
msgstr ""

#. module: purchase_request_cancel_confirm
#: model:ir.model,name:purchase_request_cancel_confirm.model_purchase_request
msgid "Purchase Request"
msgstr ""
3 changes: 3 additions & 0 deletions purchase_request_cancel_confirm/model/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from . import purchase_request
20 changes: 20 additions & 0 deletions purchase_request_cancel_confirm/model/purchase_request.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# 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 PurchaseRequest(models.Model):
_name = "purchase.request"
_inherit = ["purchase.request", "base.cancel.confirm"]

_has_cancel_reason = "optional" # ["no", "optional", "required"]

def button_rejected(self):
if not self.filtered("cancel_confirm"):
return self.open_cancel_confirm_wizard()
return super().button_rejected()

def button_draft(self):
self.clear_cancel_confirm_data()
return super().button_draft()
3 changes: 3 additions & 0 deletions purchase_request_cancel_confirm/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
1 change: 1 addition & 0 deletions purchase_request_cancel_confirm/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Kitti U. \<kittiu@ecosoft.co.th\>
2 changes: 2 additions & 0 deletions purchase_request_cancel_confirm/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
When user click to cancel purchase request, a confirmation wizard will
be show, with reason as optional.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading