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
504
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import models class L10nInProductHsnReport(models.Model): _inherit = "l10n_in.product.hsn.report" def _from(self): from_str = super(L10nInProductHsnReport, self)._from() from_str += "...
33.6
504
918
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import models class L10nInAccountInvoiceReport(models.Model): _inherit = "l10n_in.account.invoice.report" def _from(self): from_str = super(L10nInAccountInvoiceReport, self)._from() r...
36.72
918
908
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Test Full eLearning Flow', 'version': '1.0', 'category': 'Hidden/Tests', 'description': """ This module will test the main certification flow of Odoo. It will install the e-learning, survey and ...
28.375
908
6,951
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from dateutil.relativedelta import relativedelta from odoo.fields import Datetime from odoo import tests from odoo.addons.website_slides.tests.test_ui_wslides import TestUICommon @tests.common.tagged('post_install', '-a...
42.127273
6,951
1,026
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'IBAN Bank Accounts', 'category': 'Hidden/Tools', 'description': """ This module installs the base for IBAN (International Bank Account Number) bank accounts and checks for it's validity. ===========...
35.37931
1,026
7,579
py
PYTHON
15.0
# -*- coding: utf-8 -*- import re from odoo import api, fields, models, _ from odoo.exceptions import UserError, ValidationError def normalize_iban(iban): return re.sub('[\W_]', '', iban or '') def pretty_iban(iban): """ return iban in groups of four characters separated by a single space """ try: ...
43.308571
7,579
1,505
py
PYTHON
15.0
# -*- encoding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Recruitment', 'version': '1.1', 'category': 'Human Resources/Recruitment', 'sequence': 90, 'summary': 'Track your recruitment pipeline', 'description': "", 'website': 'https://www...
29.509804
1,505
4,647
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.tests import common from odoo.addons.hr.tests.common import TestHrCommon from odoo.modules.module import get_module_resource class TestRecruitmentProcess(TestHrCommon): def test_00_recruitment_process(se...
47.418367
4,647
2,607
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo import api, fields, models, _ from odoo.exceptions import UserError class ApplicantGetRefuseReason(models.TransientModel): _name = 'applicant.get.refuse.reason' _description = 'Get Refuse Reason' refuse_reason_id = fields.Many2one('hr.applicant.refuse.reason', 'Refuse R...
50.134615
2,607
1,339
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_hr_recruitment_new_colleagues = fields.Boolean('Employees') kpi_hr_recr...
46.172414
1,339
1,553
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo import api, fields, models class HrDepartment(models.Model): _inherit = 'hr.department' new_applicant_count = fields.Integer( compute='_compute_new_applicant_count', string='New Applicant') new_hired_employee = fields.Integer( compute='_compute_recruitme...
48.53125
1,553
9,633
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. import ast from odoo import api, fields, models, _ class Job(models.Model): _name = "hr.job" _inherit = ["mail.alias.mixin", "hr.job"] _order = "sequence, state desc, name asc" @api.model def _default_address_id(self): ...
46.990244
9,633
1,860
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 CalendarEvent(models.Model): """ Model for Calendar Event """ _inherit = 'calendar.event' @api.model def default_get(self, fields): if self.env.contex...
47.692308
1,860
1,426
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models from odoo.tools.translate import _ from datetime import timedelta class HrEmployee(models.Model): _inherit = "hr.employee" newly_hired_employee = fields.Boolean('Newly hired employee', compute='_c...
41.941176
1,426
374
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 ResConfigSettings(models.TransientModel): _inherit = ['res.config.settings'] module_website_hr_recruitment = fields.Boolean(string='Online Posting') module_hr_recruitm...
34
374
29,595
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from random import randint from odoo import api, fields, models, tools, SUPERUSER_ID from odoo.tools.translate import _ from odoo.exceptions import UserError AVAILABLE_PRIORITIES = [ ('0', 'Normal'), ('1', 'Goo...
50.503413
29,595
529
py
PYTHON
15.0
# -*- coding: utf-8 -*- { 'name': "Social Media", 'summary': "Social media connectors for company settings.", 'description': """ The purpose of this technical module is to provide a front for social media configuration for any other module that might need it. """, 'author': "Odoo S.A.", 'categ...
23
529
516
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 Company(models.Model): _inherit = "res.company" social_twitter = fields.Char('Twitter Account') social_facebook = fields.Char('Facebook Account') social_githu...
34.4
516
1,839
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Payment Acquirer', 'version': '2.0', 'category': 'Hidden', 'summary': 'Base Module for Payment Acquirers', 'description': """Payment Acquirer Base Module""", 'depends': ['account'], 'data': [ 'data...
36.058824
1,839
8,848
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. from hashlib import sha1 from odoo import fields from odoo.http import request from odoo.tools import consteq, float_round, ustr from odoo.tools.misc import hmac as hmac_tool from odoo.addons.payment.const import CURRENCY_MINOR_UNITS # Acce...
42.743961
8,848
4,041
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. # According to https://en.wikipedia.org/wiki/ISO_4217#Minor_unit_fractions CURRENCY_MINOR_UNITS = { 'ADF': 2, 'ADP': 0, 'AED': 2, 'AFA': 2, 'AFN': 2, 'ALL': 2, 'AMD': 2, 'ANG': 2, 'AOA': 2, 'AOK': 0, ...
14.380783
4,041
16,217
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. from unittest.mock import patch from freezegun import freeze_time from odoo.tests import tagged from odoo.tools import mute_logger from odoo.addons.payment.tests.common import PaymentCommon from odoo.addons.payment.tests.http_common import P...
42.902116
16,217
6,134
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. from unittest.mock import patch from odoo.tests import tagged from odoo.addons.payment.tests.common import PaymentCommon @tagged('-at_install', 'post_install') class TestPayments(PaymentCommon): def test_no_amount_available_for_refund_...
42.895105
6,134
3,646
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.tests import tagged from odoo.addons.payment.tests.common import PaymentCommon @tagged('-at_install', 'post_install') class TestTransactions(PaymentCommon): def test_refunds_count(self): self.acquirer.support_refund = ...
39.630435
3,646
8,699
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. import logging from unittest.mock import patch from odoo.addons.account.models.account_payment_method import AccountPaymentMethod from odoo.fields import Command from odoo.addons.payment.tests.utils import PaymentTestUtils _logger = logging.g...
39.540909
8,699
1,965
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. import logging from lxml import objectify from werkzeug import urls from odoo.addons.account.tests.common import AccountTestInvoicingCommon from odoo.tools.misc import hmac as hmac_tool _logger = logging.getLogger(__name__) class PaymentTe...
35.727273
1,965
1,410
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. import logging from odoo.fields import Command from odoo.addons.payment.tests.common import PaymentCommon _logger = logging.getLogger(__name__) class PaymentMultiCompanyCommon(PaymentCommon): @classmethod def setUpClass(cls, chart...
36.153846
1,410
3,985
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.tests import tagged from odoo.tools import mute_logger from odoo.addons.payment.tests.http_common import PaymentHttpCommon from odoo.addons.payment.tests.multicompany_common import PaymentMultiCompanyCommon @tagged('post_install', ...
44.775281
3,985
6,267
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. import json from uuid import uuid4 from lxml import etree, objectify from odoo import http from odoo.tests import HttpCase from odoo.addons.payment.tests.utils import PaymentTestUtils class PaymentHttpCommon(PaymentTestUtils, HttpCase): ...
34.624309
6,267
2,701
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models from odoo.addons.payment import utils as payment_utils class AccountMove(models.Model): _inherit = 'account.move' transaction_ids = fields.Many2many( string="Transactions", comodel_name='...
39.720588
2,701
49,570
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. import logging import pprint import re import unicodedata from datetime import datetime import psycopg2 from dateutil import relativedelta from odoo import _, api, fields, models from odoo.exceptions import ValidationError from odoo.tools imp...
45.642726
49,568
343
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import models class IrHttp(models.AbstractModel): _inherit = 'ir.http' @classmethod def _get_translation_frontend_modules_name(cls): mods = super(IrHttp, cls)._get_translation_frontend_modules_name() ret...
28.583333
343
3,913
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import _, api, Command, models from odoo.exceptions import UserError class AccountJournal(models.Model): _inherit = "account.journal" @api.constrains('inbound_payment_method_line_ids') def _check...
47.719512
3,913
5,187
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. import logging from odoo import api, fields, models _logger = logging.getLogger(__name__) class PaymentToken(models.Model): _name = 'payment.token' _order = 'partner_id, id desc' _description = 'Payment Token' acquirer_id =...
39.9
5,187
2,259
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.osv import expression class AccountPaymentMethodLine(models.Model): _inherit = "account.payment.method.line" payment_acquirer_id = fields.Many2one( com...
35.857143
2,259
19,772
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. import logging from odoo import _, api, fields, models, SUPERUSER_ID from odoo.exceptions import UserError, ValidationError from odoo.osv import expression _logger = logging.getLogger(__name__) class PaymentAcquirer(models.Model): _name...
45.768519
19,772
9,315
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import _, api, Command, fields, models from odoo.exceptions import ValidationError class AccountPayment(models.Model): _inherit = 'account.payment' # == Business fields == payment_transaction_id = fields.Many2one( ...
44.146919
9,315
714
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import _, api, models from odoo.exceptions import UserError class IrUiView(models.Model): _inherit = 'ir.ui.view' @api.ondelete(at_uninstall=False) def _unlink_if_not_referenced_by_acquirer(self): referencing_ac...
44.625
714
3,701
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models class ResCompany(models.Model): _inherit = 'res.company' payment_acquirer_onboarding_state = fields.Selection( string="State of the onboarding payment acquirer step", selection=[('...
43.541176
3,701
913
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models class ResPartner(models.Model): _inherit = 'res.partner' payment_token_ids = fields.One2many( string="Payment Tokens", comodel_name='payment.token', inverse_name='partner_id') payment_...
41.5
913
820
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import fields, models class PaymentIcon(models.Model): _name = 'payment.icon' _description = 'Payment Icon' _order = 'sequence, name' name = fields.Char(string="Name") acquirer_ids = fields.Many2many( st...
39.047619
820
4,279
py
PYTHON
15.0
from odoo import api, Command, fields, models class AccountPaymentRegister(models.TransientModel): _inherit = 'account.payment.register' # == Business fields == payment_token_id = fields.Many2one( comodel_name='payment.token', string="Saved payment token", store=True, readonly=Fal...
46.010753
4,279
9,820
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. from lxml import etree from werkzeug import urls from odoo import _, api, fields, models from odoo.exceptions import ValidationError from odoo.tools import float_compare from odoo.addons.payment import utils as payment_utils class PaymentLin...
47.902439
9,820
9,414
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import _, api, fields, models from odoo.exceptions import UserError class PaymentWizard(models.TransientModel): _name = 'payment.acquirer.onboarding.wizard' _description = 'Payment acquire onboarding wizard' payment_met...
50.886486
9,414
2,965
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import _, api, fields, models from odoo.exceptions import ValidationError class PaymentRefundWizard(models.TransientModel): _name = 'payment.refund.wizard' _description = "Payment Refund Wizard" payment_id = fields.Many...
44.924242
2,965
22,894
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. import urllib.parse import werkzeug from odoo import _, http from odoo.exceptions import AccessError, UserError, ValidationError from odoo.fields import Command from odoo.http import request from odoo.addons.payment import utils as payment_ut...
51.217002
22,894
5,406
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. import logging from datetime import timedelta import psycopg2 from odoo import fields, http from odoo.http import request _logger = logging.getLogger(__name__) class PaymentPostProcessing(http.Controller): """ This controller is r...
38.892086
5,406
737
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Product Images', 'version': '1.0', 'description': """ Automatically set product images based on the barcode ===================================================== This module integrates with the Google Custom Search API t...
30.708333
737
15,511
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. import base64 import logging from datetime import timedelta import requests from requests.exceptions import ConnectionError as RequestConnectionError from odoo import _, api, fields, models from odoo.exceptions import UserError _logger = log...
47.289634
15,511
314
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import fields, models class ProductProduct(models.Model): _inherit = "product.product" image_fetch_pending = fields.Boolean( help="Whether an image must be fetched for this product. Handled by a cron.", )
28.545455
314
501
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import fields, models class ResConfigSettings(models.TransientModel): _inherit = 'res.config.settings' google_custom_search_key = fields.Char( string="Google Custom Search API Key", config_parameter='google....
31.3125
501
2,168
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import _, api, models from odoo.exceptions import ValidationError class IrCronTrigger(models.Model): _inherit = 'ir.cron.trigger' @api.constrains('cron_id') def _check_image_cron_is_not_already_triggered(self): ...
52.878049
2,168
1,075
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Check Printing Base', 'version': '1.0', 'category': 'Accounting/Accounting', 'summary': 'Check printing basic features', 'description': """ This module offers the basic functionalities to m...
37.068966
1,075
7,839
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo.addons.account.tests.common import AccountTestInvoicingCommon from odoo.addons.account_check_printing.models.account_payment import INV_LINES_PER_STUB from odoo.tests import tagged from odoo.tools.misc import NON_BREAKING_SPACE import math @tagged('post_install', '-at_install') clas...
43.298343
7,837
1,288
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import re from odoo import api, fields, models, _ from odoo.exceptions import ValidationError class PrintPreNumberedChecks(models.TransientModel): _name = 'print.prenumbered.checks' _description = 'Print Pre-nu...
42.933333
1,288
1,303
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 from odoo.tools.sql import column_exists, create_column class AccountMove(models.Model): _inherit = 'account.move' preferred_payment_method_id = fields.Many2one( s...
39.484848
1,303
4,208
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import re from odoo import models, fields, api, _ from odoo.exceptions import ValidationError class AccountJournal(models.Model): _inherit = "account.journal" def _default_outbound_payment_methods(self): ...
40.07619
4,208
436
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 AccountPaymentMethod(models.Model): _inherit = 'account.payment.method' @api.model def _get_payment_method_information(self): res = super()._get_payment_method_in...
31.142857
436
14,621
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, _ from odoo.exceptions import UserError, ValidationError, RedirectWarning from odoo.tools.misc import formatLang, format_date INV_LINES_PER_STUB = 9 class AccountPaymentRegister(m...
48.413907
14,621
1,862
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo import models, fields class res_company(models.Model): _inherit = "res.company" # This field needs to be overridden with `selection_add` in the modules which intends to add report layouts. # The xmlID of all the report actions which are actually Check Layouts has to be ...
42.318182
1,862
2,078
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 ResConfigSettings(models.TransientModel): _inherit = 'res.config.settings' account_check_printing_layout = fields.Selection( related='company_id.account_check_prin...
44.212766
2,078
669
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import models, fields class ResPartner(models.Model): _inherit = 'res.partner' property_payment_method_id = fields.Many2one( comodel_name='account.payment.method', string='Payment Me...
35.210526
669
1,345
py
PYTHON
15.0
# -*- coding: utf-8 -*- { 'name': "l10n_it_stock_ddt", 'icon': '/l10n_it/static/description/icon.png', 'website': 'https://www.odoo.com', 'category': 'Accounting/Localizations/EDI', 'version': '0.1', 'description': """ Documento di Trasporto (DDT) Whenever goods are transferred between A and B,...
37.361111
1,345
6,312
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.addons.sale.tests.common import TestSaleCommon from odoo.tests import tagged, Form @tagged('post_install_l10n', 'post_install', '-at_install') class TestDDT(TestSaleCommon): @classmethod def setUpClas...
44.765957
6,312
4,700
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import models, api, fields, _ from odoo.tools.float_utils import float_compare class AccountMove(models.Model): _inherit = 'account.move' l10n_it_ddt_ids = fields.Many2many('stock.picking', compute="...
55.294118
4,700
4,899
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, _ class StockPicking(models.Model): _inherit = "stock.picking" l10n_it_transport_reason = fields.Selection([('sale', 'Sale'), ...
50.505155
4,899
4,996
py
PYTHON
15.0
# -*- coding: utf-8 -*- { 'name': 'eLearning', 'version': '2.4', 'sequence': 125, 'summary': 'Manage and publish an eLearning platform', 'website': 'https://www.odoo.com/app/elearning', 'category': 'Website/eLearning', 'description': """ Create Online Courses ===================== Featuring...
41.633333
4,996
16,478
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import base64 from odoo.addons.mail.tests.common import mail_new_test_user from odoo.addons.website_slides.tests import common from odoo.exceptions import AccessError from odoo.tests import tagged from odoo.tools import ...
46.679887
16,478
10,836
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import math from dateutil.relativedelta import relativedelta from odoo import fields from odoo.addons.website_slides.tests import common from odoo.exceptions import UserError from odoo.tests import tagged from odoo.tes...
47.735683
10,836
4,777
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.addons.website_slides.tests import common from odoo.tests import tagged from odoo.tests.common import users from odoo.tools import mute_logger @tagged('functional') class TestKarmaGain(common.SlidesCase): ...
42.274336
4,777
3,886
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.tests import common from odoo.addons.mail.tests.common import mail_new_test_user, MockEmail class SlidesCase(common.TransactionCase, MockEmail): @classmethod def setUpClass(cls): super(Slides...
38.84
3,884
8,356
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. import base64 from dateutil.relativedelta import relativedelta from odoo import tests from odoo.fields import Datetime from odoo.modules.module import get_module_resource from odoo.addons.base.tests.common import HttpCaseWithUserDemo, HttpCase...
41.572139
8,356
866
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.addons.website_slides.tests import common class TestAttendee(common.SlidesCase): def test_course_attendee_copy(self): """ To check members of the channel after duplication of contact """ ...
37.652174
866
11,099
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.addons.website_slides.tests import common as slides_common from odoo.tests.common import users class TestSlidesManagement(slides_common.SlidesCase): @users('user_officer') def test_get_categorized_sl...
45.863636
11,099
5,392
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import logging import re from odoo import api, fields, models, _ from odoo.exceptions import UserError, AccessError _logger = logging.getLogger(__name__) emails_split = re.compile(r"[;,\n\r]+") class SlideChannelInv...
45.310924
5,392
346
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import models, fields class Challenge(models.Model): _inherit = 'gamification.challenge' challenge_category = fields.Selection(selection_add=[ ('slides', 'Website / Slides') ], ondelete={...
28.833333
346
1,152
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import models class Http(models.AbstractModel): _inherit = 'ir.http' def binary_content(self, xmlid=None, model='ir.attachment', id=None, field='datas', unique=False, filename=...
42.666667
1,152
46,293
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import base64 import datetime import io import re import requests import PyPDF2 import json from dateutil.relativedelta import relativedelta from PIL import Image from werkzeug import urls from odoo import api, fields,...
47.141548
46,293
46,052
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import logging import uuid from collections import defaultdict from dateutil.relativedelta import relativedelta import ast from odoo import api, fields, models, tools, _ from odoo.addons.http_routing.models.ir_http imp...
51.977427
46,052
3,085
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 SlideQuestion(models.Model): _name = "slide.question" _rec_name = "question" _description = "Content Quiz Question" ...
52.288136
3,085
589
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 UserGroup(models.Model): _inherit = 'res.groups' def write(self, vals): """ Automatically subscribe new users to linked slide channels """ write_res = super(U...
36.8125
589
1,384
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 Users(models.Model): _inherit = 'res.users' @api.model_create_multi def create(self, vals_list): """ Trigger automatic subscription based on user groups """ ...
39.542857
1,384
616
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 ResConfigSettings(models.TransientModel): _inherit = "res.config.settings" website_slide_google_app_key = fields.Char(related='website_id.website_slide_google_app_key', re...
44
616
1,043
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.addons.http_routing.models.ir_http import url_for class Website(models.Model): _inherit = "website" website_slide_google_app_key = fields.Char('Google Doc Key') ...
43.458333
1,043
3,257
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 ResPartner(models.Model): _inherit = 'res.partner' slide_channel_ids = fields.Many2many( 'slide.channel', 'slide_channel_partner', 'partner_id', 'channel_i...
45.873239
3,257
1,569
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from random import randint from odoo import fields, models class SlideChannelTagGroup(models.Model): _name = 'slide.channel.tag.group' _description = 'Channel/Course Groups' _inherit = 'website.published.m...
42.405405
1,569
3,998
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import werkzeug from werkzeug.exceptions import NotFound, Forbidden from odoo import http from odoo.http import request from odoo.addons.portal.controllers.mail import _check_special_access, PortalChatter from odoo.too...
45.954023
3,998
57,196
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from ast import literal_eval from collections import defaultdict import base64 import json import logging import math import werkzeug from odoo import http, tools, _ from odoo.addons.http_routing.models.ir_http import ...
47.46556
57,196
292
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Germany - Repair', 'category': 'Accounting/Localizations', 'depends': [ 'l10n_de', 'repair', ], 'auto_install': True, 'license': 'LGPL-3', }
22.461538
292
1,139
py
PYTHON
15.0
from odoo import models, fields, _ from odoo.tools import format_date class RepairOrder(models.Model): _inherit = 'repair.order' l10n_de_template_data = fields.Binary(compute='_compute_l10n_de_template_data') l10n_de_document_title = fields.Char(compute='_compute_l10n_de_document_title') def _comput...
42.185185
1,139
546
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Contacts', 'category': 'Sales/CRM', 'sequence': 150, 'summary': 'Centralize your address book', 'description': """ This module gives you a quick view of your contacts directory, accessible...
27.3
546
682
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, models, modules class Users(models.Model): _name = 'res.users' _inherit = ['res.users'] @api.model def systray_get_activities(self): """ Update the systray icon of res.par...
34.1
682
1,166
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. # Copyright (c) 2011 CCI Connect asbl (http://www.cciconnect.be) All Rights Reserved. # Philmer <philmer@cciconnect.be> { 'name': 'Accounting Consistency Tests', 'version': '1.0', 'cate...
38.866667
1,166
789
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import fields, models CODE_EXEC_DEFAULT = '''\ res = [] cr.execute("select id, code from account_journal") for record in cr.dictfetchall(): res.append(record['code']) result = res ''' class AccountingAss...
32.875
789
2,831
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import datetime from odoo import api, models, _ from odoo.tools.safe_eval import safe_eval # # Use period and Journal for selection or resources # class ReportAssertAccount(models.AbstractModel): _name = 'report.ac...
37.746667
2,831
724
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'KPI Digests', 'category': 'Marketing', 'description': """ Send KPI Digests periodically ============================= """, 'version': '1.1', 'depends': [ 'mail', 'portal', ...
25.857143
724
10,818
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import itertools import random from dateutil.relativedelta import relativedelta from lxml import html from werkzeug.urls import url_encode from odoo import fields, SUPERUSER_ID from odoo.addons.base.tests.common import...
38.774194
10,818
17,909
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import logging import pytz from datetime import datetime, date from dateutil.relativedelta import relativedelta from markupsafe import Markup from odoo import api, fields, models, tools, _ from odoo.addons.base.models....
47.128947
17,909
847
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.translate import html_translate class DigestTip(models.Model): _name = 'digest.tip' _description = 'Digest Tips' _order = 'sequence' sequence = fields.Int...
38.5
847
858
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 ResUsers(models.Model): _inherit = "res.users" @api.model_create_multi def create(self, vals_list): """ Automatically subscribe employee users to default digest if...
47.666667
858