Odoo Help

Welcome!

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.

0

Fail to hide create and save button of views

By
Xia Sun
on 4/4/16, 11:20 PM 348 views

I want to remove the create and save button on my customized view.

Follow many answer, I add create="false" and edit="false" , but they don't work at all... Can anyone help me find what's wrong?

My code is below and please ignore the Chinese character.

Many thanks!

<record id="action_medinfo_diagnoses" model="ir.actions.act_window">

<field name="name">诊断数据</field>

<field name="res_model">medinfo.diagnoses</field>

<field name="view_mode">form</field>

</record>

<record id="medinfo_diagnoses_form" model="ir.ui.view">

<field name="name">Medinfo diagnoses: form</field>

<field name="model">medinfo.diagnoses</field>

<field name="arch" type="xml">

<form create="false" edit="false">

<sheet>

<templates>

<t t-name="form-box">

<h1>诊断数据</h1>

<div>

<p>新建、查看、修改诊断数据(含上传、下载),请点击下面的链接.</p>

<a target="_blank" href="diagnoses_index/">诊断数据详情</a>

</div>

</t>

</templates>

</sheet>

</form>

</field>

</record>

Hello Xia, Will you upgrade the module ?

Jignesh Mehta
on 4/5/16, 2:30 AM

Hi Jignesh, Yes i dit upgrade the module, I have even restart the server and clean the browser cache but still doesn't work.

Xia Sun
on 4/5/16, 4:08 AM

will you create tree view for this model ?

Jignesh Mehta
on 4/5/16, 5:00 AM

May be templates not used in form view.

Jignesh Mehta
on 4/5/16, 5:03 AM

But it seems that only can be the sub-element of ... I need some dives here

Xia Sun
on 4/5/16, 10:02 PM

But it seems that only "field" can be inside of "tree"... I need some dives here

Xia Sun
on 4/5/16, 10:13 PM

Hello Xia, Tree view is for only purpose view and you can use div tag without templates in form view.

Jignesh Mehta
on 4/6/16, 12:09 AM
2

Jignesh Mehta

--Jignesh Mehta--
2087
| 6 4 8
Surat, India
--Jignesh Mehta--


Jignesh Mehta
On 4/5/16, 2:32 AM

Hello Xia,


Please create a Tree view for the same model and give it create="false" and edit="false".


Hope this will helps you.

Thanks,

Thanks i finally jump this step, i set a menuitem to a hyper link directly so i don't need the form.

Xia Sun
on 4/14/16, 1:25 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)

Stats

Asked: 4/4/16, 11:20 PM
Seen: 348 times
Last updated: 4/14/16, 1:23 AM