Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

Is possible update value in exist demo data ?

By
M Asep Indrayana
on 4/14/15, 11:22 PM 904 views

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,

0

Bole

--Bole--
2385
| 5 4 6
Zagreb | Karlovac, Croatia
--Bole--

there is only 10 kind of people the ones that understand binary ... and others

Bole
On 4/15/15, 9:15 AM

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

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 4/14/15, 11:22 PM
Seen: 904 times
Last updated: 4/15/15, 9:15 AM