Odoo Help

16
7 Answers
0
Avatar

Aktiv software

--Aktiv software--
4101
| 5 3 7
Ahmedabad, الهند
--Aktiv software--

 Aktiv software

  • Skype : shah.jainesh

  • email : Sales@Aktivsoftware.com

Aktiv software
7‏/5‏/2019 7:43 ص

Hello @AJ,

1) If u want to place a button in tree view's header eg. beside Create Button then the below link can help:

https://supportuae.wordpress.com/2017/09/06/how-to-add-button-in-tree-view-header-near-create-and-import-buttons-odoo10/

2) If u want to place a button in tree view then below code can help:

<record id="view_categ_tree" model="ir.ui.view">

<field name="name">categ.tree</field>

<field name="model">categ</field>

<field name="arch" type="xml">

<tree string="Category" editable="bottom">

<button name="action_dosomething" string="Demo Button" type="object" class="btn-primary"/>

<field name="name" required="1"/>

</tree>

</field>

</record>

Regards,




Email: odoo@aktivsoftware.com

Skype: kalpeshmaheshwari

   

-4
Weste
4‏/4‏/2014 1:10 م

Here is an example:

    <record id="view_computed_purchase_order_form" model="ir.ui.view">
        <field name="name">computed.purchase.order.form</field>
        <field name="model">computed.purchase.order</field>
        <field name="arch" type="xml">
            <form string="Computed Purchase Order" version="7.0">
                <sheet>
                    <header>
                        <button name="make_order" states="draft" string="Make Purchase Order" type="object" class="oe_highlight"/>
                        <button name="%(action_view_update_products)d" string="Update Products" type="action" class="oe_highlight" attrs="{'invisible':[('products_updated','=',False)]}"/>
                        <field name="state" widget="statusbar" statusbar_visible="draft,done,canceled" statusbar_colors='{"canceled":"red","done":"blue"}' readonly="1"/>
                    </header>
                        <group colspan="8" col="2">
                            <h1>
                                <label string="Computed Purchase Order" class="oe_title"/>
                                <field name="name" class="oe_inline" nolabel="1"/>
                            </h1>
                        </group>
                    <group col="7">
                        <group colspan="3" col="2">
                            <field name="partner_id" on_change="onchange_partner_id(partner_id)"/>
                        </group>
                        <field name="incoming_date"/>
                        <field name="purchase_order_id" states="done"/>
                        <field name="products_updated" invisible="1"/>
                        <field name="company_id" groups="base.group_multi_company"/>
                    </group>
                    ...
               </sheet>
            </form>
        </field>
     </record
1 Comment
AJ Schrafel Paper Corp
4‏/4‏/2014 1:17 م

tree view. Your example is for form view, the request is for tree view.

Ask a Question
Keep Informed
3 follower(s)
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