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

Is possible update value in exist demo data ?

Suscribirse

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

Se marcó esta pregunta
demo_data
2 Respuestas
13311 Vistas
Avatar
M Asep Indrayana

Hi, i confused when i try to replace data in demo data. I wanna change the data in odoo/addons/product/product_data.xml for demo data Precision like this :


<record forcecreate="True" id="decimal_price" model="decimal.precision">

<field name="name">Product Price</field>

<field name="digits">2</field>

</record>

<record forcecreate="True" id="decimal_discount" model="decimal.precision">

<field name="name">Discount</field>

<field name="digits">2</field>

</record>

<record forcecreate="True" id="decimal_account" model="decimal.precision">

<field name="name">Account</field>

<field name="digits">2</field>

</record>

<record forcecreate="True" id="decimal_stock_weight" model="decimal.precision">

<field name="name">Stock Weight</field>

<field name="digits">2</field>

</record>

<record forcecreate="True" id="decimal_product_uom" model="decimal.precision">

<field name="name">Product Unit of Measure</field>

<field name="digits" eval="3"/>

</record>

<record forcecreate="True" id="decimal_product_uos" model="decimal.precision">

<field name="name">Product UoS</field>

<field name="digits" eval="3"/>

</record>



and i want to replace with create new demo data for Precision. I can't find how to change replace demo data with inherit or any else except delete and create new.


Thanks,

1
Avatar
Descartar
Avatar
Sunny Sheth
Mejor respuesta

Hello,

if you want to do it using a XML file inside a module, you can try to do the following (change the model and ID based on your needs):

<function name="write" model="ir.model.data">

            <!-- First we need to find the record...-->

            <function name="search" model="ir.model.data">

                <value

                  eval="[('module', '=', 'sale'), ('name', '=', 'email_template_edi_sale')]"

                  />

            </function>

           <!-- ...and temporarily set the noupdate field to False-->

            <value eval="{'noupdate': False}" />

        </function>

       <!-- Get our main job done, i.e. modify the email Template of a record -->

     <record id="sale.email_template_edi_sale" model="mail.template">

        <field name="email_cc">${object.company_id.email|safe}</field>

    </record>

       <!-- (Optional) Time to clean our dirty hand, set the previously noupdate False to True again -->

        <function name="write" model="ir.model.data">

            <function name="search" model="ir.model.data">

                <value

                  eval="[('module', '=', 'sale'), ('name', '=', 'email_template_edi_sale')]"

                  />

            </function>

            <value eval="{'noupdate': True}" />

        </function>

I tested this code and it is work in my case.

Hope it helps in your case also!

1
Avatar
Descartar
Avatar
Bole
Mejor respuesta

First you need to know a few things.. 

  1. . product/product_data.xml has <data noupdate="1"> tag.. wich means it will be loaded only first time the module is installed.. -> any modifications made to that file will be applied on NEXT instalations, not on current database.

  2. demo data is loaded only if you check "demo data" while creating database, othervise it is not loaded at all

  3. ou should NEVER change original module data, instead do a custom odule containig all the modification you need (in csv or xml files) .


Now, for modifying your current database you could try to use csv import and customize current data, or manualy change it...

Hope it helps a bit

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
After Load Data Demo
demo_data
Avatar
Avatar
1
jun 25
1742
Function tag and getitem tag
demo_data
Avatar
Avatar
2
ene 18
9284
Demo and non-demo data
demo_data
Avatar
Avatar
2
abr 15
13505
How to install demo data?
demo_data
Avatar
Avatar
1
mar 15
9911
how to load demo_data for custom module
demo_data
Avatar
Avatar
1
mar 15
6970
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