Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
6816 Lượt xem

Hi;

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

Thanks

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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>
        </record>
Ảnh đại diện
Huỷ bỏ
Tác giả

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

Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 2 23
1946
2
thg 9 15
5579
1
thg 3 15
3728
3
thg 5 24
3257
1
thg 11 22
3340