Odoo Help

0

Create a graph with a one2many in a XML file

By
Dijoux Corentin
on 5/20/14, 5:04 AM 1,518 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

 

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

Question tools

2 follower(s)

Stats

Asked: 5/20/14, 5:04 AM
Seen: 1518 times
Last updated: 2/28/17, 7:26 AM