Odoo Help

Welcome!

This community 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.

0

Create a graph with a one2many in a XML file

By
Dijoux Corentin
on 5/20/14, 5:04 AM 1,227 views

Hello,

 

I need a graph in the "hr.employee" model, on a one2many field (contract_ids). I need to print the "date_start" and the "wage" for each employee in a graph of the "hr.employee" view, but this attributes are in the "hr.contract" model. I can access to this attributes by the field "contract_ids", but i don't know how to add this graph to my hr.model!

 

For example, this is what i try in XML :

<record model="ir.ui.view" id="hr_employee_view_graph">
    <field name="name">hr.employee.graph</field>
    <field name="model">hr.employee</field>
    <field name="type">graph</field>
    <field name="arch" type="xml">
        <field name="contract_ids">
            <graph string="Actuals wages" type="area">
                <field name="date_start"/>
                <field name="wage"/>
            </graph>
        </field>
    </field>
</record>

I really don't know how to print in a graph some information from a one2many field in a model ... Did you have any idea please?

 

Best regards,

Corentin Dijoux

0
khudrath
On 9/11/14, 6:38 AM

Hi,

have u got any solution regarding the above

 

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 5/20/14, 5:04 AM
Seen: 1227 times
Last updated: 3/16/15, 8:10 AM