Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
1 Ответить
5823 Представления

Why I can not use this xpath (can you only use @name inside expr, but not string? Because that page does not have attribute name)?:

            <xpath expr="//page[@string='Internal Notes']" position="after">
                <page string="Laser Damage Testing">
                    <field name="substrate_id"/>
                </page>                    
            </xpath>

Strangely it install my module with this view, but if I try to upgrade my module I get this error:

InternalError: current transaction is aborted, commands ignored until end of transaction block

Then I can't do anything in my database, always getting this error. I can fix it only by restoring to older database.

If I use this:

<page string="Internal Notes" position="after">
                    <page string="Laser Damage Testing">
                        <field name="substrate_id"/>
                    </page>
                </page>

Then it work fine. But if I want to insert fields in different parts of the view, I need to use xpath.

Аватар
Отменить
Лучший ответ

@string does work. I have used this monster recently (it works):

<xpath expr="/form[@string='Manufacturing Orders']/sheet/notebook/page[@string='Consumed Products']/group/group[@string='Consumed Products']/field[@name='move_lines2']/tree[@string='Consumed Products']/field[@name='scrapped']" position="after">

Maybe try longer path, right from "form" till where you want to place your insertion.

Аватар
Отменить
Related Posts Ответы Просмотры Активность
1
дек. 16
7824
3
мар. 15
6844
1
дек. 21
7653
9
авг. 20
3911
3
мар. 15
6260