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
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng kýBài viết liên quan | Trả lời | Lượt xem | Hoạt động | |
---|---|---|---|---|
|
2
thg 7 25
|
4484 | ||
|
2
thg 12 24
|
7666 | ||
How to ORDER BY? [Odoo 10]
Đã xử lý
|
|
2
thg 11 24
|
28429 | |
|
2
thg 5 24
|
7399 | ||
|
3
thg 3 24
|
6813 |