Community mailing list archives

community@mail.odoo.com

adding a many2many data to xml record

by
Mohamed Hagag
- 06/28/2015 10:33:32

Dears,


I would like to know how to add many2many data in an xml record of module ?



for example salary structure with rule_ids, I tried this :


 <record id="hr_payroll_structure_general" model="hr.payroll.structure">
            <field name="name">General Salary strucutre</field>
            <field name="code">GENERAL</field>
            <field name="parent_id" ref="hr_payroll.structure_base"/>
            <field name="rule_ids">
                hr_salary_rule_a,
                hr_salary_rule_b,
                hr_salary_rule_c,
                hr_salary_rule_d,
            </field>
        </record>


and it didn't show an error but also it didn't link the salary structure to the rules.


any idea how to achieve it ?!



Regards,