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 |
|---|---|---|---|---|---|---|
245 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
{
'name': "test read_group",
'description': "Tests for read_group",
'category': 'Hidden/Tests',
'version': '0.1',
'depends': ['base'],
'data': ['ir.model.access.csv'],
'license': 'LGPL-3',
}
| 20.416667 | 245 |
7,222 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
from odoo.tests import common
class TestGroupOnSelection(common.TransactionCase):
def setUp(self):
super(TestGroupOnSelection, self).setUp()
self.Model = self.env['test_read_group.on_selection']
def test_none(self):
self.Model.create({'value': 1})
self.... | 32.38565 | 7,222 |
1,592 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
from odoo.tests import common
from odoo import Command
class TestAutoJoin(common.TransactionCase):
""" Test what happens when grouping with a domain using a one2many field with auto_join. """
def test_auto_join(self):
model = self.env['test_read_group.order']
records =... | 36.181818 | 1,592 |
8,958 | py | PYTHON | 15.0 | """ Test read_group grouping with many2many fields """
from odoo.fields import Command
from odoo.tests import common
@common.tagged('test_m2m_read_group')
class TestM2MGrouping(common.TransactionCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
cls.users = cls.env['test_read_gro... | 39.289474 | 8,958 |
8,866 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
from odoo.tests import common
class TestGroupBooleans(common.TransactionCase):
def setUp(self):
super(TestGroupBooleans, self).setUp()
self.Model = self.env['test_read_group.aggregate.boolean']
def test_no_value(self):
groups = self.Model.read_group(
... | 31.439716 | 8,866 |
2,095 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
from odoo.tests import common
class TestEmptyDate(common.TransactionCase):
""" Test what happens when grouping on date fields and getting a "false"
grouping value
"""
def setUp(self):
super(TestEmptyDate, self).setUp()
self.Model = self.env['test_read_group.on_d... | 33.253968 | 2,095 |
40,884 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
"""Test for fill temporal."""
from odoo.tests import common
class TestFillTemporal(common.TransactionCase):
"""Test for fill temporal.
This feature is mainly used in graph view. For more informations, read the
documentation of models's '_read_group_fill_temporal' method.
"""
... | 44.923077 | 40,880 |
631 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo.tests import BaseCase
from odoo.tools.rendering_tools import parse_inline_template
class TestParseInlineTemplate(BaseCase):
def test_no_expression(self):
text = 'a b c'
self.assertEqual(par... | 35.055556 | 631 |
6,613 | py | PYTHON | 15.0 |
import inspect
import logging
import time
import unittest
from .. import sql_db
_logger = logging.getLogger(__name__)
class OdooTestResult(unittest.result.TestResult):
"""
This class in inspired from TextTestResult (https://github.com/python/cpython/blob/master/Lib/unittest/runner.py)
Instead of using ... | 41.85443 | 6,613 |
8,954 | py | PYTHON | 15.0 | #!/usr/bin/env python3
import argparse
import logging.config
import os
import sys
import time
sys.path.append(os.path.abspath(os.path.join(__file__,'../../../')))
import odoo
from odoo.tools import config, topological_sort, unique
from odoo.netsvc import init_logger
from odoo.tests import standalone_tests
import odoo... | 39.27193 | 8,954 |
118,449 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
"""
The module :mod:`odoo.tests.common` provides unittest test cases and a few
helpers and classes to write tests.
"""
import base64
import collections
import difflib
import functools
import importlib
import inspect
import itertools
import json
import logging
import operator
import os
import pa... | 41.295328 | 118,435 |
4,149 | py | PYTHON | 15.0 | import importlib
import inspect
import itertools
import logging
import sys
import threading
import unittest
from pathlib import Path
from .. import tools
from .common import TagsSelector, OdooSuite
from .runner import OdooTestResult
_logger = logging.getLogger(__name__)
def get_test_modules(module):
""" Return a... | 34.008197 | 4,149 |
5,772 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
"""
OpenERP - Server
OpenERP is an ERP+CRM program for small and medium businesses.
The whole source code is distributed under the terms of the
GNU Public Licence.
(c) 2003-TODAY, Fabien Pinckaers - OpenERP SA
"""
imp... | 32.24581 | 5,772 |
3,663 | py | PYTHON | 15.0 | import argparse
import glob
import json
import os
import re
import sys
from . import Command
from odoo.modules.module import MANIFEST_NAMES
class TSConfig(Command):
"""Generates tsconfig files for javascript code"""
def __init__(self):
self.command_name = "tsconfig"
def get_module_list(self, pa... | 28.176923 | 3,663 |
2,132 | py | PYTHON | 15.0 | from __future__ import print_function
import logging
import sys
import os
from os.path import join as joinpath, isdir
import odoo
from odoo.modules import get_modules, get_module_path, initialize_sys_path
commands = {}
class CommandType(type):
def __init__(cls, name, bases, attrs):
super(CommandType, cls... | 33.84127 | 2,132 |
3,730 | py | PYTHON | 15.0 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
import argparse
import os
import requests
import sys
import tempfile
import zipfile
from . import Command
class Deploy(Command):
"""Deploy a module on an Odoo instance"""
def __init__(self):
super(Deploy, self).__init_... | 41.444444 | 3,730 |
3,924 | 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 code
import logging
import os
import signal
import sys
import odoo
from odoo.tools import config
from . import Command
_logger = logging.getLogger(__name__)
"""
Shell ... | 31.392 | 3,924 |
1,177 | py | PYTHON | 15.0 | import argparse
import os
import secrets
import sys
import textwrap
from passlib.hash import pbkdf2_sha512
from . import Command
from odoo.tools import config
class GenProxyToken(Command):
def __init__(self):
self.command_name = "genproxytoken"
def generate_token(self, length=16):
token = s... | 33.628571 | 1,177 |
3,159 | py | PYTHON | 15.0 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
import argparse
import glob
import itertools
import os
import sys
import odoo
from . import Command
from .server import main
from odoo.modules.module import get_module_root, MANIFEST_NAMES
from odoo.service.db import _create_empty_data... | 37.607143 | 3,159 |
1,639 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import argparse
import os
import sys
import textwrap
from odoo.tools import cloc, config
from . import Command
class Cloc(Command):
"""\
Odoo cloc is a tool to count the number of relevant lines written in
P... | 34.145833 | 1,639 |
4,298 | py | PYTHON | 15.0 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
import argparse
import os
import re
import sys
import jinja2
from . import Command
class Scaffold(Command):
""" Generates an Odoo module skeleton. """
def run(self, cmdargs):
# TODO: bash completion file
pars... | 31.372263 | 4,298 |
3,621 | py | PYTHON | 15.0 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import time
import fnmatch
import logging
import optparse
import odoo
from . import Command
_logger = logging.getLogger(__name__)
class Populate(Command):
def run(self, cmdargs):
parser = odoo.tools.config.parser
group = optparse.OptionGroup(parser,... | 41.147727 | 3,621 |
18,022 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
import base64
import json
import logging
import os
import shutil
import tempfile
import threading
import traceback
from xml.etree import ElementTree as ET
import zipfile
from psycopg2 import sql
from pytz import country_timezones
from functools import wraps
from contextlib import closing
from d... | 38.840517 | 18,022 |
56,882 | py | PYTHON | 15.0 | #-----------------------------------------------------------
# Threaded, Gevent and Prefork Servers
#-----------------------------------------------------------
import datetime
import errno
import logging
import os
import os.path
import platform
import random
import select
import signal
import socket
import subprocess
... | 41.428988 | 56,882 |
650 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import odoo
import odoo.exceptions
def check(db, uid, passwd):
res_users = odoo.registry(db)['res.users']
return res_users.check(db, uid, passwd)
def compute_session_token(session, env):
self = env['res.use... | 32.5 | 650 |
8,339 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
from contextlib import closing
from functools import wraps
import logging
from psycopg2 import IntegrityError, OperationalError, errorcodes
import random
import threading
import time
import odoo
from odoo.exceptions import UserError, ValidationError
from odoo.models import check_method_name
fr... | 46.586592 | 8,339 |
1,550 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
import logging
import odoo.release
import odoo.tools
from odoo.exceptions import AccessDenied
from odoo.tools.translate import _
_logger = logging.getLogger(__name__)
RPC_VERSION_1 = {
'server_version': odoo.release.version,
'server_version_info': odoo.release.version_info,
... | 26.724138 | 1,550 |
4,462 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
"""
WSGI stack, common code.
"""
import logging
import sys
import threading
import traceback
from xmlrpc import client as xmlrpclib
import werkzeug.exceptions
import werkzeug.wrappers
import werkzeug.serving
import... | 39.839286 | 4,462 |
6,238 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import odoo.modules
import logging
_logger = logging.getLogger(__name__)
def is_initialized(cr):
""" Check if a database has been initialized for the ORM.
The database can be initialized with the 'initialize' ... | 39.481013 | 6,238 |
26,659 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
""" Modules (also called addons) management.
"""
import itertools
import logging
import sys
import threading
import time
import odoo
import odoo.modules.db
import odoo.modules.graph
import odoo.modules.migration
impor... | 43.847039 | 26,659 |
30,053 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
""" Models registries.
"""
from collections import defaultdict, deque
from collections.abc import Mapping
from contextlib import closing, contextmanager
from functools import partial
from operator import attrgetter
impo... | 40.612162 | 30,053 |
6,679 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
""" Modules dependency graph. """
import itertools
import logging
import odoo
import odoo.tools as tools
_logger = logging.getLogger(__name__)
class Graph(dict):
""" Modules dependency graph.
The graph is a ... | 34.786458 | 6,679 |
15,966 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import ast
import collections.abc
import importlib
import logging
import os
import pkg_resources
import re
import sys
import warnings
from os.path import join as opj
import odoo
import odoo.tools as tools
import odoo.re... | 34.335484 | 15,966 |
7,816 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
""" Modules migration handling. """
from collections import defaultdict
import glob
import importlib.util
import logging
import os
from os.path import join as opj
from odoo.modules.module import get_resource_path
impor... | 41.354497 | 7,816 |
1,031 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'Bulgaria - Accounting',
'icon': '/l10n_bg/static/description/icon.png',
'version': '1.0',
'category': 'Accounting/Localizations/Account Charts',
'author': 'Odoo S.A.',
'description': """... | 32.21875 | 1,031 |
725 | py | PYTHON | 15.0 | {
'name': '2FA Invite mail',
'description': """
2FA Invite mail
===============
Allow the users to invite another user to use Two-Factor authentication
by sending an email to the target user. This email redirect him to :
- the users security settings if the user is internal.
- the portal security settings page ... | 29 | 725 |
444 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo.tests import tagged
from odoo.addons.auth_totp.tests.test_totp import TestTOTP
@tagged('post_install', '-at_install')
class TestTOTPInvite(TestTOTP):
def test_totp_administration(self):
self.star... | 34.153846 | 444 |
1,662 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import _, models
class Users(models.Model):
_inherit = 'res.users'
def action_open_my_account_settings(self):
action = {
"name": _("Account Security"),
"type": "ir.act... | 37.772727 | 1,662 |
840 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'Signup',
'description': """
Allow users to sign up and reset their password
===============================================
""",
'version': '1.0',
'category': 'Hidden/Tools',
'auto_inst... | 25.454545 | 840 |
2,338 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from unittest.mock import patch
import odoo
from odoo.tests import HttpCase
from odoo import http
from odoo.exceptions import AccessError
class TestAuthSignupFlow(HttpCase):
def setUp(self):
super(TestAuth... | 35.969231 | 2,338 |
615 | 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'
@classmethod
def _dispatch(cls):
# add signup token or login to the session if given
... | 32.368421 | 615 |
11,256 | 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 collections import defaultdict
from dateutil.relativedelta import relativedelta
from odoo import api, fields, models, _
from odoo.exceptions import UserError
from odoo.o... | 44.141176 | 11,256 |
1,186 | 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 odoo import api, fields, models
class ResConfigSettings(models.TransientModel):
_inherit = 'res.config.settings'
auth_signup_reset_password = fields.Boolean(string='Enable pa... | 49.416667 | 1,186 |
7,822 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import random
import werkzeug.urls
from collections import defaultdict
from datetime import datetime, timedelta
from odoo import api, exceptions, fields, models, _
class SignupError(Exception):
pass
def random_to... | 43.94382 | 7,822 |
7,166 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import logging
import werkzeug
from odoo import http, tools, _
from odoo.addons.auth_signup.models.res_users import SignupError
from odoo.addons.web.controllers.main import ensure_db, Home, SIGN_UP_REQUEST_PARAMS
from od... | 48.09396 | 7,166 |
1,255 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
# Copyright (C) 2016 Onestein (<http://www.onestein.eu>).
{
'name': 'Netherlands - Accounting',
'version': '3.0',
'category': 'Accounting/Localizations/Account Charts',
'author': 'Onestein',
'website... | 31.375 | 1,255 |
265 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
import odoo
def migrate(cr, version):
registry = odoo.registry(cr.dbname)
from odoo.addons.account.models.chart_template import migrate_set_tags_and_taxes_updatable
migrate_set_tags_and_taxes_updatable(cr, registry, 'l10n_nl')
| 33.125 | 265 |
697 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
from odoo import api, fields, models, _
class AccountJournal(models.Model):
_inherit = 'account.journal'
@api.model
def _prepare_liquidity_account_vals(self, company, code, vals):
# OVERRIDE
account_vals = super()._prepare_liquidity_account_vals(company, code, val... | 34.85 | 697 |
272 | py | PYTHON | 15.0 | # coding: utf-8
from odoo import fields, models
class ResCompany(models.Model):
_inherit = 'res.company'
l10n_nl_kvk = fields.Char(related='partner_id.l10n_nl_kvk', readonly=False)
l10n_nl_oin = fields.Char(related='partner_id.l10n_nl_oin', readonly=False)
| 30.222222 | 272 |
1,447 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
from odoo import api, Command, models, _
class AccountChartTemplate(models.Model):
_inherit = 'account.chart.template'
def _load(self, sale_tax_rate, purchase_tax_rate, company):
# Add tag to 999999 account
res = super(AccountChartTemplate, self)._load(sale_tax_rate, ... | 45.21875 | 1,447 |
237 | py | PYTHON | 15.0 | # coding: utf-8
from odoo import fields, models
class ResPartner(models.Model):
_inherit = 'res.partner'
l10n_nl_kvk = fields.Char(string='KVK-nummer')
l10n_nl_oin = fields.Char(string='Organisatie Indentificatie Nummer')
| 26.333333 | 237 |
1,251 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
# Copyright (C) 2014 InnOpen Group Kft (<http://www.innopen.eu>).
# Copyright (C) 2021 Odoo S.A.
{
'name': 'Hungarian - Accounting',
'version': '3.0',
'category': 'Accounting/Localizations/Account Charts',
... | 28.431818 | 1,251 |
1,767 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
# Author: Goran Kliska
# mail: goran.kliska(AT)slobodni-programi.hr
# Copyright (C) 2011- Slobodni programi d.o.o., Zagreb
# Contributions:
# Tomislav Bošnjaković, Storm Computers d.o.o. :
# - ac... | 27.904762 | 1,758 |
265 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
import odoo
def migrate(cr, version):
registry = odoo.registry(cr.dbname)
from odoo.addons.account.models.chart_template import migrate_set_tags_and_taxes_updatable
migrate_set_tags_and_taxes_updatable(cr, registry, 'l10n_hr')
| 33.125 | 265 |
561 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'Accounting/Fleet bridge',
'category': 'Accounting/Accounting',
'summary': 'Manage accounting with fleets',
'description': "",
'version': '1.0',
'depends': ['fleet', 'account'],
'data... | 29.526316 | 561 |
2,189 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models, fields, api, _
class AccountMove(models.Model):
_inherit = 'account.move'
def _post(self, soft=True):
vendor_bill_service = self.env.ref('account_fleet.data_fleet_service_type_... | 42.921569 | 2,189 |
1,764 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import Command, models, fields
class FleetVehicle(models.Model):
_inherit = 'fleet.vehicle'
bill_count = fields.Integer(compute='_compute_move_ids', string="Bills Count")
account_move_ids = field... | 40.090909 | 1,764 |
749 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'Irreversible Lock Date',
'version': '1.0',
'category': 'Accounting/Accounting',
'description': """
Make the lock date irreversible:
* You cannot set stricter restrictions on advisors th... | 44.058824 | 749 |
5,023 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
import calendar
from dateutil.relativedelta import relativedelta
from odoo import fields, models, api, _
from odoo.exceptions import UserError
class ResCompany(models.Model):
_inherit = 'res.company'
def _autorise_lock_date_changes(self, vals):
'''Check the lock dates for th... | 62.012346 | 5,023 |
1,226 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'Live Event Tracks',
'category': 'Marketing/Events',
'sequence': 1006,
'version': '1.0',
'summary': 'Support live tracks: streaming, participation, youtube',
'website': 'https://www.odo... | 32.263158 | 1,226 |
2,210 | 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
class Track(models.Model):
_inherit = 'event.track'
youtube_video_url = fields.Char('Youtube Video URL',
help="Configure this URL so that event attendees... | 52.619048 | 2,210 |
1,077 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import re
from odoo.addons.website_event_track.controllers.event_track import EventTrackController
from odoo.http import request
class WebsiteEventSessionLiveController(EventTrackController):
def _event_track_pag... | 51.285714 | 1,077 |
1,469 | 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.addons.website_event_track.controllers.event_track import EventTrackController
from odoo.osv import expression
class EventTrackLiveController(EventTrackController):
@http.route('/ev... | 39.702703 | 1,469 |
422 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
"name": "Fetchmail Gmail",
"version": "1.0",
"category": "Hidden",
"description": "Google authentication for incoming mail server",
"depends": [
"google_gmail",
"fetchmail",
],
... | 26.375 | 422 |
1,714 | 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.exceptions import UserError
class FetchmailServer(models.Model):
_name = 'fetchmail.server'
_inherit = ['fetchmail.server', 'google.gmail.mixin']
@api.constrains('... | 40.809524 | 1,714 |
2,583 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'Advanced Events',
'category': 'Marketing',
'summary': 'Sponsors, Tracks, Agenda, Event News',
'version': '1.3',
'description': "",
'depends': ['website_event'],
'data': [
's... | 41 | 2,583 |
3,584 | 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 import fields
from odoo.addons.website_event.tests.common import TestWebsiteEventCommon
from odoo.tests.common import users
class TestEventWebsiteTrack(TestWebsiteEve... | 44.8 | 3,584 |
9,115 | 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 unittest.mock import patch
from odoo import fields
from odoo.addons.website.models.website_visitor import WebsiteVisitor
from odoo.addons.website_event.tests.common import T... | 43.61244 | 9,115 |
818 | py | PYTHON | 15.0 | # Part of Odoo. See LICENSE file for full copyright and licensing details.
# -*- coding: utf-8 -*-
from odoo.tests import tagged
from odoo.tests.common import TransactionCase
@tagged('post_install', '-at_install')
class TestWebsiteEvent(TransactionCase):
def test_event_app_name(self):
website0 = self.en... | 38.952381 | 818 |
2,960 | py | PYTHON | 15.0 | # Part of Odoo. See LICENSE file for full copyright and licensing details.
# -*- coding: utf-8 -*-
from odoo.tests import tagged
from odoo.tests.common import TransactionCase
from odoo import tools
from io import BytesIO
from PIL import Image
import base64
@tagged('post_install', '-at_install')
class TestWebsite(Tran... | 37.948718 | 2,960 |
297 | 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 TrackLocation(models.Model):
_name = "event.track.location"
_description = 'Event Track Location'
name = fields.Char('Location', required=True)
| 27 | 297 |
2,323 | 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 TrackStage(models.Model):
_name = 'event.track.stage'
_description = 'Event Track Stage'
_order = 'sequence, id'
name = fields.Char(string='Stage Name', re... | 48.395833 | 2,323 |
837 | 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'
website_track = fields.Boolean(
string='Tracks on Website', compute='_compute_website_track_menu_data',
... | 38.045455 | 837 |
1,247 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models
class WebsiteMenu(models.Model):
_inherit = "website.menu"
def unlink(self):
""" Override to synchronize event configuration fields with menu deletion.
This should be cl... | 41.566667 | 1,247 |
914 | 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 TrackTag(models.Model):
_name = "event.track.tag"
_description = 'Event Track Tag'
_order = "category_id, sequence, name"
def _default_... | 33.851852 | 914 |
4,949 | 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.addons.http_routing.models.ir_http import slug
class Event(models.Model):
_inherit = "event.event"
track_ids = fields.One2many('event.track', 'event_id', 'Trac... | 54.384615 | 4,949 |
406 | 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 EventMenu(models.Model):
_inherit = "website.event.menu"
menu_type = fields.Selection(
selection_add=[('track', 'Event Tracks Menus'), ('track_proposal', 'Event Pr... | 33.833333 | 406 |
327 | 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'
events_app_name = fields.Char('Events App Name', related='website_id.events_app_name', readonly=... | 32.7 | 327 |
28,058 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from datetime import timedelta
from pytz import utc
from random import randint
from odoo import api, fields, models
from odoo.addons.http_routing.models.ir_http import slug
from odoo.osv import expression
from odoo.tool... | 45.401294 | 28,058 |
2,029 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from PIL import Image
from odoo import api, fields, models
from odoo.exceptions import ValidationError
from odoo.tools import ImageProcess
from odoo.tools.translate import _
class Website(models.Model):
_inherit ... | 41.408163 | 2,029 |
1,397 | 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 TrackVisitor(models.Model):
""" Table linking track and visitors. """
_name = 'event.track.visitor'
_description = 'Track / Visitor Link'
_table = 'event_track... | 43.65625 | 1,397 |
477 | 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 TrackTagCategory(models.Model):
_name = "event.track.tag.category"
_description = 'Event Track Tag Category'
_order = "sequence"
name = fields.Char("Name", require... | 34.071429 | 477 |
3,786 | 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 WebsiteVisitor(models.Model):
_name = 'website.visitor'
_inherit = ['website.visitor']
event_track_visitor_ids = fields.One2many(
'event.track.visitor', '... | 50.48 | 3,786 |
474 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo.addons.website_event.controllers.main import WebsiteEventController
class EventOnlineController(WebsiteEventController):
def _get_registration_confirm_values(self, event, attendees_sudo):
values ... | 39.5 | 474 |
2,834 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import json
import pytz
from odoo import http
from odoo.addons.http_routing.models.ir_http import url_for
from odoo.http import request
from odoo.modules.module import get_module_resource
from odoo.tools import ustr
fro... | 41.676471 | 2,834 |
25,723 | 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
from datetime import timedelta
from pytz import timezone, utc
from werkzeug.exceptions import Forbidden, NotFound
import babel
import babel.dates
import b... | 48.625709 | 25,723 |
1,011 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'Forum on Courses',
'category': 'Website/eLearning',
'version': '1.0',
'summary': 'Allows to link forum on a course',
'description': """A Slide channel can be linked to forum. Also, profiles... | 30.636364 | 1,011 |
1,503 | 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 Channel(models.Model):
_inherit = 'slide.channel'
forum_id = fields.Many2one('forum.forum', 'Course Forum')
forum_total_posts = fields.Integer('Number of active f... | 33.4 | 1,503 |
891 | 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 Forum(models.Model):
_inherit = 'forum.forum'
slide_channel_ids = fields.One2many('slide.channel', 'forum_id', 'Courses', help="Edit the course linked to this forum o... | 44.55 | 891 |
1,211 | 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_slides.controllers.main import WebsiteSlides
class WebsiteSlidesForum(WebsiteSlides):
def _slide_channel_prepare_values(self, **kwargs):
channel = sup... | 36.69697 | 1,211 |
1,533 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
"name": """Indian - E-invoicing""",
"version": "1.03.00",
"icon": "/l10n_in/static/description/icon.png",
"category": "Accounting/Localizations/EDI",
"depends": [
"account_edi",
"l10n... | 38.325 | 1,533 |
16,593 | 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 TestEdiJson(AccountTestInvoicingCommon):
@classmethod
def setUpCl... | 62.146067 | 16,593 |
2,990 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import json
from odoo import api, fields, models, _
from odoo.exceptions import UserError
class AccountMove(models.Model):
_inherit = "account.move"
l10n_in_edi_cancel_reason = fields.Selection(selection=[
... | 47.460317 | 2,990 |
37,107 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import re
import json
import pytz
import markupsafe
from collections import defaultdict
from odoo import models, fields, api, _
from odoo.tools import html_escape, float_is_zero, float_compare
from odoo.exceptions impo... | 53.161891 | 37,107 |
1,000 | 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"
l10n_in_edi_username = fields.Char("E-invoice (IN) Username", groups="base.group_system")
l10n_in_edi_password = fie... | 41.666667 | 1,000 |
982 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models, fields, _
from odoo.exceptions import UserError
class ResConfigSettings(models.TransientModel):
_inherit = "res.config.settings"
l10n_in_edi_username = fields.Char("Indian EDI username... | 44.636364 | 982 |
1,664 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'Event Exhibitors',
'category': 'Marketing/Events',
'sequence': 1004,
'version': '1.1',
'summary': 'Event: manage sponsors and exhibitors',
'website': 'https://www.odoo.com/app/events',... | 33.959184 | 1,664 |
3,947 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from datetime import datetime
from unittest.mock import patch
from odoo.addons.website_event_exhibitor.tests.common import TestEventExhibitorCommon
from odoo.fields import Datetime as FieldsDatetime
from odoo.tests.comm... | 45.367816 | 3,947 |
962 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo.addons.website_event.tests.common import TestEventOnlineCommon
class TestEventExhibitorCommon(TestEventOnlineCommon):
@classmethod
def setUpClass(cls):
super(TestEventExhibitorCommon, cls).se... | 33.172414 | 962 |
560 | 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"
exhibitor_menu = fields.Boolean(
string='Showcase Exhibitors', compute='_compute_exhibitor_menu',
rea... | 31.111111 | 560 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.