How to Unlock the Locked Sales Order?
without creating addon with Server Action

Use Odoo's Server Action solution!

Go to Server Action menu under Settings, first enable the developer mode...


Add new Server Action called Unlock SO.

Select Base Model: Sale Order

Select Action to Do: Execute Python Code

Type the code below under Python Code tab:


if env.context.get('active_model') == 'sale.order' and env.context.get('active_id'):
    model.browse(context['active_id']).write({'state':'sale'})


Then click the Add in the 'More' menu..


Done!


The menu will appear in the Sale Order form, Action Button -> Unlock Order for you to unlock the locked SO.

Visit my udemy course for more tricks:

http://udemy.com/user/akhmaddaniel


How to Unlock the Locked Sales Order?
vitraining, odoo indonesia
12 May, 2020
Share this post
Archive
Sign in to leave a comment
Odoo Install Checklist on Centos
Odoo + Centos 7 + Nginx + Certbot SSL