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 |
|---|---|---|---|---|---|---|
566 | py | PYTHON | 15.0 | # Copyright (C) 2019-Today: GRAP (<http://www.grap.coop/>)
# @author: Sylvain LE GAL (https://twitter.com/legalsylvain)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import fields, models
class BaseModuleUpdate(models.TransientModel):
_inherit = "base.module.update"
analyse_... | 33.294118 | 566 |
965 | py | PYTHON | 15.0 | # Copyright (C) 2019-Today: GRAP (<http://www.grap.coop/>)
# @author: Sylvain LE GAL (https://twitter.com/legalsylvain)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import fields, models
from odoo.tools.safe_eval import safe_eval
class IrModuleType(models.Model):
_name = "ir.mod... | 33.275862 | 965 |
1,292 | py | PYTHON | 15.0 | # Copyright (C) 2019-Today: GRAP (<http://www.grap.coop/>)
# @author: Sylvain LE GAL (https://twitter.com/legalsylvain)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import api, fields, models
class IrModuleAuthor(models.Model):
_name = "ir.module.author"
_description = "Modu... | 28.711111 | 1,292 |
283 | py | PYTHON | 15.0 | # Copyright 2016-2020 Therp BV <https://therp.nl>.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import SUPERUSER_ID, api
def post_init_hook(cr, pool):
env = api.Environment(cr, SUPERUSER_ID, {})
env["letsencrypt"]._get_key("account.key")
| 35.375 | 283 |
770 | py | PYTHON | 15.0 | # 2016-2021 Therp BV <https://therp.nl>.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
"name": "Let's Encrypt",
"version": "15.0.1.0.3",
"author": "Therp BV," "Tecnativa," "Acysos S.L," "Odoo Community Association (OCA)",
"website": "https://github.com/OCA/server-tools",
"l... | 36.666667 | 770 |
12,830 | py | PYTHON | 15.0 | # Copyright 2018-2022 Therp BV <https://therp.nl>.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
import os
import shutil
from datetime import datetime, timedelta
from os import path
import dns.resolver
import mock
from odoo.exceptions import UserError, ValidationError
from odoo.tests import S... | 36.762178 | 12,830 |
825 | py | PYTHON | 15.0 | # Copyright 2020 Therp BV <https://therp.nl>.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
import os
import shutil
from odoo.tests import HttpCase
from ..models.letsencrypt import _get_challenge_dir
class TestHTTP(HttpCase):
def test_query_existing(self):
with open(os.path.join... | 31.730769 | 825 |
17,974 | py | PYTHON | 15.0 | # Copyright 2016-2022 Therp BV <https://therp.nl>.
# Copyright 2016 Antonio Espinosa <antonio.espinosa@tecnativa.com>.
# Copyright 2018 Ignacio Ibeas <ignacio@acysos.com>.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
"""Fully automatic retrieval of Letsencrypt certificates."""
# pylint: disable... | 39.851441 | 17,973 |
3,683 | py | PYTHON | 15.0 | # Copyright 2018-2022 Therp BV <https://therp.nl>.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
"""Configuration of Letsencrypt."""
from odoo import _, api, exceptions, fields, models
DNS_SCRIPT_DEFAULT = """# Write your script here
# It should create a TXT record of $LETSENCRYPT_DNS_CHALLENG... | 37.581633 | 3,683 |
1,091 | py | PYTHON | 15.0 | # Copyright 2016,2022 Therp BV <https://therp.nl>.
# Copyright 2016 Antonio Espinosa <antonio.espinosa@tecnativa.com>.
# Copyright 2018 Ignacio Ibeas <ignacio@acysos.com>.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
# pylint: disable=too-few-public-methods,no-self-use
"""This controller handle... | 36.366667 | 1,091 |
1,347 | py | PYTHON | 15.0 | # Copyright 2017 Simone Orsi
# Copyright 2018 Creu Blanca
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
{
"name": "Base Fontawesome",
"summary": """Up to date Fontawesome resources.""",
"version": "15.0.5.15.4",
"license": "LGPL-3",
"website": "https://github.com/OCA/server-tools"... | 38.485714 | 1,347 |
6,483 | py | PYTHON | 15.0 | # © 2016 Antiun Ingeniería S.L. - Jairo Llopis
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
import logging
from odoo import SUPERUSER_ID, api
_logger = logging.getLogger(__name__)
def pre_init_hook_for_submodules(cr, model, field):
"""Moves images from single to multi mode.
Feel fr... | 36.206704 | 6,481 |
842 | py | PYTHON | 15.0 | # © 2014 Serv. Tecnol. Avanzados (http://www.serviciosbaeza.com)
# Pedro M. Baeza <pedro.baeza@serviciosbaeza.com>
# © 2015 Antiun Ingeniería S.L. - Jairo Llopis
# © 2016 Sodexis
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Multiple images base",
"summary": "Allow mult... | 29.892857 | 837 |
3,243 | py | PYTHON | 15.0 | # © 2014 Serv. Tecnol. Avanzados (http://www.serviciosbaeza.com)
# Pedro M. Baeza <pedro.baeza@serviciosbaeza.com>
# © 2015 Antiun Ingeniería S.L. - Jairo Llopis
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import _, api, fields, models, tools
class Owner(models.AbstractModel... | 32.727273 | 3,240 |
7,296 | py | PYTHON | 15.0 | # © 2014 Serv. Tecnol. Avanzados (http://www.serviciosbaeza.com)
# Pedro M. Baeza <pedro.baeza@serviciosbaeza.com>
# © 2015 Antiun Ingeniería S.L. - Jairo Llopis
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
import base64
import logging
import os
from urllib.error import ContentTooShortEr... | 35.926108 | 7,293 |
526 | py | PYTHON | 15.0 | # Copyright 2020 Camptocamp SA
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl)
{
"name": "Base Time Window",
"summary": "Base model to handle time windows",
"version": "15.0.1.0.0",
"category": "Technical Settings",
"author": "ACSONE SA/NV, Camptocamp, Odoo Community Association (OCA... | 37.571429 | 526 |
5,528 | py | PYTHON | 15.0 | # Copyright 2020 ACSONE SA/NV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
import math
from datetime import time
from psycopg2.extensions import AsIs
from odoo import _, api, fields, models
from odoo.exceptions import ValidationError
from odoo.tools.misc import format_time
class TimeWindowMixin(... | 40.350365 | 5,528 |
1,739 | py | PYTHON | 15.0 | # Copyright 2020 ACSONE SA/NV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import _, api, fields, models, tools
class TimeWeekday(models.Model):
_name = "time.weekday"
_description = "Time Week Day"
name = fields.Selection(
selection=[
("0", "Monday"),
... | 28.048387 | 1,739 |
1,077 | py | PYTHON | 15.0 | # Copyright 2011-2015 Therp BV <https://therp.nl>
# Copyright 2016 Opener B.V. <https://opener.am>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Upgrade Analysis",
"summary": "Performs a difference analysis between modules"
" installed on two different Odoo instances",
"vers... | 38.464286 | 1,077 |
8,297 | py | PYTHON | 15.0 | # Copyright 2011-2015 Therp BV <https://therp.nl>
# Copyright 2016 Opener B.V. <https://opener.am>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
import logging
from openupgradelib.openupgrade_tools import table_exists
from odoo import models
_logger = logging.getLogger(__name__)
def get_record_i... | 35.306383 | 8,297 |
362 | py | PYTHON | 15.0 | BLACKLIST_MODULES = []
# the hw_* modules are not affected by a migration as they don't
# contain any ORM functionality, but they do start up threads that
# delay the process and spit out annoying log messages continuously.
# We also don't want to analyze tests modules
BLACKLIST_MODULES_STARTS_WITH = ["hw_", "test_"]... | 36.2 | 362 |
20,132 | py | PYTHON | 15.0 | # Copyright 2011-2015 Therp BV <https://therp.nl>
# Copyright 2015-2016 Opener B.V. <https://opener.am>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
# flake8: noqa: C901
#####################################################################
# library providing a function to analyse two progressive ... | 36.804388 | 20,132 |
1,843 | py | PYTHON | 15.0 | import logging
_logger = logging.getLogger(__name__)
class OdooPatch(object):
"""Simple mechanism to apply a collection of monkeypatches using a
context manager.
Classes can register their monkeypatches by inheriting from this class.
They need to define a `target` member, referring to the object or ... | 30.213115 | 1,843 |
739 | py | PYTHON | 15.0 | from odoo import api, models
from ... import upgrade_log
from ..odoo_patch import OdooPatch
class BaseModelPatch(OdooPatch):
target = models.BaseModel
method_names = ["_convert_records"]
@api.model
def _convert_records(self, records, log=lambda a: None):
"""Log data ids that are imported wit... | 32.130435 | 739 |
397 | py | PYTHON | 15.0 | from odoo.tools.convert import xml_import
from .... import upgrade_log
from ...odoo_patch import OdooPatch
class XMLImportPatch(OdooPatch):
target = xml_import
method_names = ["_test_xml_id"]
def _test_xml_id(self, xml_id):
res = XMLImportPatch._test_xml_id._original_method(self, xml_id)
... | 28.357143 | 397 |
1,482 | py | PYTHON | 15.0 | from odoo.addons.base.models import ir_model
from ...... import upgrade_log
from .....odoo_patch import OdooPatch
class IrModelConstraintPatch(OdooPatch):
target = ir_model.IrModelConstraint
method_names = ["_reflect_model"]
def _reflect_model(self, model):
"""Reflect the _sql_constraints of the... | 37.05 | 1,482 |
1,032 | py | PYTHON | 15.0 | import logging
from threading import current_thread
from odoo import SUPERUSER_ID, api
from odoo.modules.registry import Registry
from .... import upgrade_log
from ...odoo_patch import OdooPatch
_logger = logging.getLogger(__name__)
class RegistryPatch(OdooPatch):
target = Registry
method_names = ["init_mo... | 31.272727 | 1,032 |
1,787 | py | PYTHON | 15.0 | from odoo.tests import common, tagged
@tagged("post_install", "-at_install")
class TestUpgradeAnalysis(common.TransactionCase):
def setUp(self):
super().setUp()
self.IrModuleModule = self.env["ir.module.module"]
self.product_module = self.IrModuleModule.search([("name", "=", "product")])
... | 38.847826 | 1,787 |
1,031 | py | PYTHON | 15.0 | # Copyright 2011-2015 Therp BV <https://therp.nl>
# Copyright 2016 Opener B.V. <https://opener.am>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
import os
from odoo import fields, models
from odoo.modules import get_module_path
class IrModuleModule(models.Model):
_inherit = "ir.module.module"
... | 32.21875 | 1,031 |
3,098 | py | PYTHON | 15.0 | # Copyright 2011-2015 Therp BV <https://therp.nl>
# Copyright 2016 Opener B.V. <https://opener.am>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from urllib.error import URLError
import odoorpc
from odoo import api, fields, models
from odoo.exceptions import UserError
from odoo.tools.translate impo... | 32.270833 | 3,098 |
6,006 | py | PYTHON | 15.0 | # Copyright 2011-2015 Therp BV <https://therp.nl>
# Copyright 2016-2020 Opener B.V. <https://opener.am>
# Copyright 2019 ForgeFlow <https://forgeflow.com>
# Copyright 2020 GRAP <https://grap.coop>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
import ast
import logging
import os
from odoo import api,... | 32.464865 | 6,006 |
536 | py | PYTHON | 15.0 | # Copyright 2011-2015 Therp BV <https://therp.nl>
# Copyright 2016 Opener B.V. <https://opener.am>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class UpgradeAttribute(models.Model):
_name = "upgrade.attribute"
_description = "Upgrade Attribute"
name = f... | 25.52381 | 536 |
22,546 | py | PYTHON | 15.0 | # Copyright 2011-2015 Therp BV <https://therp.nl>
# Copyright 2016-2020 Opener B.V. <https://opener.am>
# Copyright 2019 ForgeFlow <https://forgeflow.com>
# Copyright 2020 GRAP <https://grap.coop>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
# flake8: noqa: C901
import logging
import os
from copy im... | 37.822148 | 22,542 |
4,527 | py | PYTHON | 15.0 | # Copyright 2011-2015 Therp BV <https://therp.nl>
# Copyright 2016 Opener B.V. <https://opener.am>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from threading import current_thread
from odoo import _, fields, models
from odoo.exceptions import UserError
from odoo.modules.registry import Registry
f... | 35.645669 | 4,527 |
4,040 | py | PYTHON | 15.0 | # Copyright 2011-2015 Therp BV <https://therp.nl>
# Copyright 2016 Opener B.V. <https://opener.am>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
from odoo.modules.registry import Registry
from odoo.osv.expression import AND
from ..blacklist import (
BLACKLIST... | 34.529915 | 4,040 |
465 | py | PYTHON | 15.0 | # Copyright (c) 2018 Creu Blanca
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Remote Base",
"version": "15.0.1.0.0",
"category": "Generic Modules/Base",
"author": "Creu Blanca, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/server-tools",
"li... | 33.214286 | 465 |
2,046 | py | PYTHON | 15.0 | # Copyright 2018 Creu Blanca
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from mock import patch
from odoo import http
from odoo.tests import tagged
from odoo.tests.common import HttpCase
@tagged("post_install", "-at_install")
# Skip CSRF validation on tests
@patch(http.__name__ + ".WebRequest.v... | 34.677966 | 2,046 |
1,349 | py | PYTHON | 15.0 | # Copyright 2018 Creu Blanca
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
import logging
import socket
from odoo import api, fields, models
class ResRemote(models.Model):
_name = "res.remote"
_description = "Remotes"
name = fields.Char(required=True, string="Hostname", index=True, re... | 32.119048 | 1,349 |
1,791 | py | PYTHON | 15.0 | # Copyright 2018 Creu Blanca
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from threading import current_thread
from odoo import SUPERUSER_ID, api, models
from odoo.exceptions import AccessDenied
from odoo.service import wsgi_server
from odoo.tools import config
class ResUsers(models.Model):
... | 32.509091 | 1,788 |
479 | py | PYTHON | 15.0 | # Copyright 2018 Creu Blanca
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from threading import current_thread
from odoo import models
class Base(models.AbstractModel):
_inherit = "base"
@property
def remote(self):
try:
remote_addr = current_thread().environ["REM... | 26.611111 | 479 |
942 | py | PYTHON | 15.0 | # Copyright 2004-2009 Tiny SPRL (<http://tiny.be>).
# Copyright 2015 Agile Business Group <http://www.agilebg.com>
# Copyright 2016 Grupo ESOC Ingenieria de Servicios, S.L.U. - Jairo Llopis
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Database Auto-Backup",
"summary": "Backups da... | 33.642857 | 942 |
9,509 | py | PYTHON | 15.0 | # Copyright 2015 Agile Business Group <http://www.agilebg.com>
# Copyright 2015 Alessio Gerace <alesiso.gerace@agilebg.com>
# Copyright 2016 Grupo ESOC Ingenieria de Servicios, S.L.U. - Jairo Llopis
# Copyright 2016 LasLabs Inc.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
import logging
import os
... | 38.967213 | 9,508 |
11,278 | py | PYTHON | 15.0 | # Copyright 2004-2009 Tiny SPRL (<http://tiny.be>).
# Copyright 2015 Agile Business Group <http://www.agilebg.com>
# Copyright 2016 Grupo ESOC Ingenieria de Servicios, S.L.U. - Jairo Llopis
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
import logging
import os
import shutil
import traceback
from con... | 36.977049 | 11,278 |
688 | py | PYTHON | 15.0 | # Copyright 2016 Therp BV <http://therp.nl>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from psycopg2.extensions import ISQLQuote
class IdentifierAdapter(ISQLQuote):
def __init__(self, identifier, quote=True):
self.quote = quote
self.identifier = identifier
def __conf... | 31.272727 | 688 |
850 | py | PYTHON | 15.0 | # Copyright 2014-2016 Therp BV <http://therp.nl>
# Copyright 2021 Camptocamp SA <https://camptocamp.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Database cleanup",
"version": "15.0.1.0.2",
"author": "Therp BV,Odoo Community Association (OCA)",
"website": "https://... | 32.692308 | 850 |
1,679 | py | PYTHON | 15.0 | # Copyright 2021 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo.tests.common import tagged
from .common import Common, environment
# Use post_install to get all models loaded more info: odoo/odoo#13458
@tagged("post_install", "-at_install")
class TestCleanupPurgeLinePro... | 36.5 | 1,679 |
1,411 | py | PYTHON | 15.0 | # Copyright 2021 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo.tests.common import tagged
from .common import Common, environment
# Use post_install to get all models loaded more info: odoo/odoo#13458
@tagged("post_install", "-at_install")
class TestCleanupPurgeLineCol... | 35.275 | 1,411 |
942 | py | PYTHON | 15.0 | # Copyright 2021 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo.tests.common import tagged
from .common import Common, environment
# Use post_install to get all models loaded more info: odoo/odoo#13458
@tagged("post_install", "-at_install")
class TestCreateIndexesLine(C... | 36.230769 | 942 |
1,135 | py | PYTHON | 15.0 | # Copyright 2021 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo.tests.common import tagged
from .common import Common, environment
# Use post_install to get all models loaded more info: odoo/odoo#13458
@tagged("post_install", "-at_install")
class TestCleanupPurgeLineDat... | 35.46875 | 1,135 |
1,709 | py | PYTHON | 15.0 | # Copyright 2021 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from psycopg2 import ProgrammingError
from odoo.tests.common import tagged
from odoo.tools import mute_logger
from .common import Common, environment
# Use post_install to get all models loaded more info: odoo/odoo#1... | 36.361702 | 1,709 |
773 | py | PYTHON | 15.0 | # Copyright 2021 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from contextlib import contextmanager
import odoo
from odoo.tests import common
from odoo.tests.common import BaseCase, tagged
ADMIN_USER_ID = common.ADMIN_USER_ID
@contextmanager
def environment():
"""Return an... | 28.62963 | 773 |
1,003 | py | PYTHON | 15.0 | # Copyright 2021 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo.tests.common import tagged
from .common import Common, environment
# Use post_install to get all models loaded more info: odoo/odoo#13458
@tagged("post_install", "-at_install")
class TestCleanupPurgeLineMod... | 34.586207 | 1,003 |
915 | py | PYTHON | 15.0 | # Copyright 2021 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from psycopg2 import ProgrammingError
from odoo.tests.common import tagged
from odoo.tools import mute_logger
from .common import Common, environment
# Use post_install to get all models loaded more info: odoo/odoo#1... | 39.782609 | 915 |
1,249 | py | PYTHON | 15.0 | # Copyright 2021 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo.tests.common import tagged
from .common import Common, environment
# Use post_install to get all models loaded more info: odoo/odoo#13458
@tagged("post_install", "-at_install")
class TestCleanupPurgeLineMen... | 31.225 | 1,249 |
4,540 | py | PYTHON | 15.0 | # Copyright 2014-2016 Therp BV <http://therp.nl>
# Copyright 2021 Camptocamp <https://camptocamp.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
# pylint: disable=consider-merging-classes-inherited
from odoo import _, api, fields, models
from odoo.exceptions import UserError
from ..identifier... | 37.833333 | 4,540 |
2,760 | py | PYTHON | 15.0 | # Copyright 2014-2016 Therp BV <http://therp.nl>
# Copyright 2021 Camptocamp <https://camptocamp.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
# pylint: disable=consider-merging-classes-inherited
import logging
from odoo import _, api, fields, models
from odoo.exceptions import AccessDenie... | 30.666667 | 2,760 |
4,321 | py | PYTHON | 15.0 | # Copyright 2014-2016 Therp BV <http://therp.nl>
# Copyright 2021 Camptocamp <https://camptocamp.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
# pylint: disable=consider-merging-classes-inherited
import logging
from odoo import _, api, fields, models
from odoo.exceptions import UserError
f... | 32.984733 | 4,321 |
2,946 | py | PYTHON | 15.0 | # Copyright 2017 Therp BV <http://therp.nl>
# Copyright 2021 Camptocamp <https://camptocamp.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
# pylint: disable=consider-merging-classes-inherited
from odoo import fields, models
from ..identifier_adapter import IdentifierAdapter
class CreateInd... | 32.021739 | 2,946 |
2,284 | py | PYTHON | 15.0 | # Copyright 2014-2016 Therp BV <http://therp.nl>
# Copyright 2021 Camptocamp <https://camptocamp.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
# pylint: disable=consider-merging-classes-inherited
from odoo import _, api, fields, models
from odoo.exceptions import UserError
class CleanupPur... | 33.588235 | 2,284 |
3,120 | py | PYTHON | 15.0 | # Copyright 2014-2016 Therp BV <http://therp.nl>
# Copyright 2021 Camptocamp <https://camptocamp.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import _, api, fields, models
from odoo.exceptions import UserError
from ..identifier_adapter import IdentifierAdapter
class CleanupPurg... | 33.913043 | 3,120 |
4,929 | py | PYTHON | 15.0 | # Copyright 2014-2016 Therp BV <http://therp.nl>
# Copyright 2021 Camptocamp <https://camptocamp.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
# pylint: disable=consider-merging-classes-inherited
from odoo import _, api, fields, models
from odoo.exceptions import UserError
from ..identifier... | 36.511111 | 4,929 |
5,759 | py | PYTHON | 15.0 | # Copyright 2017 Therp BV <http://therp.nl>
# Copyright 2021 Camptocamp <https://camptocamp.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
# pylint: disable=consider-merging-classes-inherited
from odoo import api, fields, models
REASON_DUPLICATE = "REASON_DUPLICATE"
REASON_DEFAULT = "REASON_... | 37.396104 | 5,759 |
3,197 | py | PYTHON | 15.0 | # Copyright 2014-2016 Therp BV <http://therp.nl>
# Copyright 2021 Camptocamp <https://camptocamp.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
# pylint: disable=consider-merging-classes-inherited
from odoo import _, api, fields, models
from odoo.exceptions import UserError
from odoo.modules.... | 35.522222 | 3,197 |
1,111 | py | PYTHON | 15.0 | # Copyright 2015-2017 Camptocamp SA
# Copyright 2020 Onestein (<https://www.onestein.eu>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Track record changesets",
"version": "15.0.1.0.0",
"development_status": "Alpha",
"author": "Onestein, Camptocamp, Odoo Community Associat... | 33.666667 | 1,111 |
11,185 | py | PYTHON | 15.0 | # Copyright 2015-2017 Camptocamp SA
# Copyright 2020 Onestein (<https://www.onestein.eu>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from markupsafe import Markup
from odoo import fields
from odoo.tests.common import TransactionCase
from ..models.base import disable_changeset
from .common import... | 37.408027 | 11,185 |
20,690 | py | PYTHON | 15.0 | # Copyright 2015-2017 Camptocamp SA
# Copyright 2020 Onestein (<https://www.onestein.eu>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from datetime import datetime, timedelta
from odoo import fields
from odoo.exceptions import UserError
from odoo.tests.common import TransactionCase
from ..models.... | 45.673289 | 20,690 |
5,971 | py | PYTHON | 15.0 | # Copyright 2015-2017 Camptocamp SA
# Copyright 2020 Onestein (<https://www.onestein.eu>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo.tests.common import Form, TransactionCase
from ..models.base import disable_changeset
from .common import ChangesetTestCommon
class TestChangesetOrigin(... | 42.956835 | 5,971 |
3,298 | py | PYTHON | 15.0 | # Copyright 2015-2017 Camptocamp SA
# Copyright 2020 Onestein (<https://www.onestein.eu>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
class ChangesetTestCommon(object):
def assert_changeset(self, record, expected_source, expected_changes):
"""Check if a changeset has been created accor... | 38.348837 | 3,298 |
1,346 | py | PYTHON | 15.0 | # Copyright 2021 Hunki Enterprises BV (<https://hunki-enterprises.com>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo.tests.common import TransactionCase
from .common import ChangesetTestCommon
class TestChangesetFlow(ChangesetTestCommon, TransactionCase):
"""Check that changesets do... | 36.378378 | 1,346 |
2,923 | py | PYTHON | 15.0 | # Copyright 2015-2017 Camptocamp SA
# Copyright 2020 Onestein (<https://www.onestein.eu>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo.tests import common
class TestChangesetFieldRule(common.TransactionCase):
def setUp(self):
super().setUp()
self.company_model_id = se... | 40.597222 | 2,923 |
6,283 | py | PYTHON | 15.0 | # Copyright 2015-2017 Camptocamp SA
# Copyright 2020 Onestein (<https://www.onestein.eu>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, fields, models, tools
from odoo.tools.cache import ormcache
class ChangesetFieldRule(models.Model):
_name = "changeset.field.rule"
_d... | 34.712707 | 6,283 |
6,777 | py | PYTHON | 15.0 | # Copyright 2015-2017 Camptocamp SA
# Copyright 2020 Onestein (<https://www.onestein.eu>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class RecordChangeset(models.Model):
_name = "record.changeset"
_description = "Record Changeset"
_order = "date d... | 36.831522 | 6,777 |
16,486 | py | PYTHON | 15.0 | # Copyright 2015-2017 Camptocamp SA
# Copyright 2020 Onestein (<https://www.onestein.eu>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from itertools import groupby
from operator import attrgetter
from odoo import _, api, fields, models
from odoo.exceptions import UserError
from .base import disab... | 39.346062 | 16,486 |
6,982 | py | PYTHON | 15.0 | # Copyright 2020 Onestein (<https://www.onestein.eu>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from lxml import etree
from odoo import _, api, fields, models
from odoo.tools import config, ormcache
# put this object into context key '__no_changeset' to disable changeset
# functionality
disable... | 37.138298 | 6,982 |
1,500 | py | PYTHON | 15.0 | # Copyright 2016 Eficent Business and IT Consulting Services S.L.
# Copyright 2016 Serpent Consulting Services Pvt. Ltd.
# Copyright 2017 LasLabs Inc.
# Copyright 2021 Tecnativa - Jairo Llopis
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from functools import wraps
from odoo.osv import expression
... | 33.333333 | 1,500 |
739 | py | PYTHON | 15.0 | # Copyright 2016 ForgeFlow S.L.
# Copyright 2016 Serpent Consulting Services Pvt. Ltd.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Fuzzy Search",
"summary": "Fuzzy search with the PostgreSQL trigram extension",
"category": "Uncategorized",
"version": "15.0.1.0.0",
"web... | 36.95 | 739 |
3,989 | py | PYTHON | 15.0 | # Copyright 2016 ForgeFlow S.L.
# Copyright 2016 Serpent Consulting Services Pvt. Ltd.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo.osv import expression
from odoo.tests.common import TransactionCase
class QueryGenerationCase(TransactionCase):
def setUp(self):
super(QueryGener... | 46.383721 | 3,989 |
5,669 | py | PYTHON | 15.0 | # Copyright 2016 ForgeFlow S.L.
# Copyright 2016 Serpent Consulting Services Pvt. Ltd.
# Copyright 2017 LasLabs Inc.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
import logging
from psycopg2.extensions import AsIs
from odoo import _, api, exceptions, fields, models
_logger = logging.getLogger(__na... | 31.494444 | 5,669 |
1,529 | py | PYTHON | 15.0 | # Copyright 2016 ForgeFlow S.L.
# Copyright 2016 Serpent Consulting Services Pvt. Ltd.
# Copyright 2017 LasLabs Inc.
# Copyright 2020 NextERP SRL.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo.osv import query
Oridinal_Query_obj = query.Query
def percent_search_fuzzy(self, where_claus):... | 31.204082 | 1,529 |
1,014 | py | PYTHON | 15.0 | # Copyright 2019 Ecosoft Co., Ltd (http://ecosoft.co.th/)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html)
{
"name": "Excel Import/Export/Report",
"summary": "Base module for developing Excel import/export/report",
"version": "15.0.1.0.0",
"author": "Ecosoft,Odoo Community Associati... | 33.8 | 1,014 |
711 | py | PYTHON | 15.0 | # Copyright 2019 Ecosoft Co., Ltd (http://ecosoft.co.th/)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html)
import ast
from odoo import fields, models
class ReportXLSXWizard(models.TransientModel):
_name = "report.xlsx.wizard"
_description = "Generic Report Wizard, used with template repor... | 32.318182 | 711 |
6,155 | py | PYTHON | 15.0 | # Copyright 2019 Ecosoft Co., Ltd (http://ecosoft.co.th/)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html)
from odoo import _, api, fields, models
from odoo.exceptions import RedirectWarning, ValidationError
class ImportXLSXWizard(models.TransientModel):
"""This wizard is used with the templa... | 39.709677 | 6,155 |
2,638 | py | PYTHON | 15.0 | # Copyright 2019 Ecosoft Co., Ltd (http://ecosoft.co.th/)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html)
from odoo import _, api, fields, models
from odoo.exceptions import ValidationError
from odoo.tools.safe_eval import safe_eval
class ExportXLSXWizard(models.TransientModel):
"""This wiza... | 39.373134 | 2,638 |
2,110 | py | PYTHON | 15.0 | # Copyright 2019 Ecosoft Co., Ltd (http://ecosoft.co.th/)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html)
from odoo import _, api, fields, models
from odoo.exceptions import ValidationError
class XLSXReport(models.AbstractModel):
"""Common class for xlsx reporting wizard"""
_name = "xls... | 37.678571 | 2,110 |
1,517 | py | PYTHON | 15.0 | # Copyright 2019 Ecosoft Co., Ltd (http://ecosoft.co.th/)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html)
from odoo import _, api, fields, models
from odoo.exceptions import UserError
class ReportAction(models.Model):
_inherit = "ir.actions.report"
report_type = fields.Selection(
... | 37 | 1,517 |
12,675 | py | PYTHON | 15.0 | # Copyright 2019 Ecosoft Co., Ltd (http://ecosoft.co.th/)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html)
import base64
import uuid
from ast import literal_eval
from datetime import date, datetime as dt
from io import BytesIO
import xlrd
import xlwt
from odoo import _, api, models
from odoo.exce... | 42.25 | 12,675 |
10,693 | py | PYTHON | 15.0 | # Copyright 2019 Ecosoft Co., Ltd (http://ecosoft.co.th/)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html)
import csv
import itertools
import logging
import re
import string
import uuid
from ast import literal_eval
from datetime import datetime as dt
from io import StringIO
from dateutil.parser im... | 31.357771 | 10,693 |
1,623 | py | PYTHON | 15.0 | # Copyright 2019 Ecosoft Co., Ltd (http://ecosoft.co.th/)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html)
import logging
from odoo import api, models
_logger = logging.getLogger(__name__)
try:
from openpyxl.styles import Alignment, Font, PatternFill
except ImportError:
_logger.debug('Ca... | 34.531915 | 1,623 |
23,462 | py | PYTHON | 15.0 | # Copyright 2019 Ecosoft Co., Ltd (http://ecosoft.co.th/)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html)
import base64
import os
from ast import literal_eval
from os.path import join as opj
from odoo import _, api, fields, models
from odoo.exceptions import UserError, ValidationError
from odoo.m... | 37.479233 | 23,462 |
12,675 | py | PYTHON | 15.0 | # Copyright 2019 Ecosoft Co., Ltd (http://ecosoft.co.th/)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html)
import base64
import logging
import os
import zipfile
from datetime import date, datetime as dt
from io import BytesIO
from odoo import _, api, fields, models
from odoo.exceptions import Vali... | 43.556701 | 12,675 |
4,138 | py | PYTHON | 15.0 | # Copyright 2019 Ecosoft Co., Ltd (http://ecosoft.co.th/)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html)
import base64
import json
import logging
from werkzeug.urls import url_decode
from odoo import http
from odoo.http import (
content_disposition,
request,
route,
serialize_exc... | 41.38 | 4,138 |
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 |
2,353 | py | PYTHON | 15.0 | import setuptools
with open('VERSION.txt', 'r') as f:
version = f.read().strip()
setuptools.setup(
name="odoo-addons-oca-server-tools",
description="Meta package for oca-server-tools Odoo addons",
version=version,
install_requires=[
'odoo-addon-auditlog>=15.0dev,<15.1dev',
'odoo-ad... | 47.06 | 2,353 |
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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.