Skip to Content
Menu
This question has been flagged
2 Replies
5018 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>

Avatar
Discard

Hello Xia, Will you upgrade the module ?

Author

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

will you create tree view for this model ?

May be templates not used in form view.

Author

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

Author

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

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

Best Answer

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,

Avatar
Discard
Author

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

Related Posts Replies Views Activity
5
Aug 24
42968
2
Apr 24
948
3
Jun 23
3123
2
Jun 23
2364
3
Mar 23
8622