Yardım

0

Cannot remove stock_move record in database

Recently we tried to upgrade our V12 db to V14 by sending it to Odoo, they told us there was a stock.move record referencing a non existing picking_id. I checked this and this was the case. there are no stock.move.line referencing this stock.move so it seemed to be floating in the db.

Now, we tried deleting it by accessing the db using a user with full access to all table. But we can’t seem to delete it, it keeps saying 0 rows were affected. Just changing the picking_id to null also does not work. When we tried to get some info using the Odoo shell it could not find the record. The command “env[‘stock.move’].browse(9099).name” return the error that the record was deleted or does not exist. So Odoo can’t find it but it is present in the database.

Another weird thing is that the sql query “select * from stock_move;” shows the record, but changing it to “select * from stock_move where id=9099;” does not return anything. Adding any where-clause makes it so the record is not returned, so I don’t get what’s happening here.

When I take a backup of the Odoo db and restore it to a locally hosted Odoo, the record is still there. When I access that db, I can actually delete it. So I don’t really get why I can’t seem to delete the record on the original DB.

Does anyone know what might be the problem here? Any help would be greatly appreciated!


Avatar
Vazgeç
1Cevap
0
Avatar
mehdi
En iyi cevap

hi

you can become a superuser in odoo developer mode and delete it if you just want to delete it.

Avatar
Vazgeç