コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
4914 ビュー

I want to change the string name of vat,phone,mobile in res.partner and palnned_revenue(Expected Revenue) field in kanban view(CRM)

i tried with

 <record id="pannumber_contact_fields" model="ir.ui.view">
<field name="name">customer details</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_form" />
<field name="arch" type="xml">
1. <xpath expr="//field[@name='vat']" position="attributes">    
<attribute name="string">PAN NO</attribute>
</xpath>
<xpath expr="//field[@name='phone']" position="attributes">
<attribute name="string">phone1</attribute>
</xpath>
<xpath expr="//field[@name='mobile']" position="attributes">
<attribute name="string">phone2</attribute>
</xpath>



2.  <xpath expr="//sheet/group/group/field[@name='vat']" position='attributes'>
<attribute name="string">PAN No.</attribute>
</xpath>


<xpath expr="//sheet/group/group/field[@name='phone']" position='attributes'>
<attribute name="string">phone1</attribute>
</xpath>

<xpath expr="//sheet/group/group/field[@name='mobile']" position='attributes'>
<attribute name="string">phone2</attribute>
</xpath>


</field>
</record>

<xpath expr="//kanban/field[@name='planned_revenue']" position='attributes'>


<!--<xpath expr='//kanban/label[@for="planned_revenue"]' position='attributes'>-->
<attribute name="string">Loan Amount</attribute>
</xpath>


アバター
破棄
最善の回答

you need to inherit the Kanban view and you can try the attribute positioning in that field

<record id="res_partner_kanban_view" model="ir.ui.view">
 
      <field name="name">http://res.partner.kanban.view.inherit.module.name" target="_blank">res.partner.kanban.view.inherit.module.name</field>
        <field name="model">res.partner</field>
        <field name="inherit_id" ref="base.res_partner_kanban_view" />
        <field name="arch" type="xml">
            <xpath expr="//kanban/field[@name='phone']" position="attributes">
                <attribute name="string">Phone1</attribute>
            </xpath>
            <xpath expr="//kanban/field[@name='mobile']" position="attributes">
                <attribute name="string">Phone2</attribute>
            </xpath>
        </field>
    </record>                    

In the same way you can change the field name (label)

Hope it helps

アバター
破棄