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 |
|---|---|---|---|---|---|---|
11,173 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
from odoo.exceptions import ValidationError
from odoo.tests import common
class TestBarcodeNomenclature(common.TransactionCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
# Creates an empty nomenclature (rules will be added in the tests).
cls.nomenc... | 44.871486 | 11,173 |
1,045 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
from odoo import models, fields, api
class BarcodeEventsMixin(models.AbstractModel):
""" Mixin class for objects reacting when a barcode is scanned in their form views
which contains `<field name="_barcode_scanned" widget="barcode_handler"/>`.
Models using this mixin must i... | 41.8 | 1,045 |
513 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models
class IrHttp(models.AbstractModel):
_inherit = 'ir.http'
def session_info(self):
res = super(IrHttp, self).session_info()
if self.env.user.has_group('base.group_user'):
... | 34.2 | 513 |
6,348 | py | PYTHON | 15.0 | import re
from odoo import models, fields, api
UPC_EAN_CONVERSIONS = [
('none', 'Never'),
('ean2upc', 'EAN-13 to UPC-A'),
('upc2ean', 'UPC-A to EAN-13'),
('always', 'Always'),
]
class BarcodeNomenclature(models.Model):
_name = 'barcode.nomenclature'
_description = 'Barcode Nomenclature'
... | 44.391608 | 6,348 |
409 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
from odoo import models, fields
class ResCompany(models.Model):
_inherit = 'res.company'
def _get_default_nomenclature(self):
return self.env.ref('barcodes.default_barcode_nomenclature', raise_if_not_found=False)
nomenclature_id = fields.Many2one(
'barcode.nomenc... | 25.5625 | 409 |
2,411 | py | PYTHON | 15.0 | import re
from odoo import models, fields, api, _
from odoo.exceptions import ValidationError
class BarcodeRule(models.Model):
_name = 'barcode.rule'
_description = 'Barcode Rule'
_order = 'sequence asc, id'
name = fields.Char(string='Rule Name', size=32, required=True, help='An internal identificat... | 56.069767 | 2,411 |
653 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
# Copyright (C) 2018-now jeffery9@gmail.com
{
'name': 'China - City Data',
'version': '1.8',
'icon': '/l10n_cn/static/description/icon.png',
'category': 'Accounting/Localizations',
'author': 'Jeffery... | 28.043478 | 645 |
1,236 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'Event Meeting / Rooms',
'category': 'Marketing/Events',
'sequence': 1002,
'version': '1.0',
'summary': 'Event: meeting and chat rooms',
'website': 'https://www.odoo.com/app/events',
... | 32.526316 | 1,236 |
3,475 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo.addons.event.tests.common import TestEventCommon
from odoo.tests import Form
class TestWebsiteEventMeet(TestEventCommon):
def test_meeting_room_create(self):
"""Test that the field of the mixin ar... | 45.723684 | 3,475 |
605 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import api, fields, models
class EventType(models.Model):
_inherit = "event.type"
meeting_room_allow_creation = fields.Boolean(
"Allow Room Creation", compute='_compute_meeting_room_allow_cre... | 33.611111 | 605 |
2,414 | 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 Event(models.Model):
_inherit = "event.event"
meeting_room_ids = fields.One2many("event.meeting.room", "event_id", string="Meeting rooms")
meeting_room_count = fi... | 46.423077 | 2,414 |
352 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import fields, models
class EventMenu(models.Model):
_inherit = "website.event.menu"
menu_type = fields.Selection(
selection_add=[("meeting_room", "Event Meeting Room Menus")],
ondele... | 29.333333 | 352 |
2,233 | 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
from odoo.addons.http_routing.models.ir_http import slug
class EventMeetingRoom(models.Model):
_name = "event.meeting.room"
_description = "Event Meeting Ro... | 41.351852 | 2,233 |
6,855 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import logging
from werkzeug.exceptions import Forbidden, NotFound
from odoo import exceptions, http
from odoo.http import request
from odoo.addons.http_routing.models.ir_http import slug
from odoo.addons.website_event.... | 42.84375 | 6,855 |
1,069 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from babel.dates import format_datetime
from odoo import _
from odoo.http import request
from odoo.addons.website_event.controllers import main
class WebsiteEventController(main.WebsiteEventController):
def _prepa... | 42.76 | 1,069 |
555 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'France - Factur-X integration with Chorus Pro',
'version': '1.0',
'category': 'Accounting/Localizations/EDI',
'description': """
Add supports to fill three optional fields used when using Choru... | 27.75 | 555 |
370 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
from odoo import fields, models
class AccountMove(models.Model):
_inherit = "account.move"
buyer_reference = fields.Char(help="'Service Exécutant' in Chorus PRO.")
contract_reference = fields.Char(help="'Numéro de Marché' in Chorus PRO.")
purchase_order_reference = fields.Char... | 36.7 | 367 |
834 | py | PYTHON | 15.0 | # Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': "Kenya Tremol Device EDI Integration",
'summary': """
Kenya Tremol Device EDI Integration
""",
'description': """
This module integrates with the Kenyan G03 Tremol control unit device to the KRA t... | 30.888889 | 834 |
9,125 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo.tests import tagged
from odoo.addons.account.tests.common import AccountTestInvoicingCommon
@tagged('post_install_l10n', 'post_install', '-at_install')
class TestKeMoveExport(AccountTestInvoicingCommon):
... | 49.863388 | 9,125 |
14,737 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import logging
import json
import re
from datetime import datetime
from odoo import models, fields, _
from odoo.exceptions import UserError
_logger = logging.getLogger(__name__)
class AccountMove(models.Model):
_in... | 55.387218 | 14,733 |
403 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import fields, models
class ResCompany(models.Model):
_inherit = 'res.company'
l10n_ke_cu_proxy_address = fields.Char(
default="http://localhost:8069",
string='Fiscal Device Proxy Addr... | 31 | 403 |
494 | 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 ProductTemplate(models.Model):
_inherit = "product.template"
l10n_ke_hsn_code = fields.Char(
string='KRA Item Code',
help='Product code needed when not 16% ... | 30.875 | 494 |
326 | 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'
l10n_ke_cu_proxy_address = fields.Char(related='company_id.l10n_ke_cu_proxy_address', readonly=F... | 32.6 | 326 |
479 | 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'
l10n_ke_exemption_number = fields.Char(
string='Exemption Number',
help='The exemption number of the par... | 29.9375 | 479 |
875 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
{
'name': 'Maintenance',
'version': '1.0',
'sequence': 100,
'category': 'Manufacturing/Maintenance',
'description': """
Track equipments and maintenance requests""",
'depends': ['mail'],
'summary': 'Track equipment and manage maintenance requests',
'websi... | 28.225806 | 875 |
6,017 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import time
from odoo.tests.common import TransactionCase
from dateutil import relativedelta
import datetime
class TestEquipment(TransactionCase):
""" Test used to check that when doing equipment/maintenance_reques... | 44.902985 | 6,017 |
7,097 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import time
from odoo.tests.common import TransactionCase
from odoo.exceptions import AccessError
class TestEquipmentMulticompany(TransactionCase):
def test_00_equipment_multicompany_user(self):
"""Test C... | 40.554286 | 7,097 |
24,729 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
import ast
from datetime import date, datetime, timedelta
from odoo import api, fields, models, SUPERUSER_ID, _
from odoo.exceptions import UserError
from odoo.tools import DEFAULT_SERVER_DATE_FORMAT, DEFAULT_SERVER_DATETIME_FORMAT
class MaintenanceStage(models.Model):
""" Model for cas... | 55.322148 | 24,729 |
1,008 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'Google Spreadsheet',
'version': '1.0',
'category': 'Hidden/Tools',
'description': """
The module adds the possibility to display data from Odoo in Google Spreadsheets in real time.
============... | 30.545455 | 1,008 |
386 | 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"
google_drive_uri_copy = fields.Char(related='google_drive_uri', string='URI Copy', help="The URL... | 38.6 | 386 |
3,997 | py | PYTHON | 15.0 | # Part of Odoo. See LICENSE file for full copyright and licensing details.
import json
import logging
import requests
from lxml import etree
import re
import werkzeug.urls
from odoo import api, models
from odoo.tools import misc
from odoo.addons.google_account import TIMEOUT
_logger = logging.getLogger(__name__)
... | 39.574257 | 3,997 |
1,129 | py | PYTHON | 15.0 | # Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'Products Expiration Date',
'category': 'Inventory/Inventory',
'depends': ['stock'],
'demo': [],
'description': """
Track different dates on products and production lots.
============================================... | 35.28125 | 1,129 |
26,423 | 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 dateutil.relativedelta import relativedelta
from odoo import fields
from odoo.addons.mail.tests.common import mail_new_test_user
from odoo.addons.stock.tests.common import T... | 44.784746 | 26,423 |
2,524 | 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 ConfirmExpiry(models.TransientModel):
_name = 'expiry.picking.confirmation'
_description = 'Confirm Expiry'
lot_ids = fields.Many2many('stock.production.lot', ... | 47.622642 | 2,524 |
3,233 | 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
from odoo.tools.sql import column_exists, create_column
class StockMoveLine(models.Model):
_inherit = "stock.move.line"
expiration_date = fields.Datetime(
... | 44.902778 | 3,233 |
1,195 | 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 StockQuant(models.Model):
_inherit = 'stock.quant'
removal_date = fields.Datetime(related='lot_id.removal_date', store=True, readonly=False)
use_expiration_date =... | 36.212121 | 1,195 |
1,814 | 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 Product(models.Model):
_inherit = "product.product"
def action_open_quants(self):
# Override to hide the `removal_date` column if not needed.
if not any(pr... | 51.828571 | 1,814 |
978 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import datetime
from odoo import fields, models
class StockMove(models.Model):
_inherit = "stock.move"
use_expiration_date = fields.Boolean(
string='Use Expiration Date', related='product_id.use_expira... | 44.454545 | 978 |
1,634 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models, _
class StockPicking(models.Model):
_inherit = "stock.picking"
def _pre_action_done_hook(self):
res = super()._pre_action_done_hook()
# We use the 'skip_expired' contex... | 38.904762 | 1,634 |
805 | 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'
group_expiry_date_on_delivery_slip = fields.Boolean("Display Expiration Dates on Delivery S... | 38.333333 | 805 |
6,185 | 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, SUPERUSER_ID, _
class StockProductionLot(models.Model):
_inherit = 'stock.production.lot'
use_expiration_date = fields.Boolean(
string='Use Expirati... | 46.856061 | 6,185 |
1,059 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
"name": "Serbia - Accounting",
"version": "1.0",
"category": "Accounting/Localizations/Account Charts",
"description": """
This is the base module of the Serbian localization. It manages chart o... | 35.3 | 1,059 |
373 | 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 AccountMove(models.Model):
_inherit = 'account.move'
l10n_rs_company_registry = fields.Char(string='Company ID', related='partner_id.l10n_rs_company_registry')
l10n_rs... | 33.909091 | 373 |
568 | 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 ResPartner(models.Model):
_inherit = 'res.partner'
l10n_rs_company_registry = fields.Char(string='Company ID', help='The registry number of the company.')
_sql_constr... | 31.555556 | 568 |
580 | py | PYTHON | 15.0 | # Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'Alipay Payment Acquirer',
'category': 'Accounting/Payment Acquirers',
'version': '2.0',
'sequence': 345,
'summary': 'Payment Acquirer: Alipay Implementation',
'description': """Alipay Payment Acquirer""",
... | 30.526316 | 580 |
778 | py | PYTHON | 15.0 | # Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo.addons.payment.tests.common import PaymentCommon
class AlipayCommon(PaymentCommon):
@classmethod
def setUpClass(cls, chart_template_ref=None):
super().setUpClass(chart_template_ref=chart_template_ref)
cls.c... | 35.363636 | 778 |
8,076 | py | PYTHON | 15.0 | # Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo.exceptions import ValidationError
from odoo.tests import tagged
from odoo.tools import mute_logger
from .common import AlipayCommon
from ..controllers.main import AlipayController
@tagged('post_install', '-at_install')
class Alipay... | 41.84456 | 8,076 |
6,953 | py | PYTHON | 15.0 | # Part of Odoo. See LICENSE file for full copyright and licensing details.
import logging
from werkzeug import urls
from odoo import _, api, models
from odoo.exceptions import ValidationError
from odoo.tools.float_utils import float_compare
from odoo.addons.payment_alipay.controllers.main import AlipayController
_... | 41.386905 | 6,953 |
429 | 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 AccountPaymentMethod(models.Model):
_inherit = 'account.payment.method'
@api.model
def _get_payment_method_information(self):
res = super()._get_payment_method_in... | 30.642857 | 429 |
2,858 | py | PYTHON | 15.0 | # Part of Odoo. See LICENSE file for full copyright and licensing details.
import logging
from hashlib import md5
from odoo import api, fields, models
_logger = logging.getLogger(__name__)
class PaymentAcquirer(models.Model):
_inherit = 'payment.acquirer'
provider = fields.Selection(
selection_add... | 43.30303 | 2,858 |
2,349 | py | PYTHON | 15.0 | # Part of Odoo. See LICENSE file for full copyright and licensing details.
import logging
import pprint
import requests
from odoo import _, http
from odoo.exceptions import ValidationError
from odoo.http import request
_logger = logging.getLogger(__name__)
class AlipayController(http.Controller):
_return_url ... | 38.508197 | 2,349 |
823 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'Sales and MRP Management',
'version': '1.0',
'category': 'Hidden',
'description': """
This module provides facility to the user to install mrp and sales modulesat a time.
=====================... | 31.653846 | 823 |
28,086 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo.tests.common import TransactionCase, Form
class TestSaleMrpKitBom(TransactionCase):
def _create_product(self, name, product_type, price):
return self.env['product.product'].create({
'... | 41.061404 | 28,086 |
127,185 | 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 common, Form
from odoo.exceptions import UserError
from odoo.tools imp... | 46.282751 | 127,185 |
12,478 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import time
from odoo.tests.common import TransactionCase, Form
from odoo.tools import mute_logger
class TestSaleMrpProcurement(TransactionCase):
def test_sale_mrp(self):
self.env.ref('stock.route_warehou... | 39.865815 | 12,478 |
7,247 | 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.tests.common import TestMrpCommon
class TestMultistepManufacturing(TestMrpCommon):
def setUp(self):
super(TestMultistepManufacturing, self).setUp()
... | 47.993377 | 7,247 |
7,885 | 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 fields
from odoo.addons.stock.tests.common2 import TestStockCommon
from odoo.tests import Form
class TestSaleMrpLeadTime(TestStockCommon):
def setUp(self):
... | 48.67284 | 7,885 |
2,813 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo.tests import common, Form
from odoo.tools import html2plaintext
@common.tagged('post_install', '-at_install')
class TestSaleMrpInvoices(common.TransactionCase):
@classmethod
def setUpClass(cls):
... | 40.185714 | 2,813 |
2,569 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
from odoo import models
class AccountMoveLine(models.Model):
_inherit = "account.move.line"
def _stock_account_get_anglo_saxon_price_unit(self):
price_unit = super(AccountMoveLine, self)._stock_account_get_anglo_saxon_price_unit()
so_line = self.sale_line_ids and sel... | 69.432432 | 2,569 |
922 | 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 _prepare_procurement_values(self):
res = super()._prepare_procurement_values()
res['analytic_account_id'] = se... | 36.88 | 922 |
1,359 | 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 MrpProduction(models.Model):
_inherit = 'mrp.production'
sale_order_count = fields.Integer(
"Count of Source SO",
compute='_compute_sale_order_coun... | 35.763158 | 1,359 |
1,390 | 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 MrpBom(models.Model):
_inherit = 'mrp.bom'
def toggle_active(self):
self.filtered(lambda bom: bom.active)._ensure_bom_is_free()
... | 37.567568 | 1,390 |
10,406 | 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 float_compare
class SaleOrder(models.Model):
_inherit = 'sale.order'
mrp_production_count = fields.Integer(
"Count of MO generated",
... | 59.462857 | 10,406 |
1,760 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'Resellers',
'category': 'Website/Website',
'summary': 'Publish your resellers/partners and forward leads to them',
'version': '1.0',
'description': """
This module allows to publish your re... | 35.918367 | 1,760 |
7,454 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from unittest.mock import patch
from odoo.exceptions import AccessError
from odoo.tests.common import TransactionCase
from odoo.addons.crm.tests.common import TestCrmCommon
from odoo.addons.mail.tests.common import mail... | 46.298137 | 7,454 |
7,637 | 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 CrmLeadForwardToPartner(models.TransientModel):
""" Forward info history to partners. """
_name = 'crm.lead.forward.to.partner... | 45.458333 | 7,637 |
510 | 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.addons.http_routing.models.ir_http import url_for
class Website(models.Model):
_inherit = "website"
def get_suggested_controllers(self):
suggested_controllers = sup... | 36.428571 | 510 |
14,196 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import random
from odoo import api, fields, models, _
from odoo.exceptions import AccessDenied, AccessError, UserError
from odoo.tools import html_escape
class CrmLead(models.Model):
_inherit = "crm.lead"
pa... | 46.090909 | 14,196 |
2,850 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import api, fields, models
from odoo.addons.http_routing.models.ir_http import slug
class ResPartnerGrade(models.Model):
_name = 'res.partner.grade'
_order = 'sequence'
_inherit = ['website.publis... | 41.304348 | 2,850 |
2,599 | 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 CrmPartnerReportAssign(models.Model):
""" CRM Lead Report """
_name = "crm.partner.report.assign"
_auto = False
_description = "CRM Partnership Analysis"
partn... | 44.810345 | 2,599 |
15,092 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import datetime
import werkzeug.urls
from collections import OrderedDict
from werkzeug.exceptions import NotFound
from odoo import fields
from odoo import http
from odoo.http import request
from odoo.addons.http_routin... | 45.321321 | 15,092 |
451 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'Subcontracting Management with Stock Valuation',
'version': '0.1',
'category': 'Hidden',
'description': """
This bridge module allows to manage subcontracting with valuation.
""",
... | 30.066667 | 451 |
14,805 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import Command, fields
from odoo.tests.common import Form
from odoo.tools.float_utils import float_round, float_compare
from odoo.addons.mrp_subcontracting.tests.common import TestMrpSubcontractingCommon
from ... | 47.300319 | 14,805 |
965 | 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 ProductProduct(models.Model):
_inherit = 'product.product'
def _compute_bom_price(self, bom, boms_to_recompute=False, byproduct_bom=False):
""" Add the price of the... | 53.611111 | 965 |
325 | 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 _should_force_price_unit(self):
self.ensure_one()
return self.is_subcontract or super()._should_force_price_un... | 27.083333 | 325 |
791 | 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.osv.expression import OR
class StockPicking(models.Model):
_inherit = 'stock.picking'
def action_view_stock_valuation_layers(self):
action = super(StockPicking, self).... | 41.631579 | 791 |
724 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models
class MrpProduction(models.Model):
_inherit = 'mrp.production'
def _cal_price(self, consumed_moves):
finished_move = self.move_finished_ids.filtered(lambda x: x.product_id == se... | 45.25 | 724 |
1,085 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'Opportunity to Quotation',
'version': '1.0',
'category': 'Hidden',
'description': """
This module adds a shortcut on one or several opportunity cases in the CRM.
===============================... | 35 | 1,085 |
4,804 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo.addons.crm.tests import common as crm_common
from odoo.tests.common import tagged, users
@tagged('lead_manage')
class TestLeadConvertToTicket(crm_common.TestCrmCommon):
@classmethod
def setUpClass(c... | 40.033333 | 4,804 |
1,683 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo.addons.crm.tests.test_crm_lead_merge import TestLeadMergeCommon
from odoo.tests.common import tagged, users
@tagged('lead_manage')
class TestLeadSaleMerge(TestLeadMergeCommon):
@users('user_sales_manager... | 42.075 | 1,683 |
2,198 | 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 Opportunity2Quotation(models.TransientModel):
_name = 'crm.quotation.partner'
_description = 'Create new or use existing Custo... | 42.269231 | 2,198 |
1,839 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models,fields, api, _
class CrmTeam(models.Model):
_inherit = 'crm.team'
def _compute_dashboard_button_name(self):
super(CrmTeam, self)._compute_dashboard_button_name()
teams_w... | 41.795455 | 1,839 |
574 | 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 SaleOrder(models.Model):
_inherit = 'sale.order'
opportunity_id = fields.Many2one(
'crm.lead', string='Opportunity', check_company=True,
domain="[('type', ... | 38.266667 | 574 |
270 | 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 ResUsers(models.Model):
_inherit = 'res.users'
target_sales_invoiced = fields.Integer('Invoiced in Sales Orders Target')
| 27 | 270 |
4,569 | 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
class CrmLead(models.Model):
_inherit = 'crm.lead'
sale_amount_total = fields.Monetary(compute='_compute_sale_data', strin... | 48.606383 | 4,569 |
680 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'Test Discuss (full)',
'version': '1.0',
'category': 'Hidden',
'sequence': 9877,
'summary': 'Test of Discuss with all possible overrides installed.',
'description': """Test of Discuss wi... | 26.153846 | 680 |
45,422 | 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 odoo import Command
from odoo.tests.common import users, tagged, TransactionCase, warmup
from odoo.tools.misc import DEFAULT_SERVER_DATE_FO... | 56.991217 | 45,422 |
760 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'Saudi Arabia - E-invoicing (Simplified)',
'icon': '/l10n_sa/static/description/icon.png',
'version': '0.1',
'depends': [
'l10n_sa_pos',
'l10n_sa_edi',
],
'author': 'Odoo... | 28.148148 | 760 |
277 | py | PYTHON | 15.0 | from odoo import models
class AccountMove(models.Model):
_inherit = 'account.move'
def _l10n_sa_check_refund_reason(self):
return super()._l10n_sa_check_refund_reason() or (self.pos_order_ids and self.pos_order_ids[0].refunded_orders_count > 0 and self.ref)
| 34.625 | 277 |
758 | py | PYTHON | 15.0 | from odoo import models, api, _
from odoo.exceptions import ValidationError
class PosConfig(models.Model):
_inherit = 'pos.config'
@api.constrains('company_id', 'invoice_journal_id')
def _check_company_invoice_journal(self):
"""
Override to make sure POS invoice journal was probably o... | 47.375 | 758 |
543 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
from odoo import models
class AccountEdiXmlUBL21Zatca(models.AbstractModel):
_inherit = "account.edi.xml.ubl_21.zatca"
def _l10n_sa_get_payment_means_code(self, invoice):
"""
Return payment means code to be used to set the value on the XML file
"""
... | 36.2 | 543 |
513 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
{
'name': 'Import/Export invoices with Factur-X',
'description': '''
Support for invoice Export/Import in Factur-x format (1.0.04).
''',
'version': '1.0',
'category': 'Accounting/Accounting',
'depends': ['account_edi'],
'data': [
'data/account_edi_data.xml... | 27 | 513 |
14,747 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
from freezegun import freeze_time
from odoo.addons.account_edi.tests.common import AccountEdiTestCommon
from odoo.tests import tagged
@tagged('post_install', '-at_install')
class TestAccountEdiFacturx(AccountEdiTestCommon):
@classmethod
def setUpClass(cls, chart_template_ref=None, edi... | 50.851724 | 14,747 |
1,394 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
from odoo import models
class AccountTax(models.Model):
_inherit = 'account.tax'
def _get_unece_category_code(self, customer, supplier):
""" By default, this method will try to compute the tax category (used by EDI for example) based on the amount
and the tax repartit... | 41 | 1,394 |
18,232 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
from odoo import api, models, fields, tools, _
from odoo.tools import DEFAULT_SERVER_DATE_FORMAT, float_repr, is_html_empty, str2bool
from odoo.tests.common import Form
from odoo.exceptions import RedirectWarning, UserError
from datetime import datetime
from lxml import etree
from PyPDF2 impor... | 53.940828 | 18,232 |
424 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'Mass mailing sms on sale orders',
'category': 'Hidden',
'version': '1.0',
'summary': 'Add sale order info on mass mailing sms',
'description': """Mass mailing sms on sale orders""",
'de... | 32.615385 | 424 |
370 | 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 UtmCampaign(models.Model):
_inherit = 'utm.campaign'
ab_testing_sms_winner_selection = fields.Selection(selection_add=[
('sale_quotation_count', 'Quotations'),
... | 28.461538 | 370 |
1,766 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
# @author - Fekete Mihai <feketemihai@gmail.com>, Tatár Attila <atta@nvm.ro>
# Copyright (C) 2019 NextERP Romania (https://nexterp.ro)
# Copyright (C) 2015 Tatár Attila
# Copyright (C) 2015 Forest and Biomass Services R... | 39.2 | 1,764 |
744 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
# @author - Fekete Mihai <feketemihai@gmail.com>
# Copyright (C) 2020 NextERP Romania (https://www.nexterp.ro) <contact@nexterp.ro>
# Copyright (C) 2015 Forest and Biomass Services Romania (http://www.forbiom.eu).
# Cop... | 37.2 | 744 |
531 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'United Arab Emirates - Point of Sale',
'author': 'Odoo PS',
'category': 'Accounting/Localizations/Point of Sale',
'description': """
United Arab Emirates POS Localization
=======================... | 35.4 | 531 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.