Repository
OCA/rest-framework · module folder · Try on Runboat
Module version
1.0.0
Category
Uncategorized
Folder size
0.12 MB
License
AGPL-3
Application
No
Auto-installable
No
Website
https://github.com/OCA/rest-framework
Last tracking update
2026-08-07 08:42:49
Authors
Akretion, Odoo Community Association (OCA)
Maintainers
Akretion, Odoo Community Association (OCA)
Committers
Florian Mounier, OCA-git-bot, oca-ci
Odoo dependencies
OCA/queue:
OCA/server-env:
odoo/odoo:
- web
- bus
Python dependencies
itsdangerous, pyjwt, requests
System dependencies
None
Required by
fastapi_auth_partner
Description
This module adds to the partners the ability to authenticate through
directories.

This module does not implement any routing, it only provides the basic
mechanisms in a directory for:

> - Registering a partner and sending an welcome email (to validate
>   email address): \_signup
> - Authenticating a partner: \_login
> - Validating a partner email using a token: \_validate_email
> - Impersonating: \_impersonate, \_impersonating
> - Resetting the password with a unique token sent by mail:
>   \_request_reset_password, \_set_password
> - Sending an invite mail when registering a partner from odoo
>   interface for the partner to enter a password: \_send_invite,
>   \_set_password

For a routing implementation, see the
[fastapi_auth_partner](../fastapi_auth_partner) module.

Code Analysis

Views touched (9)
XML IDNameModelTypeStatus
auth_directory_view_form auth.directory form New
auth_directory_view_search auth.directory search New
auth_directory_view_tree auth.directory list New
auth_partner_view_form auth.partner form New
auth_partner_view_search auth.partner search New
auth_partner_view_tree auth.partner list New
view_partner_form res.partner form Inherits base.view_partner_form
wizard_auth_partner_force_set_password_view_form wizard.auth.partner.force.set.password form New
wizard_auth_partner_reset_password_view_form wizard.auth.partner.reset.password form New
HTTP endpoints (0)

No HTTP endpoints found for this module.

Models touched (5)

New fields (11)
  • auth_partner_ids One2many → auth.partner
    args: 'auth.partner', 'directory_id', 'Auth Partners'
  • count_partner Integer
    compute='_compute_count_partner'
  • force_verified_email Boolean
    help='If checked, email must be verified to be able to log in'
  • impersonating_token_duration Integer
    default=60 help='In seconds, default 60 seconds' required=True
  • impersonating_user_ids Many2many → res.users
    default=<expr> groups='auth_partner.group_auth_partner_manager' help='These odoo users can impersonate any partner of this directory' string='Impersonating Users' args: 'res.users', 'auth_directory_impersonating_user_rel', 'directory_id', 'user_id'
  • name Char
    required=True
  • reset_password_template_id Many2one → mail.template
    default=<expr> required=True args: 'mail.template', 'Mail Template Forget Password'
  • secret_key Char
    default=<expr> groups='base.group_system' required=True
  • set_password_template_id Many2one → mail.template
    default=<expr> required=True args: 'mail.template', 'Mail Template New Password'
  • set_password_token_duration Integer
    default=1440 help='In minute, default 1440 minutes => 24h' required=True
  • validate_email_template_id Many2one → mail.template
    default=<expr> required=True args: 'mail.template', 'Mail Template Validate Email'
Public methods (1)
  • action_regenerate_secret_key(self)

New fields (12)
  • date_last_impersonation Datetime
    help='Date of the last sucessfull impersonation'
  • date_last_request_reset_pwd Datetime
    help='Date of the last password reset request'
  • date_last_sucessfull_reset_pwd Datetime
    help='Date of the last sucessfull password reset'
  • directory_id Many2one → auth.directory
    index=True required=True args: 'auth.directory', 'Directory'
  • encrypted_password Char
    index=True
  • impersonating_user_ids Many2many
    related='directory_id.impersonating_user_ids'
  • login Char
    compute='_compute_login' index=True precompute=True required=True store=True
  • mail_verified Boolean
    help='This field is set to True when the user has clicked on the link sent by email'
  • nbr_pending_reset_sent Integer
    help='Number of pending reset sent from your customer.This field is usefull when after a migration from an other system you ask all you customer to reset their password and you senddifferent mail depending on the number of reminder' index=True
  • partner_id Many2one → res.partner
    index=True ondelete='cascade' required=True args: 'res.partner', 'Partner'
  • password Char
    compute='_compute_password' inverse='_inverse_password'
  • user_can_impersonate Boolean
    compute='_compute_user_can_impersonate' help='Technical field to check if the user can impersonate'
Public methods (2)
  • impersonate(self)
  • send_invite(self)

New fields (2)
  • auth_partner_count Integer
    compute='_compute_auth_partner_count' compute_sudo=True
  • auth_partner_ids One2many → auth.partner
    args: 'auth.partner', 'partner_id', 'Partner Auth'
Public methods (0)

No public methods.

New fields (2)
  • password Char
    required=True
  • password_confirm Char
    required=True string='Confirm Password'
Public methods (1)
  • action_force_set_password(self)

New fields (3)
  • date_validity Datetime
    compute='_compute_date_validity' readonly=False store=True
  • delay Selection
    default='6-hours' required=True args: [('manually', 'Manually'), ('6-hours', '6 Hours'), ('2-days', '2-days'), ('7-days', '7 Days'), ('14-days', '14 Days')]
  • template_id Many2one → mail.template
    domain=[('model_id', '=', 'auth.partner')] required=True args: 'mail.template', 'Mail Template'
Public methods (1)
  • action_reset_password(self)

Loading…