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 |
|---|---|---|---|---|---|---|
2,364 | py | PYTHON | 15.0 | # Copyright 2021 Tecnativa - Carlos Roca
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo.tests.common import HttpCase
class TestUI(HttpCase):
def setUp(self):
super().setUp()
self.product = self.env["product.template"].create(
{
"name": "Test ... | 38.129032 | 2,364 |
3,318 | py | PYTHON | 15.0 | # Copyright 2021 Tecnativa - Carlos Roca
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import api, models
class ProductTemplate(models.Model):
_inherit = "product.template"
@api.model
def get_product_assortment_restriction_info(self, product_ids):
partner = self.env.u... | 40.463415 | 3,318 |
2,275 | py | PYTHON | 15.0 | # Copyright 2021 Tecnativa - Carlos Roca
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class IrFilters(models.Model):
_inherit = "ir.filters"
website_availability = fields.Selection(
selection=[
("no_restriction", "Don't apply restri... | 38.559322 | 2,275 |
2,903 | py | PYTHON | 15.0 | # Copyright 2021 Tecnativa - Carlos Roca
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from werkzeug.exceptions import NotFound
from odoo.http import request, route
from odoo.addons.website_sale.controllers.main import WebsiteSale
class WebsiteSale(WebsiteSale):
def _get_products_allowed(self... | 36.746835 | 2,903 |
1,556 | py | PYTHON | 15.0 | # Copyright 2020 Tecnativa - Carlos Roca
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import _, http
from odoo.http import request
from odoo.addons.sale.controllers.variant import VariantController
class WebsiteSaleVariantController(VariantController):
@http.route(
["/sale/... | 37.047619 | 1,556 |
1,053 | py | PYTHON | 15.0 | # © 2016 Serpent Consulting Services Pvt. Ltd. (http://www.serpentcs.com)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Product Brand Filtering in Website",
"category": "e-commerce",
"author": "Serpent Consulting Services Pvt. Ltd., "
"Tecnativa, "
"Odoo Community Assoc... | 31.878788 | 1,052 |
315 | py | PYTHON | 15.0 | # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
import odoo.tests
@odoo.tests.tagged("post_install", "-at_install")
class UICase(odoo.tests.HttpCase):
def test_ui_website(self):
"""Test frontend tour."""
self.start_tour("/shop", "website_sale_product_brand", login="portal")
| 31.5 | 315 |
315 | py | PYTHON | 15.0 | # Copyright 2020 Tecnativa - David Vidal
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html)
from odoo import fields, models
class ProductBrand(models.Model):
_name = "product.brand"
_inherit = ["product.brand", "website.published.mixin"]
is_published = fields.Boolean(default=True)
| 31.5 | 315 |
565 | py | PYTHON | 15.0 | # Copyright 2022 Tecnativa - Carlos Roca
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, models
class ProductTemplate(models.Model):
_inherit = "product.template"
@api.model
def _search_get_detail(self, website, order, options):
res = super()._search_get_deta... | 33.235294 | 565 |
3,046 | py | PYTHON | 15.0 | # © 2016 Serpent Consulting Services Pvt. Ltd. (http://www.serpentcs.com)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import http
from odoo.http import request
from odoo.osv import expression
from odoo.addons.website_sale.controllers.main import QueryURL, WebsiteSale
class WebsiteSale(... | 31.071429 | 3,045 |
527 | py | PYTHON | 15.0 | # Copyright 2019 Sergio Teruel <sergio.teruel@tecnativa.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Stock Barcodes GS1",
"summary": "It provides read GS1 barcode on stock operations.",
"version": "15.0.1.0.0",
"author": "Tecnativa, Odoo Community Association (OCA... | 40.538462 | 527 |
1,329 | py | PYTHON | 15.0 | # Copyright 2108-2019 Sergio Teruel <sergio.teruel@tecnativa.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo.tests import common
from .test_stock_barcodes_gs1 import TestStockBarcodesGS1
@common.tagged("post_install", "-at_install")
class TestStockBarcodesNewLotGS1(TestStockBarcodesGS1... | 45.827586 | 1,329 |
7,133 | py | PYTHON | 15.0 | # Copyright 2108-2019 Sergio Teruel <sergio.teruel@tecnativa.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo.tests import common
from odoo.addons.stock_barcodes.tests.test_stock_barcodes import TestStockBarcodes
@common.tagged("post_install", "-at_install")
class TestStockBarcodesGS1(... | 45.724359 | 7,133 |
4,708 | py | PYTHON | 15.0 | # Copyright 2019 Sergio Teruel <sergio.teruel@tecnativa.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import _, models
class WizStockBarcodesRead(models.AbstractModel):
_inherit = "wiz.stock.barcodes.read"
def _prepare_lot_values(self, barcode_decoded):
lot_barco... | 43.192661 | 4,708 |
1,607 | py | PYTHON | 15.0 | # Copyright 2019 Sergio Teruel <sergio.teruel@tecnativa.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import models
class WizStockBarcodesNewLot(models.TransientModel):
_inherit = "wiz.stock.barcodes.new.lot"
_description = "Wizard to create new lot from barcode scanner"
... | 40.175 | 1,607 |
525 | py | PYTHON | 15.0 | # Copyright 2021 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import tools
def pre_init_hook(cr):
if not tools.column_exists(cr, "stock_move_line", "barcode_scan_state"):
cr.execute(
"""
ALTER TABLE stock_move_line
... | 29.166667 | 525 |
1,663 | py | PYTHON | 15.0 | # Copyright 2019 Sergio Teruel <sergio.teruel@tecnativa.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Stock Barcodes",
"summary": "It provides read barcode on stock operations.",
"version": "15.0.1.2.2",
"author": "Tecnativa, " "Odoo Community Association (OCA)",
... | 41.575 | 1,663 |
400 | py | PYTHON | 15.0 | # Copyright 2023 ForgeFlow <http://www.forgeflow.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openupgradelib import openupgrade
def delete_fk_constraints(env):
# delete obsolete model references
openupgrade.remove_tables_fks(env.cr, ["wiz_stock_barcodes_read_inventory"])
@... | 28.571429 | 400 |
1,041 | py | PYTHON | 15.0 | # Copyright 2108-2019 Sergio Teruel <sergio.teruel@tecnativa.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo.tests.common import tagged
from .test_stock_barcodes_picking import TestStockBarcodesPicking
@tagged("post_install", "-at_install")
class TestStockBarcodesNewLot(TestStockBarcod... | 43.375 | 1,041 |
19,330 | py | PYTHON | 15.0 | # Copyright 2108-2019 Sergio Teruel <sergio.teruel@tecnativa.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo.tests.common import tagged
from .test_stock_barcodes import TestStockBarcodes
@tagged("post_install", "-at_install")
class TestStockBarcodesPicking(TestStockBarcodes):
def s... | 42.765487 | 19,330 |
9,194 | py | PYTHON | 15.0 | # Copyright 2108-2019 Sergio Teruel <sergio.teruel@tecnativa.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo.tests.common import TransactionCase, tagged
@tagged("post_install", "-at_install")
class TestStockBarcodes(TransactionCase):
def setUp(self):
super().setUp()
... | 37.991736 | 9,194 |
27,154 | py | PYTHON | 15.0 | # Copyright 2019 Sergio Teruel <sergio.teruel@tecnativa.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
import logging
from odoo import _, api, fields, models
_logger = logging.getLogger(__name__)
class WizStockBarcodesRead(models.AbstractModel):
_name = "wiz.stock.barcodes.read"
_... | 38.958393 | 27,154 |
31,480 | py | PYTHON | 15.0 | # Copyright 2019 Sergio Teruel <sergio.teruel@tecnativa.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
import logging
from odoo import _, api, fields, models
from odoo.exceptions import ValidationError
from odoo.fields import first
from odoo.tools.float_utils import float_compare
_logger = ... | 39.898606 | 31,480 |
2,217 | py | PYTHON | 15.0 | # Copyright 2019 Sergio Teruel <sergio.teruel@tecnativa.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import fields, models
class WizStockBarcodesNewLot(models.TransientModel):
_inherit = "barcodes.barcode_events_mixin"
_name = "wiz.stock.barcodes.new.lot"
_descriptio... | 36.95 | 2,217 |
9,814 | py | PYTHON | 15.0 | # Copyright 2019 Sergio Teruel <sergio.teruel@tecnativa.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from collections import OrderedDict
from odoo import api, fields, models
from odoo.tools.safe_eval import safe_eval
class WizStockBarcodesReadTodo(models.TransientModel):
_name = "wiz... | 41.940171 | 9,814 |
3,944 | py | PYTHON | 15.0 | # Copyright 2019 Sergio Teruel <sergio.teruel@tecnativa.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import fields, models
class StockBarcodesOptionGroup(models.Model):
_name = "stock.barcodes.option.group"
_description = "Options group for barcode interface"
name =... | 37.923077 | 3,944 |
809 | py | PYTHON | 15.0 | # Copyright 2019 Sergio Teruel <sergio.teruel@tecnativa.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import api, fields, models
class StockMoveLine(models.Model):
_inherit = "stock.move.line"
barcode_scan_state = fields.Selection(
[("pending", "Pending"), ("done... | 33.708333 | 809 |
1,105 | py | PYTHON | 15.0 | # Copyright 2019 Sergio Teruel <sergio.teruel@tecnativa.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import fields, models
from odoo.tools.safe_eval import safe_eval
class StockBarcodesAction(models.Model):
_name = "stock.barcodes.action"
_description = "Actions for barc... | 34.53125 | 1,105 |
2,675 | py | PYTHON | 15.0 | # Copyright 2019 Sergio Teruel <sergio.teruel@tecnativa.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import fields, models
class StockPickingType(models.Model):
_inherit = "stock.picking.type"
barcode_option_group_id = fields.Many2one(
comodel_name="stock.barcod... | 40.530303 | 2,675 |
2,084 | py | PYTHON | 15.0 | # Copyright 2019 Sergio Teruel <sergio.teruel@tecnativa.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import fields, models
class StockBarcodesReadLog(models.Model):
_name = "stock.barcodes.read.log"
_description = "Log barcode scanner"
_order = "id DESC"
name = ... | 40.862745 | 2,084 |
1,830 | py | PYTHON | 15.0 | # Copyright 2019 Sergio Teruel <sergio.teruel@tecnativa.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import models
class StockPicking(models.Model):
_inherit = "stock.picking"
def action_barcode_scan(self, option_group=False):
option_group = option_group or self... | 41.590909 | 1,830 |
870 | py | PYTHON | 15.0 | # Copyright (C) 2014-Today GRAP (http://www.grap.coop)
# Copyright (C) 2016-Today La Louve (http://www.lalouve.net)
# Copyright (C) 2018 Komit (https://komit-consulting.com)
# @author: Sylvain LE GAL (https://twitter.com/legalsylvain)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "... | 37.826087 | 870 |
612 | py | PYTHON | 15.0 | # Copyright 2021 Tecnativa - Carlos Roca
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields, models
class BarcodeRuleUserFake(models.Model):
_inherit = "barcode.rule"
generate_model = fields.Selection(
selection_add=[("res.users", "Users")], ondelete={"res.users"... | 27.818182 | 612 |
1,740 | py | PYTHON | 15.0 | # Copyright 2021 Tecnativa - Carlos Roca
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo_test_helper import FakeModelLoader
from odoo.tests import SavepointCase
class TestBarcodesGeneratorAbstract(SavepointCase, FakeModelLoader):
@classmethod
def setUpClass(cls):
super().se... | 31.636364 | 1,740 |
3,179 | py | PYTHON | 15.0 | # Copyright (C) 2014-TODAY GRAP (http://www.grap.coop)
# Copyright (C) 2016-TODAY La Louve (http://www.lalouve.net)
# Copyright 2017 LasLabs Inc.
# @author: Sylvain LE GAL (https://twitter.com/legalsylvain)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
import logging
import barcode # pylint: d... | 34.934066 | 3,179 |
5,043 | py | PYTHON | 15.0 | # Copyright (C) 2014-Today GRAP (http://www.grap.coop)
# Copyright (C) 2016-Today La Louve (http://www.lalouve.net)
# Copyright 2017 LasLabs Inc.
# @author: Sylvain LE GAL (https://twitter.com/legalsylvain)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import _, api, exceptions, fields... | 33.177632 | 5,043 |
962 | py | PYTHON | 15.0 | import setuptools
with open('VERSION.txt', 'r') as f:
version = f.read().strip()
setuptools.setup(
name="odoo-addons-oca-stock-logistics-barcode",
description="Meta package for oca-stock-logistics-barcode Odoo addons",
version=version,
install_requires=[
'odoo-addon-barcodes_generator_abst... | 38.48 | 962 |
100 | py | PYTHON | 15.0 | import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
| 16.666667 | 100 |
100 | py | PYTHON | 15.0 | import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
| 16.666667 | 100 |
100 | py | PYTHON | 15.0 | import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
| 16.666667 | 100 |
100 | py | PYTHON | 15.0 | import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
| 16.666667 | 100 |
100 | py | PYTHON | 15.0 | import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
| 16.666667 | 100 |
100 | py | PYTHON | 15.0 | import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
| 16.666667 | 100 |
100 | py | PYTHON | 15.0 | import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
| 16.666667 | 100 |
100 | py | PYTHON | 15.0 | import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
| 16.666667 | 100 |
1,068 | py | PYTHON | 15.0 | # Copyright 2020 Carlos Roca <carlos.roca@tecnativa.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Stock Picking Product Barcode Report",
"summary": "It provides a wizard to select how many barcodes print.",
"version": "15.0.2.0.0",
"author": "Tecnativa, Odoo Commun... | 41.076923 | 1,068 |
408 | py | PYTHON | 15.0 | # Copyright 2022 Tecnativa - Carlos Roca
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openupgradelib import openupgrade
renamed_fields = [
(
"res.company",
"res_company",
"barcode_default_format",
"barcode_report_default_format",
)
]
@openupgrade.... | 22.666667 | 408 |
4,004 | py | PYTHON | 15.0 | # Copyright 2020 Carlos Roca <carlos.roca@tecnativa.com>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo.tests.common import TransactionCase
class TestStockPickingProductBarcodeReport(TransactionCase):
def setUp(self):
super().setUp()
self.supplier_location = self.env.r... | 44.988764 | 4,004 |
5,303 | py | PYTHON | 15.0 | # Copyright 2020 Carlos Roca <carlos.roca@tecnativa.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import api, fields, models
class ProductPrintingQty(models.TransientModel):
_name = "stock.picking.line.print"
_rec_name = "product_id"
_description = "Print Picking Lin... | 39.574627 | 5,303 |
335 | py | PYTHON | 15.0 | # Copyright 2021 Tecnativa - Carlos Roca
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields, models
class IrActionsReport(models.Model):
_inherit = "ir.actions.report"
is_barcode_label = fields.Boolean(string="Barcode label")
is_custom_label = fields.Boolean(string="... | 33.5 | 335 |
581 | py | PYTHON | 15.0 | # Copyright 2021 Tecnativa - Carlos Roca
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import fields, models
class Company(models.Model):
_inherit = "res.company"
barcode_report_default_format = fields.Selection(
[("gs1_128", "Display GS1_128 format for barcodes")],
... | 32.277778 | 581 |
657 | py | PYTHON | 15.0 | # Copyright 2021 Tecnativa - Carlos Roca
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import fields, models
class ResConfigSettings(models.TransientModel):
_inherit = "res.config.settings"
barcode_report_default_format = fields.Selection(
string="Method to choose th... | 32.85 | 657 |
1,430 | py | PYTHON | 15.0 | # Copyright 2020 Carlos Roca <carlos.roca@tecnativa.com>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
import barcode # pylint: disable=missing-manifest-dependency
from barcode.writer import SVGWriter # pylint: disable=missing-manifest-dependency
from odoo import http
from odoo.http import re... | 31.086957 | 1,430 |
959 | py | PYTHON | 15.0 | # Copyright (C) 2014-Today GRAP (http://www.grap.coop)
# Copyright (C) 2016-Today La Louve (http://www.lalouve.net)
# Copyright (C) 2018 Komit (https://komit-consulting.com)
# @author: Sylvain LE GAL (https://twitter.com/legalsylvain)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "... | 39.958333 | 959 |
2,647 | py | PYTHON | 15.0 | # Copyright (C) 2016-Today GRAP (http://www.grap.coop)
# Copyright (C) 2016-Today La Louve (http://www.lalouve.net)
# @author: Sylvain LE GAL (https://twitter.com/legalsylvain)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo.tests.common import TransactionCase
class Tests(TransactionCa... | 35.77027 | 2,647 |
1,866 | py | PYTHON | 15.0 | # Copyright (C) 2014-Today GRAP (http://www.grap.coop)
# Copyright (C) 2016-Today La Louve (http://www.lalouve.net)
# @author: Sylvain LE GAL (https://twitter.com/legalsylvain)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import api, fields, models
class ProductTemplate(models.Model... | 32.172414 | 1,866 |
400 | py | PYTHON | 15.0 | # Copyright (C) 2014-Today GRAP (http://www.grap.coop)
# Copyright (C) 2016-Today La Louve (http://www.lalouve.net)
# @author: Sylvain LE GAL (https://twitter.com/legalsylvain)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import models
class ProductProduct(models.Model):
_name =... | 36.363636 | 400 |
432 | py | PYTHON | 15.0 | # Copyright (C) 2014-Today GRAP (http://www.grap.coop)
# Copyright (C) 2016-Today La Louve (http://www.lalouve.net)
# @author: Sylvain LE GAL (https://twitter.com/legalsylvain)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import fields, models
class BarcodeRule(models.Model):
_i... | 36 | 432 |
781 | py | PYTHON | 15.0 | # Copyright 2020 Lorenzo Battistini @ TAKOBI
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl).
{
"name": "Barcode in supplier pricelist",
"summary": "Add a barcode to supplier pricelist items",
"version": "15.0.1.1.0",
"development_status": "Beta",
"category": "Hidden",
"website":... | 31.24 | 781 |
410 | py | PYTHON | 15.0 | from odoo import fields, models
class SupplierInfo(models.Model):
_inherit = "product.supplierinfo"
barcode = fields.Char(
copy=False,
help="Article number used by supplier for product identification.",
)
_sql_constraints = [
(
"barcode_uniq",
"unique(... | 22.777778 | 410 |
670 | py | PYTHON | 15.0 | # Copyright 2021 Tecnativa - Carlos Roca
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Stock Picking Product Barcode Report Secondary Unit",
"summary": "Set by default the maximum quantity of labels to print.",
"version": "15.0.1.1.0",
"author": "Tecnativa, Odoo Communi... | 44.666667 | 670 |
3,743 | py | PYTHON | 15.0 | # Copyright 2021 Tecnativa - Carlos Roca
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo.tests.common import TransactionCase
class TestStockPickingProductBarcodeReportSecondaryUnit(TransactionCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
cls.supplier_... | 39.819149 | 3,743 |
799 | py | PYTHON | 15.0 | # Copyright 2021 Tecnativa - Carlos Roca
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from math import ceil
from odoo import api, models
class WizStockBarcodeSelectionPrinting(models.TransientModel):
_inherit = "stock.picking.print"
@api.model
def _prepare_data_from_move_line(se... | 33.291667 | 799 |
601 | py | PYTHON | 15.0 | # Copyright 2012-2014 Numérigraphe SARL.
{
"name": "GS1 Barcode API",
"summary": "Decoding API for GS1-128 (aka UCC/EAN-128) and GS1-Datamatrix",
"version": "15.0.1.0.0",
"author": "Numérigraphe, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/stock-logistics-barcode",
"cat... | 33.277778 | 599 |
2,534 | py | PYTHON | 15.0 | # © 2019 Wassim Ghannoum <wassim@mediaengagers.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
import logging
from odoo.exceptions import ValidationError
from odoo.tests import common
_logger = logging.getLogger(__name__)
class TestGS1Barcode(common.TransactionCase):
def test_decode(se... | 40.854839 | 2,533 |
8,438 | py | PYTHON | 15.0 | # Copyright 2012-2014 Numérigraphe SARL.
# Make it easier to divide integers and get floating point results
import re
from datetime import datetime
from dateutil.relativedelta import relativedelta
from odoo import _, api, exceptions, fields, models
class GS1Barcode(models.Model):
"""GS1-128/GS1-Datamatrix barco... | 40.5625 | 8,437 |
874 | py | PYTHON | 15.0 | # Copyright 2012-2014 Numérigraphe SARL.
from odoo import fields, models
class ResUsers(models.Model):
_inherit = "res.users"
gs1_barcode_prefix = fields.Char(
"Prefix",
help=(
"The prefix that the barcode scanner will send when GS1-128 "
"or GS1-Datamatrix codes are s... | 33.576923 | 873 |
770 | py | PYTHON | 15.0 | # Copyright 2021 Camptocamp (http://www.camptocamp.com).
# @author Iván Todorovich <ivan.todorovich@gmail.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Mail Autosubscribe",
"summary": "Automatically subscribe partners to its company's business documents",
"version": "15.0.... | 33.434783 | 769 |
5,721 | py | PYTHON | 15.0 | # Copyright 2021 Camptocamp (http://www.camptocamp.com).
# @author Iván Todorovich <ivan.todorovich@gmail.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo_test_helper import FakeModelLoader
from odoo.tests.common import Form, TransactionCase, tagged
@tagged("post_install", "-at_install... | 43.333333 | 5,720 |
408 | py | PYTHON | 15.0 | # Copyright 2021 Camptocamp (http://www.camptocamp.com).
# @author Iván Todorovich <ivan.todorovich@gmail.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class FakeOrder(models.Model):
_name = "fake.order"
_inherit = "mail.thread"
_description = "Fake ... | 31.307692 | 407 |
1,492 | py | PYTHON | 15.0 | # Copyright 2021 Camptocamp (http://www.camptocamp.com).
# @author Iván Todorovich <ivan.todorovich@gmail.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, models
class BaseModel(models.AbstractModel):
_inherit = "base"
@api.model
def _message_get_autosubscribe_f... | 40.297297 | 1,491 |
1,390 | py | PYTHON | 15.0 | # Copyright 2021 Camptocamp (http://www.camptocamp.com).
# @author Iván Todorovich <ivan.todorovich@gmail.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class MailTemplate(models.Model):
_inherit = "mail.template"
use_autosubscribe_followers = fields.Boo... | 40.852941 | 1,389 |
1,192 | py | PYTHON | 15.0 | # Copyright 2021 Camptocamp (http://www.camptocamp.com).
# @author Iván Todorovich <ivan.todorovich@gmail.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import models
class MailThread(models.AbstractModel):
_inherit = "mail.thread"
def message_subscribe(self, partner_ids=None... | 41.068966 | 1,191 |
1,025 | py | PYTHON | 15.0 | # Copyright 2021 Camptocamp (http://www.camptocamp.com).
# @author Iván Todorovich <ivan.todorovich@gmail.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class MailAutosubscribe(models.Model):
_name = "mail.autosubscribe"
_description = "Mail Autosubs... | 24.380952 | 1,024 |
453 | py | PYTHON | 15.0 | # Copyright 2021 Camptocamp (http://www.camptocamp.com).
# @author Iván Todorovich <ivan.todorovich@gmail.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class ResPartner(models.Model):
_inherit = "res.partner"
mail_autosubscribe_ids = fields.Many2many(
... | 28.25 | 452 |
599 | py | PYTHON | 15.0 | # Copyright 2016 Tecnativa - Antonio Espinosa
# Copyright 2017 Tecnativa - Vicent Cubells
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
import logging
try:
from odoo.addons.mail_tracking.hooks import column_add_with_value
except ImportError:
column_add_with_value = False
_logger = logg... | 29.95 | 599 |
901 | py | PYTHON | 15.0 | # Copyright 2016 Tecnativa - Antonio Espinosa
# Copyright 2017 Tecnativa - Vicent Cubells
# Copyright 2017 Tecnativa - David Vidal
# Copyright 2018 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Mail tracking for mass mailing",
"summary": "Improve mas... | 34.653846 | 901 |
5,169 | py | PYTHON | 15.0 | # Copyright 2016 Tecnativa - Antonio Espinosa
# Copyright 2017 Tecnativa - Vicent Cubells
# Copyright 2017 Tecnativa - David Vidal
# Copyright 2018 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from unittest import mock
from odoo.tests.common import TransactionCase, t... | 43.075 | 5,169 |
808 | py | PYTHON | 15.0 | # Copyright 2016 Tecnativa - Antonio Espinosa
# Copyright 2017 Tecnativa - Vicent Cubells
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import api, fields, models
class MailMassMailingContact(models.Model):
_name = "mailing.contact"
_inherit = ["mailing.contact", "mail.bounce... | 33.666667 | 808 |
907 | py | PYTHON | 15.0 | # Copyright 2016 Tecnativa - Antonio Espinosa
# Copyright 2017 Tecnativa - Vicent Cubells
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import fields, models
class MailTrace(models.Model):
_inherit = "mailing.trace"
mail_tracking_id = fields.Many2one(
string="Mail tr... | 34.884615 | 907 |
1,938 | py | PYTHON | 15.0 | # Copyright 2016 Tecnativa - Antonio Espinosa
# Copyright 2017 Tecnativa - Vicent Cubells
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import api, fields, models
class MailTrackingEvent(models.Model):
_inherit = "mail.tracking.event"
mass_mailing_id = fields.Many2one(
... | 35.888889 | 1,938 |
2,316 | py | PYTHON | 15.0 | # Copyright 2016 Tecnativa - Antonio Espinosa
# Copyright 2017 Tecnativa - Vicent Cubells
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import api, fields, models
class MailTrackingEmail(models.Model):
_inherit = "mail.tracking.email"
mass_mailing_id = fields.Many2one(
... | 38.6 | 2,316 |
2,620 | py | PYTHON | 15.0 | # Copyright 2016 Tecnativa - Antonio Espinosa
# Copyright 2017 Tecnativa - Vicent Cubells
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import api, models
class MailMail(models.Model):
_inherit = "mail.mail"
@api.model
def _tracking_email_prepare(self, partner, email):
... | 41.587302 | 2,620 |
786 | py | PYTHON | 15.0 | # Copyright 2017 Tecnativa - Jairo Llopis
# Copyright 2018 Tecnativa - David Vidal
# Copyright 2019 Tecnativa - Victor Martin
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Dynamic Mass Mailing Lists",
"summary": "Mass mailing lists that get autopopulated",
"version": "15.0.1.0.... | 35.727273 | 786 |
7,053 | py | PYTHON | 15.0 | # Copyright 2017 Tecnativa - Jairo Llopis
# Copyright 2020 Hibou Corp. - Jared Kipe
# Copyright 2021 Tecnativa - Víctor Martínez
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from mock import patch
from odoo.exceptions import ValidationError
from odoo.tests import common, tagged
@tagged("post_inst... | 38.741758 | 7,051 |
969 | py | PYTHON | 15.0 | # Copyright 2017 Tecnativa - Jairo Llopis
# Copyright 2019 Tecnativa - Victor M.M. Torres
# Copyright 2020 Hibou Corp. - Jared Kipe
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import _, api, models
from odoo.exceptions import ValidationError
class MassMailingContact(models.Model):
... | 35.888889 | 969 |
574 | py | PYTHON | 15.0 | # Copyright 2017 Tecnativa - Jairo Llopis
# Copyright 2020 Hibou Corp. - Jared Kipe
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import models
class MassMailing(models.Model):
_inherit = "mailing.mailing"
def _get_remaining_recipients(self):
"""When evaluating remaining... | 35.875 | 574 |
2,948 | py | PYTHON | 15.0 | # Copyright 2017 Tecnativa - Jairo Llopis
# Copyright 2020 Hibou Corp. - Jared Kipe
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
from odoo.tools.safe_eval import safe_eval
class MassMailingList(models.Model):
_inherit = "mailing.list"
dynamic = fields... | 40.383562 | 2,948 |
368 | py | PYTHON | 15.0 | # Copyright 2017 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import models
class ResPartner(models.Model):
_inherit = "res.partner"
def write(self, vals):
"""Allow to write values in mass mailing contact."""
return super(ResPartne... | 30.666667 | 368 |
779 | py | PYTHON | 15.0 | # Copyright 2017 Tecnativa - Pedro M. Baeza
# Copyright 2020 Hibou Corp. - Jared Kipe
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields, models
class MailingLoadFilter(models.TransientModel):
_name = "mailing.load.filter"
_description = "Mass Mailing Load Filter"
f... | 32.458333 | 779 |
571 | py | PYTHON | 15.0 | # Copyright 2021 Tecnativa - Víctor Martínez
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import models
class BasePartnerMergeAutomaticWizard(models.TransientModel):
_inherit = "base.partner.merge.automatic.wizard"
def _merge(self, partner_ids, dst_partner=None, extra_check... | 33.470588 | 569 |
619 | py | PYTHON | 15.0 | # Copyright (C) 2015 Therp BV <http://therp.nl>
# Copyright (C) 2017 Komit <http://www.komit-consulting.com>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Restrict follower selection",
"version": "15.0.1.0.0",
"author": "Therp BV,Creu Blanca,Odoo Community Association (OCA)",
... | 38.6875 | 619 |
2,964 | py | PYTHON | 15.0 | # Copyright (C) 2015 Therp BV <http://therp.nl>
# Copyright (C) 2017 Komit <http://www.komit-consulting.com>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from lxml import etree
from odoo.tests.common import TransactionCase
class TestMailRestrictFollowerSelection(TransactionCase):
def setUp(s... | 36.146341 | 2,964 |
1,582 | py | PYTHON | 15.0 | # Copyright (C) 2018 Creu Blanca
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import models
from odoo.tools import config
from odoo.tools.safe_eval import safe_eval
class MailFollowers(models.Model):
_inherit = "mail.followers"
def _add_followers(
self,
res_mode... | 30.423077 | 1,582 |
1,432 | py | PYTHON | 15.0 | # Copyright (C) 2015 Therp BV <http://therp.nl>
# Copyright (C) 2017 Komit <http://www.komit-consulting.com>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from lxml import etree
from odoo import api, models
class MailWizardInvite(models.TransientModel):
_inherit = "mail.wizard.invite"
@a... | 35.8 | 1,432 |
1,185 | py | PYTHON | 15.0 | from odoo import models
from odoo.tools import config
from odoo.tools.safe_eval import safe_eval
class MailThread(models.AbstractModel):
_inherit = "mail.thread"
def _message_add_suggested_recipient(
self, result, partner=None, email=None, reason=""
):
result = super()._message_add_sugges... | 37.03125 | 1,185 |
1,267 | py | PYTHON | 15.0 | # Copyright 2015 Pedro M. Baeza <pedro.baeza@tecnativa.com>
# Copyright 2015 Antonio Espinosa <antonio.espinosa@tecnativa.com>
# Copyright 2015 Javier Iniesta <javieria@antiun.com>
# Copyright 2016 Antonio Espinosa - <antonio.espinosa@tecnativa.com>
# Copyright 2020 Tecnativa - Manuel Calero
# License AGPL-3.0 or later... | 42.233333 | 1,267 |
905 | py | PYTHON | 15.0 | # Copyright 2015 Pedro M. Baeza <pedro.baeza@tecnativa.com>
# Copyright 2015-2016 Antonio Espinosa <antonio.espinosa@tecnativa.com>
# Copyright 2015 Javier Iniesta <javieria@antiun.com>
# Copyright 2020 Tecnativa - Manuel Calero
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Link p... | 36.2 | 905 |
6,020 | py | PYTHON | 15.0 | # Copyright 2015 Pedro M. Baeza <pedro.baeza@tecnativa.com>
# Copyright 2015 Antonio Espinosa <antonio.espinosa@tecnativa.com>
# Copyright 2015 Javier Iniesta <javieria@antiun.com>
# Copyright 2020 Tecnativa - Manuel Calero
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo.exceptions impor... | 42.394366 | 6,020 |
829 | py | PYTHON | 15.0 | # Copyright 2018 Tecnativa - Ernesto tejeda
# Copyright 2020 Tecnativa - Manuel Calero
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo.exceptions import ValidationError
from . import base
class MailMassMailingListContactRelCase(base.BaseCase):
def test_create_mass_mailing_list(sel... | 37.681818 | 829 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.