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
5,061
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 Lead2OpportunityMassConvert(models.TransientModel): _name = 'crm.lead2opportunity.partner.mass' _description = 'Convert Lead to Opportunity (in mass)' _inherit = '...
46.431193
5,061
2,567
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 MergeOpportunity(models.TransientModel): """ Merge opportunities together. If we're talking about opportunities, it's just because it makes more sense ...
45.839286
2,567
2,344
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 AccessError class Digest(models.Model): _inherit = 'digest.digest' kpi_crm_lead_created = fields.Boolean('New Leads/Opportunities') kpi_c...
50.956522
2,344
33,120
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import datetime import logging import random import threading from ast import literal_eval from odoo import api, exceptions, fields, models, _ from odoo.osv import expression from odoo.tools import float_compare, float...
49.879518
33,120
1,156
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 LostReason(models.Model): _name = "crm.lost.reason" _description = 'Opp. Lost Reason' name = fields.Char('Description', required=True, translate=True) active = ...
39.862069
1,156
9,386
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import datetime import logging import math import threading import random from ast import literal_eval from odoo import api, exceptions, fields, models, _ from odoo.osv import expression _logger = logging.getLogger(__...
44.273585
9,386
965
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo import fields, models class LeadScoringFrequency(models.Model): _name = 'crm.lead.scoring.frequency' _description = 'Lead Scoring Frequency' variable = fields.Char('Variable', index=True) value = fields.Char('Value') won_count = fields.Float('Won Count', digits=(...
41.956522
965
2,389
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): _inherit = 'calendar.event' @api.model def default_get(self, fields): if self.env.context.get('default_opportunity_id'): ...
43.436364
2,389
1,373
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 UtmCampaign(models.Model): _inherit = 'utm.campaign' use_leads = fields.Boolean('Use Leads', compute='_compute_use_leads') crm_lead_count = fields.Integer('Leads/Oppor...
45.766667
1,373
657
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 RecurringPlan(models.Model): _name = "crm.recurring.plan" _description = "CRM Recurring revenue plans" _order = "sequence" name = fields.Char('Plan Name', required...
34.578947
657
2,236
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 AVAILABLE_PRIORITIES = [ ('0', 'Low'), ('1', 'Medium'), ('2', 'High'), ('3', 'Very High'), ] class Stage(models.Model): """ Model for case stages. This models t...
44.72
2,236
1,063
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import models class MailActivity(models.Model): _inherit = "mail.activity" def action_create_calendar_event(self): """ Small override of the action that creates a calendar. If the ac...
40.884615
1,063
1,168
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, models from odoo.addons.base.models.ir_model import MODULE_UNINSTALL_FLAG class IrConfigParameter(models.Model): _inherit = 'ir.config_parameter' def write(self, vals): result = s...
36.5
1,168
323
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 Users(models.Model): _inherit = 'res.users' target_sales_won = fields.Integer('Won in Opportunities Target') target_sales_done = fields.Integer('Activities Done Target...
29.363636
323
10,332
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 odoo import api, exceptions, fields, models, _ class ResConfigSettings(models.TransientModel): _inherit = 'res.config.settings' ...
64.173913
10,332
124,746
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import logging import pytz import threading from collections import OrderedDict, defaultdict from datetime import date, datetime, timedelta from psycopg2 import sql from odoo import api, fields, models, tools, SUPERUSER...
50.213366
124,730
2,723
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 Partner(models.Model): _name = 'res.partner' _inherit = 'res.partner' team_id = fields.Many2one('crm.team', string='Sales Team', ondelete="set null") opportun...
41.892308
2,723
3,186
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, api class ActivityReport(models.Model): """ CRM Lead Analysis """ _name = "crm.activity.report" _auto = False _description = "CRM Activity Analysis" _rec_nam...
36.204545
3,186
1,948
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import logging from odoo.addons.mail.controllers.mail import MailController from odoo import http from odoo.http import request _logger = logging.getLogger(__name__) class CrmController(http.Controller): @http.ro...
43.288889
1,948
541
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Service Margins in Sales Orders', 'version': '1.0', 'summary': 'Bridge module between Sales Margin and Sales Timesheet', 'description': """ Allows to compute accurate margin for Service sales. ...
30.055556
541
1,724
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 SaleOrderLine(models.Model): _inherit = "sale.order.line" @api.depends('analytic_line_ids.amount', 'qty_delivered_method') def _compute_purchase_price(self): timesh...
53.875
1,724
909
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Thailand - Accounting', 'version': '2.0', 'category': 'Accounting/Localizations/Account Charts', 'description': """ Chart of Accounts for Thailand. =============================== Thai account...
29.322581
909
1,399
py
PYTHON
15.0
# Author: Silvija Butko. Copyright: JSC Focusate. # Co-Authors: Eimantas Nėjus, Andrius Laukavičius. Copyright: JSC Focusate # See LICENSE file for full copyright and licensing details. { 'name': "Lithuania - Accounting", 'version': '1.0.0', 'description': """ Chart of Accounts (COA) Template for Li...
32.488372
1,397
715
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Test Payment Acquirer', 'version': '2.0', 'category': 'Hidden', 'description': """ This module adds a simple payment acquirer allowing to make test payments. It should never be used in production environment. Make sur...
29.791667
715
2,731
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. import logging from odoo import _, api, models from odoo.exceptions import ValidationError from odoo.addons.payment import utils as payment_utils _logger = logging.getLogger(__name__) class PaymentTransaction(models.Model): _inherit = ...
35.934211
2,731
427
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...
30.5
427
1,133
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 PaymentAcquirer(models.Model): _inherit = 'payment.acquirer' provider = fields.Selection(selection_add=[('test', 'Test')], ondelete={'test': 'set def...
37.766667
1,133
757
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import http from odoo.http import request class PaymentTestController(http.Controller): @http.route('/payment/test/simulate_payment', type='json', auth='public') def test_simulate_payment(self, reference, customer_input): ...
36.047619
757
913
py
PYTHON
15.0
# -*- encoding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Ireland - Accounting', 'version': '1.0', 'category': 'Accounting/Localizations/Account Charts', 'description': """ This module is for all the Irish SMEs who would like to setup their acco...
32.607143
913
3,137
py
PYTHON
15.0
# -*- coding: utf-8 -*- { 'name': 'Lunch', 'sequence': 300, 'version': '1.0', 'depends': ['mail'], 'category': 'Human Resources/Lunch', 'summary': 'Handle lunch orders of your employees', 'description': """ The base module to manage lunch. ================================ Many companies or...
41.197368
3,131
7,215
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import logging from dateutil.relativedelta import relativedelta from itertools import groupby from odoo import models from odoo.tools import populate _logger = logging.getLogger(__name__) class LunchProductCategory(mo...
43.463855
7,215
2,470
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. from datetime import datetime, timedelta from odoo import fields from odoo.tests import common from odoo.addons.lunch.tests.common import TestsCommon class TestAlarm(TestsCommon): @common.users('cle-lunch-manager') def test_cron_sync_c...
41.166667
2,470
8,590
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. import pytz from datetime import datetime, time, timedelta from unittest.mock import patch from odoo import fields from odoo.tests import common from odoo.addons.lunch.tests.common import TestsCommon class TestSupplier(TestsCommon): de...
45.691489
8,590
4,106
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. from datetime import datetime from freezegun import freeze_time from odoo.tests import common, new_test_user fakenow = datetime(2021, 1, 29, 12, 20, 0) @freeze_time(fakenow) class TestsCommon(common.TransactionCase): @classmethod def...
34.504202
4,106
12,703
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. import math import pytz from datetime import datetime, time, timedelta from textwrap import dedent from odoo import api, fields, models from odoo.osv import expression from odoo.tools import float_round from odoo.addons.base.models.res_partn...
42.343333
12,703
5,607
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import base64 from collections import defaultdict from odoo import api, fields, models, _ from odoo.exceptions import UserError from odoo.osv import expression class LunchProduct(models.Model): """ Products avail...
43.465116
5,607
415
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 LunchLocation(models.Model): _name = 'lunch.location' _description = 'Lunch Locations' name = fields.Char('Location Name', required=True) address = fields.Text('Ad...
31.923077
415
12,812
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, UserError class LunchOrder(models.Model): _name = 'lunch.order' _description = 'Lunch Order' _order = 'id desc' _disp...
53.831933
12,812
1,771
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import base64 from odoo import api, fields, models from odoo.modules.module import get_module_resource class LunchProductCategory(models.Model): """ Category of the product such as pizza, sandwich, pasta, chinese...
43.195122
1,771
1,070
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 formatLang class LunchTopping(models.Model): _name = 'lunch.topping' _description = 'Lunch Extras' name = fields.Char('Name', required=True) comp...
41.153846
1,070
238
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 Company(models.Model): _inherit = 'res.company' lunch_minimum_threshold = fields.Float()
23.8
238
382
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 ResUsers(models.Model): _inherit = 'res.users' last_lunch_location_id = fields.Many2one('lunch.location') favorite_lunch_product_ids = fields.Many2many('lunch.product'...
34.727273
382
453
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' currency_id = fields.Many2one('res.currency', related='company_id.currency_id') company_lunc...
41.181818
453
1,283
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.tools import float_round class LunchCashMove(models.Model): """ Two types of cashmoves: payment (credit) or order (debit) """ _name = 'lunch.cashmove' _desc...
42.766667
1,283
7,859
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. import pytz import logging from odoo import api, fields, models from odoo.osv import expression from .lunch_supplier import float_to_time from datetime import datetime, timedelta from textwrap import dedent from odoo.addons.base.models.res_pa...
40.302564
7,859
1,813
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 CashmoveReport(models.Model): _name = "lunch.cashmove.report" _description = 'Cashmoves report' _auto = False _order = "date desc" id = fields.I...
36.26
1,813
6,314
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import _, http, fields from odoo.exceptions import AccessError from odoo.http import request from odoo.osv import expression from odoo.tools import float_round, float_repr class LunchController(http.Controlle...
44.153846
6,314
932
py
PYTHON
15.0
{ 'name': "Egypt - Accounting", 'description': """ This is the base module to manage the accounting chart for Egypt in Odoo. ============================================================================== """, 'author': "Odoo SA", 'category': 'Accounting/Localizations/Account Charts', 'version': ...
33.285714
932
4,644
py
PYTHON
15.0
from odoo import models, fields class ETAAccountTaxMixin(models.AbstractModel): _name = 'l10n_eg.eta.account.tax.mixin' _description = 'ETA tax codes mixin' l10n_eg_eta_code = fields.Selection( selection=[ ('t1_v001', 'T1 - V001 - Export'), ('t1_v002', 'T1 - V002 - Export ...
55.285714
4,644
847
py
PYTHON
15.0
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 EGYPT chart, we add 2 new journals TA and IFRS""" if self == self.env.ref('l10n_eg.egypt_chart_template_...
47.055556
847
700
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Stripe Payment Acquirer', 'version': '2.0', 'category': 'Accounting/Payment Acquirers', 'sequence': 380, 'summary': 'Payment Acquirer: Stripe Implementation', 'description': """Stripe Payment Acquirer""", ...
29.166667
700
1,389
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. def get_publishable_key(acquirer_sudo): """ Return the publishable key for Stripe. Note: This method serves as a hook for modules that would fully implement Stripe Connect. :param recordset acquirer_sudo: The acquirer on which the...
35.615385
1,389
1,182
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. from collections import namedtuple API_VERSION = '2019-05-16' # The API version of Stripe implemented in this module # Stripe proxy URL PROXY_URL = 'https://stripe.api.odoo.com/api/stripe/' # Support payment method types PMT = namedtuple('P...
35.818182
1,182
3,343
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.tools import mute_logger from odoo.addons.payment_stripe.controllers.onboarding import OnboardingController from odoo.addons.payment_stripe.const import WEBHOOK_HANDLED_E...
49.895522
3,343
688
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.addons.payment.tests.common import PaymentCommon class StripeCommon(PaymentCommon): @classmethod def setUpClass(cls, chart_template_ref=None): super().setUpClass(chart_template_ref=chart_template_ref) cls.st...
38.222222
688
15,900
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. import logging import pprint from werkzeug import urls from odoo import _, api, fields, models from odoo.exceptions import UserError, ValidationError from odoo.addons.payment import utils as payment_utils from odoo.addons.payment_stripe impo...
45.821326
15,900
2,026
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. import logging import pprint from odoo import _, fields, models from odoo.exceptions import ValidationError _logger = logging.getLogger(__name__) class PaymentToken(models.Model): _inherit = 'payment.token' stripe_payment_method = ...
40.52
2,026
429
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...
30.642857
429
17,153
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. import logging import uuid import requests from werkzeug.urls import url_encode, url_join from odoo import _, api, fields, models from odoo.exceptions import ValidationError from odoo.addons.payment_stripe import utils as stripe_utils from o...
43.757653
17,153
2,457
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. from werkzeug.urls import url_encode from odoo import http from odoo.http import request class OnboardingController(http.Controller): _onboarding_return_url = '/payment/stripe/onboarding/return' _onboarding_refresh_url = '/payment/st...
52.276596
2,457
8,264
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. import hashlib import hmac import json import logging import pprint from datetime import datetime from odoo import http from odoo.exceptions import ValidationError from odoo.http import request from odoo.tools import consteq from odoo.addons....
46.689266
8,264
5,917
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Web Editor', 'category': 'Hidden', 'description': """ Odoo Web Editor widget. ========================== """, 'depends': ['web'], 'data': [ 'security/ir.model.access.csv', ...
41.669014
5,917
2,871
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.tests import TransactionCase class TestViews(TransactionCase): def setUp(self): super().setUp() View = self.env['ir.ui.view'] self.first_view = View.create({ 'name': '...
37.285714
2,871
6,894
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import textwrap from lxml import etree, html from lxml.builder import E from odoo.tests import common from odoo.tests.common import BaseCase from odoo.addons.web_editor.models.ir_qweb import html_to_text class TestHT...
30.732143
6,884
357
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import odoo.tests @odoo.tests.tagged("post_install", "-at_install") class TestOdooEditor(odoo.tests.HttpCase): def test_odoo_editor_suite(self): self.browser_js('/web_editor/static/lib/odoo-editor/test/edit...
35.7
357
2,894
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import binascii from odoo.addons.http_routing.models.ir_http import slug import odoo.tests from odoo.tests.common import HttpCase @odoo.tests.tagged('-at_install', 'post_install') class TestController(HttpCase): de...
47.442623
2,894
2,052
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from lxml import etree from odoo import models, api from odoo.tools.translate import encode, xml_translate, html_translate def edit_translation_mapping(data): data = dict(data, model=data['name'].partition(',')[0]...
44.608696
2,052
951
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import models from odoo.http import request class IrHttp(models.AbstractModel): _inherit = 'ir.http' @classmethod def _dispatch(cls): context = dict(request.context) if 'editable'...
36.576923
951
2,892
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from werkzeug.urls import url_quote from odoo import api, models, fields, tools SUPPORTED_IMAGE_MIMETYPES = ['image/gif', 'image/jpe', 'image/jpeg', 'image/jpg', 'image/png', 'image/svg+xml'] SUPPORTED_IMAGE_EXTENSIONS...
44.492308
2,892
16,026
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import copy import logging import uuid from lxml import etree, html from odoo import api, models, _ from odoo.osv import expression from odoo.exceptions import AccessError, ValidationError _logger = logging.getLogger(_...
40.367758
16,026
8,536
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import base64 import os import re import uuid from lxml import etree from odoo import models from odoo.tools import misc from odoo.addons.base.models.assetsbundle import EXTENSIONS _match_asset_file_url_regex = re.com...
36.169492
8,536
23,179
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. """ Web_editor-context rendering needs to add some metadata to rendered and allow to edit fields, as well as render a few fields differently. Also, adds methods to convert values back to Odoo models. """ import babel i...
36.387755
23,179
1,266
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 ConverterTest(models.Model): _name = 'web_editor.converter.test' _description = 'Web Editor Converter Test' # disable translation export for those brilliant field labe...
34
1,258
1,796
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import re from odoo.http import request from odoo.addons.bus.controllers.main import BusController from odoo.exceptions import AccessDenied class EditorCollaborationController(BusController): # -------------------...
43.804878
1,796
34,412
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import io import json import logging import re import time import requests import werkzeug.urls import werkzeug.wrappers from PIL import Image, ImageFont, ImageDraw from lxml import etree from base64 import b64decode, b64...
46.128686
34,412
1,416
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': "Partner Autocomplete", 'summary': "Auto-complete partner companies' data", 'version': '1.1', 'description': """ Auto-complete partner companies' data """, 'author': "Odoo SA", ...
32.181818
1,416
5,419
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from contextlib import contextmanager from unittest.mock import patch from odoo import exceptions from odoo.addons.iap.tools import iap_tools from odoo.addons.partner_autocomplete.models.iap_autocomplete_api import IapA...
55.244898
5,414
2,565
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.partner_autocomplete.tests.common import MockIAPPartnerAutocomplete class TestResCompany(common.TransactionCase, MockIAPPartnerAutocomplete): @classmethod def setU...
40.714286
2,565
531
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import models from odoo.http import request class Http(models.AbstractModel): _inherit = 'ir.http' def session_info(self): """ Add information about iap enrich to perform """ session_...
33.1875
531
2,297
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, models, exceptions, _ from odoo.addons.iap.tools import iap_tools from requests.exceptions import HTTPError _logger = logging.getLogger(__name__) class IapAutocompleteEnrichAPI(mo...
44.173077
2,297
1,358
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 _logger = logging.getLogger(__name__) class ResPartnerAutocompleteSync(models.Model): _name = 'res.partner.autocomplete.sync' _description = 'Partner Autocomp...
35.736842
1,358
5,388
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import json import logging import threading from odoo.addons.iap.tools import iap_tools from odoo import api, fields, models, tools, _ _logger = logging.getLogger(__name__) COMPANY_AC_TIMEOUT = 5 class ResCompany(mo...
42.09375
5,388
814
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' partner_autocomplete_insufficient_credit = fields.Boolean('Insufficient credit', compute="_compu...
38.761905
814
6,885
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import base64 import json import logging import requests from odoo import api, fields, models, tools, _ _logger = logging.getLogger(__name__) PARTNER_AC_TIMEOUT = 5 class ResPartner(models.Model): _name = 'res.p...
37.622951
6,885
1,172
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Israel - Accounting', 'version': '1.0', 'category': 'Accounting/Localizations/Account Charts', 'description': """ This is the latest basic Israelian localisation necessary to run Odoo in Israel...
33.485714
1,172
586
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Base import module', 'description': """ Import a custom data module =========================== This module allows authorized users to import a custom data module (.xml files and static assests) for cu...
27.904762
586
8,680
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import json from io import BytesIO from zipfile import ZipFile from odoo.tools import cloc from odoo.addons.base.tests import test_cloc VALID_XML = """ <templates id="template" xml:space="preserve"> <t t-name="stock...
40.943396
8,680
16,190
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import base64 import json import os import tempfile from io import BytesIO from zipfile import ZipFile import odoo.tests from odoo.tests import new_test_user from unittest.mock import patch from odoo.addons import __...
43.756757
16,190
1,743
py
PYTHON
15.0
# -*- coding: utf-8 -*- import base64 from io import BytesIO from odoo import api, fields, models class BaseImportModule(models.TransientModel): """ Import Module """ _name = "base.import.module" _description = "Import Module" module_file = fields.Binary(string='Module .ZIP file', required=True, atta...
37.891304
1,743
1,012
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from operator import itemgetter from odoo import api, models class IrUiView(models.Model): _inherit = 'ir.ui.view' @api.model def _validate_custom_views(self, model): # views from imported modules s...
36.142857
1,012
13,020
py
PYTHON
15.0
# -*- coding: utf-8 -*- import ast import base64 import logging import lxml import os import sys import tempfile import zipfile from collections import defaultdict from os.path import join as opj from odoo import api, fields, models, _ from odoo.exceptions import UserError from odoo.modules.module import MANIFEST_NAME...
45.524476
13,020
1,260
py
PYTHON
15.0
# -*- coding: utf-8 -*- import functools from odoo import _ from odoo.exceptions import AccessError from odoo.http import Controller, route, request, Response def webservice(f): @functools.wraps(f) def wrap(*args, **kw): try: return f(*args, **kw) except Exception as e: ...
34.054054
1,260
611
py
PYTHON
15.0
# -*- coding: utf-8 -*- { 'name': 'Norway - E-Invoicing (EHF 3)', 'icon': '/l10n_no/static/description/icon.png', 'version': '0.1', 'category': 'Accounting/Localizations/EDI', 'summary': 'E-Invoicing, Universal Business Language (EHF 3)', 'description': """ EHF 3 is the Norwegian implementation ...
30.55
611
10,558
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo.addons.account_edi.tests.common import AccountEdiTestCommon from odoo.tests import tagged from freezegun import freeze_time @tagged('post_install_l10n', 'post_install', '-at_install') class TestUBL(AccountEdiTestCommon): @classmethod def setUpClass(cls, chart_template_ref='...
45.904348
10,558
5,414
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo import models, _ from odoo.addons.account_edi_ubl_bis3.models.account_edi_format import COUNTRY_EAS class AccountEdiFormat(models.Model): _inherit = 'account.edi.format' #################################################### # Import ##################################...
46.672414
5,414
720
py
PYTHON
15.0
{ 'name' : 'IM Bus', 'version': '1.0', 'category': 'Hidden', 'complexity': 'easy', 'description': "Instant Messaging Bus allow you to send messages to users, in live.", 'depends': ['base', 'web'], 'data': [ 'security/ir.model.access.csv', ], 'installable': True, 'assets':...
27.692308
720
1,919
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import odoo.tests from odoo.osv import expression @odoo.tests.tagged('post_install', '-at_install', 'assets_bundle') class BusWebTests(odoo.tests.HttpCase): def test_bundle_sends_bus(self): """ Test...
37.627451
1,919
423
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.tests import HttpCase class TestBusController(HttpCase): def test_health(self): response = self.url_open('/longpolling/health') self.assertEqual(response.status_code, 200) payload = response.json() ...
35.25
423
3,310
py
PYTHON
15.0
# -*- coding: utf-8 -*- import datetime import time from psycopg2 import OperationalError from odoo import api, fields, models from odoo import tools from odoo.addons.bus.models.bus import TIMEOUT from odoo.service.model import PG_CONCURRENCY_ERRORS_TO_RETRY from odoo.tools.misc import DEFAULT_SERVER_DATETIME_FORMAT ...
45.972222
3,310
8,411
py
PYTHON
15.0
# -*- coding: utf-8 -*- import datetime import json import logging import random import select import threading import time from psycopg2 import InterfaceError import odoo import odoo.service.server as servermod from odoo import api, fields, models, SUPERUSER_ID from odoo.tools.misc import DEFAULT_SERVER_DATETIME_FORM...
36.729258
8,411