Odoo Help

3

1
3 Answers
1
Avatar

Francesco OpenCode

--Francesco OpenCode--

3909
| 7 8 11
Grottaglie, Italy
--Francesco OpenCode--

Italian Odoo (OpenERP) Modules Developer LINKEDIN: http://www.linkedin.com/in/francescoapruzzese

Francesco OpenCode
2013/03/26 7:16

Tree view hasn't header section. Insert the button like a normal field.

<record id="view_employee_tree" model="ir.ui.view">
            <field name="name">hr.employee.tree</field>
            <field name="model">hr.employee</field>
            <field name="arch" type="xml">
                <tree string="Employees">
                    <button name="confirm" string="Confirm" class="oe_highlight"/>
                    <field name="name"/>
                    <field name="work_phone"/>
                    <field name="work_email"/>
                    <field name="company_id" groups="base.group_multi_company"/>
                    <field name="department_id"/>
                    <field name="job_id"/>
                    <field name="parent_id"/>
                    <field name="coach_id" invisible="1"/>
                </tree>
            </field>      
        </record>
12 Comments
Elmasry
2013/03/26 8:17

thank you very much Francesco it is work now

but didn't give me the result that i want

i want to add this button out of the tree grid like from view . but what actually happened that the button repeated with every row of data .

have you any advice for me.

Cogitae, Pierre Soum
2013/03/26 8:27

Yes the tree view is often missing and would be a GREAT fonctionnality...

Elmasry
2013/03/26 8:38

But what can i do to add button above or under tree view???

Francesco OpenCode
2013/03/26 8:48

If you create a wizard that call the some function of the button, you can find a menu voice in the "Other" menu at top of tree that does what you want!

Elmasry
2013/03/26 9:05

could you explain more ? please francesco

Francesco OpenCode
2013/03/26 10:12

Create a wizard, insert in it a button similar to button you want "copy". In tree you can select the record that you want confirm, go to Other menu and select the wizard you have created. Click on the button in wizard (your button) and it confirm the records

Elmasry
2013/03/26 11:58

i did what as you told me and write the code to create wizard and add the button to it

but what is "Other" menu .. do you mean "More" menu if u mean "More " so i can't find it's code sorry Francesco but i really need it.

thanks for helping me your answer helped me but hope more :)

Francesco OpenCode
2013/03/26 12:17

Excuse me but I'm italian and I use italian location in my db so I sometimes forgot original name of Menu...:)....Do you know how to create an openerp module?

Elmasry
2013/03/27 5:37

yes i can

Francesco OpenCode
2013/03/27 6:00

Ok, so isn't difficult to create a wizard. In this wizard you insert a button that calla a funtion egual to function called by confirm button. It's all.

Elmasry
2013/03/28 6:32

thx Francesco :)

evon_dun
2013/07/17 4:42

want to know about a button on invoice view when we select few records to get reports printed, can we have a button there to call a function and then select invoices to print?

0

Elmasry Hi, I have the same problem as you, perhaps a little later, but let me know if you solved your problem

0
Diego Calzadilla
2013/10/11 1:01

Maybe it's too late but you should try something likes this:

       <form string="Product form view" version="7.0">
               <!--   <field name="qtty"/>-->
                <field name="products" widget='many2many_list' context="{'tree_view_ref':'_new_tree.product_product_tree'}">
                    <tree string="Products" >
                <!-- <field name="default_code"/>-->
                <field name="name"/>
               <!--  <field name="categ_id" invisible="1"/>
                <field name="type" invisible="1"/>
                <field name="variants" groups="product.group_product_variant"/>
                <field name="uom_id" string="Unit of Measure" groups="product.group_uom"/>-->
                <field name="qtty"/>
               <field name="qty_available"/>
                <field name="virtual_available"/>
                <field name="lst_price"/>
                <field name="price" invisible="not context.get('pricelist',False)"/>
                <field name="standard_price" invisible="1"/>
                <field name="state"/>
                <field name="company_id" groups="base.group_multi_company" invisible="1"/>
            </tree> 
                </field>
                <footer>
                    <button string="Cancel" class="oe_link" special="cancel"/>
                     or
                    <button name="make_order" type="object" string="Generate Order" class="oe_highlight"/>
                </footer>

It's just a tree inside a form , after the tree you add the buttons!!

Ask a Question
Writer
Tags
Keep Informed
1 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 eLearning platform and experience all Odoo Apps through learning videos, use cases and quizzes.

Test it now