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
8,688
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo.fields import Command from odoo.exceptions import ValidationError from odoo.tests import tagged from odoo.addons.project.tests.test_project_base import TestProjectCommon from datetime import date @tagged('-at_install', 'post_install') class TestTaskDependencies(TestProjectCommon):...
47.217391
8,688
13,923
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo import Command from odoo.addons.project.tests.test_project_base import TestProjectCommon from odoo.tests import tagged from odoo.tests.common import Form @tagged('-at_install', 'post_install') class TestProjectSubtasks(TestProjectCommon): def test_task_display_project_with_defaul...
59.755365
13,923
16,397
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import Command from odoo.osv import expression from odoo.exceptions import AccessError from odoo.tests import tagged from odoo.tests.common import Form from .test_project_base import TestProjectCommon class ...
55.39527
16,397
5,951
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo.tests import tagged, HttpCase from .test_project_base import TestProjectCommon @tagged('-at_install', 'post_install', 'personal_stages') class TestPersonalStages(TestProjectCommon): @classmethod def setUpClass(cls): super().setUpClass() cls.user_stages = cls...
60.72449
5,951
2,644
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo import Command from odoo.tests import HttpCase, tagged @tagged('post_install', '-at_install') class TestProjectSharingUi(HttpCase): @classmethod def setUpClass(cls): super().setUpClass() user = cls.env['res.users'].with_context({'no_reset_password': True, 'm...
38.882353
2,644
5,575
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo.tests.common import TransactionCase from odoo.exceptions import UserError class TestProjectCommon(TransactionCase): @classmethod def setUpClass(cls): super(TestProjectCommon, cls).setUpClass() user_group_employee = cls.env.ref('base.group_user') user...
44.246032
5,575
1,496
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo.tests import tagged from odoo.addons.project.tests.test_project_base import TestProjectCommon @tagged('-at_install', 'post_install') class TestTaskTracking(TestProjectCommon): def flush_tracking(self): """ Force the creation of tracking values. """ self.env['ba...
38.358974
1,496
249
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo.tests import HttpCase, tagged @tagged('post_install', '-at_install') class TestProjectUpdateUi(HttpCase): def test_01_project_tour(self): self.start_tour("/web", 'project_update_tour', login="admin")
27.666667
249
2,384
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.addons.project.tests.test_access_rights import TestProjectPortalCommon from odoo.exceptions import AccessError from odoo.tools import mute_logger class TestPortalProject(TestProjectPortalCommon): @mute_lo...
61.128205
2,384
8,049
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from freezegun import freeze_time from datetime import datetime from odoo import Command from odoo.tests.common import TransactionCase class TestBurndownChart(TransactionCase): def set_create_date(self, table, res...
45.219101
8,049
2,351
py
PYTHON
15.0
# -*- coding: utf-8 -*- import logging from .test_project_base import TestProjectCommon _logger = logging.getLogger(__name__) class TestProjectConfig(TestProjectCommon): """Test module configuration and its effects on projects.""" @classmethod def setUpClass(cls): super(TestProjectConfig, cls)...
38.540984
2,351
4,803
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo.exceptions import AccessError from odoo.tests import tagged from odoo.tests.common import users from odoo.addons.mail.tests.common import mail_new_test_user from odoo.addons.project.tests.test_project_base import TestProjectCommon @tagged('-at_install', 'post_install') class TestPro...
50.03125
4,803
27,338
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo.tests.common import TransactionCase, Form from odoo.exceptions import ValidationError from odoo import fields from datetime import date, datetime from dateutil.rrule import MO, TU, WE, TH, FR, SA, SU from freezegun import freeze_time class TestProjectrecurrence(TransactionCase): ...
43.324881
27,338
4,602
py
PYTHON
15.0
# -*- coding: utf-8 -*- from dateutil.relativedelta import relativedelta from odoo import fields from odoo.tests import tagged from odoo.tests.common import Form from odoo.addons.project.tests.test_project_base import TestProjectCommon @tagged('-at_install', 'post_install') class TestProjectUpdate(TestProjectCommon...
61.36
4,602
12,789
py
PYTHON
15.0
# -*- coding: utf-8 -*- from contextlib import contextmanager from odoo.tests.common import TransactionCase, Form from odoo.exceptions import AccessError, UserError class TestMultiCompanyCommon(TransactionCase): @classmethod def setUpMultiCompany(cls): # create companies cls.company_a = cls...
44.716783
12,789
1,798
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models class ProjectShareWizard(models.TransientModel): _name = 'project.share.wizard' _inherit = 'portal.share' _description = 'Project Sharing' @api.model def defaul...
37.458333
1,798
2,925
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models, _ from odoo.exceptions import ValidationError import ast class ProjectTaskTypeDelete(models.TransientModel): _name = 'project.task.type.delete.wizard' _description = 'Proj...
40.625
2,925
1,081
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import fields, models class ProjectDelete(models.TransientModel): _name = 'project.delete.wizard' _description = 'Project Delete Wizard' project_ids = fields.Many2many('project.project', string='...
38.607143
1,081
1,321
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import fields, models, _ from odoo.exceptions import AccessError class Digest(models.Model): _inherit = 'digest.digest' kpi_project_task_opened = fields.Boolean('Open Tasks') kpi_project_task_ope...
44.033333
1,321
7,116
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from datetime import timedelta from dateutil.relativedelta import relativedelta from werkzeug.urls import url_encode from odoo import api, fields, models from odoo.osv import expression from odoo.tools import formatLang...
42.86747
7,116
2,842
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models class ProjectCollaborator(models.Model): _name = 'project.collaborator' _description = 'Collaborators in project shared' project_id = fields.Many2one('project.project',...
51.672727
2,842
730
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import fields, models class ProjectProjectStage(models.Model): _name = 'project.project.stage' _description = 'Project Stage' _order = 'sequence, id' active = fields.Boolean(default=True) ...
45.625
730
420
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import models class IrUiMenu(models.Model): _inherit = 'ir.ui.menu' def _load_menus_blacklist(self): res = super()._load_menus_blacklist() if self.env.user.has_group('project.group_pr...
30
420
12,579
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models from odoo.exceptions import ValidationError from calendar import monthrange from dateutil.relativedelta import relativedelta from dateutil.rrule import rrule, rruleset, DAILY, WEEKLY...
42.353535
12,579
783
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import fields, models class ProjectTaskStagePersonal(models.Model): _name = 'project.task.stage.personal' _description = 'Personal Task Stage' _table = 'project_task_user_rel' _rec_name = 'stag...
43.5
783
3,073
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models class ResConfigSettings(models.TransientModel): _inherit = 'res.config.settings' module_project_forecast = fields.Boolean(string="Planning") module_hr_timesheet = field...
55.872727
3,073
276
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import fields, models class AccountAnalyticTag(models.Model): _inherit = 'account.analytic.tag' task_ids = fields.Many2many('project.task', string='Tasks')
30.666667
276
2,255
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models, _ from odoo.exceptions import UserError class AccountAnalyticAccount(models.Model): _inherit = 'account.analytic.account' _description = 'Analytic Account' project_ids...
46.979167
2,255
1,996
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import fields, models from odoo.tools import email_normalize class ResPartner(models.Model): """ Inherits partner and adds Tasks information in the partner form """ _inherit = 'res.partner' task_...
41.583333
1,996
2,134
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models class ProjectMilestone(models.Model): _name = 'project.milestone' _description = "Project Milestone" _inherit = ['mail.thread'] _order = 'deadline, is_reached desc, n...
38.8
2,134
114,886
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import ast import json from collections import defaultdict from datetime import timedelta, datetime from random import randint from odoo import api, Command, fields, models, tools, SUPERUSER_ID, _, _lt from odoo.addons....
50.81203
114,886
7,290
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from psycopg2 import sql from odoo import api, fields, models, tools from odoo.osv import expression from odoo.tools import OrderedSet class ReportProjectTaskBurndownChart(models.Model): _name = 'project.task.burn...
37.005076
7,290
4,916
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import fields, models, tools class ReportProjectTaskUser(models.Model): _name = "report.project.task.user" _description = "Tasks Analysis" _order = 'name desc, project_id' _auto = False n...
47.269231
4,916
21,800
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from collections import OrderedDict from operator import itemgetter from markupsafe import Markup from odoo import conf, http, _ from odoo.exceptions import AccessError, MissingError from odoo.http import request from o...
46.88172
21,800
5,541
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from werkzeug.exceptions import Forbidden from odoo.http import request, route from odoo.addons.portal.controllers.mail import PortalChatter from .portal import ProjectCustomerPortal class ProjectSharingChatter(Porta...
54.861386
5,541
901
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Algeria - Accounting', 'version': '1.0', 'category': 'Accounting/Localizations/Account Charts', 'description': """ This is the module to manage the accounting chart for Algeria in Odoo. =======...
36.04
901
419
py
PYTHON
15.0
from odoo import api, models, fields class AccountMove(models.Model): _inherit = 'account.move' amount_total_words = fields.Char("Amount total in words", compute="_compute_amount_total_words") @api.depends('amount_total', 'currency_id') def _compute_amount_total_words(self): for record in se...
34.916667
419
699
py
PYTHON
15.0
# -*- coding: utf-8 -*- { 'name': "Website Sale Stock Product Configurator", 'summary': """ Bridge module for website_sale_stock / sale_product_configurator""", 'description': """ Bridge module to make the website e-commerce stock management compatible with the product configurator """, ...
31.772727
699
2,252
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.tests import tagged from odoo.addons.sale_product_configurator.tests.common import TestProductConfiguratorCommon from odoo.addons.base.tests.common import HttpCaseWithUserPortal @tagged('post_install', '-at_in...
47.914894
2,252
839
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Timesheet when on Time Off', 'version': '1.0', 'category': 'Human Resources', 'summary': 'Schedule timesheet when on time off', 'description': """ Bridge module to integrate leaves in times...
29.964286
839
9,293
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from collections import defaultdict from datetime import datetime, timedelta from freezegun import freeze_time from odoo import Command from odoo.tests import common class TestTimesheetGlobalTimeOff(common.Transaction...
52.502825
9,293
6,353
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from datetime import datetime from dateutil.relativedelta import relativedelta from odoo import fields, SUPERUSER_ID from odoo.tests import common, new_test_user from odoo.addons.hr_timesheet.tests.test_timesheet impor...
51.233871
6,353
8,871
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from collections import defaultdict from pytz import timezone, utc from odoo import api, fields, models, _ class ResourceCalendarLeaves(models.Model): _inherit = "resource.calendar.leaves" timesheet_ids = fie...
53.439759
8,871
706
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models, _ from odoo.exceptions import UserError class AccountAnalyticLine(models.Model): _inherit = 'account.analytic.line' holiday_id = fields.Many2one("hr.leave", string='Leave ...
41.529412
706
2,873
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import fields, models, _ class Company(models.Model): _inherit = 'res.company' leave_timesheet_task_id = fields.Many2one( 'project.task', string="Time Off Task", domain="[('project_id...
44.890625
2,873
2,293
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models class Employee(models.Model): _inherit = 'hr.employee' @api.model def create(self, vals): employees = super(Employee, self).create(vals) # We need to c...
44.096154
2,293
1,090
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models class ResConfigSettings(models.TransientModel): _inherit = 'res.config.settings' internal_project_id = fields.Many2one( related='company_id.internal_project_id', re...
43.6
1,090
5,611
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models, _ from odoo.exceptions import ValidationError class HolidaysType(models.Model): _inherit = "hr.leave.type" def _default_project_id(self): company = self.company_id...
48.791304
5,611
671
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Test - Base Automation', 'version': '1.0', 'category': 'Hidden', 'sequence': 9877, 'summary': 'Base Automation Tests: Ensure Flow Robustness', 'description': """This module contains tes...
33.55
671
21,846
py
PYTHON
15.0
# # -*- coding: utf-8 -*- # # Part of Odoo. See LICENSE file for full copyright and licensing details. from unittest.mock import patch import sys from odoo.addons.base.tests.common import TransactionCaseWithUserDemo from odoo.tests import common, tagged from odoo.exceptions import AccessError @tagged('post_install'...
47.183585
21,846
3,284
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from dateutil import relativedelta from odoo import fields, models, api class LeadTest(models.Model): _name = "base.automation.lead.test" _description = "Automated Rule Test" name = fields.Char(string='Sub...
36.087912
3,284
676
py
PYTHON
15.0
# -*- coding: utf-8 -*- { 'name': "website_sale_delivery_mondialrelay", 'summary': """ Let's choose Point Relais® on your ecommerce """, 'description': """ This module allow your customer to choose a Point Relais® and use it as shipping address. """, 'category': 'Website/Website', 'vers...
30.636364
674
701
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import models class WebsiteMondialRelay(models.Model): _inherit = 'website' def _prepare_sale_order_values(self, partner, pricelist): self.ensure_one() values = super()._prepare_sale_...
41.235294
701
3,925
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo import http, _ from odoo.addons.website_sale.controllers.main import WebsiteSale, PaymentPortal from odoo.addons.website_sale_delivery.controllers.main import WebsiteSaleDelivery from odoo.exceptions import AccessDenied, ValidationError, UserError from odoo.http import request class...
45.08046
3,922
1,136
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. # Copyright (C) 2009 P. Christeas <p_christ@hol.gr>. All Rights Reserved { 'name': 'Greece - Accounting', 'author': 'P. Christeas, OpenERP SA.', 'website': 'http://openerp.hellug.gr/', 'category': 'Accou...
32.457143
1,136
1,020
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { "name" : "Norway - Accounting", "version" : "2.1", "author" : "Rolv Råen", 'category': 'Accounting/Localizations/Account Charts', "description": """This is the module to manage the accounting chart ...
31.84375
1,019
250
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.addons.account.models.chart_template import update_taxes_from_templates def migrate(cr, version): update_taxes_from_templates(cr, 'l10n_no.no_chart_template')
41.666667
250
291
py
PYTHON
15.0
from openerp.modules.registry import RegistryManager def migrate(cr, version): registry = RegistryManager.get(cr.dbname) from openerp.addons.account.models.chart_template import migrate_set_tags_and_taxes_updatable migrate_set_tags_and_taxes_updatable(cr, registry, 'l10n_no')
41.571429
291
1,034
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import models from stdnum import luhn class AccountMove(models.Model): _inherit = "account.move" def _get_invoice_reference_no_invoice(self): """ This computes the reference based on the Odoo...
35.655172
1,034
378
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import fields, models class AccountJournal(models.Model): _inherit = 'account.journal' invoice_reference_model = fields.Selection(selection_add=[ ('no', 'Norway') ], ondelete={'no': lambd...
31.5
378
222
py
PYTHON
15.0
# coding: utf-8 from odoo import fields, models class ResCompany(models.Model): _inherit = 'res.company' l10n_no_bronnoysund_number = fields.Char(related='partner_id.l10n_no_bronnoysund_number', readonly=False)
27.75
222
234
py
PYTHON
15.0
# coding: utf-8 from odoo import fields, models class ResPartner(models.Model): _inherit = 'res.partner' l10n_no_bronnoysund_number = fields.Char(string='Register of Legal Entities (Brønnøysund Register Center)', size=9)
29
232
1,414
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. # Copyright (C) 2010-2011 BAAMTU SARL (<http://www.baamtu.sn>). # contact: leadsn@baamtu.com { 'name' : 'OHADA - Accounting', 'author' : 'Baamtu Senegal', 'category': 'Accounting/Localizations/Account Charts...
32.883721
1,414
1,265
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': "Mail Group", 'summary': "Manage your mailing lists", 'description': """ Manage your mailing lists from Odoo. """, 'version': '1.0', 'depends': [ 'mail', 'portal'...
28.75
1,265
3,172
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import Command, tools from odoo.addons.mail.tests.common import mail_new_test_user from odoo.addons.test_mail.tests.common import TestMailCommon class TestMailListCommon(TestMailCommon): @classmethod ...
39.65
3,172
8,201
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.addons.mail_group.tests.common import TestMailListCommon from odoo.addons.mail_group.tests.data import GROUP_TEMPLATE from odoo.exceptions import AccessError from odoo.tools import mute_logger class TestMailG...
51.25625
8,201
20,232
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from psycopg2 import IntegrityError from odoo import Command, tools from odoo.addons.mail_group.tests.data import GROUP_TEMPLATE from odoo.addons.mail_group.tests.common import TestMailListCommon from odoo.exceptions im...
48.634615
20,232
1,292
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. GROUP_TEMPLATE = """Return-Path: <whatever-2a840@postmaster.twitter.com> To: {to} cc: {cc} Received: by mail1.openerp.com (Postfix, from userid 10002) id 5DF9ABFB2A; Fri, 10 Aug 2012 16:16:39 +0200 (CEST) From: {emai...
29.363636
1,292
11,863
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.addons.mail.tests.common import mail_new_test_user from odoo.addons.mail_group.tests.common import TestMailListCommon from odoo.exceptions import ValidationError, AccessError from odoo.tests.common import users...
49.844538
11,863
1,892
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models, tools, _ class MailGroupMessageReject(models.TransientModel): _name = 'mail.group.message.reject' _description = 'Reject Group Message' subject = fields.Char('Subject'...
45.047619
1,892
1,470
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import logging from odoo import api, fields, models from odoo.tools import email_normalize _logger = logging.getLogger(__name__) class MailGroupMember(models.Model): """Models a group member that can be either an...
35
1,470
31,587
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import json import logging import lxml from ast import literal_eval from datetime import datetime from dateutil import relativedelta from werkzeug import urls from odoo import _, api, fields, models, tools from odoo.ad...
44.177622
31,587
10,365
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import logging from odoo import _, api, fields, models from odoo.exceptions import AccessError, UserError from odoo.osv import expression from odoo.tools import email_normalize, append_content_to_html, ustr _logger = l...
42.306122
10,365
1,663
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import fields, models, api, _ from odoo.exceptions import UserError from odoo.tools import email_normalize class MailGroupModeration(models.Model): """Represent the moderation rules for an email address i...
40.560976
1,663
15,034
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import werkzeug from odoo import http, fields, tools from odoo.addons.http_routing.models.ir_http import slug from odoo.addons.portal.controllers.portal import pager as portal_pager from odoo.exceptions import AccessErr...
41.645429
15,034
949
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'In-App Purchases', 'category': 'Hidden/Tools', 'version': '1.1', 'summary': 'Basic models and helpers to support In-App purchases.', 'description': """ This module provides standard tools (...
27.114286
949
9,488
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import contextlib import logging import json import requests import uuid from unittest.mock import patch from odoo import exceptions, _ from odoo.tests.common import BaseCase from odoo.tools import pycompat _logger = l...
44.544601
9,488
362
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.tests.common import TransactionCase class TestIAP(TransactionCase): def test_get_account(self): account = self.env["iap.account"].get("random_service_name") self.assertTrue(account.account...
36.2
362
5,725
py
PYTHON
15.0
# -*- coding: utf-8 -*- from contextlib import contextmanager from unittest.mock import patch from odoo import exceptions from odoo.addons.iap.tools import iap_tools from odoo.addons.iap.models.iap_enrich_api import IapEnrichAPI from odoo.tests import common class MockIAPEnrich(common.TransactionCase): @classm...
37.880795
5,720
1,541
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import models, api from odoo.addons.iap.tools import iap_tools class IapEnrichAPI(models.AbstractModel): _name = 'iap.enrich.api' _description = 'IAP Lead Enrichment API' _DEFAULT_ENDPOINT = 'http...
39.512821
1,541
403
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, models class ResConfigSettings(models.TransientModel): _inherit = 'res.config.settings' @api.model def _redirect_to_iap_account(self): return { 'type': 'ir.actions...
26.866667
403
5,450
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import logging import uuid import werkzeug.urls from odoo import api, fields, models from odoo.addons.iap.tools import iap_tools _logger = logging.getLogger(__name__) DEFAULT_ENDPOINT = 'https://iap.odoo.com' class ...
41.287879
5,450
988
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'United Arab Emirates - Accounting', 'author': 'Tech Receptives', 'category': 'Accounting/Localizations/Account Charts', 'description': """ United Arab Emirates accounting chart and localization....
34.068966
988
501
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import models, fields, api class AccountMoveLine(models.Model): _inherit = "account.move.line" l10n_ae_vat_amount = fields.Monetary(compute='_compute_vat_amount', string='VAT Amount') @api.depend...
35.785714
501
2,505
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import models class AccountChartTemplate(models.Model): _inherit = 'account.chart.template' def _prepare_all_journals(self, acc_template_ref, company, journals_dict=None): """ If UAE chart, we...
64.230769
2,505
437
py
PYTHON
15.0
{ 'name': "TOTPortal", 'category': 'Hidden', 'depends': ['portal', 'auth_totp'], 'auto_install': True, 'data': [ 'security/security.xml', 'views/templates.xml', ], 'assets': { 'web.assets_frontend': [ 'auth_totp_portal/static/src/**/*', ], ...
23
437
1,711
py
PYTHON
15.0
import time from passlib.totp import TOTP from odoo import http from odoo.tests import tagged, HttpCase from odoo.addons.auth_totp.controllers.home import Home @tagged('post_install', '-at_install') class TestTOTPortal(HttpCase): """ Largely replicates TestTOTP """ def test_totp(self): totp ...
38.886364
1,711
374
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import models class Users(models.Model): _inherit = 'res.users' def get_totp_invite_url(self): if not self.has_group('base.group_user'): return '/my/security' else: ...
26.714286
374
1,120
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { "name" : "Mongolia - Accounting", "version" : "1.0", 'category': 'Accounting/Localizations/Account Charts', "author" : "BumanIT LLC, Odoo S.A.", "description": """ This is the module to manage the a...
32.941176
1,120
596
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Indian - Stock Report(GST)', 'icon': '/l10n_in/static/description/icon.png', 'version': '1.0', 'description': """GST Stock Report""", 'category': 'Accounting/Localizations', 'depends': ...
24.833333
596
335
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import models class StockPicking(models.Model): _inherit = 'stock.picking' def _should_generate_commercial_invoice(self): super(StockPicking, self)._should_generate_commercial_invoice() ...
27.916667
335
1,794
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Vantiv Payment Services', 'version': '1.0', 'category': 'Sales/Point of Sale', 'sequence': 6, 'summary': 'Credit card support for Point Of Sale', 'description': """ Allow credit card PO...
34.5
1,794
4,206
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from datetime import date, timedelta import requests from html import unescape from markupsafe import Markup from odoo import models, api, service from odoo.tools.translate import _ from odoo.exceptions import UserErr...
34.760331
4,206
3,501
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import logging from odoo import models, fields, api, _ from odoo.tools.float_utils import float_compare _logger = logging.getLogger(__name__) class BarcodeRule(models.Model): _inherit = 'barcode.rule' type =...
44.884615
3,501
388
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Finland - Sale', 'version': '1.0', 'description': """Finland Sale""", 'category': 'Localization', 'depends': [ 'l10n_fi', 'sale', ], 'installable': True, 'applic...
22.823529
388
1,719
py
PYTHON
15.0
# -*- coding: utf-8 -*- import re from odoo import api, models, _ from odoo.exceptions import UserError class SaleOrder(models.Model): _inherit = "sale.order" def write(self, values): # We compute the l10n_fi/SaleOrder.reference from itself the same way # we compute the l10n_fi/AccountMove.in...
36.574468
1,719
908
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Phone Numbers Validation', 'version': '2.1', 'summary': 'Validate and format phone numbers', 'sequence': '9999', 'category': 'Hidden', 'description': """ Phone Numbers Validation ======...
27.515152
908
4,940
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import _ from odoo.exceptions import UserError import logging _logger = logging.getLogger(__name__) _phonenumbers_lib_warning = False try: import phonenumbers def phone_parse(number, country_code):...
42.586207
4,940
1,913
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. try: import phonenumbers except ImportError: phonenumbers = None from odoo.tests.common import BaseCase from odoo.tools.parse_version import parse_version from odoo.addons.phone_validation.lib import phonenumber...
59.78125
1,913
802
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.addons.phone_validation.tools import phone_validation from odoo.exceptions import UserError from odoo.tests import tagged from odoo.tests.common import BaseCase @tagged('phone_validation') class TestPhonenumb...
34.869565
802