Hi.
In your case, I think, you could go the following way:
To change the method "_get_login_domain" from the file "odoo/addons/base/models/res_users.py":
@api.model
def _get_login_domain(self, login):
return [('login', '=', login)]
This domain is used in the method "_login" in the same model to get a user by a login. If you inherit the method and change the domain adding your condition like ('contact_no', '=', login) you could get the necessary result. My solution was not tested and may be used as a possible case, so please test it before on your system.
P.S. If you will want to add your parameter to the login page you can do it in the following way:
<template id="login" inherit_id="web.login" name="Custom Login" >
<xpath expr="//div[hasclass('field-login')]" position="before">
<div class="form-group field-contact-no">
<label for="contact_no">Contact No</label>
<input type="text" placeholder="Contact No" name="contact_no" t-att-value="contact_no" id="contact_no" t-attf-class="form-control #{'form-control-sm' if form_small else ''}" required="required" autofocus="autofocus" autocapitalize="off"/>
</div>
</xpath>
</template>
After that, you also need to add the logic for the "contact_no" parameter to the controller method "web_login" in the "web" module.