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
相關帖文 | 回覆 | 瀏覽次數 | 活動 | |
---|---|---|---|---|
|
2
7月 25
|
4440 | ||
|
2
12月 24
|
7626 | ||
|
2
11月 24
|
28395 | ||
|
2
5月 24
|
7362 | ||
|
3
3月 24
|
6793 |