Hi,
i have multiple invoices that are in the Posted status which in need to set back to Draft.
I can go one by one and change to Draft. But i have thousands of invoices that need corrections.
Is there a way to modify the Status in a bulk mode ?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Hi,
i have multiple invoices that are in the Posted status which in need to set back to Draft.
I can go one by one and change to Draft. But i have thousands of invoices that need corrections.
Is there a way to modify the Status in a bulk mode ?
Hi,
You can create a server action for this from user interface.
Steps:
1. Activate developer mode
2. Navigate to Server Actions menu under Settings -> Technical -> Actions -> Server Actions
3. Create a new server action.
4. Give name as Reset To Draft, select model as Journal Entry(ie, account.move), Action To Do as Execute Python Code, then in python code add below code
for record in records:
record.button_draft()
5. Click Create Contextual Action
6. Refresh the screen, from invoice tree view, select all records you need and from actions button click the Reset To Draft.
For More: https://www.youtube.com/watch?v=TXBjlnfbZg8
Thanks
worked like a charm.. thank you
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng kýBài viết liên quan | Trả lời | Lượt xem | Hoạt động | |
---|---|---|---|---|
|
1
thg 10 21
|
3004 | ||
|
2
thg 6 25
|
1002 | ||
|
0
thg 2 24
|
1376 | ||
|
5
thg 1 24
|
7072 | ||
|
0
thg 10 23
|
1466 |
Dear Mehjabin,
Works perfectly !! You are a star.
I did a small change to what you wrote. I used "records" instead of "record" to work for multiple selections.
records.button_draft()
THANK YOU! It worked!