Skip to Content
Odoo Menu
  • Sign in
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Approvals
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Estate Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
    • Meet an advisor
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Get a demo
  • Pricing
  • Help

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Accounting
  • Inventory
  • PoS
  • Project
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
Help

Login feature in odoo

Subscribe

Get notified when there's activity on this post

This question has been flagged
loginodoo8.0
4 Replies
11801 Views
Avatar
Anand Prasanth

I would like to create a module/app to use the login authentication. I am not sure how to proceed. But registration is necessary which I have already kept ready.

The design for the login is not a matter but How to check whether the user is registered and to give separate functionalities depending upon the type of user who logins the module/website.


And also how to carry the credentials till the users logout.

0
Avatar
Discard
Michael Watchorn

Are you talking about the backend, or a front-end website?

Anand Prasanth
Author

@Michael Watchhorn, front end is not at all a problem right? I am talking about the backend.

Avatar
Axel Mendoza
Best Answer

I think that the solution of what you want is more simple than what you are thinking about. 

If you wanna ensure that an user is authenticated before do something you just need to do something like this into the controller of the url for that something, like the following scenario:

#making sure that the user is registered and authenticated before checkout in the shop:

from openerp import http

from openerp.http import request

from openerp.addons.website_sale.controllers.main import website_sale

class solt_website_sale(website_sale):

@http.route(['/shop/checkout'], type='http', auth="user", website=True)

def checkout(self, **post):

return super(solt_website_sale, self).checkout(**post)

For the separation of features depending of the type of users, you will need to get more familiar with Odoo security stuffs like groups, and how to use it to restrict the content that you deliver to your users


1
Avatar
Discard
Avatar
Annadurai
Best Answer

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...

0
Avatar
Discard
Avatar
Anand Prasanth
Author Best Answer

Axel Mendoza thanks for the reply. This is also required for me. But I am asking for the basic authentication. i.e., the login process itself. You are saying about the process after the login for holding up the authentication.

0
Avatar
Discard
Ermin Trevisan

The login process itself is already handled by Odoo out of the box.

Anand Prasanth
Author

How to make a custom registration form to add users to the database then?

Anand Prasanth
Author

@Annadurai Thank you for your reply. I have made this design already with a different scenario. But I need to check the database for the user name and the password which is in a different table. But inside the same project.

Avatar
Alaa
Best Answer

You can use these apps (search apps in odoo apps by names provided below) to change the whole login page style.

Moreover, these apps provide the ability to define your own favicon and logo as you wish.

Apps Name:

Minimalist Login Form

Creative Login Form

Advanced Login Form


-1
Avatar
Discard
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Sign up
Related Posts Replies Views Activity
Login username with space at end cannot login
login
Avatar
Avatar
1
Sep 24
1936
how to implement joint piece in odoo 8 in one view
odoo8.0
Avatar
0
Apr 24
2719
what is the reason behind extra move? in stock
odoo8.0
Avatar
Avatar
Avatar
Avatar
4
Nov 23
6897
How to solve fields.function issue in odoo 8
odoo8.0
Avatar
0
Oct 23
2716
how to restrict create and delete access in one2many field tree view
odoo8.0
Avatar
0
Dec 22
3461
Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now