size
int64
0
304k
ext
stringclasses
1 value
lang
stringclasses
1 value
branch
stringclasses
1 value
content
stringlengths
0
304k
avg_line_length
float64
0
238
max_line_length
int64
0
304k
1,083
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo import api, fields, models from odoo.addons.bus.models.bus_presence import AWAY_TIMER from odoo.addons.bus.models.bus_presence import DISCONNECTION_TIMER class ResUsers(models.Model): _inherit = "res.users" im_status = fields.Char('IM Status', compute='_compute_im_status')...
38.678571
1,083
1,315
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo import api, fields, models from odoo.addons.bus.models.bus_presence import AWAY_TIMER from odoo.addons.bus.models.bus_presence import DISCONNECTION_TIMER class ResPartner(models.Model): _inherit = 'res.partner' im_status = fields.Char('IM Status', compute='_compute_im_statu...
45.344828
1,315
1,945
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. import json from odoo import exceptions, _ from odoo.http import Controller, request, route from odoo.addons.bus.models.bus import dispatch class BusController(Controller): # override to add channels def _poll(self, dbname, channels...
42.282609
1,945
803
py
PYTHON
15.0
# -*- coding: utf-8 -*- { 'name': 'Questions on Events', 'description': 'Questions on Events', 'category': 'Marketing', 'version': '1.2', 'depends': ['website_event'], 'data': [ 'views/event_views.xml', 'views/event_registration_answer_views.xml', 'views/event_registrati...
26.766667
803
3,945
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 import fields, tests @tests.tagged('post_install', '-at_install') class TestUi(tests.HttpCase): def test_01_tickets_questions(self): """ Will exe...
43.833333
3,945
1,329
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.addons.event.tests.common import TestEventCommon class TestEventQuestionCommon(TestEventCommon): @classmethod def setUpClass(cls): super(TestEventQuestionCommon, cls).setUpClass() cl...
34.973684
1,329
4,136
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from datetime import datetime, timedelta from odoo.fields import Datetime as FieldsDatetime from odoo.tests.common import users from odoo.addons.website.tools import MockRequest from odoo.addons.website_event_questions....
47.54023
4,136
3,437
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 EventQuestion(models.Model): _name = 'event.question' _rec_name = 'title' _order = 'sequence,id' _description = 'Event...
52.876923
3,437
1,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 EventRegistration(models.Model): """ Store answers on attendees. """ _inherit = 'event.registration' registration_answer_ids = fields.One2many('event.registration.answ...
46.066667
1,382
2,886
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 EventType(models.Model): _inherit = 'event.type' question_ids = fields.One2many( 'event.question', 'event_type_id', string='Questions', copy=True) c...
42.441176
2,886
2,117
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.http import request from odoo.addons.website_event.controllers.main import WebsiteEventController class WebsiteEvent(WebsiteEventController): def _process_attendees_form(self, event, form_details): ...
45.042553
2,117
528
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Send SMS to Visitor with leads', 'category': 'Website/Website', 'sequence': 54, 'summary': 'Allows to send sms to website visitor that have lead', 'version': '1.0', 'description': """All...
35.2
528
1,216
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import models class WebsiteVisitor(models.Model): _inherit = 'website.visitor' def _check_for_sms_composer(self): check = super(WebsiteVisitor, self)._check_for_sms_composer() if not ...
43.428571
1,216
1,852
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. # Copyright (c) 2019 - Blanco Martín & Asociados. https://www.bmya.cl { 'name': 'Chile - Accounting', 'version': "3.0", 'description': """ Chilean accounting chart and tax localization. Plan contable chileno e...
34.90566
1,850
1,520
py
PYTHON
15.0
# -*- coding: utf-8 -*- import logging from odoo import api, models _logger = logging.getLogger(__name__) class AccountChartTemplate(models.Model): _inherit = "account.chart.template" @api.model def _get_demo_data(self): yield ('res.partner', { 'base.res_partner_12': { ...
35.348837
1,520
830
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 AccountTax(models.Model): _name = 'account.tax' _inherit = 'account.tax' l10n_cl_sii_code = fields.Integer('SII Code', group_operator=False) class AccountTaxTemplate(...
30.740741
830
9,451
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.exceptions import ValidationError from odoo import models, fields, api, _ from odoo.osv import expression SII_VAT = '60805000-0' class AccountMove(models.Model): _inherit = "account.move" partner_id_...
59.05
9,448
402
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 ResPartner(models.Model): _name = 'res.country' _inherit = 'res.country' l10n_cl_customs_code = fields.Char('Customs Code') l10n_cl_customs_name = fields.Char('Cust...
33.5
402
1,105
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 L10nLatamDocumentType(models.Model): _inherit = 'l10n_latam.document.type' internal_type = fields.Selection( selection_add=[ ('invoice', 'Invoices'), ...
33.484848
1,105
1,388
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import models class AccountMoveLine(models.Model): _inherit = 'account.move.line' def _l10n_cl_prices_and_taxes(self): self.ensure_one() invoice = self.move_id included_taxes ...
44.774194
1,388
246
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import fields, models class ResBank(models.Model): _name = 'res.bank' _inherit = 'res.bank' l10n_cl_sbif_code = fields.Char('Cod. SBIF', size=10)
27.333333
246
415
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 ResCompany(models.Model): _inherit = "res.company" def _localization_use_documents(self): """ Chilean localization use documents """ self.ensure_one() ...
34.583333
415
316
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import _, api, fields, models class ResCurrency(models.Model): _name = "res.currency" _inherit = "res.currency" l10n_cl_currency_code = fields.Char('Currency Code') l10n_cl_short_name = fields.Char('Short Name')
31.6
316
219
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import fields, models, api, _ class UomUom(models.Model): _inherit = 'uom.uom' l10n_cl_sii_code = fields.Char('SII Code')
24.333333
219
593
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import models from odoo.http import request class AccountChartTemplate(models.Model): _inherit = 'account.chart.template' def _load(self, sale_tax_rate, purchase_tax_rate, company): """ Set tax calculation rounding ...
39.533333
593
2,851
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import stdnum from odoo import _, api, fields, models from odoo.exceptions import UserError, ValidationError class ResPartner(models.Model): _name = 'res.partner' _inherit = 'res.partner' _sii_taxpayer_type...
43.19697
2,851
776
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'OAuth2 Authentication', 'category': 'Hidden/Tools', 'description': """ Allow users to login through OAuth2 Provider. ============================================= """, 'maintainer': 'Odoo S.A.'...
28.740741
776
1,184
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 AuthOAuthProvider(models.Model): """Class defining the configuration values of an OAuth2 provider""" _name = 'auth.oauth.provider' _description = 'OAuth2 provider' ...
51.478261
1,184
540
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import models class IrConfigParameter(models.Model): _inherit = 'ir.config_parameter' def init(self, force=False): super(IrConfigParameter, self).init(force=force) if force: ...
31.764706
540
6,092
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import json import requests import werkzeug.http from odoo import api, fields, models from odoo.exceptions import AccessDenied, UserError from odoo.addons.auth_signup.models.res_users import SignupError from odoo.addo...
42.013793
6,092
1,387
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 ResConfigSettings(models.TransientModel): _inherit = 'res.config.settings' @api.model def get_uri(self): ...
35.564103
1,387
7,575
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import base64 import functools import json import logging import os import werkzeug.urls import werkzeug.utils from werkzeug.exceptions import BadRequest from odoo import api, http, SUPERUSER_ID, _ from odoo.exceptions ...
38.647959
7,575
869
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Website profile', 'category': 'Hidden', 'version': '1.0', 'summary': 'Access the website profile of the users', 'description': "Allows to access the website profile of the users and see the...
31.035714
869
2,504
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import hashlib import uuid from datetime import datetime from werkzeug import urls from odoo import api, models VALIDATION_KARMA_GAIN = 3 class Users(models.Model): _inherit = 'res.users' @property def S...
37.939394
2,504
263
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import models class GamificationBadge(models.Model): _name = 'gamification.badge' _inherit = ['gamification.badge', 'website.published.mixin']
29.222222
263
293
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 Website(models.Model): _inherit = 'website' karma_profile_min = fields.Integer(string="Minimal karma to see other user's profile", default=150)
29.3
293
14,680
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import base64 import werkzeug import werkzeug.exceptions import werkzeug.urls import werkzeug.wrappers import math from dateutil.relativedelta import relativedelta from operator import itemgetter from odoo import field...
45.169231
14,680
1,153
py
PYTHON
15.0
# -*- encoding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Website Test', 'version': '1.0', 'category': 'Hidden', 'sequence': 9876, 'summary': 'Website Test, mainly for module install/uninstall tests', 'description': """This module contains t...
32.027778
1,153
3,392
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. import odoo.tests import lxml @odoo.tests.common.tagged('post_install', '-at_install') class TestIsMultiLang(odoo.tests.HttpCase): def test_01_is_multilang_url(self): website = self.env['website'].search([], limit=1) fr = ...
47.774648
3,392
9,281
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.addons.website.tools import MockRequest from odoo.tests import standalone @standalone('cow_views', 'website_standalone') def test_01_cow_views_unlink_on_module_update(env): """ Ensure COW views are correc...
42.378995
9,281
10,597
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import odoo from odoo.tests import HttpCase, tagged from odoo.tests.common import HOST from odoo.tools import mute_logger from odoo.addons.http_routing.models.ir_http import slug from unittest.mock import patch @tagged...
49.751174
10,597
1,599
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. import odoo.tests @odoo.tests.common.tagged('post_install', '-at_install') class TestWebsiteControllerArgs(odoo.tests.HttpCase): def test_crawl_args(self): req = self.url_open('/ignore_args/converter/valueA/?b=valueB&c=valueC') ...
45.685714
1,599
431
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import odoo.tests from odoo.tools import mute_logger @odoo.tests.common.tagged('post_install', '-at_install') class TestCustomSnippet(odoo.tests.HttpCase): @mute_logger('odoo.addons.http_routing.models.ir_http', '...
33.153846
431
595
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.tests.common import HttpCase, tagged @tagged('post_install', '-at_install') class TestMultiCompany(HttpCase): def test_company_in_context(self): """ Test website company is set in context """ ...
37.1875
595
239
py
PYTHON
15.0
import odoo.tests from odoo.tools import mute_logger @odoo.tests.common.tagged('post_install', '-at_install') class TestWebsiteSession(odoo.tests.HttpCase): def test_01_run_test(self): self.start_tour('/', 'test_json_auth')
26.555556
239
6,099
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. import re import odoo.tests from odoo.tools import mute_logger def break_view(view, fr='<p>placeholder</p>', to='<p t-field="no_record.exist"/>'): view.arch = view.arch.replace(fr, to) @odoo.tests.common.tagged('post_install', '-at_inst...
54.945946
6,099
2,601
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.addons.web_editor.controllers.main import Web_Editor from odoo.addons.web_unsplash.controllers.main import Web_Unsplash import odoo.tests from odoo import http from odoo.tools import config BASE_URL = "http:...
45.631579
2,601
429
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.addons.website.tests.test_performance import UtilPerf class TestPerformance(UtilPerf): def test_10_perf_sql_website_controller_minimalist(self): url = '/empty_controller_test' self.assertE...
39
429
770
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import odoo.tests from odoo.tools import mute_logger @odoo.tests.common.tagged('post_install', '-at_install') class TestMedia(odoo.tests.HttpCase): @mute_logger('odoo.addons.http_routing.models.ir_http', 'odoo.htt...
33.478261
770
4,497
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import logging import psycopg2 from odoo.addons.website.controllers.main import Website from odoo.addons.website.tools import MockRequest import odoo.tests from odoo.tests.common import TransactionCase _logger = loggin...
45.887755
4,497
329
py
PYTHON
15.0
import odoo.tests from odoo.tools import mute_logger @odoo.tests.common.tagged('post_install', '-at_install') class TestWebsiteError(odoo.tests.HttpCase): @mute_logger('odoo.addons.http_routing.models.ir_http', 'odoo.http') def test_01_run_test(self): self.start_tour("/test_error_view", 'test_error_w...
32.9
329
973
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 TestModel(models.Model): """ Add website option in server actions. """ _name = 'test.model' _inherit = [ 'website.seo.metadata', 'website.publishe...
29.484848
973
468
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import models class Website(models.Model): _inherit = "website" def _search_get_details(self, search_type, order, options): result = super()._search_get_details(search_type, order, options) ...
33.428571
468
7,007
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import json import werkzeug from odoo import http from odoo.http import request from odoo.addons.portal.controllers.web import Home from odoo.exceptions import UserError, ValidationError, AccessError, MissingError, Acce...
48.659722
7,007
482
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Authentication via LDAP', 'depends': ['base', 'base_setup'], #'description': < auto-loaded from README file 'category': 'Hidden/Tools', 'data': [ 'views/ldap_installer_views.xml', 'security/ir.mode...
28.352941
482
351
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 ResCompany(models.Model): _inherit = "res.company" ldaps = fields.One2many('res.company.ldap', 'company', string='LDAP Parameters', copy=Tru...
31.909091
351
2,334
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.exceptions import AccessDenied from odoo import api, models, registry, SUPERUSER_ID class Users(models.Model): _inherit = "res.users" @classmethod def _login(cls, db, login, password, user_agent...
38.9
2,334
318
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' ldaps = fields.One2many(related='company_id.ldaps', string="LDAP Parameters", readonly=False)
31.8
318
9,469
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import ldap import logging from ldap.filter import filter_format from odoo import _, api, fields, models, tools from odoo.exceptions import AccessDenied from odoo.tools.misc import str2bool from odoo.tools.pycompat impo...
38.336032
9,469
1,539
py
PYTHON
15.0
{ 'name': 'Base import', 'description': """ New extensible file import for Odoo ====================================== Re-implement Odoo's file import system: * Server side, the previous system forces most of the logic into the client which duplicates the effort (between clients), makes the import system ...
33.456522
1,539
38,208
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import base64 import difflib import io import pprint import unittest from odoo.tests.common import TransactionCase, can_import from odoo.modules.module import get_module_resource from odoo.tools import mute_logger, pycom...
41.674672
38,174
5,199
py
PYTHON
15.0
# -*- coding: utf-8 -*- """ Tests for various autodetection magics for CSV imports """ import codecs from odoo.tests import common class ImportCase(common.TransactionCase): def _make_import(self, contents): return self.env['base_import.import'].create({ 'res_model': 'base_import.tests.models....
33.019737
5,019
71,643
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import base64 import binascii import codecs import collections import difflib import unicodedata import chardet import datetime import io import itertools import logging import psycopg2 import operator import os import ...
45.257738
71,643
3,580
py
PYTHON
15.0
# Copyright 2011 Marco Conti # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
36.530612
3,580
3,272
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo import fields, models def model(suffix_name): return 'base_import.tests.models.%s' % suffix_name class Char(models.Model): _name = model('char') _description = 'Tests : Base Import Model, Character' value = fields.Char() class CharRequired(models.Model): _name ...
30.296296
3,272
694
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import json from odoo import http from odoo.http import request from odoo.tools import misc class ImportController(http.Controller): @http.route('/base_import/set_file', methods=['POST']) def set_file(self, f...
30.173913
694
519
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'CRM Gamification', 'version': '1.0', 'category': 'Sales/CRM', 'depends': ['gamification', 'sale_crm'], 'description': """Example of goal definitions and challenges that can be used related t...
39.923077
519
739
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'ESC/POS Hardware Driver', 'category': 'Sales/Point of Sale', 'sequence': 6, 'website': 'https://www.odoo.com/app/point-of-sale-hardware', 'summary': 'Hardware Driver for ESC/POS Printers an...
30.791667
739
32,683
py
PYTHON
15.0
# -*- coding: utf-8 -*- from __future__ import print_function import base64 import copy import io import math import re import traceback import codecs from hashlib import md5 from PIL import Image from xml.etree import ElementTree as ET try: import jcconv except ImportError: jcconv = None try: import ...
34.95508
32,683
7,646
py
PYTHON
15.0
# -*- coding: utf-8 -*- """ ESC/POS Commands (Constants) """ # Control characters ESC = '\x1b' # Feed control sequences CTL_LF = '\x0a' # Print and line feed CTL_FF = '\x0c' # Form feed CTL_CR = '\x0d' # Carriage return CTL_HT = '\x09' # Horizontal tab CTL_...
39.578947
7,520
2,868
py
PYTHON
15.0
""" ESC/POS Exceptions classes """ class Error(Exception): """ Base class for ESC/POS errors """ def __init__(self, msg, status=None): Exception.__init__(self) self.msg = msg self.resultcode = 1 if status is not None: self.resultcode = status def __str__(self):...
24.93913
2,868
8,283
py
PYTHON
15.0
#!/usr/bin/python from __future__ import print_function import serial import socket import usb.core import usb.util from .escpos import * from .constants import * from .exceptions import * from time import sleep class Usb(Escpos): """ Define USB printer """ def __init__(self, idVendor, idProduct, interface=...
36.328947
8,283
13,135
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from __future__ import print_function import logging import math import os import os.path import subprocess import time import netifaces as ni import traceback try: from .. escpos import * from .. escpos.except...
38.18314
13,135
2,212
py
PYTHON
15.0
# -*- coding: utf-8 -*- { 'name': 'Website Live Chat', 'category': 'Hidden', 'summary': 'Chat with your website visitors', 'version': '1.0', 'description': """ Allow website visitors to chat with the collaborators. This module also brings a feedback tool for the livechat and web pages to display you...
38.807018
2,212
4,209
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import tests from odoo.addons.website_livechat.tests.common import TestLivechatCommon @tests.tagged('post_install', '-at_install') class TestLivechatRequestHttpCase(tests.HttpCase, TestLivechatCommon): de...
53.278481
4,209
7,113
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import datetime from odoo import tests, _ from odoo.addons.website_livechat.tests.common import TestLivechatCommon @tests.tagged('post_install', '-at_install') class TestLivechatBasicFlowHttpCase(tests.HttpCase, TestL...
53.052239
7,109
4,949
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import tests, _ from odoo.addons.website_livechat.tests.common import TestLivechatCommon @tests.tagged('post_install', '-at_install') class TestLivechatUI(tests.HttpCase, TestLivechatCommon): def setUp(se...
56.885057
4,949
4,325
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import fields, tests class TestLivechatCommon(tests.TransactionCase): def setUp(self): super(TestLivechatCommon, self).setUp() self.base_datetime = fields.Datetime.from_string("2019-11-11 ...
45.914894
4,316
371
py
PYTHON
15.0
# -*- coding: utf-8 -*- # 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_mo...
28.538462
371
804
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, models, fields from odoo.addons.http_routing.models.ir_http import slug from odoo.tools.translate import html_translate class ImLivechatChannel(models.Model): _name = 'im_livechat.channel' ...
42.315789
804
1,380
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import models, _ class ImLivechatChannel(models.Model): _inherit = 'im_livechat.channel' def _get_livechat_mail_channel_vals(self, anonymous_name, operator, user_id=None, country_id=None): ma...
60
1,380
356
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' channel_id = fields.Many2one('im_livechat.channel', string='Website Live Channel', related='webs...
35.6
356
2,964
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" channel_id = fields.Many2one('im_livechat.channel', string='Web...
46.3125
2,964
3,881
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 MailChannel(models.Model): _inherit = 'mail.channel' livechat_visitor_id = fields.Many2one('website.visitor', string='Visit...
48.4875
3,879
6,840
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from datetime import datetime, timedelta import json from odoo import models, api, fields, _ from odoo.exceptions import UserError from odoo.http import request from odoo.tools.sql import column_exists, create_column ...
53.858268
6,840
930
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.http import Controller, request, route class TestBusController(Controller): """ This controller is only useful for test purpose. Bus is unavailable in test mode, but there is no way to know, at cl...
48.947368
930
3,489
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import http, _ from odoo.http import request from odoo.addons.im_livechat.controllers.main import LivechatController class WebsiteLivechat(LivechatController): @http.route('/livechat', type='http', auth=...
51.308824
3,489
871
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Quiz on Live Event Tracks', 'category': 'Hidden', 'version': '1.0', 'summary': 'Bridge module to support quiz features during "live" tracks. ', 'website': 'https://www.odoo.com/app/events'...
26.393939
871
564
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.addons.website_event_track_live.controllers.track_live import EventTrackLiveController class EventTrackLiveQuizController(EventTrackLiveController): def _prepare_track_suggestion_values(self, track, trac...
47
564
379
py
PYTHON
15.0
{ 'name': 'Website Sale Delivery Giftcard', 'category': 'Website/Website', 'version': '1.0', 'depends': ['website_sale_delivery', 'website_sale_gift_card'], 'installable': True, 'auto_install': True, 'assets': { 'web.assets_tests': [ 'website_sale_delivery_giftcard/static...
27.071429
379
1,917
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.tests.common import HttpCase from odoo.tests import tagged @tagged('post_install', '-at_install') class TestWebsiteSaleDelivery(HttpCase): def setUp(self): super().setUp() self.env['product.product'].create({ ...
34.854545
1,917
1,444
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { "name": "Finnish Localization", "version": "13.0.1", "author": "Avoin.Systems, " "Tawasta, " "Vizucom, " "Sprintit", "category": "Accounting/Localizations/Accou...
32.088889
1,444
1,742
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.addons.account.tests.common import AccountTestInvoicingCommon from odoo.tests import tagged @tagged('post_install_l10n', 'post_install', '-at_install') class InvoiceGetReferenceTest(AccountTestInvoicingCommon): @classmethod ...
44.666667
1,742
2,133
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.tests import tagged from odoo.addons.account.tests.common import AccountTestInvoicingCommon from odoo.exceptions import UserError @tagged('post_install_l10n', 'post_install', '-at_install') class PaymentReferenceTest(AccountTestInvoi...
35.55
2,133
3,035
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. import re from odoo import api, models, _ from odoo.exceptions import UserError import logging log = logging.getLogger(__name__) class AccountInvoiceFinnish(models.Model): _inherit = 'account.move' @api.model def number2numeric(s...
34.488636
3,035
517
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import models, fields class AccountJournal(models.Model): _inherit = 'account.journal' invoice_reference_model = fields.Selection(selection_add=[ ('fi', 'Finnish Standard Reference'), ('fi_rf', 'Finnish Cred...
39.769231
517
889
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Employee Presence Control', 'version': '1.0', 'category': 'Human Resources', 'description': """ Control Employees Presence ========================== Based on: * The IP Address * The U...
26.147059
889
250
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 ResCompany(models.Model): _inherit = 'res.company' hr_presence_last_compute_date = fields.Datetime()
25
250
8,797
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import logging from ast import literal_eval from odoo import fields, models, _, api from odoo.exceptions import UserError from odoo.fields import Datetime _logger = logging.getLogger(__name__) class Employee(models.A...
43.985
8,797
215
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo import api, fields, models class ResUsersLog(models.Model): _inherit = 'res.users.log' create_uid = fields.Integer(index=True) ip = fields.Char(string="IP Address")
21.5
215