Odoo Help


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.


List View Context Problem, any idea ?

Ajeng Shilvie
on 12/27/14, 11:22 PM 462 views

i want to make list view base on custom object 'wtc.approval.line', one of its field has one2many relation to 'res.groups' .

i just want to filter list view by current user login that has a group in that object. for example i login as administrator , administrator has group 'Purchase/Manager' in 'wtc.approval.line' , so in list view the administrator only saw his group not the others . My xml code shown below :

        <record model="ir.actions.act_window" id="approval_portal_action">
            <field name="name">Portal Approval Matrix Biaya</field>
            <field name="res_model">wtc.approval.line</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree</field>
            <field name="context">{'group_id':active_id}</field>
            <field name="domain">[('sts','=','1')]</field>

any idea?

do i have to use domain ? as well as 'sts' ?

Ajeng Shilvie
on 12/27/14, 11:25 PM


| 5 4 7
Bangalore, India

Techno-Functional Associate with 6+ years of experience in Odoo (formerly known as OpenERP).

On 12/29/14, 4:55 AM

You need to write Security Record Rules to achieve the same... Refer Standard modules, how rules are defined for an object and user

anyway in Record Rules , do i have to define a new method to get user groups id ?

Ajeng Shilvie
on 12/29/14, 4:58 AM

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)


Asked: 12/27/14, 11:22 PM
Seen: 462 times
Last updated: 3/16/15, 8:10 AM