<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<record id="view_sos_shelflife_register_tree" model="ir.ui.view">
    <field name="name">sos_shelflife_register.tree</field>
    <field name="model">sos_shelflife_register</field>
    <field name="arch" type="xml">
        <tree string="Register">
            <field name="name"/>
            <field name="quantity"/>
            <field name="expiry_date"/>
             <field name="ir_ref_no"/>
<field name="remaining_days" decoration-danger="remaining_days &lt; 7" decoration-success="remaining_days &gt;= 7"/>            <field name="write_uid" string="Last Edited By" optional="hide"/>
                <field name="write_date" string="Last Edited On" optional="hide"/>
        </tree>
    </field>
</record>
<record id="view_sos_shelflife_register_form" model="ir.ui.view">
    <field name="name">sos_shelflife_register.form</field>
    <field name="model">sos_shelflife_register</field>
    <field name="arch" type="xml">
        <form string="Calibration Device">
            <sheet>
                <group>
                <field name="ir_ref_no" readonly="1"/>
                   <field name="name"/>
            <field name="quantity"/>
                </group>
                <group>
                      <field name="expiry_date"/>
<field name="remaining_days" decoration-danger="remaining_days &lt; 7" decoration-success="remaining_days &gt;= 7"/>
                </group>
            </sheet>
        </form>
    </field>
</record>
<record id="action_sos_shelflife_register" model="ir.actions.act_window">
    <field name="name">Shelf Life Register</field>
    <field name="res_model">sos_shelflife_register</field>
    <field name="view_mode">tree,form</field>
    <field name="view_id" ref="view_sos_shelflife_register_tree"/>
</record>

<menuitem id="menu_sos_shelflife_register" name="Material Shelf Life Register"
          parent="scg_forms_menu_root" action="action_sos_shelflife_register" groups="sos_inventory.sos_qc_user,sos_inventory.sos_qa_user,sos_inventory.sos_management_user,sos_inventory.sos_scg_group_user"/>
</odoo>