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 |
|---|---|---|---|---|---|---|
698 | py | PYTHON | 15.0 | # Copyright 2013 Camptocamp SA - Guewen Baconnier
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Stock Reservation",
"summary": "Stock reservations on products",
"version": "15.0.1.1.0",
"author": "Camptocamp, Odoo Community Association (OCA)",
"category": "Warehouse",
... | 31.727273 | 698 |
2,963 | 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
from odoo.tests import Form, common
class TestStockReserve(common.TransactionCase):
def setUp(self):
super().setUp()
warehouse_form = Form(self.env["stock.warehouse"])
... | 41.732394 | 2,963 |
7,403 | py | PYTHON | 15.0 | # Copyright 2013 Camptocamp SA - Guewen Baconnier
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
from odoo.exceptions import except_orm
from odoo.tools import float_compare
from odoo.tools.translate import _
class StockReservation(models.Model):
"""Allow to r... | 33.803653 | 7,403 |
2,090 | py | PYTHON | 15.0 | # Copyright 2013 Camptocamp SA - Guewen Baconnier
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields, models
class ProductTemplate(models.Model):
_inherit = "product.template"
reservation_count = fields.Float(
compute="_compute_reservation_count", string="# Sales... | 34.262295 | 2,090 |
612 | py | PYTHON | 15.0 | # Copyright 2022 ForgeFlow S.L. (https://www.forgeflow.com)
{
"name": "Stock Picking Show Linked",
"summary": """
This addon allows to easily access related pickings
(in the case of chained routes) through a button
in the parent picking view.
""",
"version": "15.0.1.0.0",
"autho... | 32.210526 | 612 |
1,863 | py | PYTHON | 15.0 | # Copyright 2022 ForgeFlow S.L. (https://www.forgeflow.com)
from odoo import api, fields, models
class StockPicking(models.Model):
_inherit = "stock.picking"
dest_picking_count = fields.Integer(compute="_compute_picking_count")
origin_picking_count = fields.Integer(compute="_compute_picking_count")
... | 39.638298 | 1,863 |
1,837 | py | PYTHON | 15.0 | # License AGPL-3.0 or later (https://www.gnuorg/licenses/agpl.html).
import os
from odoo import SUPERUSER_ID, api
def post_init_hook(cr, registry):
"""
Loaded after installing this module, and before the next module starts
installing.
Add XSD Validation Schema for a demo report if it's in the syste... | 39.934783 | 1,837 |
1,097 | py | PYTHON | 15.0 | # Copyright (C) 2014-2015 Grupo ESOC <www.grupoesoc.es>
# License AGPL-3.0 or later (https://www.gnuorg/licenses/agpl.html).
{
"name": "XML Reports",
"version": "15.0.1.0.1",
"category": "Reporting",
"website": "https://github.com/OCA/reporting-engine",
"development_status": "Production/Stable",
... | 33.242424 | 1,097 |
732 | py | PYTHON | 15.0 | # Copyright 2017 Creu Blanca
# License AGPL-3.0 or later (https://www.gnuorg/licenses/agpl).
from lxml import etree
from odoo.tests import common
class TestXmlReport(common.TransactionCase):
def test_xml(self):
report_object = self.env["ir.actions.report"]
report_name = "report_xml.demo_report_x... | 38.526316 | 732 |
2,118 | py | PYTHON | 15.0 | # Copyright (C) 2014-2015 Grupo ESOC <www.grupoesoc.es>
# License AGPL-3.0 or later (https://www.gnuorg/licenses/agpl.html).
from odoo import fields, models
class IrActionsReport(models.Model):
_inherit = "ir.actions.report"
report_type = fields.Selection(
selection_add=[("qweb-xml", "XML")], ondel... | 33.09375 | 2,118 |
4,182 | py | PYTHON | 15.0 | # Copyright (C) 2014-2015 Grupo ESOC <www.grupoesoc.es>
# License AGPL-3.0 or later (https://www.gnuorg/licenses/agpl.html).
import json
from werkzeug.urls import url_decode
from odoo.http import content_disposition, request, route, serialize_exception
from odoo.tools import html_escape
from odoo.tools.safe_eval im... | 43.113402 | 4,182 |
3,995 | py | PYTHON | 15.0 | # License AGPL-3.0 or later (https://www.gnuorg/licenses/agpl.html).
from base64 import b64decode
from xml.dom import minidom
from lxml import etree
from odoo import api, models
from odoo.exceptions import ValidationError
class ReportXmlAbstract(models.AbstractModel):
"""
Model `report.report_xml.abstract`... | 32.479675 | 3,995 |
712 | py | PYTHON | 15.0 | # Copyright (C) 2017 - Today: GRAP (http://www.grap.coop)
# @author: Sylvain LE GAL (https://twitter.com/legalsylvain)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "SQL Request Abstract",
"version": "15.0.1.0.0",
"author": "GRAP,Akretion,Odoo Community Association (OCA)",
... | 33.904762 | 712 |
9,841 | py | PYTHON | 15.0 | # Copyright (C) 2015 Akretion (<http://www.akretion.com>)
# Copyright (C) 2017 - Today: GRAP (http://www.grap.coop)
# @author: Sylvain LE GAL (https://twitter.com/legalsylvain)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
import base64
import logging
import re
import uuid
from io import BytesIO... | 33.817869 | 9,841 |
767 | py | PYTHON | 15.0 | # © 2013-2014 Nicolas Bessi (Camptocamp SA)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Base Comments Templates",
"summary": "Add conditional mako template to any report"
"on models that inherits comment.template.",
"version": "15.0.3.0.0",
"category": "Reporting... | 34.818182 | 766 |
722 | py | PYTHON | 15.0 | # Copyright 2022 Tecnativa - Víctor Martínez
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openupgradelib import openupgrade
@openupgrade.migrate()
def migrate(env, version):
openupgrade.logged_query(
env.cr, "ALTER TABLE base_comment_template ADD COLUMN IF NOT EXISTS models t... | 31.304348 | 720 |
525 | py | PYTHON | 15.0 | # Copyright 2022 Tecnativa - Víctor Martínez
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
import re
from openupgradelib import openupgrade
@openupgrade.migrate()
def migrate(env, version):
"""In v15 mail engine is inline_template, we try to replace the following:
- ${object} > {{obje... | 30.764706 | 523 |
1,000 | py | PYTHON | 15.0 | # Copyright 2017 LasLabs Inc.
# Copyright 2018 ACSONE
# Copyright 2018 Camptocamp
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
from odoo import models
def setup_test_model(env, model_cls):
"""Pass a test model class and initialize it.
Courtesy of SBidoul from https://github.com/OCA/m... | 29.411765 | 1,000 |
6,964 | py | PYTHON | 15.0 | # Copyright 2020 NextERP Romania SRL
# Copyright 2021 Tecnativa - Víctor Martínez
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo.exceptions import ValidationError
from odoo.tests import common
from odoo.tools.misc import mute_logger
from .fake_models import ResUsers, setup_test_model, t... | 40.242775 | 6,962 |
3,128 | py | PYTHON | 15.0 | from odoo import api, fields, models
from odoo.tools.safe_eval import safe_eval
from odoo.addons.base.models.res_partner import _lang_get
class BaseCommentTemplatePreview(models.TransientModel):
_name = "base.comment.template.preview"
_description = "Base Comment Template Preview"
@api.model
def _se... | 36.8 | 3,128 |
1,077 | py | PYTHON | 15.0 | # Copyright 2020 NextERP Romania SRL
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import api, fields, models
class IrModel(models.Model):
_inherit = "ir.model"
is_comment_template = fields.Boolean(
string="Comment Template",
default=False,
help="Whet... | 32.636364 | 1,077 |
4,497 | py | PYTHON | 15.0 | # Copyright 2014 Guewen Baconnier (Camptocamp SA)
# Copyright 2013-2014 Nicolas Bessi (Camptocamp SA)
# Copyright 2020 NextERP Romania SRL
# Copyright 2021-2022 Tecnativa - Víctor Martínez
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import _, api, fields, models
from odoo.exceptions i... | 35.96 | 4,495 |
2,518 | py | PYTHON | 15.0 | # Copyright 2014 Guewen Baconnier (Camptocamp SA)
# Copyright 2013-2014 Nicolas Bessi (Camptocamp SA)
# Copyright 2020 NextERP Romania SRL
# Copyright 2021-2022 Tecnativa - Víctor Martínez
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import api, fields, models
from odoo.osv import expr... | 39.3125 | 2,516 |
786 | py | PYTHON | 15.0 | # Copyright 2020 NextERP Romania SRL
# Copyright 2021 Tecnativa - Víctor Martínez
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import api, fields, models
class ResPartner(models.Model):
_inherit = "res.partner"
base_comment_template_ids = fields.Many2many(
comodel_n... | 34.086957 | 784 |
401 | py | PYTHON | 15.0 | # Copyright 2019 Creu Blanca
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Web QR Manager",
"version": "15.0.1.0.0",
"author": "Creu Blanca, " "Odoo Community Association (OCA)",
"category": "Reporting",
"website": "https://github.com/OCA/reporting-engine",
"licens... | 28.642857 | 401 |
644 | py | PYTHON | 15.0 | # Copyright 2019 Creu Blanca
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo.tests.common import HttpCase
class TestReportQr(HttpCase):
def test_qr_generation(self):
data = "TEST"
image = self.url_open("/report/qr?value=%s" % data)
self.assertEqual(image.headers[... | 35.777778 | 644 |
1,150 | py | PYTHON | 15.0 | import io
import qrcode
from qrcode.image import pil, svg
from odoo import api, models
class IrActionsReport(models.Model):
_inherit = "ir.actions.report"
@api.model
def qr_generate(self, value, box_size=3, border=5, factory="png", **kwargs):
factories = {
"png": pil.PilImage,
... | 32.857143 | 1,150 |
839 | py | PYTHON | 15.0 | import werkzeug
from odoo import http
from odoo.http import request
class Home(http.Controller):
@http.route("/report/qr", type="http", auth="public")
def report_qr(self, value, box_size=3, border=3, factory="png", **kwargs):
try:
barcode = request.env["ir.actions.report"].qr_generate(
... | 38.136364 | 839 |
776 | py | PYTHON | 15.0 | # Copyright 2015-2019 Onestein (<https://www.onestein.eu>)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
def uninstall_hook(cr, registry):
# delete dirty data that could cause problems
# while re-installing the module
cr.execute(
"""
delete from ir_model where model like... | 27.714286 | 776 |
1,291 | py | PYTHON | 15.0 | # Copyright 2015-2020 Onestein (<https://www.onestein.eu>)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "BI View Editor",
"summary": "Graphical BI views builder for Odoo",
"images": ["static/description/main_screenshot.png"],
"author": "Onestein,Odoo Community Association ... | 34.891892 | 1,291 |
15,175 | py | PYTHON | 15.0 | # Copyright 2017-2019 Onestein (<https://www.onestein.eu>)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
import json
import odoo
from odoo.exceptions import UserError, ValidationError
from odoo.tests.common import TransactionCase
from odoo.tools import mute_logger
from ..hooks import uninstall_hoo... | 35.705882 | 15,175 |
1,636 | py | PYTHON | 15.0 | # Copyright 2017-2020 Onestein (<https://www.onestein.eu>)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import api, models
class WizardModelMenuCreate(models.TransientModel):
_inherit = "wizard.ir.model.menu.create"
def menu_create(self):
if self.env.context.get("active... | 38.952381 | 1,636 |
7,490 | py | PYTHON | 15.0 | # Copyright 2015-2019 Onestein (<https://www.onestein.eu>)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from collections import defaultdict
from odoo import api, models
NO_BI_MODELS = ["fetchmail.server"]
NO_BI_TTYPES = ["many2many", "one2many", "html", "binary", "reference"]
def dict_for_fiel... | 34.200913 | 7,490 |
1,282 | py | PYTHON | 15.0 | # Copyright 2017-2020 Onestein (<https://www.onestein.eu>)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
import logging
from odoo import _, api, models
from odoo.exceptions import UserError
_logger = logging.getLogger(__name__)
@api.model
def _bi_view(_name):
return _name.startswith("x_bve."... | 26.708333 | 1,282 |
4,852 | py | PYTHON | 15.0 | # Copyright 2015-2020 Onestein (<https://www.onestein.eu>)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import _, api, fields, models
from odoo.exceptions import ValidationError
class BveViewLine(models.Model):
_name = "bve.view.line"
_description = "BI View Editor Lines"
n... | 39.447154 | 4,852 |
24,219 | py | PYTHON | 15.0 | # Copyright 2015-2020 Onestein (<https://www.onestein.eu>)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
import base64
import json
import pydot
from psycopg2.extensions import AsIs
from odoo import _, api, fields, models, tools
from odoo.exceptions import UserError, ValidationError
class BveView... | 37.490712 | 24,219 |
837 | py | PYTHON | 15.0 | # Copyright 2019 Ecosoft Co., Ltd (http://ecosoft.co.th/)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html)
{
"name": "Report Async",
"summary": "Central place to run reports live or async",
"version": "15.0.1.0.0",
"author": "Ecosoft, Odoo Community Association (OCA)",
"license":... | 34.875 | 837 |
2,491 | py | PYTHON | 15.0 | # Copyright 2019 Ecosoft Co., Ltd (http://ecosoft.co.th/)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html)
from odoo.exceptions import UserError
from odoo.tests import common
from odoo.tests.common import Form
class TestJobChannel(common.TransactionCase):
def setUp(self):
super(TestJob... | 43.701754 | 2,491 |
1,375 | py | PYTHON | 15.0 | # Copyright 2019 Ecosoft Co., Ltd (http://ecosoft.co.th/)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html)
from odoo import api, fields, models
class PrintReportWizard(models.TransientModel):
_name = "print.report.wizard"
_description = "Print Report Wizard"
reference = fields.Refere... | 30.555556 | 1,375 |
5,629 | py | PYTHON | 15.0 | # Copyright 2019 Ecosoft Co., Ltd (http://ecosoft.co.th/)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html)
import base64
from odoo import _, api, fields, models
from odoo.exceptions import UserError
from odoo.tools.safe_eval import safe_eval
# Define all supported report_type
REPORT_TYPES_FUNC = ... | 32.350575 | 5,629 |
908 | py | PYTHON | 15.0 | # Copyright 2019 Ecosoft Co., Ltd (http://ecosoft.co.th/)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html)
from odoo import models
# Define all supported report_type
REPORT_TYPES = ["qweb-pdf", "qweb-text", "qweb-xml", "csv", "excel", "xlsx"]
class Report(models.Model):
_inherit = "ir.action... | 39.478261 | 908 |
935 | py | PYTHON | 15.0 | # Copyright 2019 Ecosoft Co., Ltd (http://ecosoft.co.th/)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html)
from odoo import api, models
class IrActionsActWindow(models.Model):
_inherit = "ir.actions.act_window"
@api.model
def name_search(self, name, args=None, operator="ilike", limit... | 35.961538 | 935 |
1,448 | py | PYTHON | 15.0 | import setuptools
with open('VERSION.txt', 'r') as f:
version = f.read().strip()
setuptools.setup(
name="odoo-addons-oca-reporting-engine",
description="Meta package for oca-reporting-engine Odoo addons",
version=version,
install_requires=[
'odoo-addon-base_comment_template>=15.0dev,<15.1d... | 41.371429 | 1,448 |
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 |
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 |
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 |
820 | py | PYTHON | 15.0 | # Copyright 2020 Creu Blanca
# Copyright 2020 Ecosoft Co., Ltd.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Report Qweb Encrypt",
"summary": "Allow to encrypt qweb pdfs",
"version": "15.0.1.0.0",
"license": "AGPL-3",
"author": "Creu Blanca,Ecosoft,Odoo Community Assoc... | 29.285714 | 820 |
2,012 | py | PYTHON | 15.0 | # © 2016 Therp BV <http://therp.nl>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo.exceptions import ValidationError
from odoo.tests.common import HttpCase
class TestReportQwebEncrypt(HttpCase):
def test_report_qweb_no_encrypt(self):
ctx = {"force_report_rendering": True}
... | 41.040816 | 2,011 |
2,938 | py | PYTHON | 15.0 | # Copyright 2020 Creu Blanca
# Copyright 2020 Ecosoft Co., Ltd.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from io import BytesIO
from PyPDF2 import PdfFileReader, PdfFileWriter
from odoo import _, fields, models
from odoo.exceptions import ValidationError
from odoo.tools.safe_eval import safe_ev... | 38.155844 | 2,938 |
1,583 | py | PYTHON | 15.0 | # Copyright 2020 Creu Blanca
# Copyright 2020 Ecosoft Co., Ltd.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
import json
from werkzeug.urls import url_decode
from odoo.http import request, route
from odoo.addons.web.controllers import main as report
class ReportController(report.ReportController... | 40.589744 | 1,583 |
624 | py | PYTHON | 15.0 | # Copyright 2022 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Board Eval Context",
"summary": "Add some keys to board.board eval context",
"version": "15.0.1.0.0",
"author": "Camptocamp, Odoo Community Association (OCA)",
"maintainer": "gurneyalex",
... | 31.2 | 624 |
1,596 | py | PYTHON | 15.0 | # Copyright 2021-2023 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
import datetime
from dateutil.relativedelta import relativedelta
from odoo import api, models
from odoo.tools.safe_eval import safe_eval
class Board(models.AbstractModel):
_inherit = "board.board"
def _... | 33.25 | 1,596 |
773 | py | PYTHON | 15.0 | # Copyright (C) 2015 Akretion (<http://www.akretion.com>)
# @author: Florian da Costa
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "SQL Export",
"version": "15.0.1.0.0",
"author": "Akretion,Odoo Community Association (OCA)",
"website": "https://github.com/OCA/reporting... | 29.730769 | 773 |
2,699 | py | PYTHON | 15.0 | # Copyright (C) 2015 Akretion (<http://www.akretion.com>)
# @author: Florian da Costa
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
import base64
from odoo import fields
from odoo.exceptions import UserError
from odoo.tests.common import TransactionCase, tagged
@tagged("post_install", "-at_in... | 35.051948 | 2,699 |
4,037 | py | PYTHON | 15.0 | # Copyright (C) 2015 Akretion (<http://www.akretion.com>)
# @author: Florian da Costa
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
import json
from datetime import datetime
from lxml import etree
from odoo import api, fields, models
from odoo.tools import DEFAULT_SERVER_DATETIME_FORMAT
clas... | 40.777778 | 4,037 |
3,432 | py | PYTHON | 15.0 | # Copyright (C) 2015 Akretion (<http://www.akretion.com>)
# @author: Florian da Costa
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import fields, models
class SqlExport(models.Model):
_name = "sql.export"
_inherit = ["sql.request.mixin"]
_description = "SQL export"
_... | 36.903226 | 3,432 |
701 | py | PYTHON | 15.0 | # Copyright 2017 Avoin.Systems
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
# noinspection PyStatementEffect
{
"name": "Report Wkhtmltopdf Param",
"version": "15.0.1.0.0",
"license": "AGPL-3",
"summary": """
Add new parameters for a paper format to be used by wkhtmltopdf
... | 33.380952 | 701 |
1,257 | py | PYTHON | 15.0 | # Copyright 2017 Avoin.Systems
# Copyright 2017 Eficent Business and IT Consulting Services, S.L.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
import odoo.tests
from odoo.exceptions import ValidationError
from odoo.tests.common import tagged
@tagged("post_install", "-at_install")
class TestWkhtml... | 38.090909 | 1,257 |
543 | py | PYTHON | 15.0 | # Copyright 2017 Avoin.Systems
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields, models
class ReportPaperformatParameter(models.Model):
_name = "report.paperformat.parameter"
_description = "wkhtmltopdf parameters"
paperformat_id = fields.Many2one(
"report... | 24.681818 | 543 |
1,362 | py | PYTHON | 15.0 | # Copyright 2017 Avoin.Systems
# Copyright 2017 Eficent Business and IT Consulting Services, S.L.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
import logging
from odoo import _, api, fields, models
from odoo.exceptions import ValidationError
_logger = logging.getLogger(__name__)
class Paper(mod... | 31.674419 | 1,362 |
894 | py | PYTHON | 15.0 | # Copyright 2017 Avoin.Systems
# Copyright 2017 Eficent Business and IT Consulting Services, S.L.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import api, models
class IrActionsReport(models.Model):
_inherit = "ir.actions.report"
@api.model
def _build_wkhtmltopdf_args(
... | 30.827586 | 894 |
818 | py | PYTHON | 15.0 | # © 2016 Therp BV <http://therp.nl>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Pdf watermark",
"version": "15.0.1.0.0",
"author": "Therp BV, " "Odoo Community Association (OCA)",
"license": "AGPL-3",
"category": "Technical Settings",
"development_status": "Pr... | 32.68 | 817 |
1,996 | py | PYTHON | 15.0 | # © 2016 Therp BV <http://therp.nl>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from PIL import Image
from odoo.tests.common import HttpCase
class TestReportQwebPdfWatermark(HttpCase):
def test_report_qweb_pdf_watermark(self):
Image.init()
# with our image, we have three
... | 36.272727 | 1,995 |
265 | py | PYTHON | 15.0 | # Copyright 2022 360 ERP (<https://www.360erp.nl>)
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
from odoo import fields, models
class ResCompany(models.Model):
_inherit = "res.company"
pdf_watermark = fields.Binary("Watermark")
| 26.5 | 265 |
4,668 | py | PYTHON | 15.0 | # © 2016 Therp BV <http://therp.nl>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from base64 import b64decode
from io import BytesIO
from logging import getLogger
from PIL import Image
from odoo import api, fields, models
from odoo.tools.safe_eval import safe_eval
logger = getLogger(__name__)... | 34.57037 | 4,667 |
765 | py | PYTHON | 15.0 | # Copyright 2015 ACSONE SA/NV (<http://acsone.eu>)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
"name": "Base report xlsx",
"summary": "Base module to create xlsx report",
"author": "ACSONE SA/NV," "Creu Blanca," "Odoo Community Association (OCA)",
"website": "https://github.c... | 36.428571 | 765 |
2,271 | py | PYTHON | 15.0 | # Copyright 2017 Creu Blanca
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
import logging
from odoo.tests import common
_logger = logging.getLogger(__name__)
try:
from xlrd import open_workbook
except ImportError:
_logger.debug("Can not import xlrd`.")
class TestReport(common.Trans... | 33.865672 | 2,269 |
1,358 | py | PYTHON | 15.0 | # Copyright 2015 ACSONE SA/NV (<http://acsone.eu>)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import _, api, fields, models
from odoo.exceptions import UserError
class ReportAction(models.Model):
_inherit = "ir.actions.report"
report_type = fields.Selection(
sele... | 34.820513 | 1,358 |
555 | py | PYTHON | 15.0 | # Copyright 2017 Creu Blanca
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import models
class PartnerXlsx(models.AbstractModel):
_name = "report.report_xlsx.partner_xlsx"
_inherit = "report.report_xlsx.abstract"
_description = "Partner XLSX Report"
def generate_xls... | 34.6875 | 555 |
5,198 | py | PYTHON | 15.0 | # Copyright 2015 ACSONE SA/NV (<http://acsone.eu>)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
import logging
import re
from io import BytesIO
from odoo import models
_logger = logging.getLogger(__name__)
try:
import xlsxwriter
class PatchedXlsxWorkbook(xlsxwriter.Workbook):
... | 44.050847 | 5,198 |
4,303 | py | PYTHON | 15.0 | # Copyright (C) 2017 Creu Blanca
# Copyright 2021 ForgeFlow S.L.
# License AGPL-3.0 or later (https://www.gnuorg/licenses/agpl.html).
import json
import logging
from werkzeug.urls import url_decode
from odoo.http import (
content_disposition,
request,
route,
serialize_exception as _serialize_exceptio... | 41.375 | 4,303 |
477 | py | PYTHON | 15.0 | # Copyright 2015 Agile Business Group
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Report Qweb Element Page Visibility",
"version": "15.0.1.0.2",
"author": "Agile Business Group, Odoo Community Association (OCA)",
"category": "Tools",
"website": "https://github.com/OCA... | 31.8 | 477 |
426 | py | PYTHON | 15.0 | # Copyright 2009-2019 Noviat.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Report xlsx helpers",
"author": "Noviat, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/reporting-engine",
"category": "Reporting",
"version": "15.0.1.0.1",
"license":... | 30.428571 | 426 |
890 | py | PYTHON | 15.0 | # Copyright 2009-2019 Noviat.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from datetime import date
from odoo.tests.common import TransactionCase
class TestReportXlsxHelper(TransactionCase):
def setUp(self):
super(TestReportXlsxHelper, self).setUp()
today = date.today()
... | 32.962963 | 890 |
739 | py | PYTHON | 15.0 | # Copyright 2009-2018 Noviat.
# License AGPL-3.0 or later (https://www.gnuorg/licenses/agpl.html).
from odoo import _, api, models
from odoo.exceptions import UserError
class IrActionsReport(models.Model):
_inherit = "ir.actions.report"
@api.model
def _render_xlsx(self, docids, data):
if not sel... | 38.894737 | 739 |
35,530 | py | PYTHON | 15.0 | # Copyright 2009-2018 Noviat.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
import re
from datetime import date, datetime
from types import CodeType
from xlsxwriter.utility import xl_rowcol_to_cell
from odoo import _, fields, models
from odoo.exceptions import UserError
from .report_xlsx_format im... | 46.202861 | 35,530 |
7,581 | py | PYTHON | 15.0 | # Global Formatting
XLS_HEADERS = {"xls_headers": "", "xls_footers": ""}
FORMATS = {
"format_ws_title": False,
"format_left": False,
"format_center": False,
"format_right": False,
"format_amount_left": False,
"format_amount_center": False,
"format_amount_right": False,
"format_amount_con... | 46.22561 | 7,581 |
2,410 | py | PYTHON | 15.0 | # Copyright 2009-2019 Noviat.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import models
from .report_xlsx_format import FORMATS, XLS_HEADERS
# TODO:
# make PR to move this class as well as the report_xlsx test class
# to the tests folder (requires dynamic update Odoo registry when
# ru... | 32.133333 | 2,410 |
1,939 | py | PYTHON | 15.0 | # Copyright 2009-2018 Noviat.
# License AGPL-3.0 or later (https://www.gnuorg/licenses/agpl.html).
import json
from odoo.http import content_disposition, request, route
from odoo.addons.report_xlsx.controllers.main import ReportController
class ReportController(ReportController):
@route(
[
... | 38.78 | 1,939 |
615 | py | PYTHON | 15.0 | # Copyright 2019 Creu Blanca
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
"name": "Base report csv",
"summary": "Base module to create csv report",
"author": "Creu Blanca, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/reporting-engine",
"category": ... | 32.368421 | 615 |
1,990 | py | PYTHON | 15.0 | # Copyright 2019 Creu Blanca
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
import logging
from io import StringIO
from odoo.tests import common
_logger = logging.getLogger(__name__)
try:
import csv
except ImportError:
_logger.debug("Can not import csv.")
class TestReport(common.Trans... | 34.912281 | 1,990 |
1,282 | py | PYTHON | 15.0 | # Copyright 2019 Creu Blanca
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import _, api, fields, models
from odoo.exceptions import UserError
class ReportAction(models.Model):
_inherit = "ir.actions.report"
report_type = fields.Selection(
selection_add=[("csv", "cs... | 34.648649 | 1,282 |
744 | py | PYTHON | 15.0 | # Copyright 2019 Creu Blanca
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
import csv
from odoo import models
class PartnerCSV(models.AbstractModel):
_name = "report.report_csv.partner_csv"
_inherit = "report.report_csv.abstract"
_description = "Report Partner to CSV"
def gen... | 31 | 744 |
2,195 | py | PYTHON | 15.0 | # Copyright 2019 Creu Blanca
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
import logging
from io import StringIO
from odoo import models
_logger = logging.getLogger(__name__)
try:
import csv
except ImportError:
_logger.debug("Can not import csvwriter`.")
class ReportCSVAbstract(mo... | 35.983607 | 2,195 |
4,330 | py | PYTHON | 15.0 | # Copyright (C) 2019 Creu Blanca
# License AGPL-3.0 or later (https://www.gnuorg/licenses/agpl.html).
import json
import logging
from werkzeug.urls import url_decode
from odoo.http import (
content_disposition,
request,
route,
serialize_exception as _serialize_exception,
)
from odoo.tools import html... | 42.038835 | 4,330 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.