Hi, I have modified the form view by inheritance by the following code in the py file:
-----------------------------------------------------------------------------------------------------------------------------------
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record model="ir.ui.view" id="view_ct_form">
<field name="name">res.partner.form</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_form" />
<field name="arch" type="xml">
<field name="street2" position="attribute">
<attribute name="invisible">1</attribute>
</field>
</field>
</record>
-----------------------------------------------------------------------------------------------------------------------------------
Now I would like to create my own form view, "view_ct_form", instead of replacing fields, adding fields, deleting fields and so on. What is the code I should use?
Thanks a lot.
Hi Frankie, Can you brief more about your question what exactly you want to do for creating a view, because when you say "my own form view" then along with it you will have to modify the "action" * which will open your view instead of default. If you inherit a view than it will be mandatory to use the *"position" *attribute for putting a field *"after, before or replace"* on the form view.
All about views in odoo: https://learnopenerp.blogspot.com/2020/09/create-form-tree-view-odoo13.html