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 |
|---|---|---|---|---|---|---|
1,411 | py | PYTHON | 15.0 | # Copyright 2021 Tecnativa - Pedro M. Baeza
# Copyright 2022 Tecnativa - Víctor Martínez
# License LGPL-3 - See https://www.gnu.org/licenses/lgpl-3.0.html
from odoo.tests import common
class TestCrmProject(common.TransactionCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
cls.lea... | 37.078947 | 1,409 |
2,360 | py | PYTHON | 15.0 | # Copyright 2010-2020 Odoo S. A.
# Copyright 2021 Tecnativa - Pedro M. Baeza
# Copyright 2022 Tecnativa - Víctor Martínez
# License LGPL-3 - See https://www.gnu.org/licenses/lgpl-3.0.html
from odoo import api, fields, models
class CrmLeadConvert2Task(models.TransientModel):
"""wizard to convert a Lead into a Proj... | 36.276923 | 2,358 |
659 | py | PYTHON | 15.0 | # Copyright 2020 Camptocamp SA
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl)
{
"name": "CRM stage probability",
"summary": "Define fixed probability on the stages",
"version": "15.0.1.0.0",
"development_status": "Alpha",
"category": "Sales/CRM",
"website": "https://github.com/O... | 32.95 | 659 |
4,989 | py | PYTHON | 15.0 | # Copyright 2020 Camptocamp SA
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl)
from odoo.exceptions import UserError
from odoo.tests import TransactionCase
class TestCrmLeadProbability(TransactionCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
cls.stage_new = cls.... | 45.354545 | 4,989 |
3,103 | py | PYTHON | 15.0 | # Copyright 2020 Camptocamp SA
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl)
from odoo import _, api, fields, models
from odoo.exceptions import UserError
class CrmLeadStageProbabilityUpdate(models.TransientModel):
_name = "crm.lead.stage.probability.update"
_description = "Mass update of c... | 36.940476 | 3,103 |
823 | py | PYTHON | 15.0 | # Copyright 2020 Camptocamp SA
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl)
from odoo import fields, models
class CrmStage(models.Model):
_inherit = "crm.stage"
probability = fields.Float(
"Probability (%)",
required=True,
default=10.0,
help="This percentag... | 28.37931 | 823 |
3,036 | py | PYTHON | 15.0 | # Copyright 2020 Camptocamp SA
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl)
from odoo import api, fields, models, tools
class CrmLead(models.Model):
_inherit = "crm.lead"
is_stage_probability = fields.Boolean(
compute="_compute_is_stage_probability", readonly=True
)
stage_... | 38.43038 | 3,036 |
587 | py | PYTHON | 15.0 | # Copyright 2016 Antiun Ingeniería S.L. - Jairo Llopis
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
"name": "Firstname and Lastname in Leads",
"summary": "Specify split names for contacts in leads",
"version": "15.0.1.0.1",
"category": "Customer Relationship Management",
... | 36.625 | 586 |
1,891 | py | PYTHON | 15.0 | # Copyright 2016 Antiun Ingeniería S.L. - Jairo Llopis
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo.tests.common import Form, TransactionCase
class FirstNameCase(TransactionCase):
@classmethod
def setUpClass(cls):
super(FirstNameCase, cls).setUpClass()
cls.e... | 41.866667 | 1,884 |
2,112 | py | PYTHON | 15.0 | # Copyright 2016 Antiun Ingeniería S.L. - Jairo Llopis
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import fields, models
class CrmLead(models.Model):
_inherit = "crm.lead"
contact_name = fields.Char("First name")
contact_lastname = fields.Char("Last name")
def _p... | 39.092593 | 2,111 |
931 | py | PYTHON | 15.0 | # Copyright 2020 Ecosoft Co., Ltd. (http://ecosoft.co.th)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
def uninstall_hook(cr, registry):
"""Revert table tier_review back to original before this module"""
cr.execute(
"update tier_review a set sequence = "
"(select floor(sequ... | 49 | 931 |
977 | py | PYTHON | 15.0 | # Copyright 2020 Ecosoft Co., Ltd. (http://ecosoft.co.th)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Base Tier Validation Forward",
"summary": "Forward option for base tiers",
"version": "15.0.1.0.0",
"category": "Tools",
"website": "https://github.com/OCA/server-ux"... | 33.689655 | 977 |
4,337 | py | PYTHON | 15.0 | # Copyright 2018 ForgeFlow S.L.
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
from odoo_test_helper import FakeModelLoader
from odoo.tests import Form
from odoo.tests.common import TransactionCase, tagged
@tagged("post_install", "-at_install")
class TierTierValidation(TransactionCase):
@c... | 35.54918 | 4,337 |
496 | py | PYTHON | 15.0 | # Copyright 2020 Ecosoft Co., Ltd. (http://ecosoft.co.th)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import models
class CommentWizard(models.TransientModel):
_inherit = "comment.wizard"
def add_comment(self):
super().add_comment()
rec = self.env[self.res_model... | 33.066667 | 496 |
1,905 | py | PYTHON | 15.0 | # Copyright 2020 Ecosoft Co., Ltd. (http://ecosoft.co.th)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import _, fields, models
class ValidationForwardWizard(models.TransientModel):
_name = "tier.validation.forward.wizard"
_description = "Forward Wizard"
res_model = fields.C... | 35.277778 | 1,905 |
385 | py | PYTHON | 15.0 | # Copyright 2020 Ecosoft Co., Ltd. (http://ecosoft.co.th)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields, models
class TierDefinition(models.Model):
_inherit = "tier.definition"
has_forward = fields.Boolean(
string="Allow Forward",
default=False,
... | 29.615385 | 385 |
3,510 | py | PYTHON | 15.0 | # Copyright 2020 Ecosoft Co., Ltd. (http://ecosoft.co.th)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import _, api, fields, models
class TierValidation(models.AbstractModel):
_inherit = "tier.validation"
can_forward = fields.Boolean(compute="_compute_can_forward")
def _co... | 38.152174 | 3,510 |
1,726 | py | PYTHON | 15.0 | # Copyright 2020 Ecosoft Co., Ltd. (http://ecosoft.co.th)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class TierReview(models.Model):
_inherit = "tier.review"
_order = "sequence"
name = fields.Char(compute="_compute_definition_data", store=True)
... | 32.566038 | 1,726 |
791 | py | PYTHON | 15.0 | # Copyright 2013 Agile Business Group sagl (<http://www.agilebg.com>)
# Copyright 2016 Serpent Consulting Services Pvt. Ltd.
# Copyright 2018 Dreambits Technologies Pvt. Ltd. (<http://dreambits.in>)
# Copyright 2020 Ecosoft Co., Ltd. (<http://ecosoft.co.th>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl... | 34.391304 | 791 |
3,484 | py | PYTHON | 15.0 | # Copyright 2013 Agile Business Group sagl (<http://www.agilebg.com>)
# Copyright 2016 Serpent Consulting Services Pvt. Ltd.
# Copyright 2018 Dreambits Technologies Pvt. Ltd. (<http://dreambits.in>)
# Copyright 2020 Ecosoft (<http://ecosoft.co.th>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
fr... | 38.711111 | 3,484 |
864 | py | PYTHON | 15.0 | # Copyright 2020 Ecosoft (http://ecosoft.co.th)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields, models
class BaseRevisionTester(models.Model):
_name = "base.revision.tester"
_description = "Base Revision Tester"
_inherit = ["base.revision"]
name = fields.Cha... | 27 | 864 |
4,720 | py | PYTHON | 15.0 | # Copyright 2013 Agile Business Group sagl (<http://www.agilebg.com>)
# Copyright 2016 Serpent Consulting Services Pvt. Ltd.
# Copyright 2018 Dreambits Technologies Pvt. Ltd. (<http://dreambits.in>)
# Copyright 2020 Ecosoft Co., Ltd. (<http://ecosoft.co.th>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl... | 37.460317 | 4,720 |
646 | py | PYTHON | 15.0 | # Copyright 2020 Akretion (<http://www.akretion.com>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Base Sub State",
"version": "15.0.1.0.0",
"category": "Tools",
"author": "Akretion, " "Odoo Community Association (OCA)",
"website": "https://github.com/OCA/server-ux",
... | 32.3 | 646 |
4,082 | py | PYTHON | 15.0 | # Copyright 2020 Akretion Mourad EL HADJ MIMOUNE
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo.tests import common
from .sale_test import LineTest, SaleTest
@common.tagged("post_install", "-at_install")
class TestBaseSubstate(common.TransactionCase):
@classmethod
def setUpC... | 34.302521 | 4,082 |
1,733 | py | PYTHON | 15.0 | # Copyright 2020 Akretion Mourad EL HADJ MIMOUNE
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import api, fields, models
from .models_mixin import TestMixin
class SaleTest(models.Model, TestMixin):
_inherit = "base.substate.mixin"
_name = "base.substate.test.sale"
_desc... | 31.509091 | 1,733 |
4,378 | py | PYTHON | 15.0 | # Copyright 2018 Simone Orsi - Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from operator import attrgetter
class TestMixin(object):
"""Mixin to setup fake models for tests.
Usage - the model:
class FakeModel(models.Model, TestMixin):
_name = 'fake.m... | 35.024 | 4,378 |
4,594 | py | PYTHON | 15.0 | # Copyright 2020 Akretion
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import _, api, fields, models
from odoo.exceptions import ValidationError
class BaseSubstateMixin(models.AbstractModel):
_name = "base.substate.mixin"
_description = "BaseSubstate Mixin"
_state_field = "st... | 35.338462 | 4,594 |
3,356 | py | PYTHON | 15.0 | # Copyright 2020 Akretion
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class BaseSubstateType(models.Model):
"""This model defines technical data which precises
for each target model concerned by substate,
the technical "state" field name.
Data in th... | 32.582524 | 3,356 |
867 | py | PYTHON | 15.0 | # Copyright 2021 Tecnativa - David Vidal
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Restrict records duplicating",
"summary": "Adds a security group to restrict which users can copy records",
"version": "15.0.1.0.1",
"development_status": "Beta",
"category": "Server ... | 37.695652 | 867 |
685 | py | PYTHON | 15.0 | # Copyright 2021 Tecnativa - David Vidal
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo.tests import HttpCase, tagged
@tagged("-at_install", "post_install")
class TestDuplicateSecurityGroup(HttpCase):
def test_duplicate_button(self):
"""Whether or not the duplicate button is av... | 48.928571 | 685 |
857 | py | PYTHON | 15.0 | # Copyright 2019 Creu Blanca
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Document Quick Access Folder Auto Classification",
"summary": """
Auto classification of Documents after reading a QR""",
"version": "15.0.1.1.0",
"license": "AGPL-3",
"author": "Creu Bla... | 34.28 | 857 |
9,791 | py | PYTHON | 15.0 | # Copyright 2019 Creu Blanca
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
import os
import shutil
import uuid
from mock import patch
from odoo import tools
from odoo.tools import mute_logger
from odoo.addons.component.tests.common import TransactionComponentRegistryCase
class Encoded:
__slo... | 39.164 | 9,791 |
654 | py | PYTHON | 15.0 | # Copyright 2019 Creu Blanca
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
import logging
from odoo import api, models
try:
from odoo.addons.queue_job.job import job
except ImportError:
job = lambda *args, **kwargs: lambda func: func # noqa: E731
_logger = logging.getLogger(__name__)
cla... | 26.16 | 654 |
2,892 | py | PYTHON | 15.0 | # Copyright 2021 Creu Blanca
# @author: Enric Tobella
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
import base64
import logging
import traceback
from io import StringIO
from odoo import _
from odoo.exceptions import UserError
from odoo.addons.component.core import Component
_logger = logging.getL... | 33.241379 | 2,892 |
997 | py | PYTHON | 15.0 | # Copyright 2019 Creu Blanca
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class DocumentQuickAccessMissingAssign(models.TransientModel):
_name = "document.quick.access.missing.assign"
_description = "document.quick.access.missing.assign"
@api.model... | 34.37931 | 997 |
1,085 | py | PYTHON | 15.0 | # Copyright 2015 Anubía, soluciones en la nube,SL (http://www.anubia.es)
# Copyright 2017 Onestein (http://www.onestein.eu)
# Copyright (C) 2019-Today: Druidoo (<https://www.druidoo.io>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Optional CSV import",
"version": "15.0.1.0.1... | 33.875 | 1,084 |
2,471 | py | PYTHON | 15.0 | # Copyright 2017 Onestein (http://www.onestein.eu)
# Copyright 2021 Tecnativa - Víctor Martínez
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo.tests import common, tagged
from odoo.tools import mute_logger
@tagged("-at_install", "post_install")
class TestImportSecurityGroup(common.Ht... | 39.190476 | 2,469 |
757 | py | PYTHON | 15.0 | # Copyright 2021 Opener B.V. <stefan@opener.amsterdam>
# Copyright 2017 Antonio Esposito <a.esposito@onestein.nl>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import models
from odoo.http import request
class Http(models.AbstractModel):
_inherit = "ir.http"
def session_info(... | 42.055556 | 757 |
1,334 | py | PYTHON | 15.0 | # Copyright 2015 Anubía, soluciones en la nube,SL (http://www.anubia.es)
# Copyright 2017 Onestein (http://www.onestein.eu)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
import logging
from odoo import api, models
_logger = logging.getLogger(__name__)
class Base(models.AbstractModel):
_i... | 37.027778 | 1,333 |
785 | py | PYTHON | 15.0 | from odoo import SUPERUSER_ID, api
def post_init_hook(cr, registry):
"""
Set deprecated value for all existing fields
"""
env = api.Environment(cr, SUPERUSER_ID, {})
model_obj = env["ir.model"]
field_obj = env["ir.model.fields"]
for model in model_obj.search([]):
all_fields = mode... | 35.681818 | 785 |
646 | py | PYTHON | 15.0 | # Copyright 2023 ForgeFlow S.L. (https://www.forgeflow.com)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
"name": "Base Field Deprecated",
"summary": "Adds the deprecated attribute to the Odoo field model.",
"version": "15.0.1.0.0",
"category": "Usability",
"license": "AGPL... | 38 | 646 |
378 | py | PYTHON | 15.0 | from odoo import fields, models
class IrModelFields(models.Model):
_inherit = "ir.model.fields"
deprecated = fields.Boolean(help="Whether the field is deprecated or not.")
def _reflect_field_params(self, field, model_id):
result = super()._reflect_field_params(field, model_id)
result["de... | 31.5 | 378 |
544 | py | PYTHON | 15.0 | # Copyright 2013 Agile Business Group sagl (<http://www.agilebg.com>)
# Copyright 2016 ACSONE SA/NV (<https://acsone.eu>)
{
"name": "Optional quick create",
"version": "15.0.1.0.0",
"category": "Tools",
"summary": 'Avoid "quick create" on m2o fields, on a "by model" basis',
"author": "Agile Busines... | 32 | 544 |
1,716 | py | PYTHON | 15.0 | # Copyright 2018 Simone Rubino - Agile Business Group
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo.exceptions import UserError
from odoo.tests.common import TransactionCase
class TestQuickCreate(TransactionCase):
def setUp(self, *args, **kwargs):
super().setUp()
mode... | 37.304348 | 1,716 |
1,963 | py | PYTHON | 15.0 | # Copyright 2016 ACSONE SA/NV (https://acsone.eu)
# Copyright 2016 Akretion (Alexis de Lattre alexis.delattre@akretion.com)
# Copyright 2018 Simone Rubino - Agile Business Group
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import _, api, fields, models
from odoo.exceptions import UserError... | 33.844828 | 1,963 |
586 | py | PYTHON | 15.0 | # Copyright 2023 ForgeFlow S.L. (https://www.forgeflow.com)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
"name": "Base Archive Date",
"summary": """
Adds an archive timestamp and user doing the archiving to all models.
""",
"version": "15.0.1.0.0",
"category": "Usa... | 34.470588 | 586 |
1,139 | py | PYTHON | 15.0 | # Copyright 2023 ForgeFlow S.L. (https://www.forgeflow.com)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import fields
from odoo.tests.common import TransactionCase
class TestBaseArchiveDate(TransactionCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
... | 34.515152 | 1,139 |
2,557 | py | PYTHON | 15.0 | # Copyright 2023 ForgeFlow S.L. (https://www.forgeflow.com)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import api, fields, models
LOG_ARCHIVE_DATE = "archive_date"
LOG_ARCHIVE_UID = "archive_uid"
class Base(models.AbstractModel):
"""
The base model is inherited by all mod... | 34.554054 | 2,557 |
727 | 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 odoo import SUPERUSER_ID, api
def post_init_hook(cr, registry):
"""Loaded after installing the module.
``ir.exports.line.name`` was before a char field, and now it is a computed
... | 34.619048 | 727 |
1,057 | py | PYTHON | 15.0 | # Copyright 2015 Tecnativa - Antonio Espinosa
# Copyright 2016 Tecnativa - Pedro M. Baeza
# Copyright 2018 Tecnativa - Jairo Llopis
# Copyright 2019 brain-tec AG - Olivier Jossen
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Manage model export profiles",
"category": "Personal... | 31.088235 | 1,057 |
3,543 | py | PYTHON | 15.0 | # Copyright 2015 Antiun Ingenieria S.L. - Javier Iniesta
# Copyright 2016 Pedro M. Baeza <pedro.baeza@tecnativa.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo.exceptions import ValidationError
from odoo.tests.common import TransactionCase
class TestIrExportsLineCase(TransactionCa... | 41.682353 | 3,543 |
1,873 | py | PYTHON | 15.0 | # Copyright 2015-2018 Tecnativa - Jairo Llopis
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo.exceptions import ValidationError
from odoo.tests.common import TransactionCase
class TestIrExportsCase(TransactionCase):
def test_create_with_basic_data(self):
"""Emulate creatio... | 38.204082 | 1,872 |
716 | py | PYTHON | 15.0 | # Copyright 2019 brain-tec AG - Olivier Jossen
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import models
from odoo.http import request
class Http(models.AbstractModel):
_inherit = "ir.http"
def session_info(self):
"""
Odoo implementation doesn't allow add m... | 32.545455 | 716 |
1,793 | py | PYTHON | 15.0 | # Copyright 2015-2016 Jairo Llopis <jairo.llopis@tecnativa.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import _, api, fields, models
from odoo.exceptions import ValidationError
class IrExports(models.Model):
_inherit = "ir.exports"
name = fields.Char(required=True)
... | 33.830189 | 1,793 |
7,779 | py | PYTHON | 15.0 | # Copyright 2015 Antiun Ingeniería S.L. - Antonio Espinosa
# Copyright 2015-2016 Jairo Llopis <jairo.llopis@tecnativa.com>
# Copyright 2019 brain-tec AG - Olivier Jossen
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import _, api, exceptions, fields, models
class IrExportsLine(models... | 37.394231 | 7,778 |
689 | py | PYTHON | 15.0 | # Copyright 2016 - Ursa Information Systems <http://ursainfosystems.com>
# Copyright 2019 brain-tec AG - Olivier Jossen
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
from odoo import api, models
class ResUsers(models.Model):
_inherit = "res.users"
@api.model
def fetch_export_models(sel... | 34.45 | 689 |
490 | py | PYTHON | 15.0 | # Copyright 2016 - Ursa Information Systems <http://ursainfosystems.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
from odoo import fields, models
class IrModelAccess(models.Model):
_inherit = "ir.model.access"
# WARN: This can't be used in 'check()'
# See https://github.com/odoo/o... | 37.692308 | 490 |
663 | py | PYTHON | 15.0 | # Copyright 2020 Tecnativa - Carlos Dauden
# Copyright 2020 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
"name": "Add custom filters for fields via UI",
"version": "15.0.1.0.0",
"category": "Usability",
"website": "https://github.com/OCA/server-ux",
... | 34.894737 | 663 |
1,552 | py | PYTHON | 15.0 | # Copyright 2020 Tecnativa - Carlos Dauden
# Copyright 2020 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import _, api, exceptions, fields, models
class IrUiCustomFilter(models.Model):
_name = "ir.ui.custom.field.filter"
_description = "Custom UI ... | 33.021277 | 1,552 |
2,535 | py | PYTHON | 15.0 | # Copyright 2020 Tecnativa - Carlos Dauden
# Copyright 2020 Tecnativa - Pedro M. Baeza
# Copyright 2022 Tecnativa - Víctor Martínez
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from lxml import etree
from odoo import api, models
class Base(models.AbstractModel):
_inherit = "base"
@... | 37.25 | 2,533 |
479 | py | PYTHON | 15.0 | # Copyright 2019 Creu Blanca
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Base Tier Validation Formula",
"summary": """
Formulas for Base tier validation""",
"version": "15.0.1.0.0",
"license": "AGPL-3",
"author": "Creu Blanca,Odoo Community Association (OCA)",... | 31.933333 | 479 |
6,205 | py | PYTHON | 15.0 | # Copyright 2018 ForgeFlow S.L.
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
from odoo_test_helper import FakeModelLoader
from odoo.exceptions import UserError
from odoo.tests import common
from odoo.tests.common import tagged
@tagged("post_install", "-at_install")
class TierTierValidation(c... | 38.302469 | 6,205 |
1,473 | py | PYTHON | 15.0 | # Copyright 2019 Creu Blanca
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class TierDefinition(models.Model):
_inherit = "tier.definition"
python_code = fields.Text(
string="Tier Definition Expression",
help="Write Python code that defi... | 37.769231 | 1,473 |
907 | py | PYTHON | 15.0 | # Copyright 2019 Creu Blanca
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import _, models
from odoo.exceptions import UserError
from odoo.tools.safe_eval import safe_eval
class TierValidation(models.AbstractModel):
_inherit = "tier.validation"
def evaluate_formula_tier(self, ti... | 33.592593 | 907 |
2,062 | py | PYTHON | 15.0 | # Copyright 2019 ForgeFlow S.L.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import _, api, fields, models
from odoo.exceptions import UserError
from odoo.tools.safe_eval import safe_eval
class TierReview(models.Model):
_inherit = "tier.review"
python_reviewer_ids = fields.Many... | 36.175439 | 2,062 |
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,133 | py | PYTHON | 15.0 | import setuptools
with open('VERSION.txt', 'r') as f:
version = f.read().strip()
setuptools.setup(
name="odoo-addons-oca-server-ux",
description="Meta package for oca-server-ux Odoo addons",
version=version,
install_requires=[
'odoo-addon-announcement>=15.0dev,<15.1dev',
'odoo-addo... | 47.4 | 2,133 |
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 |
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 |
611 | py | PYTHON | 15.0 | # Copyright 2020 ForgeFlow S.L.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Filter Multi User",
"summary": "Allows to share user-defined filters filters among several users.",
"version": "15.0.1.0.0",
"development_status": "Beta",
"maintainers": ["LoisRForgeFlow"],
... | 38.1875 | 611 |
4,723 | py | PYTHON | 15.0 | # Copyright 2020 ForgeFlow S.L.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo.exceptions import AccessError
from odoo.tests import common
class TestFilterMultiUser(common.TransactionCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
cls.env = cls.env(
... | 37.188976 | 4,723 |
1,656 | py | PYTHON | 15.0 | # Copyright 2020 ForgeFlow S.L.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class IrFilters(models.Model):
_inherit = "ir.filters"
user_ids = fields.Many2many(
comodel_name="res.users",
string="Users",
compute="_compute_user_i... | 31.846154 | 1,656 |
467 | py | PYTHON | 15.0 | # Copyright 2020 Tecnativa - Ernesto Tejeda
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo.api import SUPERUSER_ID, Environment
def uninstall_hook(cr, registry):
"""Delete the actions that were created with chained_swapper when
the module is uninstalled"""
env = Environment(cr... | 33.357143 | 467 |
672 | py | PYTHON | 15.0 | # Copyright 2020 Tecnativa - Ernesto Tejeda
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Chained Swapper",
"summary": "Chained Swapper",
"version": "15.0.1.0.2",
"development_status": "Mature",
"author": "Tecnativa, Odoo Community Association (OCA)",
"category": "T... | 33.6 | 672 |
4,462 | py | PYTHON | 15.0 | # Copyright 2020 Tecnativa - Ernesto Tejeda
# Copyright 2020 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import exceptions
from odoo.modules import registry
from odoo.tests import common
from odoo.tests.common import Form
from ..hooks import uninstall_hook
c... | 42.903846 | 4,462 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.