OCA / bank-payment

Odoo Electronic Payment

Home Page:https://odoo-community.org/psc-teams/banking-10

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

11.0 [BUG] UnboundLocalError: local variable 'seq_type' referenced before assignment

Lopsanz opened this issue · comments

Version 11.0 CE in module: account_banking_sepa_direct_debit

When I try to generate XML file, from a line that is associated to a banking mandate with type = "generic", code fails with:
UnboundLocalError: local variable 'seq_type' referenced before assignment

Perhaps this happens because this type of banking mandate does not match any conditions in lines from 89 to 110 in account_payment_order.py, where seq_type is initialized.

This is normal, as bank mandates must be SEPA ones, not generic.

Then, this option shouldn't be able to be selected, @pedrobaeza ...

It's different, as when you select it, there's no knowledge that you are going to export a SEPA file in payment orders. Error message can be improved, but the error should remain and it's correct.