Reactivation of Invoices
Description
Environment
relates to
Activity
Carlos RuizMarch 28, 2025 at 11:51 AM
Hi
Please add wiki documentation page for this feature.
My test for reactivating invoice failed.
On reactivateIt you need to take care of doing the opposite that it was done in completeIt
In this case I noticed the BP Open Balance is not being restored, if I reactivate and complete again, the BP Open Balance keeps growing.
Checking MInvoice.completeIt, there is also the call to the CreditManager

Nicolas MicoudMarch 20, 2025 at 1:25 PM
Hi
PR updated with
* canReactivateThisDocType is now called from all required model classes
* the message is translated
* migration script initializes data with IsCanReactivate to Y for ‘SOO', 'POO', 'ARR', 'APP', 'CMB', 'GLJ'
So I guess the feature is complete. Setting PR to start review.
If all ok, I’ll write some lines in migration notes.
Thanks,
Nicolas
Norbert BedeMarch 1, 2025 at 12:13 PM
hi
in our case, only 2 roles A. accountant B. invoice person allowed to re-activate 2 roles.
but ok.
n
Carlos RuizFebruary 28, 2025 at 5:58 PM
Hi
I’ve udpated the PR and add a IsCanBeReactivated column on C_DocType.
ATM is always displayed.Here's the DisplayLogic I propose:
@DocBaseType@='SOO' | @DocBaseType@='POO' | @DocBaseType@='API' | @DocBaseType@='ARI' | @DocBaseType@='ARF' | @DocBaseType@='API' | @DocBaseType@='ARC' | @DocBaseType@='APC' | @DocBaseType@='ARR' | @DocBaseType@='APP' | @DocBaseType@='CMB' | @DocBaseType@='GLJ'
So, if you mean all documents where the class manages Reactivate, then yes.
In the migration script, I'll also initialize data :
Y : SOO, POO, GLJ - they were reactivable before, so no need to check
N : API, ARI, ARF, API, ARC, APC - new feature, not enable by default
according to what is found on AD_Document_Action_Access : ARR, APP, CMB - as it was previously released, we must checked is already in use. If so (with at least one active record per doctype, set it to Y)
I think to keep it simple, just set the N to the invoices and credit notes (both purchase and sales) and in the documentation we add the note that this options is disabled by default for invoices/credit notes and it needs to be enabled.
The default can also reflect the same → Y as default except N for API/ARI/APC/ARC
I also added a canReactivateThisDocType on DocumentEngine, called by
getValidActions (but not for PP_... document as I never used them and not sure what should be done there)
MOrder ; is that would you expect? if so, I'll translate the message and implement it in all other model classes
sounds good, are we controlling the same in model? (that’s the idea) - so, if reactivate is called from REST it must fail also for documents with this flag disabled.
Carlos RuizFebruary 28, 2025 at 5:44 PM
IMHO: iD is quite complex to setup, don’t think, this would be a good approach. Instead need to fix the REST, and follow generic rules (role based doc-action)
it is easier to click one time in document type, instead of adding records for each role, and being forced to remember the same for each new role after created? (which is very unlikely and it would be prone to errors)
Details
Assignee
Nicolas MicoudNicolas MicoudReporter
Nicolas MicoudNicolas MicoudLabels
Priority
Major
Details
Details
Assignee

Reporter

see also:
https://idempiere.atlassian.net/browse/IDEMPIERE-5982
https://idempiere.atlassian.net/browse/IDEMPIERE-5985