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
    • 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
    • Aprobaciones
    • 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 bienes inmuebles
    • 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
  • Odoo Community
    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

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Contabilidad
  • Inventario
  • PoS
  • Proyectos
  • MRP
All apps
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

Finding code in master code and addons

Suscribirse

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

Se marcó esta pregunta
viewsv7inherit
3 Respuestas
8384 Vistas
Avatar
greg

Hi All,

My question is on finding code within all of the master code and addons. I'll use a simple example.

I was working on a simple module to change a label on the product.product_normal_form_view.

On the product.product_normal_form_view as shown on the screen there is a label that says "EAN13 Barcode" In looking at the Debug View of product.product_normal_form_view there is nowhere that the label "EAN13 Barcode" shows up. So I figure that there must be a module that has inherited this view and changed/added this label, or some other code that has made this modification.

But when I do a full file search of all of the code and addons I don't see where "EAN13 Barcode" is used, other than in some point of sale module javascript. I am using windows file search and have it set to search file contents.

So the question is what is the correct way to find existing code, and is there any code in the entire system that would not be exposed/found using a simple in depth file search?

Maybe if someone can tell me where the label "EAN13 Barcode" comes from that would point me in the right direction.

Thanks!

0
Avatar
Descartar
Avatar
Sudhir Arya (ERP Harbor Consulting Services)
Mejor respuesta

Here Product View you will find ean13 field in product_normal_form_view.

3
Avatar
Descartar
greg
Autor

Yes I see that, but where is the label "EAN13 Barcode" set as the label?

Avatar
Gustavo
Mejor respuesta

Enable the "developer mode" on the About menu, then hover the object you want to modify. That will give you the information about the model (class name) you want to work with. Then you have to go to Settings > Customization > Database Structure and locate the model. In the model form you will find the information about the modules that create and maintain the model you wish to modify

1
Avatar
Descartar
Avatar
greg
Autor Mejor respuesta

Thank you for the information on where to find the applicable model.

I did as you suggested and used Settings > Customization > Database Structure > Models to locate the model, in this case the Field Name "ean13" is in the product.product model/module.

I do see under Settings > Customization > Database Structure > Models / Product that the field named "ean13" has a Field Label of "EAN13 Barcode", but when I look through the code @ OPENERP/ADDONS/PRODUCTS/ I cannot find the XML file that sets this Field Label.

I would expect to see something like:

<field name="ean13"/>
<label for="EAN13 Barcode"/>

But I can not find the applicable code.

Any assistance is appreciated.

UPDATE: I now see where the "EAN13 Barcode" is set...

In the product.py code the _columns include: 'ean13': fields.char('EAN13 Barcode', size=13, help="International Article Number used for product identification."),

UPDATE 2: WINDOWS does not normally search the contents of .py files. To make windows search the contents of a .py file do the following (From AgentPete answers.mircosoft.com)

a. Hit the start button and type "search" in the search box. b. Select "Change How Windows Searches" c. Hit "Advanced" d. Select the "File Types" tab. e. Make sure the file extension for the files you want to search in is on the list and is set to "Index Properties and File Contents"

Hope this helps someone

1
Avatar
Descartar
greg
Autor

I have updated with my answer

¿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
What is the different between col and colspan? Resuelto
views v7
Avatar
Avatar
1
oct 24
70339
What does the "no_open : True" widget option do in a view definition? Resuelto
views v7
Avatar
Avatar
2
dic 23
26788
How to use a new field added in a inherited model into a view?
views inherit
Avatar
Avatar
Avatar
3
ago 22
12799
How do I search by country_id in view? Resuelto
views v7
Avatar
Avatar
1
oct 21
10192
Why does the custom view code doesn't show up? Resuelto
views inherit
Avatar
Avatar
Avatar
2
feb 19
4910
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 ภาษาไทย 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.

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