bots-edi / bots

Bots EDI Translator
GNU General Public License v3.0
136 stars 84 forks source link

Partner syntax merge override does not work #69

Open bf-ckiendl opened 4 years ago

bf-ckiendl commented 4 years ago

I have partner syntax overrides for both the frompartner and the topartner. Both clearly declare merge to be false. I have made sure the files are read by deliberately causing errors which then appear during the parsing run. (e.g. setting the EDI version to a value too large.) So I have a proper partner syntax override, which I know is being read, which clearly states messages should not be merged, yet outbound EDIFACT-data still gets merged into a single file, and I can see that inn.ta_info['merge'] is still true as well as ta.merge in the database.

I've tried figuring out where the problem starts, but the code is rather convoluted.

I tried fixing it by manually setting merge to False in the mapping script, and I can see the effect on messages in the database, but the parent node (messagetype=edifact rather than INVOIC...) still registers with merge=1 and the messages still get merged.

Considering that partner-dependent non-merging of EDIFACT files is the specific example used for partner-specific syntax overrides, this is clearly a bug.

The documentation regarding EDI-splitting is useless, because it's working off the opposite premise:

Think of eg splitting up a shipment to the different orders. There are 2 ways of doing this: Write multiple message to the same file . Write each generated message to the same file, using alt translations.

...writing everything to the same file is the opposite of splitting them up.