Odoo Help

0

0
3 回答
2
アバター

Mohammed Amal N インド

--Mohammed Amal N--

2229
| 6 4 9
Ernakulam, インド
--Mohammed Amal N--

Email : mohammedamal.n@gmail.com

Blog: https://www.blogger.com/profile/14877879550922602186

Mohammed Amal N インド
2017/04/25 2:55

you have to inheri the form view too 

add <field name=”inherit_id” ref=”module_name.id_of view”/>

then use xpath to add a button

here is a simple example to inherit sale order form view :

<record model=”ir.ui.view” id=”sale_order_custom_field”>
    <field name=”name”>sale.order.form</field>
    <field name=”model”>sale.order</field>
    <field name=”inherit_id” ref=”sale.view_order_form”/>
    <field name=”arch” type=”xml”>
        <xpath expr=”//field[@name='partner_id']” position=”after”>
            <field name=”your_field”/>
        </xpath>
</field>
</record>

2
Agile インド
2017/04/25 3:20

To change state you can use self.write({'field name':'value'}) in this function.

質問する
Writer
タグ
Keep Informed
1 フォロワー
About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register
Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now