(self)
return super(L10nEsAeatMod115Report, self).button_confirm()
Check bank account completion.
Check bank account completion.
Check bank account completion .
def button_confirm(self):
        """Check bank account completion."""
        msg = ""
        for report in self.filtered(lambda x: not x.partner_bank_id):
            if report.tipo_declaracion in ("U", "N"):
                msg = (
                    _("Select an account for making the charge")
                    if report.tipo_declaracion == "U"
                    else _("Select an account for receiving the money")
                )
        if msg:
            raise UserError(msg)
        return super(L10nEsAeatMod115Report, self).button_confirm()
def button_confirm ( self ) : msg = "" for report in self . filtered ( lambda x : not x . partner_bank_id ) : if report . tipo_declaracion in ( "U" , "N" ) : msg = ( _ ( "Select an account for making the charge" ) if report . tipo_declaracion == "U" else _ ( "Select an account for receiving the money" ) ) if msg : raise UserError ( msg ) return super ( L10nEsAeatMod115Report , self ) . button_confirm ( )