Help

3

How to create wizards in odoo12 Community Version

Avatar
Keerthi

How to create wizards in odoo12 Community Version

How to implement it...

Thanks in Advance...

Avatar
Discard
2 Answers
0
Best Answer

Hi,

For creating a wizard first you can define a transient model in the system.


class TestReport(models.TransientModel):
_name = 'test.report'

date_from = fields.Date(string='From')
date_to = fields.Date(string='To')


Then you can define the view in XML as follows,

<record id="view_test_report_wizard" model="ir.ui.view">
<field name="name">Test Report</field>
<field name="model">test.report</field>
<field name="arch" type="xml">
<form string="Choose The Details">
<group>
<group>
<field name="date_from" />
<field name="date_to"/>
</group>
</group>
<footer>
<button name="test_report" string="Print" type="object" class="oe_highlight" />
or
<button string="Cancel" class="oe_link" special="cancel"/>
</footer>
</form>
</field>
</record>

Also, Please see this link for more: How To create wizards in odoo ?

Thanks

1 Comment
Avatar
Discard
Avatar
Keerthi
-

Thank You

1
Avatar
Mitul Shingala
Best Answer
1 Comment
Avatar
Discard
Avatar
Keerthi
-

Thank You:)