Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
2 Risposte
7532 Visualizzazioni

Hi expert,

I am using odoo 9. My requirement is , replace sale.order view tab 'Orders Line' with different template

I am trying with the following code. But i am getting below error. Please help me to resolve this problem


<xpath expr="//form//sheet//notebook//page[1]" position="replace">

     <page string="Order Lines">

          <div>Content will be replaced soon</div>

     </page>

    </xpath>

I hope this should replace tab with div element. but its not working.


Error details:

Element '<xpath expr="//field[@name='order_line']/tree/field[@name='product_id']">' cannot be located in parent view

Error context:

View `sale.order.form.inherit_1`

Avatar
Abbandona
Risposta migliore

The point is that you are trying to remove a field, which used in other apps' xmls.

For example, in 'purchase' you may find: <xpath expr="//field[@name='product_id']" position="before">. There are lot of (!!!) basic and community-built apps which rely upon that xml

What you should do:

* Find all sale order form view inherited forms (you may do it via developer mode through the interface)

* Define which apps do that in your database

* Make your app depend (in the manifest file - __openerp__.py) on all other apps which modify sales orders views.


Be cautious, however, there is a lot of logics applied to lines. You may loose it.


Besides, I do not understand, why you used doubled '/' in your expath, when you define the exact route. A single '/' must be enough (except the first one)

Avatar
Abbandona
Risposta migliore

Hi,

Actually i got the same error you mentioned above. But i met this error while creating field. If a group is inside the another group or a page is inside the another page we have to mention that group/page like this. Just try this.

<xpath expr="//form/sheet/notebook/page/page" position="replace">

     <page string="Order Lines">

          <div>Content will be replaced soon</div>

     </page>

    </xpath>

Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
2
gen 17
4475
6
giu 16
6107
0
feb 16
3086
0
nov 15
3305
1
set 15
4030