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 |
|---|---|---|---|---|---|---|
602 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'Quiz and Meet on community',
'category': 'Marketing/Events',
'sequence': 1007,
'version': '1.0',
'summary': 'Quiz and Meet on community route',
'website': 'https://www.odoo.com/app/eve... | 24.08 | 602 |
849 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from werkzeug.exceptions import Forbidden
from odoo import http
from odoo.addons.website_event.controllers.community import EventCommunityController
from odoo.http import request
class WebsiteEventTrackQuizMeetControl... | 42.45 | 849 |
1,477 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
"name": "Point of Sale Coupons",
"version": "1.0",
"category": "Sales/Point Of Sale",
"sequence": 6,
"summary": "Use coupons in Point of Sale",
"description": "",
"depends": ["coupon", "poin... | 33.568182 | 1,477 |
15,267 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo.addons.point_of_sale.tests.test_frontend import TestPointOfSaleHttpCommon
from odoo.tests import Form, tagged
@tagged("post_install", "-at_install")
class TestUi(TestPointOfSaleHttpCommon):
def setUp(self... | 37.511057 | 15,267 |
1,430 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
# NOTE Use black to automatically format this code.
from odoo import api, fields, models, _
class Coupon(models.Model):
_inherit = "coupon.coupon"
source_pos_order_id = fields.Many2one(
"pos.order",
... | 34.047619 | 1,430 |
3,779 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
# NOTE Use black to automatically format this code.
from datetime import datetime
from odoo import api, fields, models, _
from odoo.exceptions import UserError
class PosConfig(models.Model):
_inherit = "pos.confi... | 36.336538 | 3,779 |
3,120 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
# NOTE Use black to automatically format this code.
from odoo import api, fields, models, _
import ast
class CouponProgram(models.Model):
_inherit = "coupon.program"
pos_config_ids = fields.Many2many(
... | 36.27907 | 3,120 |
365 | 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.tools.translate import _
class BarcodeRule(models.Model):
_inherit = 'barcode.rule'
type = fields.Selection(selection_add=[
('coupon', 'Coupon'),
], ondele... | 24.333333 | 365 |
3,273 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
# NOTE Use black to automatically format this code.
from collections import defaultdict
from odoo import api, fields, models, _
class PosOrder(models.Model):
_inherit = "pos.order"
applied_program_ids = fiel... | 34.819149 | 3,273 |
702 | py | PYTHON | 15.0 | # Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'Barcode - GS1 Nomenclature',
'version': '1.0',
'category': 'Hidden',
'summary': 'Parse barcodes according to the GS1-128 specifications',
'depends': ['barcodes', 'uom'],
'data': [
'data/barcodes_gs1_ru... | 29.25 | 702 |
5,746 | py | PYTHON | 15.0 | from odoo.addons.barcodes.tests.test_barcode_nomenclature import TestBarcodeNomenclature
from odoo.exceptions import ValidationError
class TestBarcodeGS1Nomenclature(TestBarcodeNomenclature):
def test_gs1_date_to_date(self):
barcode_nomenclature = self.env['barcode.nomenclature']
# 20/10/2015 -> 1... | 44.2 | 5,746 |
5,682 | py | PYTHON | 15.0 | import re
import datetime
import calendar
from odoo import api, fields, models, _
from odoo.exceptions import ValidationError
FNC1_CHAR = '\x1D'
class BarcodeNomenclature(models.Model):
_inherit = 'barcode.nomenclature'
is_gs1_nomenclature = fields.Boolean(
string="Is GS1 Nomenclature",
hel... | 45.095238 | 5,682 |
2,998 | py | PYTHON | 15.0 | import re
from odoo import api, fields, models, _
from odoo.exceptions import ValidationError
class BarcodeRule(models.Model):
_inherit = 'barcode.rule'
def _default_encoding(self):
return 'gs1-128' if self.env.context.get('is_gs1') else 'any'
encoding = fields.Selection(
selection_add=... | 43.449275 | 2,998 |
1,403 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'EU One Stop Shop (OSS)',
'category': 'Accounting/Localizations',
'description': """
EU One Stop Shop (OSS) VAT
==========================
From July 1st 2021, EU businesses that are selling goods w... | 43.78125 | 1,401 |
5,711 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
from odoo.addons.l10n_eu_oss.models.eu_tag_map import EU_TAG_MAP
from odoo.addons.account.tests.common import AccountTestInvoicingCommon
from odoo.tests import tagged
@tagged('post_install', 'post_install_l10n', '-at_install')
class OssTemplateTestCase(AccountTestInvoicingCommon):
@class... | 47.991597 | 5,711 |
5,985 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
"""
The EU_TAG_MAP answers the question: "which tag should I apply on the OSS tax repartition line?"
{
'fiscal_country_code': {
'invoice_base_tag': xml_id_of_the_tag or None,
'invoice_tax_tag': xml_i... | 27.96729 | 5,985 |
62,079 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
# pylint: disable=C0302
"""
The EU_TAX_MAP dictionary contains a basic Tax Mapping for EU countries. It answers the question:
for an X% tax rate in the domestic country, what is the corresponding rate in a foreign EU cou... | 29.268741 | 62,079 |
8,061 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import Command, api, models
from .eu_tag_map import EU_TAG_MAP
from .eu_tax_map import EU_TAX_MAP
class Company(models.Model):
_inherit = 'res.company'
@api.model
def _map_all_eu_companies_taxes(... | 54.836735 | 8,061 |
716 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import api, fields, models
class ResConfigSettings(models.TransientModel):
_inherit = 'res.config.settings'
l10n_eu_oss_eu_country = fields.Boolean('Is European country?', compute='_compute_l10n_eu_o... | 37.684211 | 716 |
491 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models
class AccountChartTemplate(models.Model):
_inherit = 'account.chart.template'
def _load(self, sale_tax_rate, purchase_tax_rate, company):
rslt = super()._load(sale_tax_rate, purc... | 32.733333 | 491 |
1,141 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'Turkey - Accounting',
'version': '1.0',
'category': 'Accounting/Localizations/Account Charts',
'description': """
Türkiye için Tek düzen hesap planı şablonu Odoo Modülü.
=======================... | 33.818182 | 1,116 |
1,911 | py | PYTHON | 15.0 | # Part of Odoo. See LICENSE file for full copyright and licensing details.
{
"name": "LATAM Document",
"version": "1.0",
"author": "ADHOC SA",
'category': 'Accounting/Localizations',
"summary": "LATAM Document Types",
'description': """
Functional
----------
In some Latinamerica countries, incl... | 44.44186 | 1,911 |
14,218 | py | PYTHON | 15.0 | # Part of Odoo. See LICENSE file for full copyright and licensing details.
from collections import defaultdict
from odoo import models, fields, api, _
from odoo.exceptions import UserError, ValidationError
from odoo.tools.sql import column_exists, create_column
class AccountMove(models.Model):
_inherit = "acco... | 63.473214 | 14,218 |
1,714 | py | PYTHON | 15.0 | # Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import fields, models, api, _
from odoo.exceptions import ValidationError
class AccountJournal(models.Model):
_inherit = "account.journal"
l10n_latam_use_documents = fields.Boolean(
'Use Documents?', help="If active... | 45.105263 | 1,714 |
2,572 | py | PYTHON | 15.0 | # Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import fields, models, api
from odoo.osv import expression
class L10nLatamDocumentType(models.Model):
_name = 'l10n_latam.document.type'
_description = 'Latam Document Type'
_order = 'sequence, id'
active = fields.B... | 48.528302 | 2,572 |
848 | py | PYTHON | 15.0 | # Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models, fields
from odoo.tools.sql import column_exists, create_column
class AccountMoveLine(models.Model):
_inherit = 'account.move.line'
def _auto_init(self):
# Skip the computation of the field `l10n_lata... | 44.631579 | 848 |
372 | py | PYTHON | 15.0 | # Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import fields, models
class ResCompany(models.Model):
_inherit = "res.company"
def _localization_use_documents(self):
""" This method is to be inherited by localizations and return True if localization use documents... | 31 | 372 |
791 | py | PYTHON | 15.0 | # Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models, api, fields, _
class AccountChartTemplate(models.Model):
_inherit = 'account.chart.template'
@api.model
def _prepare_all_journals(self, acc_template_ref, company, journals_dict=None):
""" We add u... | 41.631579 | 791 |
493 | py | PYTHON | 15.0 | # Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models, fields
class AccountInvoiceReport(models.Model):
_inherit = 'account.invoice.report'
l10n_latam_document_type_id = fields.Many2one('l10n_latam.document.type', 'Document Type', index=True)
_depends = {'acc... | 37.923077 | 493 |
461 | py | PYTHON | 15.0 | from odoo import models
class AccountDebitNote(models.TransientModel):
_inherit = 'account.debit.note'
def create_debit(self):
""" Properly compute the latam document type of type debit note. """
res = super().create_debit()
new_move_id = res.get('res_id')
if new_move_id:
... | 30.733333 | 461 |
5,298 | py | PYTHON | 15.0 | # Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models, fields, api, _
from odoo.exceptions import UserError
class AccountMoveReversal(models.TransientModel):
_inherit = "account.move.reversal"
l10n_latam_use_documents = fields.Boolean(compute='_compute_document_t... | 55.768421 | 5,298 |
580 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': "Timesheets/attendances reporting",
'description': """
Module linking the attendance module to the timesheet app.
""",
'category': 'Hidden',
'version': '1.0',
'depends': ['hr_timesh... | 29 | 580 |
2,175 | 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 TimesheetAttendance(models.Model):
_name = 'hr.timesheet.attendance.report'
_auto = False
_description = 'Timesheet Attendance Report'
user_id = fields... | 39.545455 | 2,175 |
997 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': "mrp_subcontracting",
'version': '0.1',
'summary': "Subcontract Productions",
'description': "",
'website': 'https://www.odoo.com/app/manufacturing',
'category': 'Manufacturing/Manufactu... | 32.16129 | 997 |
54,750 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import Command
from odoo.tests import Form
from odoo.tests.common import TransactionCase
from odoo.addons.mrp_subcontracting.tests.common import TestMrpSubcontractingCommon
from odoo.tests import tagged
from d... | 51.025163 | 54,750 |
2,499 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo.tests.common import Form, TransactionCase
class TestMrpSubcontractingCommon(TransactionCase):
@classmethod
def setUpClass(cls):
super(TestMrpSubcontractingCommon, cls).setUpClass()
# 1... | 40.967213 | 2,499 |
1,247 | 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
class ReturnPicking(models.TransientModel):
_inherit = 'stock.return.picking'
subcontract_location_id = fields.Many2one('stock.location', compute='_compute_subcontract_loca... | 43 | 1,247 |
775 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models
class MrpConsumptionWarning(models.TransientModel):
_inherit = 'mrp.consumption.warning'
def action_confirm(self):
if self.mrp_production_ids._get_subcontract_move():
... | 40.789474 | 775 |
7,271 | 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 StockWarehouse(models.Model):
_inherit = 'stock.warehouse'
subcontracting_to_resupply = fields.Boolean(
'Resupply Subcontractors', default=True,
help="R... | 43.023669 | 7,271 |
911 | 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 StockMoveLine(models.Model):
_inherit = 'stock.move.line'
@api.onchange('lot_name', 'lot_id')
def _onchange_serial_number(self):
current_location_id = self.lo... | 45.55 | 911 |
959 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import fields, models, _
from odoo.exceptions import UserError
class StockQuant(models.Model):
_inherit = 'stock.quant'
is_subcontract = fields.Boolean(store=False, search='_search_is_subcontract')
... | 36.884615 | 959 |
11,599 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from collections import defaultdict
from odoo import fields, models, _
from odoo.exceptions import UserError
from odoo.tools.float_utils import float_compare, float_is_zero
class StockMove(models.Model):
_inherit ... | 48.128631 | 11,599 |
1,441 | 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 ResCompany(models.Model):
_inherit = 'res.company'
subcontracting_location_id = fields.Many2one('stock.location')
@api.model
def create_missing_subcontrac... | 38.945946 | 1,441 |
9,445 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from datetime import timedelta
from odoo import api, fields, models, _
from odoo.exceptions import UserError
from odoo.tools.float_utils import float_compare
from dateutil.relativedelta import relativedelta
class Stoc... | 57.944785 | 9,445 |
1,182 | 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 SupplierInfo(models.Model):
_inherit = 'product.supplierinfo'
is_subcontractor = fields.Boolean('Subcontracted', compute='_compute_is_subcontractor', help="Choose a v... | 45.461538 | 1,182 |
435 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models
class StockRule(models.Model):
_inherit = "stock.rule"
def _push_prepare_move_copy_values(self, move_to_copy, new_date):
new_move_vals = super(StockRule, self)._push_prepare_mov... | 33.461538 | 435 |
9,460 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from collections import defaultdict
from odoo import fields, models, _, api
from odoo.exceptions import UserError
from odoo.osv import expression
from odoo.tools.float_utils import float_compare, float_is_zero
class Mr... | 49.528796 | 9,460 |
1,117 | 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):
_inherit = 'res.partner'
property_stock_subcontractor = fields.Many2one(
'stock.location', string="Subcontractor Location", company_depen... | 44.68 | 1,117 |
1,457 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import api, fields, models, _
from odoo.exceptions import ValidationError
from odoo.osv.expression import AND
class MrpBom(models.Model):
_inherit = 'mrp.bom'
type = fields.Selection(selection_add=[
... | 53.962963 | 1,457 |
3,357 | 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 ReportBomStructure(models.AbstractModel):
_inherit = 'report.mrp.report_bom_structure'
def _get_subcontracting_line(self, bom, seller, level, bom_quantity):
rat... | 51.646154 | 3,357 |
1,850 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'Gamification',
'version': '1.0',
'sequence': 160,
'category': 'Human Resources',
'depends': ['mail', 'web_kanban_gauge'],
'description': """
Gamification process
====================
The... | 37.755102 | 1,850 |
6,620 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import datetime
from odoo.addons.base.tests.common import TransactionCaseWithUserDemo
from odoo.exceptions import UserError
from odoo.tools import mute_logger
class TestGamificationCommon(TransactionCaseWithUserDemo):
... | 43.267974 | 6,620 |
13,776 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from datetime import date
from dateutil.relativedelta import relativedelta
from unittest.mock import patch
from odoo import exceptions, fields
from odoo.addons.mail.tests.common import mail_new_test_user
from odoo.tests... | 43.726984 | 13,774 |
1,159 | 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, _, exceptions
class grant_badge_wizard(models.TransientModel):
""" Wizard allowing to grant a badge to a user"""
_name = 'gamification.badge.user.wizard'
_description =... | 34.088235 | 1,159 |
781 | 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
class goal_manual_wizard(models.TransientModel):
"""Wizard to update a manual goal"""
_name = 'gamification.goal.wizard'
_description = 'Gamification Goal Wizard'
go... | 32.541667 | 781 |
11,769 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import logging
from datetime import date
from odoo import api, fields, models, _, exceptions
_logger = logging.getLogger(__name__)
class BadgeUser(models.Model):
"""User having received a badge"""
_name = 'g... | 43.914179 | 11,769 |
2,743 | 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.translate import html_translate
class KarmaRank(models.Model):
_name = 'gamification.karma.rank'
_description = 'Rank based on karma'
_inherit = 'image.mi... | 46.491525 | 2,743 |
2,823 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import calendar
from dateutil.relativedelta import relativedelta
from odoo import api, fields, models
class KarmaTracking(models.Model):
_name = 'gamification.karma.tracking'
_description = 'Track Karma Chang... | 40.913043 | 2,823 |
12,924 | 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 Users(models.Model):
_inherit = 'res.users'
karma = fields.Integer('Karma', default=0, copy=False)
karma_tracking_ids = fields.One2many('gamification.karma.tracki... | 42.37377 | 12,924 |
23,122 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import ast
import logging
from datetime import date, datetime, timedelta
from odoo import api, fields, models, _, exceptions
from odoo.osv import expression
from odoo.tools.safe_eval import safe_eval, time
_logger = lo... | 49.829741 | 23,121 |
35,772 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import ast
import itertools
import logging
from datetime import date, timedelta
from dateutil.relativedelta import relativedelta, MO
from odoo import api, models, fields, _, exceptions
from odoo.tools import ustr
_logg... | 45.052897 | 35,772 |
763 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'Gulf Cooperation Council - Point of Sale',
'author': 'Odoo S.A',
'category': 'Accounting/Localizations/Point of Sale',
'description': """
GCC POS Localization
===================================... | 30.52 | 763 |
7,598 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
{
'name': 'Discuss',
'version': '1.5',
'category': 'Productivity/Discuss',
'sequence': 145,
'summary': 'Chat, mail gateway and private channels',
'description': "",
'website': 'https://www.odoo.com/app/discuss',
'depends': ['base', 'base_setup', 'bus', 'web_tour'... | 44.95858 | 7,598 |
888 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import logging
from odoo import tools
_logger = logging.getLogger(__name__)
_flanker_lib_warning = False
try:
from flanker.addresslib import address
# Avoid warning each time a mx server is not reachable by fl... | 32.888889 | 888 |
1,053 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo.tests.common import tagged, HttpCase
from odoo import Command
@tagged('-at_install', 'post_install', 'mail_composer')
class TestMailFullComposer(HttpCase):
def test_full_composer_tour(self):
self... | 40.5 | 1,053 |
1,008 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo.tests import tagged, TransactionCase
@tagged('-at_install', 'post_install')
class TestMailUninstall(TransactionCase):
def test_unlink_model(self):
model = self.env['ir.model'].create({
... | 32.516129 | 1,008 |
9,035 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo.addons.mail.tests.common import MailCommon
from odoo.tests import tagged, users
from odoo import tools
@tagged('mail_tools')
class TestMailTools(MailCommon):
@classmethod
def setUpClass(cls):
... | 46.803109 | 9,033 |
27,677 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import base64
from datetime import datetime
from unittest.mock import patch
from odoo import Command, fields
from odoo.addons.mail.models.mail_channel import channel_avatar, group_avatar
from odoo.addons.mail.tests.comm... | 51.73271 | 27,677 |
7,738 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo.tests import Form, users
from odoo.exceptions import AccessError
from odoo.addons.mail.tests.common import MailCommon
class TestMailTemplate(MailCommon):
@classmethod
def setUpClass(cls):
supe... | 48.062112 | 7,738 |
2,430 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo.addons.mail.tests.common import MailCommon
from odoo.tests.common import users
class TestResUsersSettings(MailCommon):
@users('employee')
def test_find_or_create_for_user_should_create_record_if_not_... | 44.181818 | 2,430 |
46,102 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import email
import email.policy
import time
from collections import defaultdict
from contextlib import contextmanager
from functools import partial
from lxml import html
from unittest.mock import patch
from smtplib imp... | 47.28 | 46,098 |
8,972 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from uuid import uuid4
from odoo.addons.mail.tests.common import MailCommon, mail_new_test_user
from odoo.tests.common import Form, users
# samples use effective TLDs from the Mozilla public suffix
# list at http://pu... | 47.962567 | 8,969 |
10,614 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo.addons.mail.tests.common import MailCommon
from odoo.exceptions import AccessError
from odoo.tests import Form, tagged, users
from odoo.tools import mute_logger
class TestMailComposer(MailCommon):
@class... | 41.139535 | 10,614 |
12,826 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo.addons.mail.tests.common import mail_new_test_user
from odoo.addons.mail.tests.common import MailCommon
from odoo.exceptions import AccessError, UserError
class TestMailChannelMembers(MailCommon):
@class... | 54.118143 | 12,826 |
8,568 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import json
import odoo
from odoo.tools import mute_logger
from odoo.tests import HttpCase
@odoo.tests.tagged("-at_install", "post_install")
class TestDiscussController(HttpCase):
@classmethod
def setUpClass(c... | 40.225352 | 8,568 |
20,143 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from markupsafe import Markup
from odoo.addons.mail.tests import common
from odoo.exceptions import AccessError
from odoo.tests import tagged, users
@tagged('mail_render')
class TestMailRender(common.MailCommon):
... | 43.225322 | 20,143 |
4,141 | 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
from odoo.addons.mail.tests.common import mail_new_test_user
@odoo.tests.tagged('-at_install', 'post_install')
class TestMailPublicPage(HttpCase):
"""Checks that the invit... | 46.011111 | 4,141 |
31,767 | 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
from odoo.addons.mail.tests.common import MailCommon
from odoo.tests import tagged
from odoo.tests.common import users
from odoo.tools import mute... | 49.869702 | 31,767 |
733 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
from odoo.tests.common import TransactionCase
class TestUpdateNotification(TransactionCase):
def test_user_count(self):
ping_msg = self.env['publisher_warranty.contract'].with_context(active_test=False)._get_message()
user_count = self.env['res.users'].search_count([('activ... | 66.636364 | 733 |
399 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models
class BaseModuleUninstall(models.TransientModel):
_inherit = "base.module.uninstall"
def _get_models(self):
# consider mail-thread models only
models = super(BaseModuleU... | 30.692308 | 399 |
5,689 | 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, _, Command
from odoo.exceptions import UserError
class MailResendMessage(models.TransientModel):
_name = 'mail.resend.message'
_description = 'Email resend wizard'
mai... | 58.05102 | 5,689 |
1,826 | 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 MailResendCancel(models.TransientModel):
_name = 'mail.resend.cancel'
_description = 'Dismiss notification for resend by model'
model = fields.Char(string='Mod... | 49.351351 | 1,826 |
36,799 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import ast
import base64
import re
from odoo import _, api, fields, models, tools, Command
from odoo.exceptions import UserError
from odoo.osv import expression
from odoo.tools import email_re
def _reopen(self, res_id... | 53.331884 | 36,799 |
573 | 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 MergePartnerAutomatic(models.TransientModel):
_inherit = 'base.partner.merge.automatic.wizard'
def _log_merge_operation(self, src_partners, dst_partner):
super(Mer... | 47.75 | 573 |
444 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
from odoo import fields, models
class MailBlacklistRemove(models.TransientModel):
_name = 'mail.blacklist.remove'
_description = 'Remove email from blacklist wizard'
email = fields.Char(name="Email", readonly=True, required=True)
reason = fields.Char(name="Reason")
def a... | 31.714286 | 444 |
4,755 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from lxml import etree
from lxml.html import builder as html
from odoo import _, api, fields, models
from odoo.exceptions import UserError
class Invite(models.TransientModel):
""" Wizard to invite partners (or cha... | 53.426966 | 4,755 |
4,904 | 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 MailTemplatePreview(models.TransientModel):
_name = 'mail.template.preview'
_description = 'Email Template Preview'
_MAIL_TEM... | 55.727273 | 4,904 |
5,508 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import datetime
import logging
import requests
import werkzeug.urls
from ast import literal_eval
from odoo import api, release, SUPERUSER_ID
from odoo.exceptions import UserError
from odoo.models import AbstractModel
... | 44.064 | 5,508 |
2,499 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import fields, models
import requests
class MailIceServer(models.Model):
_name = 'mail.ice.server'
_description = 'ICE server'
server_type = fields.Selection([('stun', 'stun:'), ('turn', 'turn:')... | 43.842105 | 2,499 |
10,962 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from werkzeug.exceptions import NotFound
from odoo import api, fields, models, _
from odoo.exceptions import AccessError
from odoo.osv import expression
class ChannelPartner(models.Model):
_name = 'mail.channel.pa... | 55.363636 | 10,962 |
16,350 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from collections import defaultdict
import itertools
from odoo import api, fields, models, Command
class Followers(models.Model):
""" mail_followers holds the data related to the follow mechanism inside
Odoo. ... | 48.372781 | 16,350 |
2,586 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models, api, _
from odoo.exceptions import AccessError
class IrTranslation(models.Model):
_inherit = 'ir.translation'
@api.model_create_multi
def create(self, vals_list):
translati... | 43.1 | 2,586 |
5,948 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from collections import defaultdict
from dateutil.relativedelta import relativedelta
from odoo import api, fields, models
class MailRtcSession(models.Model):
_name = 'mail.channel.rtc.session'
_description = '... | 45.753846 | 5,948 |
4,313 | 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, _
from odoo.exceptions import UserError
class MailBlackList(models.Model):
""" Model of blacklisted email addresses to stop sending emails."""
_name = 'mail.blacklis... | 40.308411 | 4,313 |
5,261 | 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 IrModel(models.Model):
_inherit = 'ir.model'
_order = 'is_mail_thread DESC, name ASC'
is_mail_thread = fields.Boolean(
... | 45.353448 | 5,261 |
5,133 | 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 api, fields, models
from odoo.exceptions import AccessError
from odoo.tools.translate import _
class MailNotification(models.Model):
_name = 'mail.... | 42.421488 | 5,133 |
4,211 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import pytz
import uuid
from odoo.tools import consteq
from odoo import _, api, fields, models
from odoo.addons.base.models.res_partner import _tz_get
from odoo.exceptions import UserError
class MailGuest(models.Model... | 38.633028 | 4,211 |
1,356 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import odoo
from odoo import models
from odoo.addons.web.controllers.main import HomeStaticTemplateHelpers
from odoo.http import request
class IrHttp(models.AbstractModel):
_inherit = 'ir.http'
def session_inf... | 43.741935 | 1,356 |
11,930 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from lxml.builder import E
from odoo import api, models, tools, _
class BaseModel(models.AbstractModel):
_inherit = 'base'
def _valid_field_parameter(self, field, name):
# allow tracking on abstract m... | 47.34127 | 11,930 |
1,996 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import fields, models
class ResUsersSettingsVolumes(models.Model):
""" Represents the volume of the sound that the user of user_setting_id will receive from partner_id. """
_name = 'res.users.settings... | 53.945946 | 1,996 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.