Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
2 Răspunsuri
5937 Vizualizări

I have a few products in my database where a long time ago the unit of measure was changed from unit to meter. There are stock moves with both uom categories.

Now I run into problems when trying to use openupgrade to upgrade to newer odoo versions. Actually my database is incosistent as there are different UoM for one product in the database. I can't delete the stock moves as they are already in 'done' state.

Is there any way to solve this problems? I think deleting from database could induce other problems. Updating the ancient stock moves from unit to m would be fine for me, as I actually don't need them.

I think, some SQL magic could help. Years ago I worked with SQL but never with database structure of openerp. Could anybody help me with correct sql syntax on how to update inventory moves from one uom to another? are there any other issues expected (like on old invoices or purchase orders)? What is the best way to restore consistency of my database?

Imagine profil
Abandonează
Autor Cel mai bun răspuns

Unfortunately archiving the wrong products will not work. The stock moves will still be there and openupgrade will fail due to database inconsistency. I think I will need to edit those stock moves on low level to change older moves to reflect current UoM.

Actually I could also live with deleting all old stock moves for those products, but don't know if that would induce some more problems and also currently I don't know the syntax for this.

Imagine profil
Abandonează
Cel mai bun răspuns

The error is because of unit and meter belong to different unit of measure categories. You can archive the product,  create a new replacement product, record open transactions(deliveries/receipts) on the new product and continue with the new product.

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
2
mai 15
5454
1
iul. 23
3052
0
dec. 15
3512
1
mar. 24
1549
2
sept. 21
3792