Dcoument number can have 'null' in prefix or suffix

Description

When generating a document number which has prefix and/or suffix, if it requires a value from an empty fields (eg: @AD_Org_ID<AD_Org.Description>@, the document number will contains 'null' instead of ''.

Regards,

Nicolas

Environment

None

Activity

Show:
Nicolas Micoud
November 13, 2014, 8:04 AM
Edited

Hi Carlos,

I set the priority to Critical because generating a document number with 'null' inside is quite ugly

Regards,

Nicolas

Carlos Ruiz
November 13, 2014, 6:02 PM

Thanks Nicolas, your patch contained a copy/paste error. I committed a fixed version, please test.

Nicolas Micoud
November 13, 2014, 6:41 PM
Edited

Hi Carlos,
Making more tests and I think this is more complex

Let's take this example : /@AD_Org_ID<AD_Org.Description>@/@XXA_DossierRecuLe<yyyy>@

If there is no description, it will add null2014.

So I think the problem is in the parseVariable method which should returns "" instead of 'null'.

Moreover, this should be
if (!Util.isEmpty(suffixValue))
instead of
if (Util.isEmpty(suffixValue))

WDYT ?

Fixed

Assignee

Nicolas Micoud

Reporter

Nicolas Micoud

Labels

Tested By

None

Priority

Critical