mirror of
https://github.com/bringout/oca-technical.git
synced 2026-04-18 07:32:04 +02:00
Initial commit: OCA Technical packages (595 packages)
This commit is contained in:
commit
2cc02aac6e
24950 changed files with 2318079 additions and 0 deletions
|
|
@ -0,0 +1,4 @@
|
|||
* `Cetmix <cetmix.com>`_:
|
||||
* Ivan Sokolov
|
||||
* Mikhail Lapin
|
||||
* Maksim Shurupov
|
||||
|
|
@ -0,0 +1 @@
|
|||
The module lets the developer trigger a confirmation wizard during any action in Odoo. Based on data passed to the wizard and, based on user input, executes specified methods or close wizard.
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
To create configuration wizard:
|
||||
|
||||
Use confirm wizard which return method (return_type = method):
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
def change_address(self, address):
|
||||
# Confirmation wizard
|
||||
action = (
|
||||
self.env["confirmation.wizard"]
|
||||
.confirm_message(
|
||||
_("Do you want to change the partner's address?"),
|
||||
records=self.env["res.partner"].browse(1), # One or more records
|
||||
title="Confirm",
|
||||
method="change_address",
|
||||
callback_params={"address": address}
|
||||
)
|
||||
)
|
||||
if action:
|
||||
return action
|
||||
... # Your code here
|
||||
|
||||
Use confirm wizard which does nothing and closes itself when clicking confirm (return_type = window_close):
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
def method(self):
|
||||
...
|
||||
return (
|
||||
self.env["confirmation.wizard"]
|
||||
.with_context(hide_cancel=True)
|
||||
.confirm_no_action_message(
|
||||
message="Message",
|
||||
title="Notification"
|
||||
)
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue