I needed to move the old database with all its setting from one server to another, and then remove the accounting testing data, I was able to delete journal items, journal entries and invoices but couldn't make the counter equals zero. as shown in the picture next to the journal entries:
I need to setup Odoo system for the production. I don't want to make a new database as it needs a lot of data entry.
You need to use the REINDEX
maintenance operation on your database to reset table id.
Or you can reset the table (Journal entries
) id with the following SQL query:
ALTER SEQUENCE account_move_id_seq RESTART WITH 1;