Odoo Help


How to disable form view if there are not registers?

on 4/1/14, 9:04 AM 1,438 views


I have a model with a tree view and a form view. In the tree view i have quit the button create, but when i click on the form view the user can creates a register, and i do not want. The data for this it is created in other view.

My question is, there is any way to disable the form view or quit when the table/model in db is empty


On 4/1/14, 10:31 AM

Remove view mode form, it will work as only tree view. give you action like this. ex.

<record id="action_set_name" model="ir.actions.act_window">
            <field name="name">Student</field>
            <field name="res_model">student.studdent</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree</field>
            <field name="context">{'search_default_permenant_staff':1}</field>

The problem of that is later when db has data, i can't see the form view of one register. Thanks for the answer

on 4/1/14, 11:00 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

0 follower(s)


Asked: 4/1/14, 9:04 AM
Seen: 1438 times
Last updated: 3/16/15, 8:10 AM