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

Importing postgres data to odoo?

By
Uppili Arivukkannu
on 7/7/16, 3:31 AM 285 views

I have copied a table to a csv file from postgres.

The csv file contains this data


34,2016-06-08 13:56:31,0,1,0,0,t

34,2016-06-10 13:49:17,0,1,0,0,t

34,2016-06-11 13:45:53,0,1,0,0,t

34,2016-06-14 13:37:10,0,1,0,0,t

The last column is  Boolean value in postgres table the Boolean value is taken only as 't' or 'f'.

While I importing this csv file in odoo it shows this error in yellow color


"Unknown value 't' for boolean field 'state?', assuming 'yes' at row 655

Use '1' for yes and '0' for no"


It take all the values of 't' and 'f' as yes that is it takes all value as 't' while importing changes the state field(boolean) to 't' in postgres table.


So the odoo takes only 0 and 1 as boolean value while importing then how can I import the data of postgres in odoo.

Provide me some other solutions to import postgres boolean value into odoo.


 

1
ANHLQ
On 7/7/16, 4:22 AM

On CSV file we only need to key in 0 or 1.

Notes: 0 = False; 1 = True  in PostgreSQL

So I want to change the boolean data to 0 and 1. There is no other way. I have more than 20000 records and it will be more in future it is difficult to change that much records. Is there so other way?

Uppili Arivukkannu
on 7/7/16, 4:28 AM
0

Ermin Trevisan

--Ermin Trevisan--
3546
| 6 3 7
Walchwil, Switzerland
--Ermin Trevisan--


Ermin Trevisan
On 7/7/16, 4:30 AM

"Unknown value 't' for boolean field 'state?', assuming 'yes' at row 655

Use '1' for yes and '0' for no"

Why don't you just manipulate your .csv file accordingly?

how to manipulate large amount of csv files. Is there a way to change the field of the csv file?

Uppili Arivukkannu
on 7/7/16, 4:33 AM

There are numerous ways not related to Odoo to accomplish that. But you can also develop a new Odoo import csv module based on the existing one.

Ermin Trevisan
on 7/7/16, 4:50 AM

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: 7/7/16, 3:31 AM
Seen: 285 times
Last updated: 7/7/16, 4:30 AM