mirror of
https://github.com/guohuadeng/app-odoo.git
synced 2025-02-23 04:11:36 +02:00
140 lines
7.8 KiB
XML
140 lines
7.8 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
||
<odoo>
|
||
<data noupdate="0">
|
||
<!-- Partner Form视图,用继承方式改写2018-11-21,ivan -->
|
||
<record id="app_view_partner_form" model="ir.ui.view">
|
||
<field name="name">app.res.partner.form</field>
|
||
<field name="model">res.partner</field>
|
||
<field name="inherit_id" ref="base.view_partner_form"/>
|
||
<field name="arch" type="xml">
|
||
<xpath expr="//page[@name='sales_purchases']//field[@name='ref']" position="replace">
|
||
</xpath>
|
||
<!-- 客户编号设计在重要位置,在ui层必填,其它联系人type时不需要填 2017-10-22 -->
|
||
<xpath expr="//field[@name='type']" position="after">
|
||
<field name="ref" placeholder="e.g. VIP001" />
|
||
<field name="short_name"/>
|
||
</xpath>
|
||
<xpath expr="//field[@name='website']" position="attributes">
|
||
<attribute name="invisible">1</attribute>
|
||
</xpath>
|
||
<!-- 信用额度 -->
|
||
<xpath expr="//field[@name='category_id']" position="after">
|
||
<field name="credit_limit"/>
|
||
</xpath>
|
||
<!--res.partner客户 地址中国化 -->
|
||
<xpath expr="//div[@class='o_address_format']" position="replace">
|
||
<div class="o_address_format">
|
||
<div class="oe_edit_only">
|
||
<button name="open_parent" type="object" string="(edit)" class="oe_link"
|
||
attrs="{'invisible': ['|', ('parent_id', '=', False), ('type', '!=', 'contact')]}"/>
|
||
</div>
|
||
<field name="country_id" placeholder="Country" class="o_address_country" options='{"no_open": True, "no_create": True}'
|
||
attrs="{'readonly': [('type', '=', 'contact'),('parent_id', '!=', False)]}"/>
|
||
<field name="state_id" class="o_address_state" placeholder="State" options='{"no_open": True}'
|
||
attrs="{'readonly': [('type', '=', 'contact'),('parent_id', '!=', False)]}" context="{'country_id': country_id, 'zip': zip}"/>
|
||
<field name="city" placeholder="City" class="o_address_city"
|
||
attrs="{'readonly': [('type', '=', 'contact'),('parent_id', '!=', False)]}"/>
|
||
<field name="zip" placeholder="ZIP" class="o_address_zip"
|
||
attrs="{'readonly': [('type', '=', 'contact'),('parent_id', '!=', False)]}"/>
|
||
<field name="street" placeholder="Street..." class="o_address_street"
|
||
attrs="{'readonly': [('type', '=', 'contact'),('parent_id', '!=', False)]}"/>
|
||
<field name="street2" invisible="1"/>
|
||
</div>
|
||
</xpath>
|
||
<!-- res.partner联系人 form -->
|
||
<!-- 所有类型联系人默认都不是客户,不是供应商-->
|
||
<xpath expr="//field[@name='child_ids']" position="attributes">
|
||
<attribute name="context">
|
||
{'default_parent_id': active_id, 'default_street': street, 'default_street2': street2, 'default_city': city, 'default_state_id':
|
||
state_id, 'default_zip': zip, 'default_country_id': country_id, 'default_supplier': 0, 'default_customer': 0,
|
||
'default_lang': lang,}
|
||
</attribute>
|
||
</xpath>
|
||
<!--联系人,如果是个人类型,不允许其下再有联系人-->
|
||
<xpath expr="//notebook/page[1]" position="attributes">
|
||
<attribute name="attrs">{'invisible': [('is_company','!=', True)]}</attribute>
|
||
</xpath>
|
||
<!-- 联系人也显示地址,中国格式 -->
|
||
<xpath expr="//page//form[1]//group//group" position="replace">
|
||
<group attrs="">
|
||
<label for="street" string="Address"/>
|
||
<div>
|
||
<div class="o_address_format" name="div_address">
|
||
<field name="country_id" placeholder="Country" class="o_address_country"
|
||
options='{"no_open": True, "no_create": True}'/>
|
||
<field name="state_id" class="o_address_state" placeholder="State"
|
||
options='{"no_open": True}' context="{'country_id': country_id, 'zip': zip}"/>
|
||
<field name="city" placeholder="City" class="o_address_city"/>
|
||
<field name="zip" placeholder="ZIP" class="o_address_zip"/>
|
||
<field name="street" placeholder="Street..." class="o_address_street"/>
|
||
<field name="street2" invisible="1"/>
|
||
</div>
|
||
</div>
|
||
</group>
|
||
</xpath>
|
||
<!-- res.partner联系人 kanban -->
|
||
<!-- 显示类型和地址等 -->
|
||
<xpath expr="//page//kanban[1]//templates//div[@class='oe_kanban_details']" position="replace">
|
||
<div class="oe_kanban_details">
|
||
<div>
|
||
[<field name="ref"/>]
|
||
<strong>
|
||
<field name="name"/>
|
||
</strong>
|
||
</div>
|
||
<div>
|
||
<field name="type"/>
|
||
</div>
|
||
<div t-if="record.function.raw_value">
|
||
<field name="function"/>
|
||
</div>
|
||
<div t-if="record.email.raw_value">
|
||
<field name="email"/>
|
||
</div>
|
||
<div>
|
||
<field t-if="record.state_id.raw_value" name="state_id"/>
|
||
<div>
|
||
<field name="city"/>
|
||
<field name="street"/>
|
||
<field name="zip" invisible="1"/>
|
||
</div>
|
||
</div>
|
||
<div t-if="record.phone.raw_value">Tel:
|
||
<field name="phone"/>
|
||
</div>
|
||
<div t-if="record.mobile.raw_value">Mobile:
|
||
<field name="mobile"/>
|
||
</div>
|
||
</div>
|
||
</xpath>
|
||
</field>
|
||
</record>
|
||
|
||
<!--Partner kanban 视图,用继承方式改写2017-11-23,ivan-->
|
||
<record id="app_res_partner_kanban_view" model="ir.ui.view">
|
||
<field name="name">app.res.partner.kanban</field>
|
||
<field name="model">res.partner</field>
|
||
<field name="inherit_id" ref="base.res_partner_kanban_view"/>
|
||
<field name="arch" type="xml">
|
||
<xpath expr="//templates" position="before">
|
||
<field name="credit_limit"/>
|
||
</xpath>
|
||
<xpath expr="//div[@class='oe_kanban_details']/ul" position="inside">
|
||
<li t-if="record.mobile.raw_value" class="o_text_overflow">
|
||
, <field name="mobile"/>
|
||
</li>
|
||
<li t-if="record.credit_limit.raw_value">
|
||
Credit:<field name="credit_limit"/>
|
||
</li>
|
||
</xpath>
|
||
</field>
|
||
</record>
|
||
<!--end客户-->
|
||
|
||
<!-- 为供应商菜单单独增加筛选器 2017-11-13 -->
|
||
<!--end供应商-->
|
||
|
||
<!-- 所有合作伙伴 2017-11-13 -->
|
||
</data>
|
||
</odoo>
|