In .PY
fields-->
user_name=fields.Char(string="User name",required=True,help="This field has ADMIN authenticity, Provide valid user name and password")
password_login=fields.Char(string="Password",required=True,help="This field has ADMIN authenticity, Provide valid user name and password")
check_valid=fields.Char(compute="check_user_password",string=" Login",help="If USER NAME and PASSWORD are Matched, Then it will show you LOGIN BUTTON")
@api.one
@api.depends('user_name','password_login')
def check_user_password(self):
if self.user_name=='vicky' and self.password_login=='vicky':
self.check_valid=True
AND in XML
<field name="user_name" style="width:60%%;height:5%%;font-size:15px" placeholder=" USER NAME"/>
<field name="password_login" style="width:60%%;height:5%%;font-size:15px" placeholder=" PASSWORD" password="1"/>
<field name="check_valid" />
<button name="%(customer_action_window)d" type="action"
class="oe_highlight oe_stat_info oe_right o_wow" style="background-color:#32CD32"
icon="fa-sign-in" attrs="{'invisible':[('check_valid','=',False)]}" />
You may fetch records from db and check it for login... whenever the condition is "True", it automaticlly Shows the Button to login... Hope this will give some Idea to u...
Are you talking about the backend, or a front-end website?
@Michael Watchhorn, front end is not at all a problem right? I am talking about the backend.