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.

1

Sequence changed on Import Validation

By
tim diamond
on 9/20/13, 1:18 PM 1,161 views

I have an object with a sequence that is updated in the create() method. I ran into an odd problem today, when I was importing data:

To illustrate, my next number in the sequence was 50. And lets say I was importing 75 records.

  1. I ran the import wizard, clicked validate. Everything was good.
  2. Import the data. Success.
  3. Check the assigned sequence: They were 125-200 instead of the expected 50-125!

So clearly, the import validation button is actually running the create() method? Then deleting the results? If this is the case, is there a way I could check the context to make sure that If the import validation is running that I do NOT assign a sequence number? Anyone run into this problem before?

2

AJ Schrafel Paper Corp

--AJ Schrafel Paper Corp--
2050
| 4 5 8
Bronx, United States
--AJ Schrafel Paper Corp--

Exploring OpenERP for business

AJ Schrafel Paper Corp
On 9/20/13, 1:32 PM

If you have the column "id" mapped properly the sequence will be preserved, items without a sequence will be flagged.

also, if you have imported things and deleted them, those sequence numbers will not be reclaimed, number will start with the last highest.

if you have id - name 1 - A 2 - B 3 - C < delete this

and then you import more stuff number will start at 4. 1 - A 2 - B 4 - D 5 - E

if you have id - name 1 - A 2 - B 3 - C < delete this

and then you import this: id - name 3 - D 4 - E

you would end up with 1 - A 2 - B 3 - D 4 - E

Thank you for your answer. However, I still a bit confused. What exactly do you meanby mapping the column id? I'm importing new products, and thus NOT using an external_id column in the import. When openerp sees this, it simply adds a new product for me. Please, could you be a little more specific? Thanks again!

tim diamond
on 9/20/13, 2:48 PM

Actually, THANKS!! I had to change the sequence entry to be "No Gap".

tim diamond
on 9/20/13, 2:59 PM

glad it worked for you.

AJ Schrafel Paper Corp
on 9/20/13, 3:03 PM

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

0 follower(s)

Stats

Asked: 9/20/13, 1:18 PM
Seen: 1161 times
Last updated: 8/11/16, 11:06 PM