Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1340 Lượt xem

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>



Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 11 23
1075
0
thg 6 23
2276
0
thg 10 22
2143
0
thg 10 22
2233
2
thg 10 21
4562