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

Hey i have a view in which a line view when clicked also has a form view which pops up. I want to xpath a field inside that popping form but unable to do so . here is the code

<page string="Products">
<field
name="line_ids">
<tree
decoration-muted="cancelled == True">
<field
name="product_id"/>
<field
name="name"/>
<field name="is_editable" invisible="1"/>
</tree>
<form>
<sheet>
<group>
<group>
<field
name="is_editable" invisible="1"/>
<field
name="product_id"
attrs="{'readonly': [('is_editable','=', False)]}"/>
<field
name="name"
attrs="{'readonly': [('is_editable','=', False)]}"/>
<label
for="product_qty"
attrs="{'readonly': [('is_editable','=', False)]}"/>
<div>
<field
name="product_qty"
class="oe_inline"
attrs="{'readonly': [('is_editable','=', False)]}"/>
More or less this is what it looks like.
Ảnh đại diện
Huỷ bỏ
Tác giả

P.s. ignore open tags its just a sample

right now i have tried using

<xpath expr="/field[@name='line_ids']/tree/form/sheet//field[@name='product_id']" position="before">

but this is not working

Tác giả Câu trả lời hay nhất

ok I found an answer of my solution

here is the solution

<xpath expr="//field[@name='line_ids']/form/sheet/group/group" position="inside">
Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Thanks for the help. Am also facing the same issue

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
4
thg 12 23
18321
1
thg 9 19
4063
1
thg 7 25
2173
2
thg 5 24
2939
1
thg 2 24
1647