size int64 0 304k | ext stringclasses 1
value | lang stringclasses 1
value | branch stringclasses 1
value | content stringlengths 0 304k | avg_line_length float64 0 238 | max_line_length int64 0 304k |
|---|---|---|---|---|---|---|
1,576 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': "Sale Product Configurator",
'version': '1.0',
'category': 'Hidden',
'summary': "Configure your products",
'description': """
Technical module installed when the user checks the "module_sale... | 36.651163 | 1,576 |
7,565 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import odoo.tests
from .common import TestProductConfiguratorCommon
@odoo.tests.tagged('post_install', '-at_install', 'kzh')
class TestUi(odoo.tests.HttpCase, TestProductConfiguratorCommon):
def setUp(self):
... | 44.239766 | 7,565 |
4,895 | py | PYTHON | 15.0 | # Part of Odoo. See LICENSE file for full copyright and licensing details.
import base64
from odoo.tests.common import TransactionCase
from odoo.modules.module import get_module_resource
class TestProductConfiguratorCommon(TransactionCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
... | 42.938596 | 4,895 |
1,155 | 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 SaleProductConfigurator(models.TransientModel):
_name = 'sale.product.configurator'
_description = 'Sale Product Configurator'
product_template_id = fields.Many2one(
... | 55 | 1,155 |
473 | 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 SaleOrderLine(models.Model):
_inherit = "sale.order.line"
is_configurable_product = fields.Boolean('Is the product configurable?', related="product_template_id.has_configu... | 43 | 473 |
2,305 | 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 ProductTemplate(models.Model):
_inherit = 'product.template'
_check_company_auto = True
optional_product_ids = fields.Many2many(
'product.template', 'prod... | 53.604651 | 2,305 |
4,306 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import http
from odoo.http import request
class ProductConfiguratorController(http.Controller):
@http.route(['/sale_product_configurator/configure'], type='json', auth="user", methods=['POST'])
def co... | 51.261905 | 4,306 |
691 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'Indian - Point of Sale',
'icon': '/l10n_in/static/description/icon.png',
'version': '1.0',
'description': """GST Point of Sale""",
'category': 'Accounting/Localizations/Point of Sale',
... | 25.592593 | 691 |
1,871 | 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 PosOrder(models.Model):
_inherit = 'pos.order'
#TODO: remove in master
@api.model
def _get_account_move_line_group_data_type_key(self, data_type, values, optio... | 49.236842 | 1,871 |
1,150 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
# Copyright (c) 2010 kazacube (http://kazacube.com).
{
'name': 'Morocco - Accounting',
'author': 'kazacube',
'category': 'Accounting/Localizations/Account Charts',
'description': """
This is the base mod... | 39.241379 | 1,138 |
2,628 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'Belgium - Accounting',
'version': '2.0',
'category': 'Accounting/Localizations/Account Charts',
'description': """
This is the base module to manage the accounting chart for Belgium in Odoo.
==... | 40.430769 | 2,628 |
1,948 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
# Copyright (c) 2011 Noviat nv/sa (www.noviat.be). All rights reserved.
import random
import re
from odoo import api, fields, models, _
from odoo.exceptions import UserError
"""
account.move object: add support for Be... | 38.8 | 1,940 |
382 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import fields, models
class AccountJournal(models.Model):
_inherit = 'account.journal'
invoice_reference_model = fields.Selection(selection_add=[
('be', 'Belgium')
], ondelete={'be': l... | 34.727273 | 382 |
882 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
# Copyright (c) 2011 Noviat nv/sa (www.noviat.be). All rights reserved.
from odoo import api, models
class ResCompany(models.Model):
_inherit = 'res.company'
@api.depends('vat', 'country_id')
def _compute... | 44.1 | 882 |
670 | 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 AccountChartTemplate(models.Model):
_inherit = 'account.chart.template'
@api.model
def _prepare_all_journals(self, acc_template_ref, company, journals_dict=None):... | 39.411765 | 670 |
682 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': "Define Taxes as Python Code",
'summary': "Use python code to define taxes",
'description': """
A tax defined as python code consists of two snippets of python code which are executed in a local env... | 32.47619 | 682 |
2,267 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
from odoo.addons.account.tests.test_tax import TestTaxCommon
from odoo.tests import tagged
@tagged('post_install', '-at_install')
class TestTaxPython(TestTaxCommon):
@classmethod
def setUpClass(cls):
super(TestTaxPython, cls).setUpClass()
cls.python_tax = cls.env['acco... | 37.163934 | 2,267 |
5,156 | 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.safe_eval import safe_eval
from odoo.exceptions import UserError
class AccountTaxPython(models.Model):
_inherit = "account.tax"
amount_type = fields.Selection... | 56.659341 | 5,156 |
288 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'Germany - Sale',
'category': 'Accounting/Localizations',
'depends': [
'l10n_de',
'sale',
],
'auto_install': True,
'license': 'LGPL-3',
}
| 22.153846 | 288 |
2,382 | py | PYTHON | 15.0 | from odoo import models, fields, _
from odoo.tools import format_date
class SaleOrder(models.Model):
_inherit = 'sale.order'
l10n_de_template_data = fields.Binary(compute='_compute_l10n_de_template_data')
l10n_de_document_title = fields.Char(compute='_compute_l10n_de_document_title')
l10n_de_addresse... | 47.64 | 2,382 |
939 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': "Shopper's Wishlist",
'summary': 'Allow shoppers to enlist products',
'description': """
Allow shoppers of your eCommerce store to create personalized collections of products they want to buy and sav... | 32.37931 | 939 |
2,551 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import odoo.tests
@odoo.tests.tagged('-at_install', 'post_install')
class TestUi(odoo.tests.HttpCase):
def test_01_wishlist_tour(self):
self.env['product.template'].search([]).write({'website_published': Fa... | 38.651515 | 2,551 |
3,901 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
from datetime import datetime, timedelta
from odoo import api, fields, models
from odoo.http import request
class ProductWishlist(models.Model):
_name = 'product.wishlist'
_description = 'Product Wishlist'
_sql_constraints = [
("product_unique_partner_id",
"UNIQUE(... | 42.402174 | 3,901 |
475 | py | PYTHON | 15.0 | from odoo import api, fields, models
from odoo.http import request
class ResUsers(models.Model):
_inherit = "res.users"
def _check_credentials(self, password, env):
"""Make all wishlists from session belong to its owner user."""
result = super(ResUsers, self)._check_credentials(password, env)... | 36.538462 | 475 |
2,243 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
from odoo import http
from odoo.http import request
from odoo.addons.website_sale.controllers.main import WebsiteSale
import json
class WebsiteSaleWishlist(WebsiteSale):
@http.route(['/shop/wishlist/add'], type='json', auth="public", website=True)
def add_to_wishlist(self, product_id,... | 38.016949 | 2,243 |
482 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
"name": "Microsoft Outlook",
"version": "1.0",
"category": "Hidden",
"description": "Outlook support for outgoing mail servers",
"depends": [
"mail",
],
"data": [
"views/ir_m... | 25.368421 | 482 |
2,754 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import base64
from odoo import _, api, models
from odoo.exceptions import UserError
class IrMailServer(models.Model):
"""Add the Outlook OAuth authentication on the outgoing mail servers."""
_name = 'ir.mail_... | 41.104478 | 2,754 |
8,568 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import json
import logging
import time
import requests
from werkzeug.urls import url_encode, url_join
from odoo import _, api, fields, models
from odoo.exceptions import AccessError, UserError
from odoo.tools.misc impo... | 43.714286 | 8,568 |
470 | 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'
microsoft_outlook_client_identifier = fields.Char('Outlook Client Id', config_parameter='microso... | 42.727273 | 470 |
2,848 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import json
import logging
import werkzeug
from werkzeug.exceptions import Forbidden
from odoo import http
from odoo.exceptions import UserError
from odoo.http import request
from odoo.tools import consteq
_logger = l... | 37.473684 | 2,848 |
1,652 | py | PYTHON | 15.0 | #-*- coding:utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
# Copyright (c) 2009-2010 Soluciones Tecnologócias Prisma S.A. All Rights Reserved.
# José Rodrigo Fernández Menegazzo, Soluciones Tecnologócias Prisma S.A.
# (http://www.solucionesprisma.com)
#
# This module provides a m... | 36.555556 | 1,645 |
1,571 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
# Copyright (C) 2009 - now Grzegorz Grzelak grzegorz.grzelak@openglobe.pl
{
'name' : 'Poland - Accounting',
'version' : '2.0',
'author' : 'Grzegorz Grzelak (OpenGLOBE)',
'website': 'http://www.openglobe.... | 35.386364 | 1,557 |
290 | py | PYTHON | 15.0 | from openerp.modules.registry import RegistryManager
def migrate(cr, version):
registry = RegistryManager.get(cr.dbname)
from openerp.addons.account.models.chart_template import migrate_set_tags_and_taxes_updatable
migrate_set_tags_and_taxes_updatable(cr, registry, 'l10n_pl')
| 48.333333 | 290 |
1,822 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'Forum',
'category': 'Website/Website',
'sequence': 265,
'summary': 'Manage a forum with FAQ and Q&A',
'version': '1.1',
'description': """
Ask questions, get answers, no distractions
... | 30.366667 | 1,822 |
587 | py | PYTHON | 15.0 | # Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo.addons.base.tests.common import HttpCaseWithUserDemo
from odoo.tests import tagged
@tagged('post_install', '-at_install')
class TestUi(HttpCaseWithUserDemo):
def test_01_admin_forum_tour(self):
self.start_tour("/", 'que... | 34.529412 | 587 |
22,437 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from .common import KARMA, TestForumCommon
from odoo import http
from odoo.addons.http_routing.models.ir_http import slug
from odoo.exceptions import UserError, AccessError
from odoo.tests import HttpCase
from odoo.tools... | 43.908023 | 22,437 |
1,511 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo.addons.website_forum.tests.common import TestForumCommon
class TestForumTag(TestForumCommon):
@classmethod
def setUpClass(cls):
super().setUpClass()
cls.env['forum.tag'].search([]).unl... | 43.171429 | 1,511 |
3,628 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo.tests import common
KARMA = {
'ask': 5, 'ans': 10,
'com_own': 5, 'com_all': 10,
'com_conv_all': 50,
'upv': 5, 'dwv': 10,
'edit_own': 10, 'edit_all': 20,
'close_own': 10, 'close_all': 20... | 37.791667 | 3,628 |
59,089 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import logging
import math
import re
from datetime import datetime
from odoo import api, fields, models, tools, SUPERUSER_ID, _
from odoo.exceptions import UserError, ValidationError, AccessError
from odoo.tools import... | 50.676672 | 59,089 |
1,020 | 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'
create_date = fields.Datetime('Create Date', readonly=True, index=True)
forum_waiting_posts_count = fields.Integer('Wa... | 35.172414 | 1,020 |
1,723 | 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, _
from odoo.addons.http_routing.models.ir_http import url_for
class Website(models.Model):
_inherit = 'website'
@api.model
def get_default_forum_count(self):
s... | 44.179487 | 1,723 |
343 | 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 Challenge(models.Model):
_inherit = 'gamification.challenge'
challenge_category = fields.Selection(selection_add=[
('forum', 'Website / Forum')
], ondelete={'f... | 28.583333 | 343 |
33,445 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import json
import lxml
import requests
import logging
import werkzeug.exceptions
import werkzeug.urls
import werkzeug.wrappers
from datetime import datetime
from odoo import http, tools, _
from odoo.addons.http_routing... | 47.305516 | 33,445 |
841 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'Pakistan - Accounting',
'version': '1.0',
'category': 'Accounting/Localizations/Account Charts',
'description': """ This is the base module to manage chart of accounts and localization for the ... | 33.64 | 841 |
598 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'Dropship and Subcontracting Management',
'version': '0.1',
'category': 'Inventory/Purchase',
'description': """
This bridge module allows to manage subcontracting with the dropshipping... | 29.9 | 598 |
6,670 | 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 TestSubcon... | 49.776119 | 6,670 |
12,700 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo.tests import Form
from odoo.addons.mrp_subcontracting.tests.common import TestMrpSubcontractingCommon
class TestSaleDropshippingFlows(TestMrpSubcontractingCommon):
@classmethod
def setUpClass(cls):
... | 43.34471 | 12,700 |
16,612 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo.tests import Form
from odoo.addons.mrp_subcontracting.tests.common import TestMrpSubcontractingCommon
class TestSubcontractingDropshippingFlows(TestMrpSubcontractingCommon):
def test_mrp_subcontracting_d... | 46.272981 | 16,612 |
1,831 | 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_dropshipping_to_resupply = fields.Boolean(
'Dropship Subcontractors', default=True,
... | 43.595238 | 1,831 |
1,729 | 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.exceptions import UserError
class PurchaseOrder(models.Model):
_inherit = 'purchase.order'
def _get_destination_location(self):
self.ensure_one()
if not sel... | 46.72973 | 1,729 |
1,037 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models
class StockMove(models.Model):
_inherit = "stock.move"
def _is_purchase_return(self):
res = super()._is_purchase_return()
return res or self._is_dropshipped_returned()
... | 37.035714 | 1,037 |
2,118 | 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 ResCompany(models.Model):
_inherit = 'res.company'
def _create_subcontracting_dropshipping_rules(self):
route = self.env.ref('mrp_subcontracting_dropshipping.route_su... | 46 | 2,116 |
3,620 | 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.tools import float_compare
class StockPicking(models.Model):
_inherit = 'stock.picking'
def _compute_is_dropship(self):
dropship_subcontract_pickings = self.filtered(l... | 47.631579 | 3,620 |
534 | py | PYTHON | 15.0 | # -*- encoding: 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 _prepare_purchase_order(self, company_id, origins, values):
if 'partner_id' not in values[0] and company_id.subcontr... | 41.076923 | 534 |
551 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'Google Maps',
'category': 'Website/Website',
'summary': 'Show your company address on Google Maps',
'version': '1.0',
'description': """
Show your company address/partner address on Google M... | 32.411765 | 551 |
2,438 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import http
from odoo.http import request
from odoo.tools.json import scriptsafe
class GoogleMap(http.Controller):
'''
This class generates on-the-fly partner maps that can be reused in every
websi... | 42.034483 | 2,438 |
492 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'United States - Accounting',
'version': '1.1',
'category': 'Accounting/Localizations/Account Charts',
'description': """
United States - Chart of accounts.
==================================
... | 27.333333 | 492 |
654 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import re
from odoo import fields, models, api, _
from odoo.exceptions import ValidationError
class ResPartnerBank(models.Model):
_inherit = 'res.partner.bank'
aba_routing = fields.Char(string="ABA/Routing", h... | 36.333333 | 654 |
1,054 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'Lead Generation',
'summary': 'Generate Leads/Opportunities based on country, industries, size, etc.',
'category': 'Sales/CRM',
'version': '1.2',
'depends': [
'iap_crm',
'iap... | 29.277778 | 1,054 |
3,762 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
from contextlib import contextmanager
from unittest.mock import patch
from odoo import exceptions
from odoo.addons.crm.models.crm_lead import Lead
from odoo.addons.crm_iap_mine.models.crm_iap_lead_mining_request import CRMLeadMiningRequest
from odoo.addons.iap.tests.common import MockIAPEnrich... | 41.340659 | 3,762 |
6,394 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import exceptions
from odoo.addons.crm.tests.common import TestCrmCommon
from odoo.addons.crm_iap_mine.tests.common import MockIAPReveal
from odoo.tests.common import users
class TestLeadMine(TestCrmCommon, M... | 45.014085 | 6,392 |
718 | 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 CrmIapLeadIndustry(models.Model):
""" Industry Tags of Acquisition Rules """
_name = 'crm.iap.lead.industry'
_description = 'CRM IAP Lead Industry'
_order = 'sequen... | 34.190476 | 718 |
1,190 | 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 PeopleRole(models.Model):
""" CRM Reveal People Roles for People """
_name = 'crm.iap.lead.role'
_description = 'People Role'
name = fields.Char(string='Role ... | 30.512821 | 1,190 |
15,788 | 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, _
from odoo.addons.iap.tools import iap_tools
from odoo.exceptions import UserError
_logger = logging.getLogger(__name__)
DEFAULT_ENDPOINT = 'https://iap-services.o... | 46.572271 | 15,788 |
305 | 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 Lead(models.Model):
_inherit = 'crm.lead'
lead_mining_request_id = fields.Many2one('crm.iap.lead.mining.request', string='Lead Mining Request', index=True)
| 30.5 | 305 |
3,242 | py | PYTHON | 15.0 | from math import floor, log10
from odoo import api, models
class CRMHelpers(models.Model):
_name = 'crm.iap.lead.helpers'
_description = 'Helper methods for crm_iap_mine modules'
@api.model
def notify_no_more_credit(self, service_name, model_name, notification_parameter):
"""
Notify a... | 46.314286 | 3,242 |
645 | 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 PeopleSeniority(models.Model):
""" Seniority for People Rules """
_name = 'crm.iap.lead.seniority'
_description = 'People Seniority'
name = fields.Char(string... | 30.714286 | 645 |
995 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
{
'name': 'Belgium - E-Invoicing (UBL 2.0, e-fff)',
'icon': '/l10n_be/static/description/icon.png',
'version': '0.1',
'category': 'Accounting/Localizations/EDI',
'summary': 'E-Invoicing, Universal Business Language (UBL 2.0), e-fff protocol',
'description': """
Universal ... | 41.458333 | 995 |
8,203 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
import base64
import io
from PyPDF2 import PdfFileWriter, PdfFileReader
from odoo.addons.account_edi.tests.common import AccountEdiTestCommon
from odoo.tests import tagged
@tagged('post_install_l10n', 'post_install', '-at_install')
class TestUBLBE(AccountEdiTestCommon):
@classmethod
... | 43.62234 | 8,201 |
8,898 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
from odoo.addons.account_edi.tests.common import AccountEdiTestCommon
from odoo.tests import tagged
from odoo import Command
@tagged('post_install_l10n', 'post_install', '-at_install')
class TestL10nBeEdi(AccountEdiTestCommon):
@classmethod
def setUpClass(cls, chart_template_ref='l10n... | 43.194175 | 8,898 |
375 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
from odoo import models
import re
class AccountMove(models.Model):
_inherit = 'account.move'
def _get_efff_name(self):
self.ensure_one()
vat = self.company_id.partner_id.commercial_partner_id.vat
return 'efff_%s%s%s' % (vat or '', '_' if vat else '', re.sub(r... | 26.785714 | 375 |
2,500 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
from odoo import models
import base64
import markupsafe
class AccountEdiFormat(models.Model):
_inherit = 'account.edi.format'
####################################################
# Export
####################################################
def _get_efff_values(self, in... | 39.0625 | 2,500 |
2,648 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models
from lxml import etree
import base64
from xml.sax.saxutils import escape, quoteattr
class IrActionsReport(models.Model):
_inherit = 'ir.actions.report'
def _postprocess_pdf_report(self... | 49.962264 | 2,648 |
621 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'Pad on tasks',
'category': 'Services/Project',
'description': """
This module adds a PAD in all project form views.
=================================================
""",
'depends': [
... | 23.884615 | 621 |
2,079 | 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 ProjectTask(models.Model):
_name = "project.task"
_inherit = ["project.task", 'pad.common']
_description = 'Task'
description_pad = fields.Char('Pad URL', pad... | 40.764706 | 2,079 |
511 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': "Sale - SMS",
'summary': "Ease SMS integration with sales capabilities",
'description': "Ease SMS integration with sales capabilities",
'category': 'Hidden',
'version': '1.0',
'depends':... | 28.388889 | 511 |
1,326 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'Purchase Stock',
'version': '1.2',
'category': 'Inventory/Purchase',
'sequence': 60,
'summary': 'Purchase Orders, Receipts, Vendor Bills for Stock',
'description': "",
'depends': ['... | 31.571429 | 1,326 |
1,175 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import logging
from odoo import models
from odoo.tools import populate, groupby
_logger = logging.getLogger(__name__)
class PurchaseOrder(models.Model):
_inherit = "purchase.order"
_populate_dependencies = [... | 39.166667 | 1,175 |
20,378 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from datetime import datetime, timedelta, time
from unittest.mock import patch
from odoo import fields
from .common import PurchaseTestCommon
from odoo.tests.common import Form
class TestPurchaseLeadTime(PurchaseTestC... | 56.448753 | 20,378 |
15,369 | 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
from odoo.addons.mail.tests.common import mail_new_test_user
from odoo.addons.stock.tests.test_report import TestReportsCommon
class TestPurchaseStockReports(TestReportsCommon):
d... | 42.455801 | 15,369 |
44,598 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from datetime import datetime as dt
from datetime import timedelta as td
from freezegun import freeze_time
from odoo import SUPERUSER_ID
from odoo.tests import Form, tagged
from odoo.tests.common import TransactionCase
... | 48.264069 | 44,596 |
17,744 | 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
import time
@tagged('-at_install', 'post_install')
clas... | 48.472678 | 17,741 |
29,757 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from datetime import date, datetime, timedelta
from odoo.addons.mail.tests.common import mail_new_test_user
from odoo.addons.product.tests import common
from odoo.tests import Form
from odoo.tools import DEFAULT_SERVER_... | 46.278383 | 29,757 |
6,607 | 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 TestAccruedPurchaseStock(AccountTestInvoicingCommon):
@classmetho... | 43.183007 | 6,607 |
1,751 | py | PYTHON | 15.0 | from odoo.tests.common import TransactionCase, Form
class TestRoutes(TransactionCase):
def test_allow_rule_creation_for_route_without_company(self):
self.env['res.config.settings'].write({
'group_stock_adv_location': True,
'group_stock_multi_locations': True,
})
w... | 33.037736 | 1,751 |
1,709 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo.exceptions import UserError
from .common import PurchaseTestCommon
class TestDeleteOrder(PurchaseTestCommon):
def test_00_delete_order(self):
''' Testcase for deleting purchase order with purchas... | 40.690476 | 1,709 |
2,135 | py | PYTHON | 15.0 | from .common import PurchaseTestCommon
class TestPurchaseOrderProcess(PurchaseTestCommon):
def test_00_cancel_purchase_order_flow(self):
""" Test cancel purchase order with group user."""
# In order to test the cancel flow,start it from canceling confirmed purchase order.
purchase_order ... | 38.125 | 2,135 |
20,609 | 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.common import Form, tagged
from odoo import fields
from freezegun import free... | 45.797778 | 20,609 |
2,501 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
from datetime import timedelta
from odoo import fields
from odoo.addons.stock.tests.common2 import TestStockCommon
from odoo import tools
from odoo.modules.module import get_module_resource
class PurchaseTestCommon(TestStockCommon):
def _create_make_procurement(self, product, product_qty... | 43.12069 | 2,501 |
29,295 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import re
from datetime import datetime, timedelta
from freezegun import freeze_time
from odoo.tools import DEFAULT_SERVER_DATETIME_FORMAT
from odoo.addons.stock_account.tests.test_anglo_saxon_valuation_reconciliation_co... | 46.496825 | 29,293 |
3,978 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
import time
from odoo.tests import tagged, Form
from odoo.addons.stock_account.tests.test_anglo_saxon_valuation_reconciliation_common import ValuationReconciliationTestCommon
@tagged('-at_install', 'post_install')
class TestFifoReturns(ValuationReconciliationTestCommon):
def test_fifo_r... | 44.674157 | 3,976 |
911 | py | PYTHON | 15.0 | from odoo.tests.common import TransactionCase
class TestProductTemplate(TransactionCase):
def test_name_search(self):
partner = self.env['res.partner'].create({
'name': 'Azure Interior',
})
seller = self.env['product.supplierinfo'].create({
'name': partner.id,
'price': 1... | 35.038462 | 911 |
5,474 | 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 fields
from odoo.tests.common import TransactionCase, Form
from odoo.tools import DEFAULT_SERVER_DATETIME_FORMAT
class TestOnchangeProductId(TransactionCase):
"""Test ... | 45.239669 | 5,474 |
6,544 | 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
import time
@tagged('-at_install', 'post_install')
clas... | 49.5 | 6,534 |
10,181 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo.addons.stock.tests.common import TestStockCommon
class TestReplenishWizard(TestStockCommon):
def setUp(self):
super(TestReplenishWizard, self).setUp()
self.vendor = self.env['res.partner'].... | 40.88755 | 10,181 |
66,777 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import time
from datetime import datetime
from unittest.mock import patch
from odoo import fields
from odoo.tests import Form
from odoo.tests.common import TransactionCase, tagged
from odoo.addons.account.tests.common i... | 42.723608 | 66,777 |
15,288 | 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 .common import PurchaseTestCommon
class TestMoveCancelPropagation(PurchaseTestCommon):
def setUp(self):
super(TestMoveCancelPropagation, self).setUp()
self.custome... | 52.177474 | 15,288 |
709 | 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 StockReplenishmentInfo(models.TransientModel):
_inherit = 'stock.replenishment.info'
_description = 'Stock supplier replenishment information'
supplierinfo_id = f... | 37.315789 | 709 |
32,910 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from markupsafe import Markup
from dateutil.relativedelta import relativedelta
from odoo import api, fields, models, SUPERUSER_ID, _
from odoo.tools.float_utils import float_compare, float_is_zero, float_round
from odoo.... | 53.508943 | 32,908 |
17,848 | 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.float_utils import float_round, float_is_zero
from odoo.exceptions import UserError
from odoo.osv.expression import AND
from dateutil.relativedelta import relatived... | 49.303867 | 17,848 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.