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

I would like to have an additional SUBMITTED state between draft and open for customer invoices.

The objective is to clearly identify which invoices have been submitted to customer and which ones were not submitted.

An additional checkbox might fit too. What do you think would be the best approach?

Is it difficult to achieve it, could someone explain the high level approach to do this?

Thanks,


Awatar
Odrzuć
Najlepsza odpowiedź

Hi,

 One option is you can keep a boolean field, and if submitted you can check that field by edit. Then  by overriding the write() to check if state = draft && boolean field = checked, do transition to "submitted" state. In submitted state you can make visible the default buttons on open state.

Another option is you can have a button "Submitted", which on click, makes the transition from "draft" to "submitted" and also check the boolean field. So when the boolean field got checked, then only other default buttons in open state would be visible.

You may refer this post to understand, how to change existing workflow by including a new state:

https://www.odoo.com/forum/help-1/question/how-do-i-add-new-state-and-change-the-workflow-of-purchase-order-5118 

If you have any doubts, I can help you with the code.

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
1
paź 17
3969
1
lis 16
7535
1
gru 22
5541
1
wrz 21
3509
2
cze 20
3926