How to Add a Form View in Odoo 16 | Odoo 16 Development Tutorial – CBMS Odoo ERP

How to Add a Form View in Odoo 16 | Odoo 16 Development Tutorial – CBMS Odoo ERP

form view is used to display the data from a single record. We can create a form view using form tags. Which renders the single record.
#odoodevelopment

In this video, it explains about form view and its structural and semantic components and then how to create a form view in Odoo 16.
#odoo16 #odootraining

Connect With Us:
——–
➡️ Website:
➡️ Email: info@cybrosys.com
➡️ Twitter:
➡️ LinkedIn:
➡️ Facebook:
➡️ Instagram:
➡️ Pinterest:

#Add #Form #View #Odoo #Odoo #Development #Tutorial

Similar Posts

Comments

  1. avatar
    @funbrainbytemania says:

    Thank you for this video, so i define my form view but it's not that which render to user interface. Odoo continues to use default view as if i don't define custom form view. Thank you

    My code :

    <?xml version="1.0" encoding="utf-8"?>
    <odoo>

    <record id="view_account_fiscal_year_form" model="ir.ui.view">
    <field name="name">fiscal.year.form</field>
    <field name="model">fiscal.year</field>
    <field name="arch" type="xml">
    <form>
    <header>
    <button name="action_closProv" class="oe_highlight" string="Clôturer provisoirement" type="object" attrs="{'invisible': [('fiscal_year_state', 'in', ['closDef', 'closProv'])]}" help="Clôturer provisoirement votre année fiscale"/>
    <button name="action_closDef" class="oe_highlight" string="Clôturer definitivement" type="object" attrs="{'invisible': [('fiscal_year_state', 'in', ['closDef', 'ouvert'])]}" help="Clôturer definitivement votre année fiscale"/>
    <field name="fiscal_year_state" widget="statusbar" statusbar_visible="ouvert,closProv,closDef"/>
    </header>
    <sheet>
    <group>
    <group>
    <field name="company_id" optional="hide"/>
    <field name="fiscal_period_ids" optional="hide" widget="section_and_note_one2many"
    mode="tree,kanban"/>
    </group>
    <group>
    <field name="code"/>
    <field name="libelle"/>
    <field name="journal_id"/>
    </group>
    <group>
    <field name="date_from"/>
    <field name="date_to"/>
    </group>
    <group>
    <field name="compte_res_pos"/>
    <field name="compte_res_neg"/>
    </group>
    </group>
    </sheet>
    </form>
    </field>
    </record>

    <record id="view_account_fiscal_year_tree" model="ir.ui.view">
    <field name="name">fiscal.year.tree</field>
    <field name="model">fiscal.year</field>
    <field name="arch" type="xml">
    <tree>
    <field name="code"/>
    <field name="libelle"/>
    <field name="date_from"/>
    <field name="date_to"/>
    <field name="journal_id"/>
    <field name="fiscal_period_ids"/>
    <field name="fiscal_year_state"/>
    </tree>
    </field>
    </record>

    <record id="actions_account_fiscal_year" model="ir.actions.act_window">
    <field name="name">Fiscal.Years</field>
    <field name="res_model">fiscal.year</field>
    <field name="view_mode">tree,form</field>
    <field name="help" type="html">
    <p class="oe_view_nocontent_create">
    Click here to create a new fiscal year.
    </p>
    </field>
    </record>

    </odoo>

Leave a Reply

Your email address will not be published. Required fields are marked *