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

[MIG] multi_step_wizard: Migration to 18.0 #974

Open
wants to merge 37 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
37 commits
Select commit Hold shift + click to select a range
6b490b3
Extract multi_step_wizard as an addon
guewen Feb 11, 2019
4d5f120
[UPD] Update multi_step_wizard.pot
oca-travis Jul 12, 2019
a3252b7
[ADD] icon.png
OCA-git-bot Jul 12, 2019
c3159a8
[MIG] multi_step_wizard: Migration to 12.0
alexey-pelykh Jul 20, 2019
d8f4372
[UPD] Update multi_step_wizard.pot
oca-travis Jul 23, 2019
a78d8fa
[UPD] README.rst
OCA-git-bot Jul 29, 2019
706cabf
Added translation using Weblate (Chinese (Simplified))
liweijie0812 Sep 2, 2019
0b40403
[13.0][MIG] migrate multi_step_wizard
Apr 13, 2020
169a4aa
[UPD] Update multi_step_wizard.pot
oca-travis Apr 24, 2020
db1edea
[UPD] README.rst
OCA-git-bot Apr 24, 2020
c3fda14
[IMP] base_export_manager: black, isort, prettier
Tardo Mar 25, 2020
2ae6aea
[12.0][IMP] multi_step_wizard: Go Back
Jun 2, 2020
acdfbfd
[UPD] Update multi_step_wizard.pot
oca-travis Jun 12, 2020
f8c0585
multi_step_wizard 13.0.1.1.0
OCA-git-bot Jun 12, 2020
4204f0d
Update translation files
oca-transbot Jun 12, 2020
5fee087
[UPD] Brainbean Apps => CorporateHub
alexey-pelykh Nov 8, 2020
fae514a
[UPD] README.rst
OCA-git-bot Nov 8, 2020
1406085
multi_step_wizard 13.0.1.1.1
OCA-git-bot Nov 8, 2020
797b492
[FIX] multi_step_wizard: allow_back
tarteo Nov 18, 2020
e0afdaa
multi_step_wizard 13.0.1.1.2
OCA-git-bot Nov 19, 2020
a94dc86
Added translation using Weblate (Dutch)
tarteo Nov 25, 2020
b8c4ea6
[IMP] multi_step_wizard: black, isort, prettier
schhatbar-initos Mar 4, 2021
915747b
[14.0][MIG]multi_step_wizard
schhatbar-initos Mar 4, 2021
2b7efc2
Added translation using Weblate (Catalan)
Jan 26, 2022
4e1ffbf
[MIG] multi_step_wizard: Migration to 15.0
nicomacr Apr 29, 2022
a24435b
[UPD] Update multi_step_wizard.pot
Jul 5, 2022
9ad9664
[UPD] README.rst
OCA-git-bot Jul 5, 2022
a194d89
[FIX] Replaced deprecated SavepointCase with TransactionCase
dhx Aug 1, 2022
e7d9d4e
multi_step_wizard 15.0.1.0.1
OCA-git-bot Aug 1, 2022
30a71a0
[MIG] multi_step_wizard: Migration to 16.0
FernandoRomera Nov 30, 2022
da664f9
Added translation using Weblate (German)
johnny-longneck Jun 1, 2023
74ad9b4
Added translation using Weblate (Spanish)
Ivorra78 Nov 11, 2023
b55fb5c
Added translation using Weblate (Italian)
mymage Dec 29, 2023
6cf3d89
[IMP] multi_step_wizard: pre-commit auto fixes
john-herholz-dt Jan 9, 2024
37506a5
[MIG] multi_step_wizard: Migration to 17.0
john-herholz-dt Jan 9, 2024
c4713e1
[IMP] multi_step_wizard: pre-commit auto fixes
sanderlienaerts Nov 28, 2024
7fbc8e0
[MIG] multi_step_wizard: Migration to 18.0
sanderlienaerts Nov 28, 2024
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 <[email protected]>
- `CorporateHub <https://corporatehub.eu/>`__

- Alexey Pelykh <[email protected]>

- Sunanda Chhatbar <[email protected]>

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 <[email protected]>\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 <[email protected]>\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 <[email protected]>\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