Odoo Help


How to hide tickets from unsolicited users?

on 9/17/14, 10:18 AM 1,440 views

Hello, i'm developing a a ticket module. But i have no ideea how to make my tickets visible only for asigned users?  Now every ticket is visible for everyone. I would be happy if someone will give me a hint. Thanks.


A piece of code:


from osv import fields, osv
from openerp.addons.crm import crm
from openerp.addons import project

class support_form(osv.osv):
        _name = "cf.support"
        _description = 'cf.support Module'
        _inherit = 'mail.thread'
        _order = "state desc, priority,id"
        _columns = { 
                'name': fields.char('Name', required=True),
                'state': fields.selection(crm.AVAILABLE_STATES, 'State', select=True, track_visibility='onchange'),
                'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority', select=True , track_visibility='onchange'),
                'description': fields.text('Description', required=1),
                'private': fields.boolean('Private'),
                'contract':fields.many2one('account.analytic.account', 'Analytic account', track_visibility='onchange'),
                'partner_id': fields.many2many('res.users', track_visibility='onchange'),
                'deadline': fields.date('Deadline', track_visibility='onchange'),
                'create_date': fields.date('Create_date', readonly=True),

        _defaults = { 
                'state': crm.AVAILABLE_STATES[0][0],
                'priority': crm.AVAILABLE_PRIORITIES[2][0],
                'created_by': lambda obj, cr, uid, context: uid,



P.s. I'm fresh in programming.


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

On 9/17/14, 3:28 PM

You can achieve it using security record rules ...using this one can set rules for an object like who can see/edit etc .......

i know that. But I want to make that my tickets would be visible only for owner. And Administrator would have posibility to se them all.

on 9/18/14, 4:50 AM

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.


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

1 follower(s)


Asked: 9/17/14, 10:18 AM
Seen: 1440 times
Last updated: 3/16/15, 8:10 AM