Code review comment for lp:~akretion-team/banking-addons/70-sepa-trf-dd-updates

Revision history for this message
Alexis de Lattre (alexis-via) wrote :

@Stefan

Yes, it is a direct consequence of the support of the missing BIC. I can't put an "if" clause, because the content of the if would be different depending on the origin of the function call :

- if we are in block B, we would have to test "sepa_export.payment_order_ids[0].mode.bank_id.bank.bic"

- if we are in block C, we would have to test "line.bank_id.bank.bic"

I think that, if we want to avoid this "try/except" in generate_party_agent(), I would need to fully re-organize the code about BIC following the introduction of the support of the missing BIC :
- check if we have a BIC or not in wizard/export_sepa.py just before each call to the function generate_party_block() and pass this information in the call of the function generate_party_block()
- then I could remove the try/except in the function generate_party_agent()

So, if you still want me to remove the try/except in generate_party_agent() and you agree with my proposal to re-organise the code, I will make the change described above.

« Back to merge proposal