Created
June 8, 2021 23:41
-
-
Save 3mrdev/7f1aead7530f56d9d34b169950d74f7e to your computer and use it in GitHub Desktop.
Odoo Wizards
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from odoo import models, fields, api | |
class PopupWizard(models.TransientModel): | |
_name = 'popup.wizard' | |
title = fields.Char() | |
start_date = fields.Datetime() | |
def confirm(self): | |
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<odoo> | |
<data> | |
<record model="ir.ui.view" id="wizard_form"> | |
<field name="name">Wizard Form</field> | |
<field name="model">popup.wizard</field> | |
<field name="type">form</field> | |
<field name="arch" type="xml"> | |
<form string="Popup Wizard"> | |
<group> | |
<group> | |
<field name="start_date"/> | |
<field name="end_date"/> | |
</group> | |
</group> | |
<footer> | |
<button name="confirm" string="Confirm" type="object" class="oe_highlight"/> | |
<button string="Cancel" special="cancel"/> | |
</footer> | |
</form> | |
</field> | |
</record> | |
<act_window id="action_popup_wizard" | |
name="Popup Wizard" | |
res_model="popup.wizard" | |
view_mode="form" | |
target="new"/> | |
<menuitem id="popup_wizard_menu" name="Popup Wizard" sequence="1" parent="your_module.your_menu" action="action_popup_wizard"/> | |
</data> | |
</odoo> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment