Odoo Help


can I start res.partner.pkey from a given number

Jan Pompe
on 9/23/13, 11:53 AM 2,898 views

Version: V7.0


Module developer:

Server details: CentOS 6

I searched with keywords: start res.partner.pkey

I did this before I got an error: I did an import from MS Access via ODBC to the res.partner table. This works fine, all data is visible but when I want to create a new partner from OpenERP I get an error (of course). I can accept this error (in my case 703 times) as a workaround, but maybe there is an other option ☺?

The error I get: duplicate key value violates unique constraint "res_partner_pkey" DETAIL: Key (id)=(30) already exists.

What do I want: Is there a method or place like the invoice starting number to set the res.partner.pkey ?

My descriptive question:


Grover Menacho

--Grover Menacho--
WebVision Enterprise Systems
| 5 7 8
La Paz, Bolivia
--Grover Menacho--

Odoo Developer

Grover Menacho
On 9/23/13, 1:12 PM

You can do this:

ALTER SEQUENCE res_partner_id_seq RESTART WITH number;


ALTER SEQUENCE res_partner_id_seq RESTART WITH 500;

About This Community

This platform 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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

0 follower(s)


Asked: 9/23/13, 11:53 AM
Seen: 2898 times
Last updated: 3/16/15, 8:10 AM