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][17.0] multi_step_wizard: Migration to 17.0 #797

Open
wants to merge 47 commits into
base: 17.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
97283d1
Extract multi_step_wizard as an addon
guewen Feb 11, 2019
632df3b
[UPD] Update multi_step_wizard.pot
oca-travis Jul 12, 2019
26f7154
[ADD] icon.png
OCA-git-bot Jul 12, 2019
028d389
[MIG] multi_step_wizard: Migration to 12.0
alexey-pelykh Jul 20, 2019
d6f55e4
[UPD] Update multi_step_wizard.pot
oca-travis Jul 23, 2019
af2719f
[UPD] README.rst
OCA-git-bot Jul 29, 2019
e750f26
Added translation using Weblate (Chinese (Simplified))
liweijie0812 Sep 2, 2019
18ed669
[13.0][MIG] migrate multi_step_wizard
Apr 13, 2020
05a52be
[UPD] Update multi_step_wizard.pot
oca-travis Apr 24, 2020
a1cdf98
[UPD] README.rst
OCA-git-bot Apr 24, 2020
43139a7
[IMP] base_export_manager: black, isort, prettier
Tardo Mar 25, 2020
3b28e0d
[12.0][IMP] multi_step_wizard: Go Back
Jun 2, 2020
5ab5c26
[UPD] Update multi_step_wizard.pot
oca-travis Jun 12, 2020
900e6ee
multi_step_wizard 13.0.1.1.0
OCA-git-bot Jun 12, 2020
75c16d0
Update translation files
oca-transbot Jun 12, 2020
5f8bcb5
[UPD] Brainbean Apps => CorporateHub
alexey-pelykh Nov 8, 2020
176f00f
[UPD] README.rst
OCA-git-bot Nov 8, 2020
bf944c3
multi_step_wizard 13.0.1.1.1
OCA-git-bot Nov 8, 2020
ab0e2bf
[FIX] multi_step_wizard: allow_back
tarteo Nov 18, 2020
cbd1672
multi_step_wizard 13.0.1.1.2
OCA-git-bot Nov 19, 2020
8e37dca
Added translation using Weblate (Dutch)
tarteo Nov 25, 2020
8b42f4c
Translated using Weblate (Dutch)
tarteo Nov 25, 2020
6149689
[IMP] multi_step_wizard: black, isort, prettier
schhatbar-initos Mar 4, 2021
b7404d9
[14.0][MIG]multi_step_wizard
schhatbar-initos Mar 4, 2021
394f419
[UPD] Update multi_step_wizard.pot
oca-travis Apr 2, 2021
fc2e965
[UPD] README.rst
OCA-git-bot Apr 2, 2021
babcf5d
Added translation using Weblate (Catalan)
Jan 26, 2022
46b9a32
Translated using Weblate (Catalan)
Jan 26, 2022
b290164
[MIG] multi_step_wizard: Migration to 15.0
nicomacr Apr 29, 2022
4e0dde9
[UPD] Update multi_step_wizard.pot
Jul 5, 2022
7a73ccc
[UPD] README.rst
OCA-git-bot Jul 5, 2022
4e8ce08
[FIX] Replaced deprecated SavepointCase with TransactionCase
dhx Aug 1, 2022
d469e88
multi_step_wizard 15.0.1.0.1
OCA-git-bot Aug 1, 2022
61b5b12
[MIG] multi_step_wizard: Migration to 16.0
FernandoRomera Nov 30, 2022
3fa458b
[UPD] Update multi_step_wizard.pot
Dec 6, 2022
ca92edc
[UPD] README.rst
OCA-git-bot Dec 6, 2022
3417839
Update translation files
weblate Dec 6, 2022
d033c6e
Added translation using Weblate (German)
johnny-longneck Jun 1, 2023
da7747d
Translated using Weblate (German)
johnny-longneck Jun 1, 2023
21bd618
[UPD] README.rst
OCA-git-bot Sep 3, 2023
adc1249
Update translation files
weblate Oct 10, 2023
7cb5b92
Added translation using Weblate (Spanish)
Ivorra78 Nov 11, 2023
63df7c7
Translated using Weblate (Spanish)
Ivorra78 Nov 11, 2023
3405dce
Added translation using Weblate (Italian)
mymage Dec 29, 2023
3bf891e
Translated using Weblate (Italian)
mymage Dec 31, 2023
aee5cad
[IMP] multi_step_wizard: pre-commit auto fixes
john-herholz-dt Jan 9, 2024
91675bb
[MIG] multi_step_wizard: Migration to 17.0
john-herholz-dt Jan 9, 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:f402687073ac0f9bc8b525e4e8030a711d2a0e18d4adf0535720fbaec896410d
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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/17.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-17-0/server-ux-17-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=17.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:%2017.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/17.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": "17.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