Is it necessary to add data tag when we use xpath in OpenERP 7.0 ? Invalid XML Architecture error is coming every time whenever we changes made on that record? Which is the proper way to use Xpath expression?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Financeiro
- Inventário
- PoS
- Projeto
- MRP
Esta pergunta foi sinalizada
You're only using xpath on the contents of the arch tags. The root tags should always be /form, /tree, /search, /kanban, etc.
You could also make life a lot easier by just using two slashes then just entering the field you're looking for. Unless you're on a large, complex form with more than one instance of the same field listed, it should be fine. If that's the case, just add in a few extra bare minimum details to the xpath string to find it. So for example, putting "new_field" in place of "original_field":
<xpath expr="//field[@name='original_field']" position="replace">
<field name="new_field"/>
</xpath>
Ok, Why <data> tag used before xpath expression.... Can you explain more?
You should never need to add data tags into xpath expressions. The data tags in view XML files are only used to give the option of adding the noupdate attribute. You could have two sets of data tags, one with some basic records or maybe a sequence that you wouldn't want to revert after installing, so you could use <data noupdate="1"> for that. Then after those tags, use normal <data> tags and put the rest of your views/menus in there. And you're still left with only one root tag, <openerp>.
Está gostando da discussão? Não fique apenas lendo, participe!
Crie uma conta hoje mesmo para aproveitar os recursos exclusivos e interagir com nossa incrível comunidade!
Inscreva-se| Publicações relacionadas | Respostas | Visualizações | Atividade | |
|---|---|---|---|---|
|
|
4
jan. 24
|
24606 | ||
|
Attrs attribute
Resolvido
|
|
2
jan. 24
|
3445 | |
|
|
0
ago. 23
|
3152 | ||
|
Not displaying the form and tree view
Resolvido
|
|
5
set. 21
|
18833 | |
|
|
3
jan. 21
|
20473 |