Ir al contenido
Odoo Menú
  • Inicia sesión
  • Pruébalo gratis
  • Aplicaciones
    Finanzas
    • Contabilidad
    • Facturación
    • Gastos
    • Hoja de cálculo (BI)
    • Documentos
    • Firma electrónica
    Ventas
    • CRM
    • Ventas
    • PdV para tiendas
    • PdV para restaurantes
    • Suscripciones
    • Alquiler
    Sitios web
    • Creador de sitios web
    • Comercio electrónico
    • Blog
    • Foro
    • Chat en vivo
    • eLearning
    Cadena de suministro
    • Inventario
    • Manufactura
    • PLM
    • Compras
    • Mantenimiento
    • Calidad
    Recursos humanos
    • Empleados
    • Reclutamiento
    • Vacaciones
    • Evaluaciones
    • Referencias
    • Flotilla
    Marketing
    • Redes sociales
    • Marketing por correo
    • Marketing por SMS
    • Eventos
    • Automatización de marketing
    • Encuestas
    Servicios
    • Proyectos
    • Registro de horas
    • Servicio externo
    • Soporte al cliente
    • Planeación
    • Citas
    Productividad
    • Conversaciones
    • Inteligencia artificial
    • IoT
    • VoIP
    • Artículos
    • WhatsApp
    Aplicaciones externas Studio de Odoo Plataforma de Odoo en la nube
  • Industrias
    Venta minorista
    • Librería
    • Tienda de ropa
    • Mueblería
    • Tienda de abarrotes
    • Ferretería
    • Juguetería
    Alimentos y hospitalidad
    • Bar y pub
    • Restaurante
    • Comida rápida
    • Casa de huéspedes
    • Distribuidora de bebidas
    • Hotel
    Bienes inmuebles
    • Agencia inmobiliaria
    • Estudio de arquitectura
    • Construcción
    • Gestión de propiedades
    • Jardinería
    • Asociación de propietarios
    Consultoría
    • Firma contable
    • Partner de Odoo
    • Agencia de marketing
    • Bufete de abogados
    • Adquisición de talentos
    • Auditorías y certificaciones
    Manufactura
    • Textil
    • Metal
    • Muebles
    • Comida
    • Cervecería
    • Regalos corporativos
    Salud y ejercicio
    • Club deportivo
    • Óptica
    • Gimnasio
    • Especialistas en bienestar
    • Farmacia
    • Peluquería
    Trades
    • Personal de mantenimiento
    • Hardware y soporte de TI
    • Sistemas de energía solar
    • Zapateros y fabricantes de calzado
    • Servicios de limpieza
    • Servicios de calefacción, ventilación y aire acondicionado
    Otros
    • Organización sin fines de lucro
    • Agencia para la protección del medio ambiente
    • Alquiler de anuncios publicitarios
    • Fotografía
    • Alquiler de bicicletas
    • Distribuidor de software
    Descubre todas las industrias
  • Comunidad
    Aprende
    • Tutoriales
    • Documentación
    • Certificaciones
    • Capacitación
    • Blog
    • Podcast
    Fortalece la educación
    • Programa educativo
    • Scale Up! El juego empresarial
    • Visita Odoo
    Obtén el software
    • Descargar
    • Compara ediciones
    • Versiones
    Colabora
    • GitHub
    • Foro
    • Eventos
    • Traducciones
    • Conviértete en partner
    • Servicios para partners
    • Registra tu firma contable
    Obtén servicios
    • Encuentra un partner
    • Encuentra un contador
    • Contacta a un consultor
    • Servicios de implementación
    • Referencias de clientes
    • Soporte
    • Actualizaciones
    GitHub YouTube Twitter LinkedIn Instagram Facebook Spotify
    +1 (650) 691-3277
    Solicita 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
Acerca de este foro
Debe estar registrado para interactuar con la comunidad.
Todas las publicaciones Personas Insignias
Etiquetas (Ver todo)
odoo accounting v14 pos v15
Acerca de este foro
Ayuda

error while parsing inherit view

Suscribirse

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

Se marcó esta pregunta
modulexmlcustom
1 Responder
5582 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.

Registrarse
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
4523
Custom Module Not Populating in Apps List Resuelto
module custom
Avatar
Avatar
4
oct 20
11594
how to manage this 2 modules
module xml
Avatar
0
mar 15
5263
For Odoo hosted version, how would I upload a custom module? Resuelto
module upload custom
Avatar
Avatar
Avatar
Avatar
3
feb 24
13151
importing custom module
module custom importing
Avatar
Avatar
1
nov 23
5303
Comunidad
  • Tutoriales
  • Documentación
  • Foro
Código abierto
  • Descargar
  • GitHub
  • Runbot
  • Traducciones
Servicios
  • Alojamiento en Odoo.sh
  • Soporte
  • Actualizaciones del software
  • Desarrollos personalizados
  • Educación
  • Encuentra un contador
  • Encuentra un partner
  • Conviértete en partner
Sobre nosotros
  • Nuestra empresa
  • Activos de marca
  • Contáctanos
  • Empleos
  • Eventos
  • Podcast
  • Blog
  • Clientes
  • 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 de código abierto que cubren 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.

Sitio web hecho con

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