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.
 
 
 
 
 

87 lines
4.2 KiB

<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<data>
<!-- form view -->
<record id="view_branch_form" model="ir.ui.view">
<field name="name">res.branch.form</field>
<field name="model">res.branch</field>
<field name="arch" type="xml">
<form string="Branch">
<sheet>
<div class="oe_title">
<label for="name" class="oe_edit_only"/>
<h1>
<field name="name"/>
</h1>
</div>
<notebook colspan="4">
<page string="Contact Information" name="contact_info">
<group>
<group>
<label for="street" string="Address"/>
<div class="o_address_format">
<field name="street" placeholder="Street..." class="o_address_street"/>
<field name="street2" placeholder="Street 2..." class="o_address_street"/>
<field name="city" placeholder="City" class="o_address_city"/>
<field name="state_id" class="o_address_state" placeholder="State" options='{"no_open": True}'/>
<field name="zip" placeholder="ZIP" class="o_address_zip"/>
<field name="country_id" placeholder="Country" class="o_address_country" options='{"no_open": True}'/>
</div>
</group>
<group>
<field name="company_id" options='{"no_create": True}'/>
<field name="phone" class="o_force_ltr"/>
<field name="email"/>
<field name="website" string="Website" widget="url" placeholder="e.g. https://www.odoo.com"/>
</group>
</group>
</page>
</notebook>
</sheet>
</form>
</field>
</record>
<!-- tree view -->
<record id="view_branch_tree" model="ir.ui.view">
<field name="name">res.branch.tree</field>
<field name="model">res.branch</field>
<field name="arch" type="xml">
<tree string="Branches" sample="1">
<field name="name"/>
<field name="company_id"/>
<field name="phone"/>
</tree>
</field>
</record>
<!-- search view -->
<record id="res_branch_search" model="ir.ui.view">
<field name="name">res.branch.search</field>
<field name="model">res.branch</field>
<field name="arch" type="xml">
<search string="Branches">
<field name="name" string="Branch"/>
<group expand="1" string="Group By">
<filter string="Company" name="groupby_company"
context="{'group_by': 'company_id'}"/>
</group>
</search>
</field>
</record>
<!-- View action for branch views -->
<record id="action_res_branch_form" model="ir.actions.act_window">
<field name="name">Branches</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">res.branch</field>
<field name="view_mode">tree,form</field>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
Create a new Branch
</p><p>
Create and manage branches for the companies that will be managed by Odoo from here.
</p>
</field>
</record>
<!-- Menu item -->
<menuitem action="action_res_branch_form" id="menu_action_res_branch_form" parent="base.menu_users"/>
</data>
</odoo>