size int64 0 304k | ext stringclasses 1
value | lang stringclasses 1
value | branch stringclasses 1
value | content stringlengths 0 304k | avg_line_length float64 0 238 | max_line_length int64 0 304k |
|---|---|---|---|---|---|---|
647 | py | PYTHON | 15.0 | # Copyright (C) 2018 - TODAY, Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Field Service - Distribution",
"summary": "Manage your distribution structure",
"version": "15.0.1.0.0",
"category": "Field Service",
"author": "Open Source Integrators, ... | 28.130435 | 647 |
1,639 | py | PYTHON | 15.0 | # Copyright (C) 2021 - TODAY, Open Source Integrators
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html)
from odoo.tests.common import TransactionCase
class TestFSMSDistribution(TransactionCase):
def setUp(self):
super(TestFSMSDistribution, self).setUp()
self.location = self.env... | 39.97561 | 1,639 |
2,064 | py | PYTHON | 15.0 | # Copyright (C) 2018 - TODAY, Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class FSMLocation(models.Model):
_inherit = "fsm.location"
is_a_distribution = fields.Boolean(string="Is a Distribution")
dist_parent_id = fields.Many2one... | 36.210526 | 2,064 |
508 | py | PYTHON | 15.0 | # Copyright 2021 ACSONE SA/NV
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
{
"name": "Auth JWT Test",
"summary": """
Test/demo module for auth_jwt.""",
"version": "14.0.1.2.0",
"license": "LGPL-3",
"author": "ACSONE SA/NV,Odoo Community Association (OCA)",
"maintainer... | 29.882353 | 508 |
2,082 | py | PYTHON | 15.0 | # Copyright 2021 ACSONE SA/NV
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
import time
import jwt
from odoo import tests
@tests.tagged("post_install", "-at_install")
class TestRegisterHook(tests.HttpCase):
def test_auth_method_exists(self):
validator = self.env["auth.jwt.validator"].... | 40.823529 | 2,082 |
2,295 | py | PYTHON | 15.0 | # Copyright 2021 ACSONE SA/NV
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
import json
from odoo.http import Controller, Response, request, route
class JWTTestController(Controller):
@route(
"/auth_jwt_demo/whoami",
type="http",
auth="jwt_demo",
csrf=False,
... | 33.26087 | 2,295 |
563 | py | PYTHON | 15.0 | # Copyright (C) 2013-Today GRAP (http://www.grap.coop)
# @author Sylvain LE GAL (https://twitter.com/legalsylvain)
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
{
"name": "Authentification - System Administrator Passkey",
"summary": "Allows system administrator to authenticate with any accou... | 37.533333 | 563 |
2,301 | py | PYTHON | 15.0 | # Copyright (C) 2013-Today GRAP (http://www.grap.coop)
# @author Sylvain LE GAL (https://twitter.com/legalsylvain)
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
from odoo import exceptions
from odoo.tests import common, tagged
from odoo.tools import config
@tagged("post_install", "-at_install")
cl... | 38.35 | 2,301 |
5,347 | py | PYTHON | 15.0 | # Copyright (C) 2013-Today GRAP (http://www.grap.coop)
# @author Sylvain LE GAL (https://twitter.com/legalsylvain)
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
from lxml import html
from werkzeug.test import Client
from werkzeug.wrappers import BaseResponse
from odoo.service import wsgi_server
fro... | 38.467626 | 5,347 |
2,539 | py | PYTHON | 15.0 | # Copyright (C) 2013-Today GRAP (http://www.grap.coop)
# @author Sylvain LE GAL (https://twitter.com/legalsylvain)
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
import logging
from datetime import datetime
from odoo import SUPERUSER_ID, _, api, exceptions, models
from odoo.tools import config
logg... | 36.797101 | 2,539 |
1,256 | py | PYTHON | 15.0 | # Copyright 2015 LasLabs Inc.
# Copyright 2018 Modoolar <info@modoolar.com>.
# Copyright 2019 initOS GmbH
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
{
"name": "Password Security",
"summary": "Allow admin to set password security requirements.",
"version": "15.0.1.1.4",
"author"... | 28.545455 | 1,256 |
3,100 | py | PYTHON | 15.0 | # Copyright 2023 Onestein (<https://www.onestein.eu>)
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
from odoo import http
from odoo.exceptions import UserError
from odoo.tests.common import HttpCase, Opener, get_db_name, new_test_user, tagged
@tagged("-at_install", "post_install")
class TestPa... | 35.632184 | 3,100 |
5,164 | py | PYTHON | 15.0 | # Copyright 2015 LasLabs Inc.
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
from odoo.exceptions import UserError
from odoo.tests.common import SavepointCase
class TestResUsers(SavepointCase):
@classmethod
def setUpClass(cls):
super(TestResUsers, cls).setUpClass()
cls.l... | 35.129252 | 5,164 |
2,055 | py | PYTHON | 15.0 | # Copyright 2016 LasLabs Inc.
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
from contextlib import contextmanager
from unittest import mock
from odoo.http import _request_stack
from odoo.tests.common import TransactionCase
from ..controllers import main
IMPORT = "odoo.addons.password_security... | 34.830508 | 2,055 |
1,784 | py | PYTHON | 15.0 | # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
from odoo.exceptions import UserError
from odoo.tests.common import TransactionCase
class TestPasswordHistory(TransactionCase):
def test_check_password_history(self):
# Disable all password checks except for history
set_param = ... | 36.408163 | 1,784 |
8,036 | py | PYTHON | 15.0 | # Copyright 2016 LasLabs Inc.
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
from contextlib import contextmanager
from datetime import datetime, timedelta
from unittest import mock
from werkzeug.urls import url_parse
from odoo.exceptions import UserError
from odoo.http import Response, _reques... | 37.7277 | 8,036 |
813 | py | PYTHON | 15.0 | # Copyright 2023 Onestein (<https://www.onestein.eu>)
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
from odoo.exceptions import ValidationError
from odoo.tests.common import TransactionCase
class TestConfigSettings(TransactionCase):
@classmethod
def setUpClass(cls):
super().set... | 33.875 | 813 |
618 | py | PYTHON | 15.0 | # Copyright 2016 LasLabs Inc.
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
from odoo import fields, models
class ResUsersPassHistory(models.Model):
_name = "res.users.pass.history"
_description = "Res Users Password History"
_order = "user_id, date desc"
user_id = fields.Man... | 24.72 | 618 |
1,885 | py | PYTHON | 15.0 | # Copyright 2016 LasLabs Inc.
# Copyright 2017 Kaushal Prajapati <kbprajapati@live.com>.
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
from odoo import _, api, fields, models
from odoo.exceptions import ValidationError
class ResCompany(models.Model):
_inherit = "res.company"
password_... | 30.403226 | 1,885 |
7,724 | py | PYTHON | 15.0 | # Copyright 2016 LasLabs Inc.
# Copyright 2017 Kaushal Prajapati <kbprajapati@live.com>.
# Copyright 2018 Modoolar <info@modoolar.com>.
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
import logging
import re
from datetime import datetime, timedelta
from odoo import _, api, fields, models
from od... | 35.269406 | 7,724 |
1,168 | py | PYTHON | 15.0 | # Copyright 2018 Modoolar <info@modoolar.com>
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
from odoo import fields, models
class ResConfigSettings(models.TransientModel):
_inherit = "res.config.settings"
password_expiration = fields.Integer(
related="company_id.password_expira... | 37.677419 | 1,168 |
2,257 | py | PYTHON | 15.0 | # Copyright 2015 LasLabs Inc.
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
import operator
from odoo import http
from odoo.exceptions import UserError
from odoo.http import request
from odoo.addons.auth_signup.controllers.main import AuthSignupHome
from odoo.addons.web.controllers.main import... | 37.616667 | 2,257 |
738 | py | PYTHON | 15.0 | # Copyright 2012-2018 Therp BV <https://therp.nl>
# Copyright 2018 Brainbean Apps <https://brainbeanapps.com>
# Copyright 2021 Tecnativa - João Marques
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
"name": "LDAP groups assignment",
"version": "15.0.1.0.0",
"depends": ["auth_ldap"],... | 43.352941 | 737 |
7,998 | py | PYTHON | 15.0 | # Copyright 2018 Therp BV <https://therp.nl>
# Copyright 2018 Brainbean Apps <https://brainbeanapps.com>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from contextlib import contextmanager
from unittest import mock
from odoo.exceptions import UserError
from odoo.tests.common import TransactionC... | 35.23348 | 7,998 |
1,473 | py | PYTHON | 15.0 | # Copyright 2012-2018 Therp BV <https://therp.nl>
# Copyright 2018 Brainbean Apps <https://brainbeanapps.com>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from logging import getLogger
from string import Template
from odoo import api, models
_logger = getLogger(__name__)
class ResCompanyLda... | 35.926829 | 1,473 |
1,348 | py | PYTHON | 15.0 | # Copyright 2012-2018 Therp BV <https://therp.nl>
# Copyright 2018 Brainbean Apps <https://brainbeanapps.com>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import fields, models
class ResCompanyLdapGroupMapping(models.Model):
_name = "res.company.ldap.group_mapping"
_descript... | 32.095238 | 1,348 |
1,158 | py | PYTHON | 15.0 | # Copyright 2018 Therp BV <https://therp.nl>
# Copyright 2018 Brainbean Apps <https://brainbeanapps.com>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import SUPERUSER_ID, api, models, registry
class ResUsers(models.Model):
_inherit = "res.users"
@classmethod
def _login(... | 42.888889 | 1,158 |
2,638 | py | PYTHON | 15.0 | # Copyright 2012-2018 Therp BV <https://therp.nl>
# Copyright 2018 Brainbean Apps <https://brainbeanapps.com>
# Copyright 2021 Tecnativa - João Marques
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from logging import getLogger
from odoo import _, api, fields, models
from odoo.exceptions import... | 36.625 | 2,637 |
735 | py | PYTHON | 15.0 | # Copyright 2016 ICTSTUDIO <http://www.ictstudio.eu>
# Copyright 2021 ACSONE SA/NV <https://acsone.eu>
# License: AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
{
"name": "Authentication OpenID Connect",
"version": "15.0.1.0.1",
"license": "AGPL-3",
"author": (
"ICTSTUDIO, André Schenkels... | 34.952381 | 734 |
2,064 | py | PYTHON | 15.0 | # Copyright 2021 ACSONE SA/NV <https://acsone.eu>
# License: AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
import contextlib
from urllib.parse import parse_qs, urlparse
import odoo
from odoo.tests import common
from odoo.addons.website.tools import MockRequest as _MockRequest
from ..controllers.main import O... | 38.943396 | 2,064 |
2,656 | py | PYTHON | 15.0 | # Copyright 2016 ICTSTUDIO <http://www.ictstudio.eu>
# Copyright 2021 ACSONE SA/NV <https://acsone.eu>
# License: AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
import logging
import secrets
import requests
from odoo import fields, models, tools
try:
from jose import jwt
except ImportError:
logging.ge... | 32.390244 | 2,656 |
3,061 | py | PYTHON | 15.0 | # Copyright 2016 ICTSTUDIO <http://www.ictstudio.eu>
# Copyright 2021 ACSONE SA/NV <https://acsone.eu>
# License: AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
import logging
import requests
from odoo import api, models
from odoo.exceptions import AccessDenied
from odoo.http import request
_logger = logging.... | 40.276316 | 3,061 |
2,119 | py | PYTHON | 15.0 | # Copyright 2016 ICTSTUDIO <http://www.ictstudio.eu>
# Copyright 2021 ACSONE SA/NV <https://acsone.eu>
# License: AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
import base64
import hashlib
import logging
import secrets
from werkzeug.urls import url_decode, url_encode
from odoo.addons.auth_oauth.controllers.ma... | 42.38 | 2,119 |
756 | py | PYTHON | 15.0 | # Copyright 2021 Camptocamp SA
# @author: Simone Orsi <simone.orsi@camptocamp.com>
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
{
"name": "Auth API key server environment",
"summary": """
Configure api keys via server env.
This can be very useful to avoid mixing your keys between your vario... | 36 | 756 |
1,298 | py | PYTHON | 15.0 | # Copyright 2018 ACSONE SA/NV
# Copyright 2021 Camptocamp SA
# @author: Simone Orsi <simone.orsi@camptocamp.com>
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
from odoo.exceptions import ValidationError
from odoo.tests.common import TransactionCase
from odoo.addons.server_environment import serv_conf... | 40.5625 | 1,298 |
945 | py | PYTHON | 15.0 | # Copyright 2018 ACSONE SA/NV
# Copyright 2021 Camptocamp SA
# @author: Simone Orsi <simone.orsi@camptocamp.com>
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
from odoo import models
class AuthApiKey(models.Model):
_name = "auth.api.key"
_inherit = ["auth.api.key", "server.env.mixin"]
... | 28.636364 | 945 |
626 | py | PYTHON | 15.0 | # Copyright 2015 Antiun Ingeniería, S.L.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Verify email at signup",
"summary": "Force uninvited users to use a good email for signup",
"version": "15.0.1.0.0",
"category": "Authentication",
"website": "https://github.com/O... | 36.705882 | 624 |
1,889 | py | PYTHON | 15.0 | # Copyright 2016 Jairo Llopis <jairo.llopis@tecnativa.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from lxml.html import document_fromstring
from mock import patch
from odoo.tests.common import HttpCase
from odoo.tools.misc import mute_logger
from odoo.addons.mail.models import mail_template
... | 38.55102 | 1,889 |
2,969 | py | PYTHON | 15.0 | # Copyright 2015 Antiun Ingeniería, S.L.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
import logging
from email_validator import EmailSyntaxError, EmailUndeliverableError, validate_email
from odoo import _
from odoo.http import request, route
from odoo.addons.auth_signup.controllers.main imp... | 37.1 | 2,968 |
477 | py | PYTHON | 15.0 | # Copyright 2018 ACSONE SA/NV
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
{
"name": "Auth Api Key",
"summary": """
Authenticate http requests from an API key""",
"version": "15.0.1.1.1",
"license": "LGPL-3",
"author": "ACSONE SA/NV,Odoo Community Association (OCA)",
... | 34.071429 | 477 |
1,788 | py | PYTHON | 15.0 | # Copyright 2018 ACSONE SA/NV
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
from odoo.exceptions import AccessError, ValidationError
from odoo.tests.common import TransactionCase
class TestAuthApiKey(TransactionCase):
@classmethod
def setUpClass(cls, *args, **kwargs):
super().setUpCl... | 39.733333 | 1,788 |
1,265 | py | PYTHON | 15.0 | # Copyright 2018 ACSONE SA/NV
# Copyright 2017 Akretion (http://www.akretion.com).
# @author Sébastien BEAU <sebastien.beau@akretion.com>
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
import logging
from odoo import models
from odoo.exceptions import AccessDenied
from odoo.http import request
_logg... | 35.111111 | 1,264 |
2,058 | py | PYTHON | 15.0 | # Copyright 2018 ACSONE SA/NV
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
from odoo import _, api, fields, models, tools
from odoo.exceptions import AccessError, ValidationError
from odoo.tools import consteq
class AuthApiKey(models.Model):
_name = "auth.api.key"
_description = "API Key"
... | 32.666667 | 2,058 |
1,318 | py | PYTHON | 15.0 | import setuptools
with open('VERSION.txt', 'r') as f:
version = f.read().strip()
setuptools.setup(
name="odoo-addons-oca-server-auth",
description="Meta package for oca-server-auth Odoo addons",
version=version,
install_requires=[
'odoo-addon-auth_admin_passkey>=15.0dev,<15.1dev',
... | 39.939394 | 1,318 |
100 | py | PYTHON | 15.0 | import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
| 16.666667 | 100 |
100 | py | PYTHON | 15.0 | import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
| 16.666667 | 100 |
100 | py | PYTHON | 15.0 | import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
| 16.666667 | 100 |
100 | py | PYTHON | 15.0 | import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
| 16.666667 | 100 |
100 | py | PYTHON | 15.0 | import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
| 16.666667 | 100 |
100 | py | PYTHON | 15.0 | import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
| 16.666667 | 100 |
100 | py | PYTHON | 15.0 | import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
| 16.666667 | 100 |
100 | py | PYTHON | 15.0 | import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
| 16.666667 | 100 |
100 | py | PYTHON | 15.0 | import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
| 16.666667 | 100 |
100 | py | PYTHON | 15.0 | import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
| 16.666667 | 100 |
100 | py | PYTHON | 15.0 | import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
| 16.666667 | 100 |
100 | py | PYTHON | 15.0 | import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
| 16.666667 | 100 |
100 | py | PYTHON | 15.0 | import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
| 16.666667 | 100 |
100 | py | PYTHON | 15.0 | import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
| 16.666667 | 100 |
100 | py | PYTHON | 15.0 | import setuptools
setuptools.setup(
setup_requires=["setuptools-odoo"],
odoo_addon=True,
)
| 16.666667 | 100 |
100 | py | PYTHON | 15.0 | import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
| 16.666667 | 100 |
808 | py | PYTHON | 15.0 | # Copyright 2021 Camptcamp SA
# @author: Simone Orsi <simone.orsi@camptocamp.com>
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
{
"name": "Auth API key group",
"summary": """
Allow grouping API keys together.
Grouping per se does nothing. This feature is supposed to be used by other modules
... | 32.32 | 808 |
1,879 | py | PYTHON | 15.0 | # Copyright 2021 Camptcamp SA
# @author: Simone Orsi <simone.orsi@camptocamp.com>
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
from odoo.tests.common import TransactionCase
class TestAuthApiKey(TransactionCase):
@classmethod
def setUpClass(cls, *args, **kwargs):
super().setUpClass... | 40.847826 | 1,879 |
613 | py | PYTHON | 15.0 | # Copyright 2021 Camptcamp SA
# @author: Simone Orsi <simone.orsi@camptocamp.com>
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
from odoo import fields, models
class AuthApiKeyGroup(models.Model):
"""Group API keys together."""
_name = "auth.api.key.group"
_description = "API Key auth... | 26.652174 | 613 |
469 | py | PYTHON | 15.0 | # Copyright 2021 Camptcamp SA
# @author: Simone Orsi <simone.orsi@camptocamp.com>
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
from odoo import fields, models
class AuthApiKey(models.Model):
_inherit = "auth.api.key"
auth_api_key_group_ids = fields.Many2many(
comodel_name="auth.... | 24.684211 | 469 |
646 | py | PYTHON | 15.0 | # Copyright 2016 Florent de Labarre
# Copyright 2017 Camptocamp
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
{
"name": "OAuth Multi Token",
"version": "15.0.1.0.0",
"license": "AGPL-3",
"author": "Florent de Labarre, Camptocamp, Odoo Community Association (OCA)",
"summary": """All... | 32.3 | 646 |
3,143 | py | PYTHON | 15.0 | # Copyright 2017 Camptocamp
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
import json
from odoo import exceptions
from odoo.tests import TransactionCase
class TestMultiToken(TransactionCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
cls.token_model = cls.env["a... | 34.538462 | 3,143 |
2,732 | py | PYTHON | 15.0 | # Copyright 2016 Florent de Labarre
# Copyright 2017 Camptocamp
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
import uuid
from odoo import api, exceptions, fields, models
from odoo.addons import base
base.models.res_users.USER_PRIVATE_FIELDS.append("oauth_master_uuid")
class ResUsers(models.Model)... | 32.915663 | 2,732 |
1,559 | py | PYTHON | 15.0 | # Copyright 2016 Florent de Labarre
# Copyright 2017 Camptocamp
# Copyright 2021 ACSONE SA/NV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
from odoo import api, fields, models
class AuthOauthMultiToken(models.Model):
"""Define a set of tokens."""
_name = "auth.oauth.multi.token"
_descr... | 29.415094 | 1,559 |
378 | py | PYTHON | 15.0 | # Copyright 2023 Quartile Limited
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Auth Signup Partner Company",
"version": "15.0.1.0.0",
"author": "Quartile Limited, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/server-auth",
"depends": ["auth_sign... | 34.363636 | 378 |
1,359 | py | PYTHON | 15.0 | # Copyright 2023 Quartile Limited
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo.tests.common import TransactionCase
class TestAuthSignupPartnerCompany(TransactionCase):
def setUp(self):
super(TestAuthSignupPartnerCompany, self).setUp()
self.env["ir.config_parameter"].... | 46.862069 | 1,359 |
566 | py | PYTHON | 15.0 | # Copyright 2023 Quartile Limited
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import models
class ResUsers(models.Model):
_inherit = "res.users"
def _create_user_from_template(self, values):
values["company_ids"] = [self.env.company.id]
values["company_id"] = s... | 31.444444 | 566 |
701 | py | PYTHON | 15.0 | # Copyright (C) 2017 Creu Blanca
# Copyright (C) 2018 Brainbean Apps
# Copyright 2020 CorporateHub (https://corporatehub.eu)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
"name": "LDAPS authentication",
"version": "15.0.1.0.0",
"category": "Tools",
"website": "https://github.c... | 36.894737 | 701 |
1,912 | py | PYTHON | 15.0 | # Copyright (C) Creu Blanca
# Copyright (C) 2018 Brainbean Apps
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
import logging
import ldap
from odoo import fields, models
_logger = logging.getLogger(__name__)
class CompanyLDAP(models.Model):
_inherit = "res.company.ldap"
_descriptio... | 38.24 | 1,912 |
602 | py | PYTHON | 15.0 | # Copyright 2021 ACSONE SA/NV
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
{
"name": "Auth JWT",
"summary": """
JWT bearer token authentication.""",
"version": "14.0.1.2.0",
"license": "LGPL-3",
"author": "ACSONE SA/NV,Odoo Community Association (OCA)",
"maintainers":... | 33.444444 | 602 |
602 | py | PYTHON | 15.0 | # Copyright 2021 ACSONE SA/NV
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl)
from werkzeug.exceptions import InternalServerError, Unauthorized
class UnauthorizedMissingAuthorizationHeader(Unauthorized):
pass
class UnauthorizedMalformedAuthorizationHeader(Unauthorized):
pass
class Unauthor... | 18.8125 | 602 |
12,826 | py | PYTHON | 15.0 | # Copyright 2021 ACSONE SA/NV
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
import contextlib
import time
from unittest.mock import Mock
import jwt
import odoo.http
from odoo.exceptions import ValidationError
from odoo.tests.common import TransactionCase
from odoo.tools import mute_logger
from odoo... | 42.330033 | 12,826 |
3,596 | py | PYTHON | 15.0 | # Copyright 2021 ACSONE SA/NV
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
import logging
import re
from odoo import SUPERUSER_ID, api, models, registry as registry_get
from odoo.http import request
from ..exceptions import (
UnauthorizedMalformedAuthorizationHeader,
UnauthorizedMissingAut... | 38.255319 | 3,596 |
7,697 | py | PYTHON | 15.0 | # Copyright 2021 ACSONE SA/NV
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
import logging
from functools import partial
import jwt # pylint: disable=missing-manifest-dependency
from jwt import PyJWKClient
from werkzeug.exceptions import InternalServerError
from odoo import _, api, fields, models,... | 35.8 | 7,697 |
1,165 | py | PYTHON | 15.0 | # Copyright 2017 LasLabs Inc.
# Copyright 2021 Open Source Integrators
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
from odoo import _
from odoo.exceptions import ValidationError
def pre_init_hook_login_check(cr):
"""This hook will look to see if any conflicting logins exist before
the mod... | 32.361111 | 1,165 |
684 | py | PYTHON | 15.0 | # Copyright 2015-2017 LasLabs Inc.
# Copyright 2021 Open Source Integrators
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
{
"name": "Case Insensitive Logins",
"summary": "Makes the user login field case insensitive",
"version": "15.0.1.0.0",
"category": "Authentication",
"webs... | 38 | 684 |
1,990 | py | PYTHON | 15.0 | # Copyright 2015-2017 LasLabs Inc.
# Copyright 2021 Open Source Integrators
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
from odoo.tests.common import TransactionCase
class TestResUsers(TransactionCase):
def setUp(self):
super(TestResUsers, self).setUp()
self.login = "LasL... | 33.728814 | 1,990 |
1,106 | py | PYTHON | 15.0 | # Copyright 2015-2017 LasLabs Inc.
# Copyright 2021 Open Source Integrators
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
from odoo import api, fields, models
class ResUsers(models.Model):
_inherit = "res.users"
login = fields.Char(help="Used to log into the system. Case insensitive.... | 32.529412 | 1,106 |
1,322 | py | PYTHON | 15.0 | # © 2021 Florian Kantelberg - initOS GmbH
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Vault - Share",
"summary": "Implementation of a mechanism to share secrets",
"license": "AGPL-3",
"version": "15.0.1.1.1",
"website": "https://github.com/OCA/server-auth",
"appli... | 33.871795 | 1,321 |
2,237 | py | PYTHON | 15.0 | # © 2021 Florian Kantelberg - initOS GmbH
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
import logging
from datetime import datetime
from uuid import uuid4
from odoo.tests import TransactionCase
from odoo.tools import mute_logger
from odoo.addons.website.tools import MockRequest
from ..controllers... | 30.630137 | 2,236 |
511 | py | PYTHON | 15.0 | # © 2021 Florian Kantelberg - initOS GmbH
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
import logging
from odoo import _, fields, models
_logger = logging.getLogger(__name__)
class VaultShareLog(models.Model):
_name = "vault.share.log"
_description = _("Vault share log")
_order = "cr... | 23.181818 | 510 |
254 | py | PYTHON | 15.0 | # © 2021 Florian Kantelberg - initOS GmbH
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class RecCompany(models.Model):
_inherit = "res.company"
vault_share_delay = fields.Integer(default=0)
| 25.3 | 253 |
2,761 | py | PYTHON | 15.0 | # © 2021 Florian Kantelberg - initOS GmbH
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
import logging
from datetime import datetime, timedelta
from uuid import uuid4
from odoo import _, api, fields, models
_logger = logging.getLogger(__name__)
class VaultShare(models.Model):
_name = "vault.s... | 32.857143 | 2,760 |
695 | py | PYTHON | 15.0 | # © 2021 Florian Kantelberg - initOS GmbH
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
import logging
from odoo import api, fields, models
_logger = logging.getLogger(__name__)
class ResConfigSettings(models.TransientModel):
_inherit = "res.config.settings"
vault_share_delay = fields.In... | 28.916667 | 694 |
1,141 | py | PYTHON | 15.0 | # © 2021 Florian Kantelberg - initOS GmbH
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
import logging
from odoo import _, http
from odoo.http import request
_logger = logging.getLogger(__name__)
class Controller(http.Controller):
@http.route("/vault/share/<string:token>", type="http", auth="... | 32.571429 | 1,140 |
631 | py | PYTHON | 15.0 | # (c) 2015 ACSONE SA/NV, Dhinesh D
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Inactive Sessions Timeout",
"summary": """
This module disable all inactive sessions since a given delay""",
"author": "ACSONE SA/NV, "
"Dhinesh D, "
"Jesse Morgan, "
"LasL... | 31.55 | 631 |
4,779 | py | PYTHON | 15.0 | # Copyright 2016-2017 LasLabs Inc.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
import time
from contextlib import contextmanager
import mock
from odoo.http import SessionExpiredException
from odoo.tests.common import TransactionCase
from odoo.tools.misc import mute_logger
class EndTestExce... | 43.445455 | 4,779 |
2,796 | py | PYTHON | 15.0 | # (c) 2015 ACSONE SA/NV, Dhinesh D
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo.tests import common
class TestIrConfigParameter(common.TransactionCase):
def setUp(self):
super(TestIrConfigParameter, self).setUp()
self.db = self.env.cr.dbname
self.param_o... | 39.380282 | 2,796 |
509 | py | PYTHON | 15.0 | # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import models
from odoo.http import request
class IrHttp(models.AbstractModel):
_inherit = "ir.http"
@classmethod
def _authenticate(cls, endpoint):
res = super(IrHttp, cls)._authenticate(endpoint=endpoint)
aut... | 31.8125 | 509 |
1,313 | py | PYTHON | 15.0 | # (c) 2015 ACSONE SA/NV, Dhinesh D
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import api, models, tools
DELAY_KEY = "inactive_session_time_out_delay"
IGNORED_PATH_KEY = "inactive_session_time_out_ignored_url"
class IrConfigParameter(models.Model):
_inherit = "ir.config_parame... | 28.543478 | 1,313 |
3,277 | py | PYTHON | 15.0 | # (c) 2015 ACSONE SA/NV, Dhinesh D
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
import logging
from os import utime
from os.path import getmtime
from time import time
from odoo import api, http, models
from odoo.http import SessionExpiredException
_logger = logging.getLogger(__name__)
clas... | 31.815534 | 3,277 |
1,522 | py | PYTHON | 15.0 | # Copyright (C) 2020 GlodoUK <https://www.glodo.uk/>
# Copyright (C) 2010-2016, 2022 XCG Consulting <http://odoo.consulting>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "SAML2 Authentication",
"version": "15.0.1.2.1",
"category": "Tools",
"author": "XCG Consulting, Odoo Co... | 41.135135 | 1,522 |
10,152 | py | PYTHON | 15.0 | import base64
import os
from odoo.exceptions import AccessDenied, UserError, ValidationError
from odoo.tests import HttpCase, tagged
from .fake_idp import FakeIDP
@tagged("saml", "post_install", "-at_install")
class TestPySaml(HttpCase):
def setUp(self):
super().setUp()
sp_pem_public = None
... | 36.916364 | 10,152 |
4,904 | py | PYTHON | 15.0 | import os
from urllib.parse import parse_qs, urlparse
from saml2 import BINDING_HTTP_POST, BINDING_HTTP_REDIRECT, pack
from saml2.authn_context import INTERNETPROTOCOLPASSWORD
from saml2.config import Config as Saml2Config
from saml2.metadata import create_metadata_string
from saml2.saml import NAME_FORMAT_URI, NAMEID... | 29.542169 | 4,904 |
1,281 | py | PYTHON | 15.0 | # Copyright (C) 2022 XCG Consulting <https://xcg-consulting.fr/>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class ResUserSaml(models.Model):
_name = "res.users.saml"
_description = "User to SAML Provider Mapping"
user_id = fields.Many2one("res.use... | 35.583333 | 1,281 |
974 | py | PYTHON | 15.0 | from odoo import api, fields, models
class AuthSamlAttributeMapping(models.Model):
"""
Attributes to copy from SAML provider on logon, into Odoo
"""
_name = "auth.saml.attribute.mapping"
_description = "SAML2 attribute mapping"
provider_id = fields.Many2one(
"auth.saml.provider",
... | 26.324324 | 974 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.