flectra/addons/base_branch_company/views/res_branch_view.xml
2018-01-23 12:10:28 +05:30

127 lines
5.7 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<flectra>
<record id="view_res_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" create="false">
<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>
<group col="4">
<field name="name"/>
<field name="code"/>
<field name="company_id" groups="base.group_multi_company"/>
<field name="partner_id" readonly="1"/>
</group>
<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}'
context="{'country_id': country_id, 'zip': zip}"/>
<field name="zip" placeholder="ZIP" class="o_address_zip"/>
<field name="country_id" placeholder="Country" class="o_address_country" options='{"no_open": True, "no_create": True}'/>
</div>
</group>
<group>
<field name="phone" widget="phone"/>
<field name="mobile" widget="phone"/>
<field name="email" widget="email" context="{'gravatar_image': True}"/>
</group>
</group>
</sheet>
</form>
</field>
</record>
<record id="view_res_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="Branch" create="false">
<field name="code"/>
<field name="name"/>
<field name="company_id" groups="base.group_multi_company"/>
</tree>
</field>
</record>
<record id="view_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="Search Branch">
<field name="name" string="Branch"/>
<field name="code" string="Code"/>
</search>
</field>
</record>
<record id="action_res_branch_tree" model="ir.actions.act_window">
<field name="name">Branches</field>
<field name="res_model">res.branch</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click to start a new Branch.
</p>
</field>
</record>
<menuitem action="action_res_branch_tree"
id="menu_action_res_branch_tree"
parent="base.menu_users"/>
<record id="view_branch_users_form" model="ir.ui.view">
<field name="name">res.users.form.branch</field>
<field name="model">res.users</field>
<field name="inherit_id" ref="base.view_users_form"/>
<field name="arch" type="xml">
<xpath expr="//page[@name='access_rights']/group[1]" position="after">
<group groups="base_branch_company.group_multi_branch">
<group string="Allowed Branches" attrs="{'invisible': [('branches_count', '&lt;=', 1)]}">
<field name="default_branch_id"/>
<field name="branch_ids" widget="many2many_tags"/>
<field string="Branches count" name="branches_count" invisible="1"/>
</group>
</group>
</xpath>
</field>
</record>
<record id="view_res_branch_form_editable" model="ir.ui.view">
<field name="name">res.branch.form.editable</field>
<field name="model">res.branch</field>
<field name="inherit_id" ref="base_branch_company.view_res_branch_form"/>
<field name="groups_id" eval="[(4, ref('base_branch_company.group_multi_branch'))]"/>
<field name="arch" type="xml">
<xpath expr="//form" position="attributes">
<attribute name="create">true</attribute>
</xpath>
</field>
</record>
<record id="stock_warehouse_view_tree_editable" model="ir.ui.view">
<field name="name">res.branch.tree.editable</field>
<field name="model">res.branch</field>
<field name="inherit_id" ref="base_branch_company.view_res_branch_tree"/>
<field name="groups_id" eval="[(4, ref('base_branch_company.group_multi_branch'))]"/>
<field name="arch" type="xml">
<xpath expr="//tree" position="attributes">
<attribute name="create">true</attribute>
</xpath>
</field>
</record>
</flectra>