Ir al contenido
Odoo Menú
  • Iniciar sesión
  • Pruébalo gratis
  • Aplicaciones
    Finanzas
    • Contabilidad
    • Facturación
    • Gastos
    • Hoja de cálculo (BI)
    • Documentos
    • Firma electrónica
    Ventas
    • CRM
    • Ventas
    • TPV para tiendas
    • TPV para restaurantes
    • Suscripciones
    • Alquiler
    Sitios web
    • Creador de sitios web
    • Comercio electrónico
    • Blog
    • Foro
    • Chat en directo
    • e-learning
    Cadena de suministro
    • Inventario
    • Fabricación
    • PLM
    • Compra
    • Mantenimiento
    • Calidad
    Recursos Humanos
    • Empleados
    • Reclutamiento
    • Ausencias
    • Evaluación
    • Referencias
    • Flota
    Marketing
    • Marketing social
    • Marketing por correo electrónico
    • Marketing por SMS
    • Eventos
    • Automatización de marketing
    • Encuestas
    Servicios
    • Proyecto
    • Partes de horas
    • Servicio de campo
    • Servicio de asistencia
    • Planificación
    • Citas
    Productividad
    • Conversaciones
    • Inteligencia artificial
    • IoT
    • VoIP
    • Información
    • WhatsApp
    Aplicaciones de terceros Studio de Odoo Plataforma de Odoo Cloud
  • Sectores
    Comercio al por menor
    • Librería
    • Tienda de ropa
    • Tienda de muebles
    • Tienda de ultramarinos
    • Ferretería
    • Juguetería
    Alimentación y hostelería
    • Bar y pub
    • Restaurante
    • Comida rápida
    • Casa de huéspedes
    • Distribuidor de bebidas
    • Hotel
    Inmueble
    • Agencia inmobiliaria
    • Estudio de arquitectura
    • Construcción
    • Gestión inmobiliaria
    • Jardinería
    • Asociación de propietarios
    Consultoría
    • Asesoría contable
    • Partner de Odoo
    • Agencia de marketing
    • Bufete de abogados
    • Adquisición de talentos
    • Auditorías y certificaciones
    Fabricación
    • Textil
    • Metal
    • Muebles
    • Alimentos
    • Cervecería
    • Regalos corporativos
    Salud y bienestar
    • Club deportivo
    • Óptica
    • Gimnasio
    • Especialistas en bienestar
    • Farmacia
    • Peluquería
    Oficios
    • Servicios de mantenimiento
    • Hardware y soporte técnico
    • Sistemas de energía solar
    • Zapatero
    • Servicios de limpieza
    • Servicios de calefacción, ventilación y aire acondicionado
    Otros
    • Organización sin ánimo de lucro
    • Agencia de protección del medio ambiente
    • Alquiler de vallas publicitarias
    • Estudio fotográfico
    • Alquiler de bicicletas
    • Distribuidor de software
    Explorar todos los sectores
  • Comunidad
    Aprender
    • Tutoriales
    • Documentación
    • Certificaciones
    • Formación
    • Blog
    • Podcast
    Potenciar la educación
    • Programa de formación
    • Scale Up! El juego empresarial
    • Visita Odoo
    Obtener el software
    • Descargar
    • Comparar ediciones
    • Versiones
    Colaborar
    • GitHub
    • Foro
    • Eventos
    • Traducciones
    • Convertirse en partner
    • Servicios para partners
    • Registrar tu asesoría contable
    Obtener servicios
    • Encontrar un partner
    • Encontrar un asesor fiscal
    • Contacta con un experto
    • Servicios de implementación
    • Referencias de clientes
    • Ayuda
    • Actualizaciones
    GitHub YouTube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Solicitar una demostración
  • Precios
  • Ayuda
Debe estar registrado para interactuar con la comunidad.
Todas las publicaciones Personas Insignias
Etiquetas (Ver todo)
odoo accounting v14 pos v15
Sobre este foro
Debe estar registrado para interactuar con la comunidad.
Todas las publicaciones Personas Insignias
Etiquetas (Ver todo)
odoo accounting v14 pos v15
Sobre este foro
Ayuda

error while parsing inherit view

Suscribirse

Reciba una notificación cuando haya actividad en esta publicación

Esta pregunta ha sido marcada
modulexmlcustom
1 Responder
5612 Vistas
Avatar
BCB Dev, Bruno Corredato Botti

xml version="1.0" encoding="utf-8" ?>




id="view_sale_order_inherit_two" model="ir.ui.view">
name="name">sale.order.inherit.two
name="model">sale.order
name="inherit_id" ref="sale.view_order_form"/>
name="arch" type="xml">
name="partner_id" position="after">
name="oc_number"/>






log error:


Erro:
Odoo Server Error

Traceback (most recent call last):
File "/home/corredato/PycharmProjects/rowena14/odoo/odoo/tools/convert.py", line 677, in _tag_root
f(rec)
File "/home/corredato/PycharmProjects/rowena14/odoo/odoo/tools/convert.py", line 580, in _tag_record
record = model._load_records([data], self.mode == 'update')
File "/home/corredato/PycharmProjects/rowena14/odoo/odoo/models.py", line 4230, in _load_records
data['record']._load_records_write(data['values'])
File "/home/corredato/PycharmProjects/rowena14/odoo/odoo/addons/base/models/ir_ui_view.py", line 1858, in _load_records_write
super(View, self)._load_records_write(values)
File "/home/corredato/PycharmProjects/rowena14/odoo/odoo/models.py", line 4154, in _load_records_write
self.write(values)
File "/home/corredato/PycharmProjects/rowena14/odoo/addons/website/models/theme_models.py", line 295, in write
res = super(IrUiView, other_views).write(vals)
File "/home/corredato/PycharmProjects/rowena14/odoo/addons/website/models/ir_ui_view.py", line 68, in write
return super(View, self).write(vals)
File "/home/corredato/PycharmProjects/rowena14/odoo/odoo/addons/base/models/ir_ui_view.py", line 507, in write
res = super(View, self).write(self._compute_defaults(vals))
File "/home/corredato/PycharmProjects/rowena14/odoo/odoo/models.py", line 3713, in write
fields[0].determine_inverse(real_recs)
File "/home/corredato/PycharmProjects/rowena14/odoo/odoo/fields.py", line 1207, in determine_inverse
determine(self.inverse, records)
File "/home/corredato/PycharmProjects/rowena14/odoo/odoo/fields.py", line 82, in determine
return needle(*args)
File "/home/corredato/PycharmProjects/rowena14/odoo/odoo/addons/base/models/ir_ui_view.py", line 307, in _inverse_arch
view.write(data)
File "/home/corredato/PycharmProjects/rowena14/odoo/addons/website/models/theme_models.py", line 295, in write
res = super(IrUiView, other_views).write(vals)
File "/home/corredato/PycharmProjects/rowena14/odoo/addons/website/models/ir_ui_view.py", line 68, in write
return super(View, self).write(vals)
File "/home/corredato/PycharmProjects/rowena14/odoo/odoo/addons/base/models/ir_ui_view.py", line 507, in write
res = super(View, self).write(self._compute_defaults(vals))
File "/home/corredato/PycharmProjects/rowena14/odoo/odoo/models.py", line 3703, in write
real_recs._validate_fields(vals, inverse_fields)
File "/home/corredato/PycharmProjects/rowena14/odoo/odoo/models.py", line 1266, in _validate_fields
check(self)
File "/home/corredato/PycharmProjects/rowena14/odoo/odoo/addons/base/models/ir_ui_view.py", line 415, in _check_xml
raise ValidationError(_(
File "/home/corredato/PycharmProjects/rowena14/odoo/odoo/addons/base/models/ir_ui_view.py", line 398, in _check_xml
view.postprocess_and_fields(view_doc, validate=True)
File "/home/corredato/PycharmProjects/rowena14/odoo/odoo/addons/base/models/ir_ui_view.py", line 857, in postprocess_and_fields
arch, name_manager = self._postprocess_view(node, model, validate=validate)
File "/home/corredato/PycharmProjects/rowena14/odoo/odoo/addons/base/models/ir_ui_view.py", line 869, in _postprocess_view
self.postprocess(node, [], editable, name_manager)
File "/home/corredato/PycharmProjects/rowena14/odoo/odoo/addons/base/models/ir_ui_view.py", line 969, in postprocess
self.postprocess(child, current_node_path, node_info['editable'], name_manager)
File "/home/corredato/PycharmProjects/rowena14/odoo/odoo/addons/base/models/ir_ui_view.py", line 969, in postprocess
self.postprocess(child, current_node_path, node_info['editable'], name_manager)
File "/home/corredato/PycharmProjects/rowena14/odoo/odoo/addons/base/models/ir_ui_view.py", line 969, in postprocess
self.postprocess(child, current_node_path, node_info['editable'], name_manager)
[Previous line repeated 1 more time]
File "/home/corredato/PycharmProjects/rowena14/odoo/odoo/addons/base/models/ir_ui_view.py", line 948, in postprocess
postprocessor(node, name_manager, node_info)
File "/home/corredato/PycharmProjects/rowena14/odoo/odoo/addons/base/models/ir_ui_view.py", line 1005, in _postprocess_tag_field
xarch, sub_name_manager = self.with_context(
File "/home/corredato/PycharmProjects/rowena14/odoo/odoo/addons/base/models/ir_ui_view.py", line 869, in _postprocess_view
self.postprocess(node, [], editable, name_manager)
File "/home/corredato/PycharmProjects/rowena14/odoo/odoo/addons/base/models/ir_ui_view.py", line 969, in postprocess
self.postprocess(child, current_node_path, node_info['editable'], name_manager)
File "/home/corredato/PycharmProjects/rowena14/odoo/odoo/addons/base/models/ir_ui_view.py", line 960, in postprocess
validator(node, name_manager, node_info)
File "/home/corredato/PycharmProjects/rowena14/odoo/odoo/addons/base/models/ir_ui_view.py", line 1096, in _validate_tag_field
self.handle_view_error(msg)
File "/home/corredato/PycharmProjects/rowena14/odoo/odoo/addons/base/models/ir_ui_view.py", line 680, in handle_view_error
raise ValueError(formatted_message).with_traceback(from_traceback) from from_exception
odoo.exceptions.ValidationError: Erro ao validar a visualização:

O campo "sequencia" não existe no modelo "sale.order.line"

View name: sale.order.inherit.two
Error context:
view: ir.ui.view(2681,)
xmlid: view_sale_order_inherit_two
view.model: sale.order
view.parent: ir.ui.view(1469,)
file: /home/corredato/PycharmProjects/rowena14/odoo/trustcode-rowena/res_partner_purchase_order/views/sale_po.xml


The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/home/corredato/PycharmProjects/rowena14/odoo/odoo/addons/base/models/ir_http.py", line 237, in _dispatch
result = request.dispatch()
File "/home/corredato/PycharmProjects/rowena14/odoo/odoo/http.py", line 696, in dispatch
result = self._call_function(**self.params)
File "/home/corredato/PycharmProjects/rowena14/odoo/odoo/http.py", line 370, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/home/corredato/PycharmProjects/rowena14/odoo/odoo/service/model.py", line 94, in wrapper
return f(dbname, *args, **kwargs)
File "/home/corredato/PycharmProjects/rowena14/odoo/odoo/http.py", line 358, in checked_call
result = self.endpoint(*a, **kw)
File "/home/corredato/PycharmProjects/rowena14/odoo/odoo/http.py", line 919, in __call__
return self.method(*args, **kw)
File "/home/corredato/PycharmProjects/rowena14/odoo/odoo/http.py", line 544, in response_wrap
response = f(*args, **kw)
File "/home/corredato/PycharmProjects/rowena14/odoo/addons/web/controllers/main.py", line 1374, in call_button
action = self._call_kw(model, method, args, kwargs)
File "/home/corredato/PycharmProjects/rowena14/odoo/addons/web/controllers/main.py", line 1362, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/home/corredato/PycharmProjects/rowena14/odoo/odoo/api.py", line 399, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "/home/corredato/PycharmProjects/rowena14/odoo/odoo/api.py", line 386, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "", line 2, in button_immediate_upgrade
File "/home/corredato/PycharmProjects/rowena14/odoo/odoo/addons/base/models/ir_module.py", line 74, in check_and_log
return method(self, *args, **kwargs)
File "/home/corredato/PycharmProjects/rowena14/odoo/odoo/addons/base/models/ir_module.py", line 658, in button_immediate_upgrade
return self._button_immediate_function(type(self).button_upgrade)
File "/home/corredato/PycharmProjects/rowena14/odoo/odoo/addons/base/models/ir_module.py", line 596, in _button_immediate_function
modules.registry.Registry.new(self._cr.dbname, update_module=True)
File "/home/corredato/PycharmProjects/rowena14/odoo/odoo/modules/registry.py", line 89, in new
odoo.modules.load_modules(registry._db, force_demo, status, update_module)
File "/home/corredato/PycharmProjects/rowena14/odoo/odoo/modules/loading.py", line 455, in load_modules
processed_modules += load_marked_modules(cr, graph,
File "/home/corredato/PycharmProjects/rowena14/odoo/odoo/modules/loading.py", line 347, in load_marked_modules
loaded, processed = load_module_graph(
File "/home/corredato/PycharmProjects/rowena14/odoo/odoo/modules/loading.py", line 222, in load_module_graph
load_data(cr, idref, mode, kind='data', package=package)
File "/home/corredato/PycharmProjects/rowena14/odoo/odoo/modules/loading.py", line 69, in load_data
tools.convert_file(cr, package.name, filename, idref, mode, noupdate, kind)
File "/home/corredato/PycharmProjects/rowena14/odoo/odoo/tools/convert.py", line 733, in convert_file
convert_xml_import(cr, module, fp, idref, mode, noupdate)
File "/home/corredato/PycharmProjects/rowena14/odoo/odoo/tools/convert.py", line 799, in convert_xml_import
obj.parse(doc.getroot())
File "/home/corredato/PycharmProjects/rowena14/odoo/odoo/tools/convert.py", line 719, in parse
self._tag_root(de)
File "/home/corredato/PycharmProjects/rowena14/odoo/odoo/tools/convert.py", line 677, in _tag_root
f(rec)
File "/home/corredato/PycharmProjects/rowena14/odoo/odoo/tools/convert.py", line 681, in _tag_root
raise ParseError('while parsing %s:%s, near\n%s' % (
Exception

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/home/corredato/PycharmProjects/rowena14/odoo/odoo/http.py", line 652, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/home/corredato/PycharmProjects/rowena14/odoo/odoo/http.py", line 317, in _handle_exception
raise exception.with_traceback(None) from new_cause
odoo.tools.convert.ParseError: while parsing /home/corredato/PycharmProjects/rowena14/odoo/trustcode-rowena/res_partner_purchase_order/views/sale_po.xml:6, near

sale.order.inherit.two
sale.order


Traceback (most recent call last):
  File "/home/corredato/PycharmProjects/rowena14/odoo/odoo/http.py", line 652, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/home/corredato/PycharmProjects/rowena14/odoo/odoo/http.py", line 317, in _handle_exception
    raise exception.with_traceback(None) from new_cause
odoo.tools.convert.ParseError: while parsing /home/corredato/PycharmProjects/rowena14/odoo/trustcode-rowena/res_partner_purchase_order/views/sale_po.xml:6, near

            sale.order.inherit.two
            sale.order
            
            
                
                    
                
            
        









0
Avatar
Descartar
BCB Dev, Bruno Corredato Botti
Autor

Hi Cybrosys, thanks for your answer, but still does'nt work, can you see the final of the log?


Traceback (most recent call last):
  File "/home/corredato/PycharmProjects/rowena14/odoo/odoo/http.py", line 652, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/home/corredato/PycharmProjects/rowena14/odoo/odoo/http.py", line 317, in _handle_exception
    raise exception.with_traceback(None) from new_cause
odoo.tools.convert.ParseError: while parsing /home/corredato/PycharmProjects/rowena14/odoo/trustcode-rowena/res_partner_purchase_order/views/sale_po.xml:6, near

            sale.order.inherit.two
            sale.order
            
            
                
                    
                
            
        


Avatar
Cybrosys Techno Solutions Pvt.Ltd
Mejor respuesta

Hi, 

Try this code.

<record id="view_sale_order_inherit_two" model="ir.ui.view">


    <field name="name">sale.order.inherit.two</field>


    <field name="model">sale.order</field>


    <field name="inherit_id" ref="sale.view_order_form"/>


    <field name="arch" type="xml">


        <xpath expr="//field[@name='partner_id']" position="after">


            <field name="oc_number"/>


        </xpath>


    </field>


</record>


The code introduces changes to the initial code block by adding an `<xpath>` tag within the `<field name="arch" type="xml">` block. This allows for more precise targeting of elements in the XML structure. The XPath expression `//field[@name='partner_id']` is used to locate the "partner_id" field, and the `position="after"` attribute ensures that the new "oc_number" field is inserted after it. This modification enhances the code's flexibility, enabling the addition of the "oc_number" field in the desired position relative to the "partner_id" field within the inherited view.


Regards

0
Avatar
Descartar
¿Le interesa esta conversación? ¡Participe en ella!

Cree una cuenta para poder utilizar funciones exclusivas e interactuar con la comunidad.

Inscribirse
Publicaciones relacionadas Respuestas Vistas Actividad
Can't get report to appear on print menu after moving from <report> to <record>
module xml custom report
Avatar
Avatar
1
may 23
4525
Custom Module Not Populating in Apps List Resuelto
module custom
Avatar
Avatar
4
oct 20
11621
how to manage this 2 modules
module xml
Avatar
0
mar 15
5290
For Odoo hosted version, how would I upload a custom module? Resuelto
module upload custom
Avatar
Avatar
Avatar
Avatar
3
feb 24
13185
importing custom module
module custom importing
Avatar
Avatar
1
nov 23
5331
Comunidad
  • Tutoriales
  • Documentación
  • Foro
Código abierto
  • Descargar
  • GitHub
  • Runbot
  • Traducciones
Servicios
  • Alojamiento Odoo.sh
  • Ayuda
  • Actualizar
  • Desarrollos personalizados
  • Educación
  • Encontrar un asesor fiscal
  • Encontrar un partner
  • Convertirse en partner
Sobre nosotros
  • Nuestra empresa
  • Activos de marca
  • Contacta con nosotros
  • Puestos de trabajo
  • Eventos
  • Podcast
  • Blog
  • Clientes
  • Información legal • Privacidad
  • Seguridad
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk Slovenščina Español (América Latina) Español Svenska ภาษาไทย Türkçe українська Tiếng Việt

Odoo es un conjunto de aplicaciones empresariales de código abierto que cubre todas las necesidades de tu empresa: CRM, comercio electrónico, contabilidad, inventario, punto de venta, gestión de proyectos, etc.

La propuesta única de valor de Odoo es ser muy fácil de usar y estar totalmente integrado.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now