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

[12.0][BKP] base_cancel_confirm #973

Open
wants to merge 21 commits into
base: 12.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
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
110 changes: 110 additions & 0 deletions base_cancel_confirm/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
===================
Base Cancel Confirm
===================

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

.. |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%2Fserver--ux-lightgray.png?logo=github
:target: https://github.com/OCA/server-ux/tree/14.0/base_cancel_confirm
:alt: OCA/server-ux
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/server-ux-14-0/server-ux-14-0-base_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/server-ux&target_branch=14.0
:alt: Try me on Runboat

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

Many document model that already has cancel action may also want a confirm dialog with option to provide reason.

This module does not provide a functionality by itself but an abstract model
to easily implement a confirm with reason wizard when cancel button is clicked.
If reason is provided, it will be visible in form view.

**Note:** To be able to use this module in a new model you will need some
development.

You can see implementation example as followings,

* `sale_cancel_confirm <https://github.com/OCA/sale-workflow>`_
* `purchase_cancel_confirm <https://github.com/OCA/purchase-workflow>`_
* `purchase_request_cancel_confirm <https://github.com/OCA/purchase-workflow>`_
* `account_move_cancel_confirm <https://github.com/OCA/account-invoicing>`_

**Table of contents**

.. contents::
:local:

Configuration
=============

By default, the cancel confirm will be disabled (to ensure no side effect on other module unit test)

To enable cancel confirm wizard, please add System Parameter (ir.config_parameter) for each extended module.

For example,

* sale_cancel_confirm, add `sale.order.cancel_confirm_disable = False`
* purchase_cancel_confirm, add `purchase.order.cancel_confirm_disable = False`

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/server-ux/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/server-ux/issues/new?body=module:%20base_cancel_confirm%0Aversion:%2014.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/server-ux <https://github.com/OCA/server-ux/tree/14.0/base_cancel_confirm>`_ project on GitHub.

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

from . import wizard
from . import model
20 changes: 20 additions & 0 deletions base_cancel_confirm/__manifest__.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).

{
"name": "Base Cancel Confirm",
"version": "12.0.1.0.0",
"author": "Ecosoft,Odoo Community Association (OCA)",
"category": "Usability",
"license": "AGPL-3",
"website": "https://github.com/OCA/server-ux",
"depends": ["base"],
"data": [
"wizard/cancel_confirm.xml",
"security/ir.model.access.csv",
"templates/cancel_confirm_template.xml",
],
"auto_install": False,
"installable": True,
"maintainers": ["kittiu"],
}
131 changes: 131 additions & 0 deletions base_cancel_confirm/i18n/base_cancel_confirm.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * base_cancel_confirm
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.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: base_cancel_confirm
#: model:ir.model.fields,help:base_cancel_confirm.field_base_cancel_confirm__cancel_confirm
msgid "A flag signify that this document is confirmed for cancellation"
msgstr ""

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

#. module: base_cancel_confirm
#: model_terms:ir.ui.view,arch_db:base_cancel_confirm.view_cancel_confirm_wizard
msgid "Are you sure to cancel this document?"
msgstr ""

#. module: base_cancel_confirm
#: model_terms:ir.ui.view,arch_db:base_cancel_confirm.view_cancel_confirm_wizard
msgid "Cancel"
msgstr ""

#. module: base_cancel_confirm
#: model:ir.model,name:base_cancel_confirm.model_cancel_confirm
msgid "Cancel Confirm"
msgstr ""

#. module: base_cancel_confirm
#: model:ir.actions.act_window,name:base_cancel_confirm.action_cancel_confirm_wizard
#: model:ir.model,name:base_cancel_confirm.model_base_cancel_confirm
#: model_terms:ir.ui.view,arch_db:base_cancel_confirm.view_cancel_confirm_wizard
msgid "Cancel Confirmation"
msgstr ""

#. module: base_cancel_confirm
#: model:ir.model.fields,field_description:base_cancel_confirm.field_base_cancel_confirm__cancel_confirm
msgid "Cancel Confirmed"
msgstr ""

#. module: base_cancel_confirm
#: model:ir.model.fields,field_description:base_cancel_confirm.field_base_cancel_confirm__cancel_reason
#: model:ir.model.fields,field_description:base_cancel_confirm.field_cancel_confirm__cancel_reason
msgid "Cancel Reason"
msgstr ""

#. module: base_cancel_confirm
#: code:addons/base_cancel_confirm/model/base_cancel_confirm.py:0
#, python-format
msgid "Configuration Error (%s), should be 'True' or 'False'"
msgstr ""

#. module: base_cancel_confirm
#: model_terms:ir.ui.view,arch_db:base_cancel_confirm.view_cancel_confirm_wizard
msgid "Confirm"
msgstr ""

#. module: base_cancel_confirm
#: model:ir.model.fields,field_description:base_cancel_confirm.field_cancel_confirm__create_uid
msgid "Created by"
msgstr ""

#. module: base_cancel_confirm
#: model:ir.model.fields,field_description:base_cancel_confirm.field_cancel_confirm__create_date
msgid "Created on"
msgstr ""

#. module: base_cancel_confirm
#: model:ir.model.fields,field_description:base_cancel_confirm.field_base_cancel_confirm__display_name
#: model:ir.model.fields,field_description:base_cancel_confirm.field_cancel_confirm__display_name
msgid "Display Name"
msgstr ""

#. module: base_cancel_confirm
#: model:ir.model.fields,field_description:base_cancel_confirm.field_cancel_confirm__has_cancel_reason
msgid "Has Cancel Reason"
msgstr ""

#. module: base_cancel_confirm
#: model:ir.model.fields,field_description:base_cancel_confirm.field_base_cancel_confirm__id
#: model:ir.model.fields,field_description:base_cancel_confirm.field_cancel_confirm__id
msgid "ID"
msgstr ""

#. module: base_cancel_confirm
#: model:ir.model.fields,field_description:base_cancel_confirm.field_base_cancel_confirm____last_update
#: model:ir.model.fields,field_description:base_cancel_confirm.field_cancel_confirm____last_update
msgid "Last Modified on"
msgstr ""

#. module: base_cancel_confirm
#: model:ir.model.fields,field_description:base_cancel_confirm.field_cancel_confirm__write_uid
msgid "Last Updated by"
msgstr ""

#. module: base_cancel_confirm
#: model:ir.model.fields,field_description:base_cancel_confirm.field_cancel_confirm__write_date
msgid "Last Updated on"
msgstr ""

#. module: base_cancel_confirm
#: model:ir.model.fields.selection,name:base_cancel_confirm.selection__cancel_confirm__has_cancel_reason__no
msgid "None"
msgstr ""

#. module: base_cancel_confirm
#: model:ir.model.fields.selection,name:base_cancel_confirm.selection__cancel_confirm__has_cancel_reason__optional
msgid "Optional"
msgstr ""

#. module: base_cancel_confirm
#: model:ir.model.fields.selection,name:base_cancel_confirm.selection__cancel_confirm__has_cancel_reason__required
msgid "Required"
msgstr ""

#. module: base_cancel_confirm
#: model_terms:ir.ui.view,arch_db:base_cancel_confirm.view_cancel_confirm_wizard
msgid "or"
msgstr ""
Loading
Loading