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

Import partners with SQL : update ir_property table too ?

Suscribirse

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

Se marcó esta pregunta
importsqlpartners
2 Respuestas
9643 Vistas
Avatar
cd

When I create a partner (company) within OpenERP, I've noticed that records are automatically created in ir_property table.

I'm looking to import partners through direct SQL insert queries, in the res_partner table.

Is it necessary to make inserts in the ir_property table too ?

If yes, could someone explain why ? And what is the purpose ?

0
Avatar
Descartar
Avatar
Paul Ridley
Mejor respuesta

Hi cd,

when customers are created in OpenERP the model res.users updates both tabel res.users and also tabel ir_property for a number of properties such as

  • property_payment_term -property_product_pricelist -property_delivery_carrier -many more... (see screenshot) image description

In order to ensure that the correct tabel in updated by any inserts/updates and deletes it is recommended that instead of directly updating a singele tabel with a SQL-statement that you instead utilise the OpenERP model itself. In this way you guarantee data integrity.

There are many methods to insert records using the OpenERP models for example: -program a script for it called XML/RPC -Use the inbuilt OpenERP csv import functionality -Use Talend which has available OpenERP connectors (my persona;l favourite)

hope this helps

Paul

1
Avatar
Descartar
Ray Carnes

Never use SQL to change data unless you know EXACTLY what you are doing - it can easily result in an inconsistent database. It bypasses all of the business logic and validation checks built in to the software. You should use XML-RPC if you want to script data imports.

Avatar
cd
Autor Mejor respuesta

Thank you. But I would like to go further.

I would of course never use direct INSERT SQL queries for sales, invoices etc... but to import partners and products, at the setup of a new database, it would make sense to try, especially with thousands of references.

CSV and even XML-RPC imports are -unfortunatly- rather slow.

Some people seem to use SQL to import products, successfully (videos on youtube).

On a fresh DB install, I've noticed that if I choose a "chart of account", and then create a partner, the compulsory fields for the partner "account receivable" and "account payable" are automatically filled.

But OpenERP doesn't create records in ir_property table.

However, when I choose a payment term for a partner, or if i change the AR or AP accounts, then records are added into the ir_property table.

So i'm rather lost.

I believe it would be good for the community to have a clear understanding of the mechanism, regarding importation of products (the most important point) and partners, in order to know once and for all if a proper set of direct INSERT SQL queries could do the job.

0
Avatar
Descartar
Ray Carnes

You can understand the SQL used to create new partner records (including related records in the ir_property table) you should run the server with SQL logging enabled and watch what happens when you enter a record via the UI. See http://help.openerp.com/question/895/how-can-i-log-all-sql-queries-to-a-file/

¿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 I import SQL tables into Odoo? Resuelto
import sql
Avatar
Avatar
1
nov 25
4452
Issue with import and comma in Excel File (odoo 19)
import
Avatar
0
sept 25
234
Importacion de Atributos y Valores
import
Avatar
Avatar
Avatar
2
may 25
2410
Import from Winbooks Resuelto
import
Avatar
Avatar
Avatar
Avatar
Avatar
4
may 25
7068
can i import journal entries from Excel
import
Avatar
Avatar
1
ago 24
3663
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.

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