You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
<odoo>
<!-- Animal Tree View --> <record id="view_animal_tree" model="ir.ui.view"> <field name="name">animal.tree</field> <field name="model">animal</field> <field name="arch" type="xml"> <tree string="Animals"> <field name="ref"/> <field name="name"/> <field name="gender"/> <field name="species_id"/> <field name="breed_id"/> <field name="color_id"/> </tree> </field> </record>
<!-- Animal Form View --> <record id="view_animal_form" model="ir.ui.view"> <field name="name">animal.form</field> <field name="model">animal</field> <field name="arch" type="xml"> <form string="Animal"> <header/> <sheet> <div class="oe_button_box" name="button_box"> <button name="toggle_active" type="object" class="oe_stat_button" icon="fa-archive"> <field name="active" widget="boolean_button" options='{"terminology": "archive"}'/> </button> </div> <field name="image" widget='image' class="oe_avatar"/> <div class="oe_title"> <h1> <field name="name"/> </h1> <field name="gender" widget="radio" options="{'horizontal': true}"/> </div> <group id="main"> <group id="left"> <field name="species_id"/> <field name="breed_id" domain="[('species_id', '=', species_id)]"/> <field name="color_id" domain="[('breed_id', '=', breed_id)]"/> <field name="size"/> </group> <group id="right"> <field name="ref"/> <field name="weight"/> <field name="birth_date"/> </group> </group> <notebook/> </sheet> <div class="oe_chatter"> <field name="message_follower_ids" widget="mail_followers"/> <field name="activity_ids" widget="mail_activity"/> <field name="message_ids" widget="mail_thread" options="{'post_refresh': 'recipients'}"/> </div> </form> </field> </record>
<!-- Animal Kanban View --> <record id="view_animal_kanban" model="ir.ui.view"> <field name="name">animal.kanban</field> <field name="model">animal</field> <field name="arch" type="xml"> <kanban class="o_res_partner_kanban"> <field name="id"/> <field name="image"/> <field name="name"/> <templates> <t t-name="kanban-box"> <div class="oe_kanban_global_click o_kanban_record_has_image_fill o_res_partner_kanban"> <t t-if="record.image.raw_value"> <img class="o_kanban_image" t-att-src="kanban_image('animal', 'image', record.id.raw_value)" t-att-alt="record.name"/> </t> <t t-else=""> <img class="o_kanban_image" alt="Avatar" t-att-src='_s + "/animal/static/img/avatar.png"'/> </t> <div class="oe_kanban_details"> <strong class="o_kanban_record_title oe_partner_heading"><field name="display_name"/></strong> <div class="o_kanban_tags_section oe_kanban_partner_categories"/> <ul> <li t-if="record.gender.raw_value"><field name="gender"/></li> <li t-if="record.species_id.raw_value and record.breed_id.raw_value"><field name="breed_id"/>, <field name="species_id"/></li> </ul> <div class="oe_kanban_partner_links"/> </div> </div> </t> </templates> </kanban> </field> </record>
<!-- Search for animal --> <record id="view_animal_search" model="ir.ui.view"> <field name="name">animal.search</field> <field name="model">animal</field> <field name="arch" type="xml"> <search string="Animals"> <field name="name" filter_domain="['|', ('name', 'ilike', self), ('ref', 'ilike', self)]" string="Name"/> <field name="species_id"/> <field name="breed_id"/> <field name="color_id"/> <field name="size"/> <separator/> <filter string="Female" domain="[('gender', '=', 'female')]" name="female"/> <filter string="Male" domain="[('gender', '=', 'male')]" name="male"/> <filter string="Hermaphrodite" domain="[('gender', '=', 'hermaphrodite')]" name="hermaphrodite"/> <filter string="Neutered" domain="[('gender', '=', 'neutered')]" name="neutered"/> <separator/> <group expand="0" string="Group By"> <filter name="gender" string="Gender" domain="" context="{'group_by': 'gender'}"/> <filter name="species_id" string="Species" domain="" context="{'group_by': 'species_id'}"/> <filter name="breed_id" string="Breed" domain="" context="{'group_by': 'breed_id'}"/> <filter name="color_id" string="Color" domain="" context="{'group_by': 'color_id'}"/> </group> </search> </field> </record>
<record id="action_animal" model="ir.actions.act_window"> <field name="name">Animals</field> <field name="res_model">animal</field> <field name="view_type">form</field> <field name="view_mode">kanban,tree,form</field> <field name="search_view_id" ref="view_animal_search"/> <field name="help" type="html"> <p class="o_view_nocontent_smiling_face"> Create an animal. </p> </field> </record>
</odoo>
|