How to create a save and new button in a wizard, which does the same functionality like save and new button when creating sub contacts for a parent in odoo 10.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
How to create a save and new button in a wizard, which does the same functionality like save and new button when creating sub contacts for a parent in odoo 10.
Hi
XML
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="sub_contacts_view_form" model="ir.ui.view">
<field name="name">sub.contacts.view.
<field name="model">sub.contacts</fie
<field name="arch" type="xml">
<form string="Sub Contacts">
<group>
<field name="name"/>
<field name="email"/>
</group>
// you can add the fields here
<footer>
<button string="Save" name="action_sub_contacts" type="object" class="oe_highlight"/>
or
<button string="Cancel" class="oe_link" special="cancel"/>
</footer>
</form>
</field>
</record>
<record id="sub_contacts_action" model="ir.actions.act_window">
<field name="name">Sub Contacts</field>
<field name="res_model">sub.contacts<
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="view_id" ref="sub_contacts_view_form"/>
<field name="target">new</field>
</record>
</odoo>
py
from odoo import api, fields, models |
Hope it helps
Create an account today to enjoy exclusive features and engage with our awesome community!
РегистрацияRelated Posts | Ответы | Просмотры | Активность | |
---|---|---|---|---|
|
2
июл. 25
|
4440 | ||
|
2
дек. 24
|
7626 | ||
How to ORDER BY? [Odoo 10]
Решено
|
|
2
нояб. 24
|
28395 | |
|
2
мая 24
|
7362 | ||
|
3
мар. 24
|
6793 |