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

[18.0] [MIG] multi_step_wizard: Migration to 18.0 #1005

Open
wants to merge 51 commits into
base: 18.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
3fc2665
Extract multi_step_wizard as an addon
guewen Feb 11, 2019
1632242
[UPD] Update multi_step_wizard.pot
oca-travis Jul 12, 2019
e35ccc2
[ADD] icon.png
OCA-git-bot Jul 12, 2019
c293875
[MIG] multi_step_wizard: Migration to 12.0
alexey-pelykh Jul 20, 2019
cdda51b
[UPD] Update multi_step_wizard.pot
oca-travis Jul 23, 2019
8e2a54b
[UPD] README.rst
OCA-git-bot Jul 29, 2019
636b8e0
Added translation using Weblate (Chinese (Simplified))
liweijie0812 Sep 2, 2019
4de0e74
[13.0][MIG] migrate multi_step_wizard
Apr 13, 2020
86dcfcf
[UPD] Update multi_step_wizard.pot
oca-travis Apr 24, 2020
0856184
[UPD] README.rst
OCA-git-bot Apr 24, 2020
c66531e
[IMP] base_export_manager: black, isort, prettier
Tardo Mar 25, 2020
07ef6fd
[12.0][IMP] multi_step_wizard: Go Back
Jun 2, 2020
419e757
[UPD] Update multi_step_wizard.pot
oca-travis Jun 12, 2020
4fc5d1f
multi_step_wizard 13.0.1.1.0
OCA-git-bot Jun 12, 2020
a92a39e
Update translation files
oca-transbot Jun 12, 2020
ce25f30
[UPD] Brainbean Apps => CorporateHub
alexey-pelykh Nov 8, 2020
6c2695c
[UPD] README.rst
OCA-git-bot Nov 8, 2020
39be729
multi_step_wizard 13.0.1.1.1
OCA-git-bot Nov 8, 2020
51a0f83
[FIX] multi_step_wizard: allow_back
tarteo Nov 18, 2020
a892445
multi_step_wizard 13.0.1.1.2
OCA-git-bot Nov 19, 2020
1b3bc33
Added translation using Weblate (Dutch)
tarteo Nov 25, 2020
191ecbe
Translated using Weblate (Dutch)
tarteo Nov 25, 2020
fc36b51
[IMP] multi_step_wizard: black, isort, prettier
schhatbar-initos Mar 4, 2021
a21f842
[14.0][MIG]multi_step_wizard
schhatbar-initos Mar 4, 2021
97c67d2
[UPD] Update multi_step_wizard.pot
oca-travis Apr 2, 2021
25ffe97
[UPD] README.rst
OCA-git-bot Apr 2, 2021
bda6d79
Added translation using Weblate (Catalan)
Jan 26, 2022
267068d
Translated using Weblate (Catalan)
Jan 26, 2022
7fdb2f0
[MIG] multi_step_wizard: Migration to 15.0
nicomacr Apr 29, 2022
57b5a9b
[UPD] Update multi_step_wizard.pot
Jul 5, 2022
3004841
[UPD] README.rst
OCA-git-bot Jul 5, 2022
c634b7a
[FIX] Replaced deprecated SavepointCase with TransactionCase
dhx Aug 1, 2022
5ea5c18
multi_step_wizard 15.0.1.0.1
OCA-git-bot Aug 1, 2022
8434383
[MIG] multi_step_wizard: Migration to 16.0
FernandoRomera Nov 30, 2022
c76d333
[UPD] Update multi_step_wizard.pot
Dec 6, 2022
6804566
[UPD] README.rst
OCA-git-bot Dec 6, 2022
ded8c93
Update translation files
weblate Dec 6, 2022
f2f2b40
Added translation using Weblate (German)
johnny-longneck Jun 1, 2023
4623520
Translated using Weblate (German)
johnny-longneck Jun 1, 2023
b7d1ded
[UPD] README.rst
OCA-git-bot Sep 3, 2023
9b47096
Update translation files
weblate Oct 10, 2023
c5a5734
Added translation using Weblate (Spanish)
Ivorra78 Nov 11, 2023
3e6dbb6
Translated using Weblate (Spanish)
Ivorra78 Nov 11, 2023
6313338
Added translation using Weblate (Italian)
mymage Dec 29, 2023
a382e91
Translated using Weblate (Italian)
mymage Dec 31, 2023
f9d1783
[IMP] multi_step_wizard: pre-commit auto fixes
john-herholz-dt Jan 9, 2024
214fb40
[MIG] multi_step_wizard: Migration to 17.0
john-herholz-dt Jan 9, 2024
fbd7ee2
[UPD] Update multi_step_wizard.pot
Jul 19, 2024
09f63c5
[BOT] post-merge updates
OCA-git-bot Jul 19, 2024
e7a3f3b
Update translation files
weblate Jul 19, 2024
770f091
[MIG] multi_step_wizard: Migration to 18.0
rven Jan 27, 2025
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
175 changes: 175 additions & 0 deletions multi_step_wizard/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,175 @@
===================
Multi-Steps Wizards
===================

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

.. |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/18.0/multi_step_wizard
: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-18-0/server-ux-18-0-multi_step_wizard
: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=18.0
:alt: Try me on Runboat

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

This module is a base for creating multi-steps wizards. It does nothing
by itself.

**Table of contents**

.. contents::
:local:

Usage
=====

Example of class:

.. code:: python

class MyWizard(models.TransientModel):
_name = 'my.wizard'
_inherit = ['multi.step.wizard.mixin']

project_id = fields.Many2one(
comodel_name='project.project',
name="Project",
required=True,
ondelete='cascade',
default=lambda self: self._default_project_id(),
)
name = fields.Char()
field1 = fields.Char()
field2 = fields.Char()
field3 = fields.Char()

@api.model
def _selection_state(self):
return [
('start', 'Start'),
('configure', 'Configure'),
('custom', 'Customize'),
('final', 'Final'),
]

@api.model
def _default_project_id(self):
return self.env.context.get('active_id')

def state_exit_start(self):
self.state = 'configure'

def state_exit_configure(self):
self.state = 'custom'

def state_exit_custom(self):
self.state = 'final'

Example of view (note the mode, must be primary):

.. code:: xml

<?xml version="1.0" encoding="utf-8"?>
<odoo>

<record id="my_wizard_form" model="ir.ui.view">
<field name="name">my.wizard.form</field>
<field name="model">my.wizard</field>
<field name="mode">primary</field>
<field name="inherit_id" ref="multi_step_wizard.multi_step_wizard_form"/>
<field name="arch" type="xml">
<xpath expr="//footer" position="before">
<h1>
<field name="name"
readonly="state != 'start'"
class="oe_inline"
placeholder="Name"/>
</h1>
<group name="configure" invisible="state != 'configure'">
<group>
<field name="field1"/>
<field name="field2"/>
</group>
</group>
<group name="custom" invisible="state != 'custom'">
<group>
<field name="field3"/>
</group>
</group>
<div name="final" invisible="state != 'final'">
<p>The project is now configured.</p>
</div>
</xpath>
</field>
</record>

<record id="open_my_wizard" model="ir.actions.act_window">
<field name="name">My Wizard</field>
<field name="res_model">my.wizard</field>
<field name="view_mode">form</field>
<field name="target">new</field>
<field name="binding_model_id" ref="project.model_project_project" />
<field name="binding_view_types">form</field>
</record>
</odoo>

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:%20multi_step_wizard%0Aversion:%2018.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
-------

* Camptocamp

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

- Guewen Baconnier <guewen.baconnier@camptocamp.com>
- `CorporateHub <https://corporatehub.eu/>`__

- Alexey Pelykh <alexey.pelykh@corphub.eu>

- Sunanda Chhatbar <sunanda.chhatbar@initos.com>

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/server-ux <https://github.com/OCA/server-ux/tree/18.0/multi_step_wizard>`_ 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 multi_step_wizard/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).

from . import models
12 changes: 12 additions & 0 deletions multi_step_wizard/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).

{
"name": "Multi-Steps Wizards",
"version": "18.0.1.0.0",
"author": "Camptocamp,Odoo Community Association (OCA)",
"license": "AGPL-3",
"depends": ["base"],
"website": "https://github.com/OCA/server-ux",
"data": ["views/multi_step_wizard_views.xml"],
"installable": True,
}
56 changes: 56 additions & 0 deletions multi_step_wizard/i18n/ca.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * multi_step_wizard
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2022-01-26 18:52+0000\n"
"Last-Translator: Jaume Planas <jaume.planas@minorisa.net>\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: multi_step_wizard
#: model:ir.model.fields,field_description:multi_step_wizard.field_multi_step_wizard_mixin__allow_back
msgid "Allow Back"
msgstr "Permet enrera"

#. module: multi_step_wizard
#: model_terms:ir.ui.view,arch_db:multi_step_wizard.multi_step_wizard_form
msgid "Cancel"
msgstr "Cancel·la"

#. module: multi_step_wizard
#: model_terms:ir.ui.view,arch_db:multi_step_wizard.multi_step_wizard_form
msgid "Go Back"
msgstr "Enrera"

#. module: multi_step_wizard
#: model:ir.model,name:multi_step_wizard.model_multi_step_wizard_mixin
msgid "Multi Steps Wizard Mixin"
msgstr "Mixin Assistent multipas"

#. module: multi_step_wizard
#: model_terms:ir.ui.view,arch_db:multi_step_wizard.multi_step_wizard_form
msgid "Next"
msgstr "Següent"

#. module: multi_step_wizard
#: model:ir.model.fields,field_description:multi_step_wizard.field_multi_step_wizard_mixin__state
msgid "State"
msgstr "Estat"

#~ msgid "Display Name"
#~ msgstr "nOM"

#~ msgid "ID"
#~ msgstr "ID"

#~ msgid "Last Modified on"
#~ msgstr "Última modificació el"
47 changes: 47 additions & 0 deletions multi_step_wizard/i18n/de.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * multi_step_wizard
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2023-06-01 08:31+0000\n"
"Last-Translator: John Herholz <j.longneck@gmail.com>\n"
"Language-Team: none\n"
"Language: de\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: multi_step_wizard
#: model:ir.model.fields,field_description:multi_step_wizard.field_multi_step_wizard_mixin__allow_back
msgid "Allow Back"
msgstr "Zurück erlauben"

#. module: multi_step_wizard
#: model_terms:ir.ui.view,arch_db:multi_step_wizard.multi_step_wizard_form
msgid "Cancel"
msgstr "Abbrechen"

#. module: multi_step_wizard
#: model_terms:ir.ui.view,arch_db:multi_step_wizard.multi_step_wizard_form
msgid "Go Back"
msgstr "Zurück"

#. module: multi_step_wizard
#: model:ir.model,name:multi_step_wizard.model_multi_step_wizard_mixin
msgid "Multi Steps Wizard Mixin"
msgstr "Mehrstufiger Assistent Mixin"

#. module: multi_step_wizard
#: model_terms:ir.ui.view,arch_db:multi_step_wizard.multi_step_wizard_form
msgid "Next"
msgstr "Weiter"

#. module: multi_step_wizard
#: model:ir.model.fields,field_description:multi_step_wizard.field_multi_step_wizard_mixin__state
msgid "State"
msgstr "Status"
47 changes: 47 additions & 0 deletions multi_step_wizard/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * multi_step_wizard
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2023-11-11 15:33+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: multi_step_wizard
#: model:ir.model.fields,field_description:multi_step_wizard.field_multi_step_wizard_mixin__allow_back
msgid "Allow Back"
msgstr "Permitir Volver"

#. module: multi_step_wizard
#: model_terms:ir.ui.view,arch_db:multi_step_wizard.multi_step_wizard_form
msgid "Cancel"
msgstr "Cancelar"

#. module: multi_step_wizard
#: model_terms:ir.ui.view,arch_db:multi_step_wizard.multi_step_wizard_form
msgid "Go Back"
msgstr "Volver"

#. module: multi_step_wizard
#: model:ir.model,name:multi_step_wizard.model_multi_step_wizard_mixin
msgid "Multi Steps Wizard Mixin"
msgstr "Mezclador Asistente de Pasos Múltiples"

#. module: multi_step_wizard
#: model_terms:ir.ui.view,arch_db:multi_step_wizard.multi_step_wizard_form
msgid "Next"
msgstr "Siguiente"

#. module: multi_step_wizard
#: model:ir.model.fields,field_description:multi_step_wizard.field_multi_step_wizard_mixin__state
msgid "State"
msgstr "Estado"
Loading
Loading