跳至內容
選單
此問題已被標幟
1330 瀏覽次數

i have a custom module that changes on a field's label, like this 

 <record id="view_date_order_purchase_inherit" model="ir.ui.view"> 
    <field name="name">tech.date.order.purchase.form.inherit</field>
    <field name="model">purchase.order</field>
    <field name="inherit_id" ref="purchase.purchase_order_form"/>
    <field name="arch" type="xml">
        <xpath expr="//field[@name='date_order']" position="after">
            <div attrs="{'invisible': [('state','=','purchase')]}">
<label for="date_order" string="Date End" attrs="{'invisible': [('bool', '!=', False)]}"/>
<label for="date_order" string="Date Start" attrs="{'invisible': [('lab', '=', False)]}"/>
</div>
<field name="order_date" nolabel="1" attrs="{'invisible': [('state','=','purchase')]}"/>
</xpath>
</field>
</record>


and i want to change its second label (date start) via an other custom module, i didn't find a way to call the div tag because it dsoent have a name, or a class, all i can do is changing the first label by using this code :


 <xpath expr="//label[@for='date_order']" position="replace">
    <label for="date_order" string="Date continue" attrs="{'invisible': [('bool', '=', False)]}"/>
</xpath>



頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
0
11月 23
1073
0
6月 23
2269
0
10月 22
2139
0
10月 22
2230
2
10月 21
4558