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
376
py
PYTHON
15.0
# Copyright (C) 2018 Brainbean Apps (https://brainbeanapps.com) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo import fields, models class HrEmployee(models.Model): _inherit = "hr.employee" relative_ids = fields.One2many( string="Relatives", comodel_name="hr.employ...
26.857143
376
2,796
py
PYTHON
15.0
# Copyright 2019 Tecnativa - Pedro M. Baeza # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). from collections import defaultdict from odoo import SUPERUSER_ID, api def post_init_hook(cr, registry, employees=None): """Split current calendars by date ranges and assign new ones for having prope...
39.380282
2,796
631
py
PYTHON
15.0
# Copyright 2019 Tecnativa - Pedro M. Baeza # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). { "name": "Employee Calendar Planning", "version": "15.0.1.1.8", "category": "Human Resources", "website": "https://github.com/OCA/hr", "author": "Tecnativa,Odoo Community Association (OCA)",...
33.210526
631
17,694
py
PYTHON
15.0
# Copyright 2019 Tecnativa - Pedro M. Baeza # Copyright 2021-2023 Tecnativa - Víctor Martínez # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). from odoo import exceptions, fields from odoo.tests import common, new_test_user from ..hooks import post_init_hook class TestHrEmployeeCalendarPlanning(comm...
38.969163
17,692
2,539
py
PYTHON
15.0
# Copyright 2019 Tecnativa - Pedro M. Baeza # Copyright 2021 Tecnativa - Víctor Martínez # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). from odoo import _, api, fields, models from odoo.exceptions import ValidationError class ResourceCalendar(models.Model): _inherit = "resource.calendar" a...
38.439394
2,537
7,806
py
PYTHON
15.0
# Copyright 2019 Tecnativa - Pedro M. Baeza # Copyright 2022-2023 Tecnativa - Víctor Martínez # 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 import config SECTION_LINES = [ ( 0, 0, ...
34.378855
7,804
733
py
PYTHON
15.0
# Copyright 2018 Brainbean Apps (https://brainbeanapps.com) # Copyright 2020 CorporateHub (https://corporatehub.eu) # Copyright 2020 Tecnativa - Víctor Martínez # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). { "name": "HR Employee Document", "version": "15.0.1.0.0", "category": "Huma...
33.227273
731
3,361
py
PYTHON
15.0
# Copyright 2018 Brainbean Apps (https://brainbeanapps.com) # Copyright 2021-2022 Tecnativa - Víctor Martínez # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). import base64 from odoo.tests import common, new_test_user from odoo.tests.common import users class TestHrEmployeeDocument(common.Trans...
39.05814
3,359
1,094
py
PYTHON
15.0
# Copyright 2020 Tecnativa - Víctor Martínez # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo import fields, models class HrEmployeePublic(models.Model): _inherit = "hr.employee.public" is_logged = fields.Boolean(compute="_compute_is_logged", store=False) def _compute_is_logged...
33.090909
1,092
1,299
py
PYTHON
15.0
# Copyright 2018 Brainbean Apps (https://brainbeanapps.com) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo import fields, models class HrEmployeeBase(models.AbstractModel): _inherit = "hr.employee.base" document_count = fields.Integer( compute="_compute_document_count", ...
35.108108
1,299
592
py
PYTHON
15.0
# copyright 2017 Denis Leemann, Camptocamp SA # Copyright (C) 2021 Open Source Integrators # Copyright (C) 2021 Serpent Consulting Services # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). { "name": "Employee Birth Name", "version": "15.0.1.0.1", "category": "Human Resources", "author":...
32.888889
592
358
py
PYTHON
15.0
# copyright 2017 Denis Leemann, Camptocamp SA # Copyright (C) 2021 Open Source Integrators # Copyright (C) 2021 Serpent Consulting Services # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo import fields, models class HrEmployee(models.Model): _inherit = "hr.employee" birth_name = f...
29.833333
358
594
py
PYTHON
15.0
# copyright 2011,2013 Michael Telahun Makonnen <mmakonnen@gmail.com> # copyright 2016 OpenSynergy Indonesia # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { "name": "HR Emergency Contact", "version": "15.0.1.0.0", "category": "Generic Modules/Human Resources", "author": "OpenSyner...
29.7
594
514
py
PYTHON
15.0
# copyright 2011 Michael Telahun Makonnen <mmakonnen@gmail.com> # copyright 2016 OpenSynergy Indonesia # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from odoo import fields, models class HrEmployee(models.Model): _inherit = "hr.employee" emergency_contact_ids = fields.Many2many( ...
27.052632
514
823
py
PYTHON
15.0
# Copyright 2011, 2013 Michael Telahun Makonnen <mmakonnen@gmail.com> # Copyright 2016 OpenSynergy Indonesia # Copyright 2018 Brainbean Apps (https://brainbeanapps.com) # Copyright 2020 CorporateHub (https://corporatehub.eu) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { "name": "Employee ID...
34.291667
823
5,629
py
PYTHON
15.0
# Copyright 2015 Salton Massally <smassally@idtlabs.sl> # Copyright 2016 OpenSynergy Indonesia # Copyright 2018 Brainbean Apps (https://brainbeanapps.com) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from odoo.tests import common class TestEmployeeID(common.TransactionCase): def setUp(sel...
38.292517
5,629
875
py
PYTHON
15.0
# Copyright 2015 Salton Massally <smassally@idtlabs.sl> # Copyright 2016 OpenSynergy Indonesia # Copyright 2018 Brainbean Apps (https://brainbeanapps.com) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from odoo import fields, models class ResCompany(models.Model): _inherit = "res.company" ...
32.407407
875
2,194
py
PYTHON
15.0
# Copyright 2011, 2013 Michael Telahun Makonnen <mmakonnen@gmail.com> # Copyright 2016 OpenSynergy Indonesia # Copyright 2018 Brainbean Apps (https://brainbeanapps.com) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). import logging import random import string from odoo import _, api, fields, mode...
33.753846
2,194
1,795
py
PYTHON
15.0
# Copyright 2015 Salton Massally <smassally@idtlabs.sl> # Copyright 2016 OpenSynergy Indonesia # Copyright 2018 Brainbean Apps (https://brainbeanapps.com) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from odoo import fields, models class ResConfigSettings(models.TransientModel): _inherit ...
36.632653
1,795
492
py
PYTHON
15.0
# Copyright 2017 ForgeFlow S.L. # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). { "name": "HR Holidays Settings", "summary": "Enables Settings Form for HR Holidays.", "version": "15.0.1.0.0", "category": "Human Resources", "website": "https://github.com/OCA/hr", "author": "Forge...
35.142857
492
709
py
PYTHON
15.0
# Copyright 2018 Brainbean Apps (https://brainbeanapps.com) # Copyright 2020 CorporateHub (https://corporatehub.eu) # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). { "name": "HR Employee Service from Contracts", "version": "15.0.1.0.0", "category": "Human Resources", "website": "h...
37.315789
709
4,934
py
PYTHON
15.0
# Copyright 2018 Brainbean Apps (https://brainbeanapps.com) # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from dateutil.relativedelta import relativedelta from odoo import fields from odoo.tests import common class TestHrEmployeeService(common.TransactionCase): def setUp(self): s...
33.794521
4,934
2,185
py
PYTHON
15.0
# Copyright 2018 Brainbean Apps (https://brainbeanapps.com) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo import api, fields, models class HrEmployee(models.Model): _inherit = "hr.employee" first_contract_id = fields.Many2one( "hr.contract", compute="_compute_firs...
31.214286
2,185
475
py
PYTHON
15.0
# copyright 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). { "name": "Employee Phone Extension", "version": "15.0.1.0.0", "category": "Human Resources", "author": "Savoir-faire Linux,Odoo Community Association (OCA)", "web...
33.928571
475
427
py
PYTHON
15.0
# copyright 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo import fields, models class HrEmployee(models.Model): """Enhance the features of the employee using Number details.""" _inherit = "hr.employee" internal_numb...
32.846154
427
653
py
PYTHON
15.0
# Copyright (C) 2018 Brainbean Apps (https://brainbeanapps.com) # Copyright 2020 CorporateHub (https://corporatehub.eu) # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). { "name": "HR Employee Service", "version": "15.0.1.0.0", "category": "Human Resources", "website": "https://gith...
36.277778
653
4,497
py
PYTHON
15.0
# Copyright (C) 2018 Brainbean Apps (https://brainbeanapps.com) # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from datetime import date from dateutil.relativedelta import relativedelta from mock import patch from odoo import fields from odoo.tests import common class TestHrEmployeeService(c...
34.592308
4,497
3,810
py
PYTHON
15.0
# Copyright (C) 2018-2019 Brainbean Apps (https://brainbeanapps.com) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from datetime import timedelta from math import fabs from dateutil.relativedelta import relativedelta from odoo import api, fields, models class HrEmployee(models.Model): _inheri...
37.722772
3,810
481
py
PYTHON
15.0
# Copyright 2021 Ecosoft Co., Ltd. (http://ecosoft.co.th) # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). { "name": "HR department code", "version": "15.0.1.0.0", "license": "AGPL-3", "category": "Human Resources", "author": "Ecosoft, Odoo Community Association (OCA)", "website...
32.066667
481
1,193
py
PYTHON
15.0
# Copyright 2021 Ecosoft Co., Ltd. (http://ecosoft.co.th) # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). from odoo.tests.common import TransactionCase class TestHrDepartmentCode(TransactionCase): @classmethod def setUpClass(cls): super().setUpClass() cls.department_model = c...
41.137931
1,193
867
py
PYTHON
15.0
# Copyright 2021 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 Department(models.Model): _inherit = "hr.department" _order = "code, name" code = fields.Char() def name_get(self): res = [] ...
29.896552
867
2,653
py
PYTHON
15.0
import logging from odoo import SUPERUSER_ID, api _logger = logging.getLogger(__name__) def post_init_hook(cr, registry, employees=None): """Migrate calendars from contracts to calendar_ids to have consistent work schedule history""" env = api.Environment(cr, SUPERUSER_ID, {}) if not employees: ...
42.790323
2,653
505
py
PYTHON
15.0
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). { "name": "Hr Contract Employee Calendar Planning", "version": "15.0.1.0.0", "category": "Human Resources", "website": "https://github.com/OCA/hr", "author": "cibex,Odoo Community Association (OCA)", "license": "AGPL-3", "appli...
36.071429
505
2,863
py
PYTHON
15.0
from datetime import datetime from odoo.addons.hr_contract.tests.common import TestContractCommon from ..hooks import post_init_hook class TestHrContractEmployeeCalendarPlanning(TestContractCommon): def setUp(self): super().setUp() calendar_ids = [ ( 0, ...
36.240506
2,863
1,071
py
PYTHON
15.0
from odoo import models class HrContract(models.Model): _inherit = "hr.contract" def write(self, vals): if ( vals.get("resource_calendar_id") and self.employee_id and vals.get("resource_calendar_id") != self.employee_id.resource_calendar_id.id )...
46.565217
1,071
584
py
PYTHON
15.0
# Copyright 2014 Savoir-faire Linux. All Rights Reserved. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). { "name": "HR Contract Multi Jobs", "version": "15.0.1.0.0", "license": "AGPL-3", "category": "Generic Modules/Human Resources", "author": "Savoir-faire Linux, " "Fekete Mi...
34.352941
584
2,881
py
PYTHON
15.0
# Copyright 2014 Savoir-faire Linux. All Rights Reserved. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo.exceptions import UserError from odoo.tests.common import TransactionCase class TestContractMultiJob(TransactionCase): def setUp(self): super(TestContractMultiJob, self).set...
34.710843
2,881
315
py
PYTHON
15.0
# Copyright 2014 Savoir-faire Linux. All Rights Reserved. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo import fields, models class HrJob(models.Model): _inherit = "hr.job" contract_job_ids = fields.One2many( "hr.contract.job", "job_id", string="Contract Jobs" )
26.25
315
877
py
PYTHON
15.0
# Copyright 2014 Savoir-faire Linux. All Rights Reserved. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo import fields, models class HrContractJob(models.Model): """ An instance of a job position for an employee's contract. This model may look trivial for now, but the purpose ...
39.863636
877
1,703
py
PYTHON
15.0
# Copyright 2014 Savoir-faire Linux. All Rights Reserved. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo import _, api, fields, models from odoo.exceptions import UserError class HrContract(models.Model): _inherit = "hr.contract" contract_job_ids = fields.One2many("hr.contract.job...
37.021739
1,703
644
py
PYTHON
15.0
# Copyright 2017-2018 ACSONE SA/NV # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). { "name": "Partner Company Type", "summary": "Adds a company type to partner that are companies", "version": "15.0.1.0.1", "license": "AGPL-3", "author": "ACSONE SA/NV,Odoo Community Association (OCA)...
33.894737
644
699
py
PYTHON
15.0
# Copyright 2017-2018 ACSONE SA/NV # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from psycopg2 import IntegrityError from odoo import tools from odoo.tests.common import TransactionCase class TestResPartnerCompanyType(TransactionCase): @classmethod def setUpClass(cls): super(TestRe...
31.772727
699
507
py
PYTHON
15.0
# Copyright 2017-2018 ACSONE SA/NV # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo import fields, models class ResPartnerCompanyType(models.Model): _name = "res.partner.company.type" _description = "Partner Company Type" name = fields.Char(string="Title", required=True, transl...
29.823529
507
318
py
PYTHON
15.0
# Copyright 2017-2018 ACSONE SA/NV # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo import fields, models class ResPartner(models.Model): _inherit = "res.partner" partner_company_type_id = fields.Many2one( comodel_name="res.partner.company.type", string="Legal Form" )
26.5
318
622
py
PYTHON
15.0
# Copyright (C) 2014-2015 Grupo ESOC <www.grupoesoc.es> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { "name": "Contact nationality", "summary": "Add nationality field to contacts", "version": "15.0.1.0.0", "category": "Customer Relationship Management", "website": "https:/...
36.588235
622
290
py
PYTHON
15.0
# Copyright (C) 2014-2015 Grupo ESOC <www.grupoesoc.es> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from odoo import fields, models class ResPartner(models.Model): _inherit = "res.partner" nationality_id = fields.Many2one("res.country", "Nationality")
29
290
717
py
PYTHON
15.0
# Copyright 2019 Patrick Wilson <patrickraymondwilson@gmail.com> # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). { "name": "Partner Priority", "summary": "Adds priority to partners.", "author": "Patrick Wilson, Odoo Community Association (OCA)", "website": "https://github.com/OCA/partn...
34.142857
717
477
py
PYTHON
15.0
# Copyright 2019 Patrick Wilson <patrickraymondwilson@gmail.com> # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). from odoo import fields, models class PartnerPriority(models.Model): _name = "partner.priority" _order = "sequence" _description = "Partner Priority" name = fields.Char(s...
28.058824
477
281
py
PYTHON
15.0
# Copyright 2019 Patrick Wilson <patrickraymondwilson@gmail.com> # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). from odoo import fields, models class ResPartner(models.Model): _inherit = "res.partner" priority_id = fields.Many2one("partner.priority")
28.1
281
371
py
PYTHON
15.0
# Copyright 2023 Quartile Limited # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). { "name": "Partner Company Default", "version": "15.0.1.0.0", "author": "Quartile Limited, Odoo Community Association (OCA)", "website": "https://github.com/OCA/partner-contact", "depends": ["base"], ...
33.727273
371
268
py
PYTHON
15.0
# Copyright 2023 Quartile Limited # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). from odoo import fields, models class ResPartner(models.Model): _inherit = "res.partner" company_id = fields.Many2one(default=lambda self: self.env.company)
26.8
268
893
py
PYTHON
15.0
# Copyright 2016 Tecnativa - Jairo Llopis # Copyright 2016 Tecnativa - Vicent Cubells # Copyright 2017-2018 Tecnativa - Pedro M. Baeza # Copyright 2019 Tecnativa - Victor M.M. Torres # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). { "name": "Deduplicate Contacts ACL", "summary": "Contact ...
35.72
893
1,662
py
PYTHON
15.0
# Copyright 2017-2019 Tecnativa - Pedro M. Baeza # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from odoo import exceptions from odoo.tests import common class TestPartnerDeduplicateAcl(common.TransactionCase): def setUp(self): super().setUp() self.partner_1 = self.env["res...
36.130435
1,662
759
py
PYTHON
15.0
# Copyright 2016 Tecnativa - Jairo Llopis # Copyright 2016 Tecnativa - Vicent Cubells # Copyright 2017-2019 Tecnativa - Pedro M. Baeza # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from odoo import models class BasePartnerMergeAutomaticWizard(models.TransientModel): _inherit = "base.partn...
37.95
759
527
py
PYTHON
15.0
# Copyright 2019 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { "name": "Base Partner Company Group", "summary": "Adds the possibility to add a company group to a company", "version": "15.0.1.1.0", "category": "Sales", "author": "Camptocamp SA, Odoo Community As...
32.9375
527
816
py
PYTHON
15.0
# Copyright 2020 Ecosoft Co., Ltd (http://ecosoft.co.th/) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from odoo.tests.common import TransactionCase class TestBasePartnerCompanyGroup(TransactionCase): @classmethod def setUpClass(cls): super().setUpClass() cls.partner_m...
38.857143
816
629
py
PYTHON
15.0
# Copyright 2019 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from odoo import fields, models class Contact(models.Model): _inherit = "res.partner" company_group_id = fields.Many2one( "res.partner", "Company group", domain=[("is_company", "=", Tr...
27.347826
629
939
py
PYTHON
15.0
# Copyright 2015 Antonio Espinosa <antonio.espinosa@tecnativa.com> # Copyright 2015 Jairo Llopis <jairo.llopis@tecnativa.com> # Copyright 2017 David Vidal <david.vidal@tecnativa.com> # Copyright 2018 Tecnativa - Pedro M. Baeza # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). { "name": "Employe...
37.56
939
823
py
PYTHON
15.0
# Copyright 2015 Antonio Espinosa <antonio.espinosa@tecnativa.com> # Copyright 2015 Jairo Llopis <jairo.llopis@tecnativa.com> # Copyright 2018 Tecnativa - Pedro M. Baeza # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from odoo import fields, models class ResPartner(models.Model): _inherit ...
34.291667
823
752
py
PYTHON
15.0
# Copyright 2019 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { "name": "Partner Company Group", "summary": "Adds the possibility to add a company group to a company", "version": "15.0.2.0.0", "category": "Sales", "author": "Camptocamp SA, Odoo Community Associa...
32.695652
752
757
py
PYTHON
15.0
# Copyright 2013-2020 Therp BV <http://therp.nl>. # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). { "name": "Partner Relations", "version": "15.0.1.0.0", "author": "Therp BV,Camptocamp,Odoo Community Association (OCA)", "website": "https://github.com/OCA/partner-contact", "comp...
34.409091
757
14,300
py
PYTHON
15.0
# Copyright 2016-2017 Therp BV # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from datetime import date from odoo.exceptions import ValidationError from .test_partner_relation_common import TestPartnerRelationCommon class TestPartnerRelation(TestPartnerRelationCommon): def setUp(self): ...
42.942943
14,300
3,345
py
PYTHON
15.0
# Copyright 2015 Camptocamp SA # Copyright 2016 Therp BV # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from odoo import fields from odoo.exceptions import ValidationError from .test_partner_relation_common import TestPartnerRelationCommon class TestPartnerSearch(TestPartnerRelationCommon): ...
41.296296
3,345
17,586
py
PYTHON
15.0
# Copyright 2016-2017 Therp BV # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from datetime import date, datetime, timedelta from dateutil.relativedelta import relativedelta from odoo import fields from odoo.exceptions import ValidationError from .test_partner_relation_common import TestPartne...
38.4814
17,586
4,346
py
PYTHON
15.0
# Copyright 2016 Therp BV # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from odoo.tests import common class TestPartnerRelationCommon(common.TransactionCase): def setUp(self): super(TestPartnerRelationCommon, self).setUp() self.partner_model = self.env["res.partner"] ...
41
4,346
995
py
PYTHON
15.0
# © 2021 Tobias Zehntner # © 2021 Niboo SRL (https://www.niboo.com/) # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from odoo import exceptions from .test_partner_relation_common import TestPartnerRelationCommon class TestPartnerRelationAction(TestPartnerRelationCommon): def setUp(self):...
34.241379
993
10,871
py
PYTHON
15.0
# Copyright 2013-2018 Therp BV <https://therp.nl>. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). """Define the type of relations that can exist between partners.""" from odoo import _, api, fields, models from odoo.exceptions import ValidationError from odoo.osv.expression import AND, OR HANDLE_...
41.811538
10,871
17,816
py
PYTHON
15.0
# Copyright 2014-2018 Therp BV <http://therp.nl> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). # pylint: disable=method-required-super import collections import logging from psycopg2.extensions import AsIs from odoo import _, api, fields, models from odoo.exceptions import MissingError, Validat...
37.507368
17,816
4,908
py
PYTHON
15.0
# Copyright 2013-2017 Therp BV <http://therp.nl> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). """ For the model defined here _auto is set to False to prevent creating a database file. The model is based on a SQL view based on res_partner_relation_type where each type is included in the result se...
33.387755
4,908
5,759
py
PYTHON
15.0
# Copyright 2013-2017 Therp BV <http://therp.nl> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). # pylint: disable=api-one-deprecated """Store relations (connections) between partners.""" from odoo import _, api, fields, models from odoo.exceptions import ValidationError class ResPartnerRelation(...
36.916667
5,759
7,701
py
PYTHON
15.0
# Copyright 2013-2017 Therp BV <http://therp.nl> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). """Support connections between partners.""" import numbers from odoo import _, api, exceptions, fields, models from odoo.osv.expression import FALSE_LEAF, OR, is_leaf class ResPartner(models.Model): ...
37.383495
7,701
1,018
py
PYTHON
15.0
# Copyright 2014-2016 Akretion (Alexis de Lattre # <alexis.delattre@akretion.com>) # Copyright 2014 Lorenzo Battistini <lorenzo.battistini@agilebg.com> # Copyright 2016-2021 Tecnativa - Pedro M. Baeza # Copyright 2017 ForgeFlow, S.L. <.com> # License AGPL-3.0 or later (https://www.gnu.org/licenses/a...
32.83871
1,018
6,912
py
PYTHON
15.0
# Copyright 2016-2021 Tecnativa - Pedro M. Baeza # Copyright 2020 Manuel Regidor <manuel.regidor@sygel.es> # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from odoo.exceptions import UserError from odoo.tests import common class TestBaseLocationGeonamesImport(common.TransactionCase): @class...
36
6,912
10,580
py
PYTHON
15.0
# Copyright 2014-2016 Akretion (Alexis de Lattre # <alexis.delattre@akretion.com>) # Copyright 2014 Lorenzo Battistini <lorenzo.battistini@agilebg.com> # Copyright 2017 ForgeFlow, S.L. <.com> # Copyright 2018 Aitor Bouzas <aitor.bouzas@adaptivecity.com> # Copyright 2016-2020 Tecnativa - Pedro M. Bae...
39.04059
10,580
335
py
PYTHON
15.0
# Copyright 2017 Franco Tampieri, Freelancer http://franco.tampieri.info # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo import fields, models class ResCountry(models.Model): _inherit = "res.country" geonames_state_name_column = fields.Integer() geonames_state_code_column = fi...
27.916667
335
1,076
py
PYTHON
15.0
# Copyright 2004-2010 Tiny SPRL http://tiny.be # Copyright 2010-2012 ChriCar Beteiligungs- und Beratungs- GmbH # http://www.camptocamp.at # Copyright 2015 Antiun Ingenieria, SL (Madrid, Spain) # http://www.antiun.com # Antonio Espinosa <antonioea@antiun.com> # Copyright 2016 ACSONE SA/NV (<htt...
35.866667
1,076
4,636
py
PYTHON
15.0
# Copyright 2016 ACSONE SA/NV (<http://acsone.eu>) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from psycopg2._psycopg import IntegrityError from odoo.exceptions import UserError, ValidationError from odoo.tests import common from odoo.tools import mute_logger class TestPartnerIdentification...
35.121212
4,636
1,258
py
PYTHON
15.0
# Copyright 2017 LasLabs Inc. # Copyright 2018 ACSONE # Copyright 2018 Camptocamp # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). from odoo import fields, models def setup_test_model(env, model_cls): """Pass a test model class and initialize it. Courtesy of SBidoul from https://github.c...
31.45
1,258
3,521
py
PYTHON
15.0
# Copyright 2017 LasLabs Inc. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from odoo.exceptions import ValidationError from odoo.tests import common from .fake_models import ResPartner, setup_test_model, teardown_test_model class TestResPartner(common.TransactionCase): @classmethod d...
40.471264
3,521
2,498
py
PYTHON
15.0
# Copyright 2004-2010 Tiny SPRL http://tiny.be # Copyright 2010-2012 ChriCar Beteiligungs- und Beratungs- GmbH # http://www.camptocamp.at # Copyright 2015 Antiun Ingenieria, SL (Madrid, Spain) # http://www.antiun.com # Antonio Espinosa <antonioea@antiun.com> # Copyright 2016 ACSONE SA/NV (<ht...
35.685714
2,498
2,847
py
PYTHON
15.0
# Copyright 2004-2010 Tiny SPRL http://tiny.be # Copyright 2010-2012 ChriCar Beteiligungs- und Beratungs- GmbH # http://www.camptocamp.at # Copyright 2015 Antiun Ingenieria, SL (Madrid, Spain) # http://www.antiun.com # Antonio Espinosa <antonioea@antiun.com> # License AGPL-3.0 or later (http:/...
35.148148
2,847
6,226
py
PYTHON
15.0
# Copyright 2004-2010 Tiny SPRL http://tiny.be # Copyright 2010-2012 ChriCar Beteiligungs- und Beratungs- GmbH # http://www.camptocamp.at # Copyright 2015 Antiun Ingenieria, SL (Madrid, Spain) # http://www.antiun.com # Antonio Espinosa <antonioea@antiun.com> # License AGPL-3.0 or later (http:/...
36.623529
6,226
693
py
PYTHON
15.0
# Copyright 2021 Tecnativa - David Vidal # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). { "name": "Portal Partner Block Data Edit", "version": "15.0.1.0.0", "category": "Customer Relationship Management", "author": "Tecnativa," "Odoo Community Association (OCA)", "website": "h...
33
693
763
py
PYTHON
15.0
# Copyright 2020 Tecnativa - David Vidal # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). from odoo.tests import common, tagged @tagged("-at_install", "post_install") class PortalHttpCase(common.HttpCase): def setUp(self): super().setUp() self.partner = self.env.ref("base.partner_d...
36.333333
763
2,570
py
PYTHON
15.0
# Copyright 2021 Tecnativa - David Vidal # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from lxml import html from markupsafe import Markup from odoo import models class IrUiView(models.Model): _inherit = "ir.ui.view" def _render(self, values=None, engine="ir.qweb", minimal_qcontext=F...
48.490566
2,570
389
py
PYTHON
15.0
# Copyright 2021 Tecnativa - David Vidal # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from odoo import fields, models class ResPartner(models.Model): _inherit = "res.partner" block_portal_data_edit = fields.Boolean( string="Block Customer Info Edit", help="Block porta...
32.416667
389
883
py
PYTHON
15.0
# Copyright 2021 Tecnativa - David Vidal # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from odoo.http import request, route from odoo.addons.portal.controllers.portal import CustomerPortal class PortalBlockEdit(CustomerPortal): def _prepare_portal_layout_values(self): """So we can...
42.047619
883
550
py
PYTHON
15.0
# Copyright 2020 - Iván Todorovich # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). { "name": "Secondary phone number on partners", "summary": "Adds a secondary phone number on partners", "license": "AGPL-3", "version": "15.0.1.0.0", "author": "Iván Todorovich, Odoo Community Associ...
36.533333
548
884
py
PYTHON
15.0
# Copyright 2020 - Iván Todorovich # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). from odoo.tests.common import Form, TransactionCase class TestPartnerPhoneSecondary(TransactionCase): def test_01_phone_validation_compatibility(self): # This is here only to get code coverage. wit...
46.473684
883
526
py
PYTHON
15.0
# Copyright 2020 - Iván Todorovich # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). from odoo import api, fields, models class ResPartner(models.Model): _inherit = "res.partner" phone2 = fields.Char("Phone (Secondary)") @api.onchange("phone2", "country_id", "company_id") def _onchan...
30.882353
525
441
py
PYTHON
15.0
# Copyright 2022 Tecnativa - David Vidal # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). { "name": "Track partner pricelist changes", "version": "15.0.1.0.0", "category": "Partner Management", "author": "Tecnativa, Odoo Community Association (OCA)", "website": "https://github.c...
33.923077
441
790
py
PYTHON
15.0
# Copyright 2022 Tecnativa - David Vidal # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from odoo import fields, models class ResPartner(models.Model): _inherit = "res.partner" # When we change the country or the state of the partner, Odoo tries to match # a proper pricelist for the...
49.375
790
526
py
PYTHON
15.0
# Copyright 2017 Camptocamp # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). { "name": "Partner Contact Role", "summary": """Add roles to partners.""", "version": "15.0.1.0.0", "license": "AGPL-3", "author": "Camptocamp,Odoo Community Association (OCA)", "website": "https://githu...
27.684211
526
423
py
PYTHON
15.0
# Copyright 2017 Camptocamp # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo import fields, models class ResPartner(models.Model): _inherit = "res.partner" role_ids = fields.Many2many( string="Roles", comodel_name="res.partner.role", ) class ResPartnerRole(mode...
20.142857
423
896
py
PYTHON
15.0
# Copyright 2015 Antonio Espinosa <antonio.espinosa@tecnativa.com> # Copyright 2016 Jairo Llopis <jairo.llopis@tecnativa.com> # Copyright 2017 David Vidal <david.vidal@tecnativa.com> # Copyright 2021 Gustavo Salgado <gustavo2840@gmail.com> # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). { "na...
37.333333
896
5,595
py
PYTHON
15.0
# Copyright 2017 David Vidal <david.vidal@tecnativa.com> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo.exceptions import UserError from odoo.tests import common class TestBaseLocationNuts(common.TransactionCase): @classmethod def setUpClass(cls): super(TestBaseLocationNuts...
44.76
5,595
7,919
py
PYTHON
15.0
# Copyright 2015 Antonio Espinosa <antonio.espinosa@tecnativa.com> # Copyright 2016 Jairo Llopis <jairo.llopis@tecnativa.com> # Copyright 2017 David Vidal <jairo.llopis@tecnativa.com> # Copyright 2021 Andrii Skrypka <andrijskrypa@ukr.net> # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). import log...
33.413502
7,919
369
py
PYTHON
15.0
# Copyright 2015 Antonio Espinosa <antonio.espinosa@tecnativa.com> # Copyright 2016 Jairo Llopis <jairo.llopis@tecnativa.com> # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from odoo import fields, models class ResCountry(models.Model): _inherit = "res.country" state_level = fields.In...
33.545455
369
1,014
py
PYTHON
15.0
# Copyright 2015 Antonio Espinosa <antonio.espinosa@tecnativa.com> # Copyright 2016 Jairo Llopis <jairo.llopis@tecnativa.com> # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from odoo import fields, models class ResPartnerNuts(models.Model): _name = "res.partner.nuts" _order = "parent_p...
37.555556
1,014
4,535
py
PYTHON
15.0
# Copyright 2015 Antonio Espinosa <antonio.espinosa@tecnativa.com> # Copyright 2016 Jairo Llopis <jairo.llopis@tecnativa.com> # Copyright 2021 Andrii Skrypka <andrijskrypa@ukr.net> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from odoo import api, fields, models from odoo.osv.expression import ...
36.28
4,535