Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
4 Odpowiedzi
10696 Widoki

It happened that there was some entry in a work order for a manufacturing order, that was wrong.  What we needed to do, was to cancel and delete the work order / manufacturing order. Since it would only create wrong postings.

But I find absolutely now way of managing that. I cannot cancel or delete a work order that is in status "Progress". I cannot cancel / delete a Manufacturing order that got a Work order in progress attached to it.

Pleas advice what I can do to get rid of these orders.

Awatar
Odrzuć
Najlepsza odpowiedź

Hello Lars 

please check the below link. This will helps you.

https://apps.odoo.com/apps/modules/13.0/eq_cancel_mrp_orders/




Awatar
Odrzuć
Najlepsza odpowiedź

Hi all,

    I want to delete MO and the all child MOs also, how can I do?

    It means that delete all related with parent MO

Please help

Thanks

Awatar
Odrzuć
Najlepsza odpowiedź

I had the same problem, and found a way to delete it by modifying the database directly (Community v11).  No easy way it seems.

Be very careful if you attempt this, you can destroy your database if its not done correctly.

This may also have some side effects that I am not aware of.

You need to first cancel all the inventory moves for the manufacturing order, there is an 'Inventory Moves' button on the manufacturing order in odoo which lets you delete the records. 

Then this is the hard part, maybe.  Login to the database via a postgres client program, how you do this depends largely on your installation and may not be possible in cloud based installs. I just login using psql over ssh. Locate the record in the mrp_production table. It seems the number in the MO/00001 relates to the id of the record, so that would id = 1, for me at least. But a query like this should find it and tell you the id of it:

     select * from mrp_production where name = 'MO/00001';

or for just the id

select id from mrp_production where name = 'MO/00001';

Then you can cancel the manufacturing order with the following query, using the id you found in the previous query:

update mrp_production set state = 'cancel' where id = [ID];

for example:

update mrp_production set state = 'cancel' where id = 1;

Then you can delete the manufacturing order via the usual way using odoo.

Anyway may not be for everyone, but it seemed to work for me.


Awatar
Odrzuć
Autor

Oh. No. I use Enterprise edition on Odoo SAAS. Cannot access the database this way.

But the issue was expereinced in a test database. In production it has not happened - yet.

We need a solution from Odoo. And they say that there are imporvements in V13.

Powiązane posty Odpowiedzi Widoki Czynność
0
sie 19
3068
1
sie 23
2067
2
paź 18
2666
2
gru 19
5443
0
lip 25
402