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 |
|---|---|---|---|---|---|---|
4,738 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import _, models, SUPERUSER_ID
from odoo.exceptions import AccessError, MissingError, UserError
from odoo.http import request
from odoo.tools import consteq
class IrAttachment(models.Model):
_inherit = 'i... | 48.346939 | 4,738 |
6,556 | 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 MailActivityType(models.Model):
""" Activity Types are used to categorize activities. Each type is a different
kind of activity e.g. call, mail, meeting. An activity c... | 54.181818 | 6,556 |
3,569 | 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 ResUsersSettings(models.Model):
_name = 'res.users.settings'
_description = 'User Settings'
user_id = fields.Many2one('res.users', string="User", required=True, r... | 48.22973 | 3,569 |
5,407 | 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 MailMessageSubtype(models.Model):
""" Class holding subtype definition for messages. Subtypes allow to tune
the follower subscription, allowing only some su... | 49.154545 | 5,407 |
16,481 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import base64
import logging
from odoo import _, api, fields, models, tools, Command
from odoo.exceptions import UserError
_logger = logging.getLogger(__name__)
class MailTemplate(models.Model):
"Templates for s... | 49.492492 | 16,481 |
1,006 | 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 MailShortcode(models.Model):
""" Shortcode
Canned Responses, allowing the user to defined shortcuts in its message. Should be applied before storing message in database... | 52.947368 | 1,006 |
584 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
from odoo import fields, models
class BusPresence(models.Model):
_inherit = ['bus.presence']
guest_id = fields.Many2one('mail.guest', 'Guest', ondelete='cascade')
def init(self):
self.env.cr.execute("CREATE UNIQUE INDEX IF NOT EXISTS bus_presence_guest_unique ON %s (gues... | 36.5 | 584 |
28,692 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import babel
import copy
import logging
import re
from lxml import html
from markupsafe import Markup
from werkzeug import urls
from odoo import _, api, fields, models, tools
from odoo.addons.base.models.qweb import QW... | 46.729642 | 28,692 |
970 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models
class ResGroups(models.Model):
""" Update of res.groups class
- if adding users from a group, check mail.channels linked to this user
group and subscribe them. This is done... | 42.173913 | 970 |
5,651 | 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 AliasMixin(models.AbstractModel):
""" A mixin for models that inherits mail.alias. This mixin initializes the
... | 41.248175 | 5,651 |
150,913 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import ast
import base64
import datetime
import dateutil
import email
import email.policy
import hashlib
import hmac
import lxml
import logging
import pytz
import re
import time
import threading
from collections import ... | 52.309532 | 150,913 |
183 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
from odoo import fields, models
class View(models.Model):
_inherit = 'ir.ui.view'
type = fields.Selection(selection_add=[('activity', 'Activity')])
| 22.875 | 183 |
1,778 | 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, tools
class Company(models.Model):
_name = 'res.company'
_inherit = 'res.company'
catchall_email = fields.Char(string="Catchall Email", compute="_compute_catchall")
... | 44.45 | 1,778 |
1,363 | 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 MailMessageReaction(models.Model):
_name = 'mail.message.reaction'
_description = 'Message Reaction'
_order = 'id desc'
_log_access = False
message_id = fields... | 56.791667 | 1,363 |
1,193 | 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 IrModelField(models.Model):
_inherit = 'ir.model.fields'
tracking = fields.Integer(
string="Enable Ordered Tracking",
help="If set every modification done ... | 37.28125 | 1,193 |
5,704 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from datetime import datetime
from odoo import api, fields, models
class MailTracking(models.Model):
_name = 'mail.tracking.value'
_description = 'Mail Tracking Value'
_rec_name = 'field'
_order = 'tra... | 47.140496 | 5,704 |
32,351 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import pytz
from collections import defaultdict
from datetime import date, datetime
from dateutil.relativedelta import relativedelta
from odoo import api, exceptions, fields, models, _, Command
from odoo.osv import exp... | 50.627543 | 32,351 |
1,799 | 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 IrConfigParameter(models.Model):
_inherit = 'ir.config_parameter'
@api.model_create_multi
def create(self, vals_list):
for vals in vals_list:
if vals.... | 46.128205 | 1,799 |
13,984 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import ast
import re
from markupsafe import Markup
from odoo import _, api, fields, models
from odoo.exceptions import ValidationError, UserError
from odoo.tools import is_html_empty, remove_accents
# see rfc5322 sect... | 51.792593 | 13,984 |
2,116 | 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 MailCCMixin(models.AbstractModel):
_name = 'mail.thread.cc'
_inherit = 'mail.thread'
_description = 'Email CC management'
email_cc = fields.Char('Em... | 42.32 | 2,116 |
9,420 | 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 _, api, exceptions, fields, models, modules
from odoo.addons.base.models.res_users import is_selection_groups
class Users(models.Model):
""" Update of res.users... | 49.319372 | 9,420 |
4,147 | 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 MailComposerMixin(models.AbstractModel):
""" Mixin used to edit and render some fields used when sending emails or
notifications based on a mail template.
... | 44.591398 | 4,147 |
2,070 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import datetime
from odoo import api, fields, models, tools
class ResConfigSettings(models.TransientModel):
""" Inherit the base settings to add a counter of failed email + configure
the alias domain. """
... | 39.807692 | 2,070 |
261 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
from odoo import fields, models
class ActWindowView(models.Model):
_inherit = 'ir.actions.act_window.view'
view_mode = fields.Selection(selection_add=[
('activity', 'Activity')
], ondelete={'activity': 'cascade'})
| 26.1 | 261 |
23,160 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from datetime import datetime
import logging
import pytz
from odoo import api, fields, models
from odoo.osv import expression
_logger = logging.getLogger(__name__)
class MailActivityMixin(models.AbstractModel):
... | 45.770751 | 23,160 |
26,573 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import ast
import base64
import datetime
import logging
import psycopg2
import smtplib
import threading
import re
import pytz
from collections import defaultdict
from dateutil.parser import parse
from odoo import _, ap... | 51.003839 | 26,573 |
7,174 | 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 UserError, ValidationError
class ServerActions(models.Model):
""" Add email option in server act... | 48.802721 | 7,174 |
55,983 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import logging
import re
from collections import defaultdict
from binascii import Error as binascii_error
from odoo import _, api, Command, fields, models, modules, tools
from odoo.exceptions import AccessError
from od... | 50.299191 | 55,983 |
11,736 | 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.addons.bus.models.bus_presence import AWAY_TIMER
from odoo.addons.bus.models.bus_presence import DISCONNECTION_TIMER
from odoo.osv import expression
class Partne... | 46.944 | 11,736 |
5,948 | 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 AccessError, UserError
class MailBlackListMixin(models.AbstractModel):
""" Mixin that is inherited by all model with opt out. This mixin st... | 47.206349 | 5,948 |
66,253 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import base64
import logging
from collections import defaultdict
from hashlib import sha512
from secrets import choice
from odoo import _, api, fields, models, tools, Command
from odoo.addons.base.models.avatar_mixin im... | 53.215261 | 66,253 |
1,868 | py | PYTHON | 15.0 | #!/usr/bin/env python2
# Part of Odoo. See LICENSE file for full copyright and licensing details.
#
# odoo-mailgate
#
# This program will read an email from stdin and forward it to odoo. Configure
# a pipe alias in your mail server to use it, postfix uses a syntax that looks
# like:
#
# email@address: "|/home/odoo/src/... | 40.608696 | 1,868 |
7,723 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import logging
from werkzeug.urls import url_encode
from odoo import http
from odoo.exceptions import AccessError
from odoo.http import request
from odoo.tools import consteq
_logger = logging.getLogger(__name__)
cl... | 46.245509 | 7,723 |
1,628 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
import ipaddress
from odoo import _, SUPERUSER_ID
from odoo.http import request
from odoo.addons.web.controllers import main as web
def _admin_password_warn(uid):
""" Admin still has `admin` password, flash a message via chatter.
Uses a private mail.channel from the system (/ odoobot)... | 38.761905 | 1,628 |
3,377 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import SUPERUSER_ID, tools
from odoo.http import request, route
from odoo.addons.bus.controllers.main import BusController
class MailChatController(BusController):
def _default_request_uid(self):
... | 46.902778 | 3,377 |
35,481 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import json
from collections import defaultdict
from datetime import datetime, timedelta
from psycopg2 import IntegrityError
from psycopg2.errorcodes import UNIQUE_VIOLATION
from odoo import http
from odoo.exceptions im... | 59.531879 | 35,481 |
1,650 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'Sales and Warehouse Management',
'version': '1.0',
'category': 'Hidden',
'summary': 'Quotation, Sales Orders, Delivery & Invoicing Control',
'description': """
Manage sales quotations and o... | 31.730769 | 1,650 |
1,871 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
from odoo.addons.sale_stock.tests.test_anglo_saxon_valuation_reconciliation import TestValuationReconciliation
from odoo.tests import tagged
@tagged('post_install', '-at_install')
class TestAngloSaxonAccounting(TestValuationReconciliation):
def test_cogs_should_use_price_from_the_right_com... | 51.972222 | 1,871 |
6,545 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
from odoo import fields, Command
from odoo.addons.account.tests.common import AccountTestInvoicingCommon
from odoo.tests import tagged, Form
from odoo.exceptions import UserError
@tagged('post_install', '-at_install')
class TestAccruedStockSaleOrders(AccountTestInvoicingCommon):
@classmet... | 43.344371 | 6,545 |
2,084 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo.tests import HttpCase, tagged, Form
from odoo.addons.sale.tests.common import TestSaleCommon
from odoo.addons.mail.tests.common import mail_new_test_user
@tagged('post_install', '-at_install')
class TestContr... | 41.68 | 2,084 |
75,965 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo.tests import Form, tagged
from odoo.addons.stock_account.tests.test_anglo_saxon_valuation_reconciliation_common import ValuationReconciliationTestCommon
from odoo.exceptions import UserError
@tagged('post_ins... | 44.976317 | 75,965 |
6,814 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo.addons.stock_account.tests.test_anglo_saxon_valuation_reconciliation_common import ValuationReconciliationTestCommon
from odoo.tests import Form, tagged
@tagged('post_install', '-at_install')
class TestValuati... | 46.671233 | 6,814 |
3,782 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo.addons.stock_account.tests.test_anglo_saxon_valuation_reconciliation_common import ValuationReconciliationTestCommon
from odoo.addons.sale.tests.common import TestSaleCommon
from odoo.tests import tagged
@tagg... | 43.976744 | 3,782 |
21,520 | 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.tools import html2plaintext
from odoo.tests.common import Form, tagged
from odoo.addons.stock.tests.test_report import TestReportsCommon
from odoo.addons.sale.tests.com... | 45.690021 | 21,520 |
75,272 | 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.addons.stock_account.tests.test_anglo_saxon_valuation_reconciliation_common import ValuationReconciliationTestCommon
from odoo.addons.sale.tests.common import TestSaleCo... | 48.656755 | 75,272 |
11,568 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo.addons.stock_account.tests.test_anglo_saxon_valuation_reconciliation_common import ValuationReconciliationTestCommon
from odoo.addons.sale.tests.common import TestSaleCommon
from odoo import fields
from odoo.tes... | 58.130653 | 11,568 |
5,853 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo.addons.stock_account.tests.test_anglo_saxon_valuation_reconciliation_common import ValuationReconciliationTestCommon
from datetime import timedelta
from odoo import fields
from odoo.tests import common, tagged
... | 50.895652 | 5,853 |
467 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models
class SaleAdvancePaymentInv(models.TransientModel):
_inherit = "sale.advance.payment.inv"
def _prepare_invoice_values(self, order, name, amount, so_line):
invoice_vals = super()... | 35.923077 | 467 |
553 | 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 SaleOrderCancel(models.TransientModel):
_inherit = 'sale.order.cancel'
display_delivery_alert = fields.Boolean('Delivery Alert', compute='_compute_display_delivery_al... | 36.866667 | 553 |
594 | 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 StockRulesReport(models.TransientModel):
_inherit = 'stock.rules.report'
so_route_ids = fields.Many2many('stock.location.route', string='Apply specific routes',
... | 37.125 | 594 |
8,367 | 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.tools import float_is_zero, float_compare
from odoo.tools.misc import formatLang
class AccountMove(models.Model):
_inherit = 'account.m... | 60.194245 | 8,367 |
32,378 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import json
import logging
from datetime import timedelta
from collections import defaultdict
from odoo import api, fields, models, _
from odoo.tools import float_compare, float_round
from odoo.exceptions import UserErr... | 53.517355 | 32,378 |
631 | 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 ProductTemplate(models.Model):
_inherit = 'product.template'
@api.onchange('type')
def _onchange_type(self):
""" We want to prevent storable product to be expense... | 33.210526 | 631 |
7,705 | 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 api, fields, models, _
from odoo.tools.sql import column_exists, create_column
class StockLocationRoute(models.Model):
_inherit = "stock.location.route"
sal... | 42.569061 | 7,705 |
559 | 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 company(models.Model):
_inherit = 'res.company'
security_lead = fields.Float(
'Sales Safety Days', default=0.0, required=True,
help="Margin of error for da... | 37.266667 | 559 |
951 | 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 Users(models.Model):
_inherit = ['res.users']
property_warehouse_id = fields.Many2one('stock.warehouse', string='Default Warehouse', company_dependent=True, check_company=... | 38.04 | 951 |
1,220 | 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'
security_lead = fields.Float(related='company_id.security_lead', string="Security Lead Time... | 50.833333 | 1,220 |
476 | 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 ReportStockRule(models.AbstractModel):
_inherit = 'report.stock.report_stock_rule'
@api.model
def _get_routes(self, data):
res = super(ReportStockRule, self)._get... | 31.733333 | 476 |
1,677 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models
class ReplenishmentReport(models.AbstractModel):
_inherit = 'report.stock.report_product_product_replenishment'
def _compute_draft_quantity_count(self, product_template_ids, product_var... | 49.323529 | 1,677 |
598 | 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 SaleReport(models.Model):
_inherit = "sale.report"
warehouse_id = fields.Many2one('stock.warehouse', 'Warehouse', readonly=True)
def _group_by_sale(self, groupby=''):... | 31.473684 | 598 |
1,748 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import exceptions, SUPERUSER_ID
from odoo.addons.sale.controllers.portal import CustomerPortal
from odoo.http import request, route
from odoo.tools import consteq
class SaleStockPortal(CustomerPortal):
d... | 46 | 1,748 |
506 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'pos_sale_margin',
'version': '1.1',
'category': 'Hidden',
'summary': 'Link module between Point of Sale and Sales Margin',
'description': """
This module adds enable you to view the margi... | 28.111111 | 506 |
1,421 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import odoo
from odoo.addons.point_of_sale.tests.common import TestPoSCommon
@odoo.tests.tagged('post_install', '-at_install')
class TestPoSSaleMarginReport(TestPoSCommon):
def setUp(self):
super(TestPoSSa... | 33.046512 | 1,421 |
489 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models
class SaleReport(models.Model):
_inherit = "sale.report"
def _select_pos(self, fields=None):
if not fields:
fields = {}
fields['margin'] = ', SUM(l.price_sub... | 34.928571 | 489 |
524 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'Partners Geolocation',
'version': '2.1',
'category': 'Hidden/Tools',
'description': """
Partners Geolocation
========================
""",
'depends': ['base_setup'],
'data': [
... | 26.2 | 524 |
1,553 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo.tests import TransactionCase
from odoo.exceptions import UserError
import odoo.tests
@odoo.tests.tagged('external', '-standard')
class TestGeoLocalize(TransactionCase):
def test_default_openstreetmap(sel... | 44.371429 | 1,553 |
6,731 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import requests
import logging
from odoo import api, fields, models, tools, _
from odoo.exceptions import UserError
_logger = logging.getLogger(__name__)
class GeoProvider(models.Model):
_name = "base.geo_provide... | 42.06875 | 6,731 |
807 | 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'
geoloc_provider_id = fields.Many2one(
'base.geo_provider',
string='API',
... | 38.428571 | 807 |
2,255 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import api, fields, models
from odoo.tools import config
class ResPartner(models.Model):
_inherit = "res.partner"
date_localization = fields.Date(string='Geolocation Date')
def write(self, vals)... | 42.54717 | 2,255 |
650 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'Landed Costs On MO',
'version': '1.0',
'summary': 'Landed Costs on Manufacturing Order',
'description': """
This module allows you to easily add extra costs on manufacturing order
and decide t... | 32.5 | 650 |
8,752 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo.addons.stock_account.tests.test_anglo_saxon_valuation_reconciliation_common import ValuationReconciliationTestCommon
from odoo.tests import tagged, Form
@tagged('post_install', '-at_install')
class TestStockLa... | 49.168539 | 8,752 |
896 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import fields, models, api
class StockLandedCost(models.Model):
_inherit = 'stock.landed.cost'
target_model = fields.Selection(selection_add=[
('manufacturing', "Manufacturing Orders")
],... | 37.333333 | 896 |
26,028 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'Web',
'category': 'Hidden',
'version': '1.0',
'description': """
Odoo Web core module.
========================
This module provides the core of the Odoo Web Client.
""",
'depends': ['base... | 49.009416 | 26,024 |
2,729 | py | PYTHON | 15.0 | # Part of Odoo. See LICENSE file for full copyright and licensing details.
import logging
import time
import odoo
import odoo.tests
from odoo.modules.module import read_manifest
from odoo.tools import mute_logger
_logger = logging.getLogger(__name__)
class TestAssetsGenerateTimeCommon(odoo.tests.TransactionCase):... | 39.550725 | 2,729 |
41,844 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import random
import re
from unittest.mock import patch
import textwrap
from datetime import datetime, timedelta
from lxml import etree
import logging
from odoo.tests.common import BaseCase, HttpCase, tagged
from odoo.t... | 40.863281 | 41,844 |
3,561 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import io
import base64
from PIL import Image
from odoo.http import content_disposition
from odoo.tests.common import HttpCase, tagged
@tagged('-at_install', 'post_install')
class TestImage(HttpCase):
def test_01... | 42.903614 | 3,561 |
1,801 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import re
import odoo.tests
RE_ONLY = re.compile(r'QUnit\.(only|debug)\(')
@odoo.tests.tagged('post_install', '-at_install')
class WebSuite(odoo.tests.HttpCase):
def test_js(self):
# webclient desktop tes... | 39.152174 | 1,801 |
2,433 | py | PYTHON | 15.0 | # -*- encoding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import json
from uuid import uuid4
from odoo import Command
from odoo.tests import common
class TestSessionInfo(common.HttpCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
cls.com... | 37.430769 | 2,433 |
1,503 | py | PYTHON | 15.0 | from odoo.tests.common import HttpCase
class LoadMenusTests(HttpCase):
def setUp(self):
super().setUp()
self.menu = self.env["ir.ui.menu"].create({
"name": "test_menu",
"parent_id": False,
})
def search(*args, **kwargs):
return self.menu
... | 28.358491 | 1,503 |
5,381 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import datetime
import json
from unittest.mock import patch
from odoo.tools import mute_logger
from odoo.tests.common import HttpCase, tagged
class ProfilingHttpCase(HttpCase):
@classmethod
def setUpClass(cls... | 49.366972 | 5,381 |
6,942 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo.tests import common
@common.tagged('post_install', '-at_install')
class TestReadProgressBar(common.TransactionCase):
"""Test for read_progress_bar"""
def setUp(self):
super(TestReadProgressBar... | 43.936709 | 6,942 |
1,714 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo.tests.common import BaseCase
from ..controllers import main
class ActionMungerTest(BaseCase):
def test_actual_treeview(self):
action = {
"views": [[False, "tree"], [False, "form"],
... | 31.163636 | 1,714 |
415 | py | PYTHON | 15.0 | # Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo.tests import HttpCase
class TestWebController(HttpCase):
def test_health(self):
response = self.url_open('/web/health')
self.assertEqual(response.status_code, 200)
payload = response.json()
self.a... | 34.583333 | 415 |
2,060 | py | PYTHON | 15.0 | # Part of Odoo. See LICENSE file for full copyright and licensing details.
import logging
import odoo.tests
_logger = logging.getLogger(__name__)
@odoo.tests.tagged('click_all', 'post_install', '-at_install', '-standard')
class TestMenusAdmin(odoo.tests.HttpCase):
def test_01_click_everywhere_as_admin(self):
... | 47.906977 | 2,060 |
10,352 | py | PYTHON | 15.0 | import os
from PIL import Image
from functools import partial
from odoo.tests import TransactionCase, tagged, Form
from odoo.tools import frozendict, image_to_base64, hex_to_rgb
dir_path = os.path.dirname(os.path.realpath(__file__))
_file_cache = {}
class TestBaseDocumentLayoutHelpers(TransactionCase):
#
#... | 43.495798 | 10,352 |
9,541 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import base64
import hashlib
import json
import odoo
from odoo import api, http, models
from odoo.http import request
from odoo.tools import file_open, image_process, ustr
from odoo.addons.web.controllers.main import H... | 49.692708 | 9,541 |
35,081 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
import babel.dates
import pytz
from lxml import etree
import base64
import json
from odoo import _, _lt, api, fields, models
from odoo.osv.expression import AND, TRUE_DOMAIN, normalize_domain
from odoo.tools import date_utils, lazy
from odoo.tools.misc import get_lang
from odoo.exceptions impor... | 42.729598 | 35,081 |
14,255 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
import markupsafe
from markupsafe import Markup
from odoo import api, fields, models, tools
from odoo.addons.base.models.ir_qweb_fields import nl2br
from odoo.modules import get_resource_path
try:
import sass as libsass
except ImportError:
# If the `sass` python library isn't found, w... | 45.983871 | 14,255 |
2,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 IrUiMenu(models.Model):
_inherit = "ir.ui.menu"
def load_web_menus(self, debug):
""" Loads all menu items (all applications and their sub-menus) and
processes them... | 38.387097 | 2,380 |
4,369 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import hashlib
from collections import OrderedDict
from werkzeug.urls import url_quote
from markupsafe import Markup
from odoo import api, models
from odoo.tools import pycompat
from odoo.tools import html_escape as esc... | 37.34188 | 4,369 |
7,829 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
#
# py.js documentation build configuration file, created by
# sphinx-quickstart on Sun Sep 9 19:36:23 2012.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All c... | 31.696356 | 7,829 |
89,434 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import base64
import copy
import datetime
import functools
import hashlib
import io
import itertools
import json
import logging
import operator
import os
import re
import sys
import tempfile
import unicodedata
from colle... | 43.94742 | 89,433 |
4,740 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from collections import deque
import io
import json
from odoo import http, _
from odoo.http import content_disposition, request
from odoo.tools import ustr, osutil
from odoo.tools.misc import xlsxwriter
class TableExp... | 42.702703 | 4,740 |
1,570 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import json
from odoo.exceptions import UserError
from odoo.http import Controller, request, Response, route
class Profiling(Controller):
@route('/web/set_profiling', type='http', auth='public', sitemap=False)
... | 46.176471 | 1,570 |
656 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'Indian - Sale Report(GST)',
'icon': '/l10n_in/static/description/icon.png',
'version': '1.0',
'description': """GST Sale Report""",
'category': 'Accounting/Localizations/Sale',
'depends... | 25.230769 | 656 |
737 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models
class SaleAdvancePaymentInv(models.TransientModel):
_inherit = "sale.advance.payment.inv"
def _prepare_invoice_values(self, order, name, amount, so_line):
res = super()._prepare... | 40.944444 | 737 |
507 | 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 AccountMove(models.Model):
_inherit = "account.move"
def _l10n_in_get_shipping_partner(self):
shipping_partner = super()._l10n_in_get_shipping_partner()
retur... | 31.6875 | 507 |
3,187 | 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 SaleOrder(models.Model):
_inherit = "sale.order"
l10n_in_reseller_partner_id = fields.Many2one('res.partner',
string='Reseller', domain="[('vat', '!=', False)... | 56.910714 | 3,187 |
809 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import api, fields, models, _
from odoo.exceptions import ValidationError
class ResPartner(models.Model):
_inherit = 'res.partner'
l10n_in_shipping_gstin = fields.Char("Shipping GSTIN")
@api.con... | 44.944444 | 809 |
497 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models
class L10nInExemptedReport(models.Model):
_inherit = "l10n_in.exempted.report"
def _from(self):
from_str = super(L10nInExemptedReport, self)._from()
from_str += """ AND ... | 33.133333 | 497 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.