106 lines
4.9 KiB
XML
106 lines
4.9 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">
|
|
<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">
|
|
<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="replace">
|
|
<group>
|
|
<group string="Multi Companies" attrs="{'invisible': [('companies_count', '<=', 1)]}">
|
|
<field string="Allowed Companies" name="company_ids" widget="many2many_tags"/>
|
|
<field string="Current Company" name="company_id" context="{'user_preference': 0}"/>
|
|
<field string="Companies count" name="companies_count" invisible="1"/>
|
|
</group>
|
|
<group string="Allowed Branches">
|
|
<field name="default_branch_id" domain="[('company_id','=',company_id)]"/>
|
|
<field name="branch_ids" widget="many2many_tags" domain="[('company_id','=',company_id)]"/>
|
|
</group>
|
|
</group>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
|
|
</flectra> |