This question has been flagged

I tried overriding the base code and removing the create = "False" in the form view and even changed the view_id and and view_mode


The form view can be seen from the (view modes option)from front-end


My Code :

<record id="document_view_form" model="ir.ui.view">
<field name="name">documents.documents form</field>
<field name="model">documents.document</field>
<field name="mode">primary</field>
<field name="priority" eval="500"/>
<!-- <field name="priority" eval="1"/>-->
<field name="arch" type="xml">
<form create="True">
<header>
<button type="object" name="access_content" string="Access" class="oe_highlight" attrs="{'invisible': [('url', '=', False)]}"/>
<button type="object" name="access_content" string="Download" class="oe_highlight" attrs="{'invisible': [('type', '!=', 'binary')]}"/>
<button type="object" name="create_share" string="Share"/>
<button type="object" name="toggle_lock" string="Lock" attrs="{'invisible': [('lock_uid', '!=', False)]}"/>
<button type="object" name="toggle_lock" string="Unlock" attrs="{'invisible': [('lock_uid', '=', False)]}"/>
<button type="object" name="toggle_active" string="Archive" attrs="{'invisible': [('active', '=', False)]}"/>
<button type="object" name="toggle_active" string="Restore" attrs="{'invisible': [('active', '=', True)]}"/>
</header>
<sheet>
<div class="oe_button_box" name="button_box">
<button name="open_resource" type="object" class="oe_stat_button" icon="fa-external-link" attrs="{'invisible': ['|', ('res_id', '=', False), ('res_model', 'in', [False, 'documents.document'])]}">
<div class="o_field_widget o_stat_info">
<span class="o_stat_text">Related <br/> Record</span>
</div>
</button>
</div>
<widget name="web_ribbon" title="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
<field name="thumbnail" nolabel="1" widget="image" class="oe_avatar" options="{&quot;preview_image&quot;:&quot;thumbnail&quot;}" attrs="{ 'invisible' : [('thumbnail', '=', False)]}"/>
<div class="oe_title" aria-label="Name">
<label for="name" class="oe_edit_only"/>
<h1>
<field name="name" class="oe_inline" attrs="{'readonly': [('is_locked', '=', True)]}" required="True"/>&amp;nbsp;
<i class="fa fa-lock oe_inline" title="Locked" attrs="{'invisible': [('lock_uid', '=', False)]}"/>
</h1>
</div>
<field name="is_locked" invisible="1"/>
<field name="active" invisible="1"/>
<field name="res_id" invisible="1"/>
<field name="res_model" invisible="1"/>
<group>
<group>
<field name="datas" string="File" filename="name" attrs="{'invisible':[('type','=','url')], 'readonly': [('is_locked', '=', True)]}"/>
<field name="url" attrs="{ 'invisible' : [('type', '!=', 'url')], 'readonly': [('is_locked', '=', True)]}"/>
<field name="folder_id" attrs="{'readonly': [('is_locked', '=', True)]}"/>
<field name="owner_id" attrs="{'readonly': [('is_locked', '=', True)]}"/>
<field name="partner_id"/>
<field name="tag_ids" widget="many2many_tags"/>
</group>
<group>
<field name="type"/>
<field name="create_date"/>
<field name="create_uid"/>
<field name="lock_uid" readonly="1" attrs="{'invisible': [('lock_uid', '=', False)]}"/>
</group>
</group>
<group groups="base.group_no_one">
<field name="group_ids" widget="many2many_tags"/>
<field name="company_id" groups="base.group_multi_company"/>
<field name="file_size" attrs="{ 'invisible' : [('type', '!=', 'binary')]}"/>
<field name="mimetype"/>
</group>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids"/>
<field name="activity_ids"/>
<field name="message_ids"/>
</div>
</form>
</field>
</record>
 <record id="documents.document_action" model="ir.actions.act_window">
<field name="name">Docs</field>
<field name="view_id" ref="documents.document_view_form"/>
<field name="view_mode">form,tree,kanban</field>
<!-- <field name="sequence">1</field>-->
  </record>
Avatar
Discard