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 |
|---|---|---|---|---|---|---|
3,589 | py | PYTHON | 15.0 | # © 2009 EduSense BV (<http://www.edusense.nl>)
# © 2011-2013 Therp BV (<https://therp.nl>)
# © 2014-2016 Serv. Tecnol. Avanzados - Pedro M. Baeza
# © 2016 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import api, fields, mode... | 38.138298 | 3,585 |
1,516 | py | PYTHON | 15.0 | # © 2017 Acsone SA/NV (<https://www.acsone.eu>)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import api, models
from odoo.tools.misc import formatLang
class AccountPaymentOrderReport(models.AbstractModel):
_name = "report.account_payment_order.print_account_payment_order_main"
... | 32.934783 | 1,515 |
752 | py | PYTHON | 15.0 | # Copyright 2010-2020 Akretion (www.akretion.com)
# Copyright 2016 Tecnativa - Antonio Espinosa
# Copyright 2016-2022 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html)
{
"name": "Account Banking SEPA Credit Transfer",
"summary": "Create SEPA XML files for Credit Tr... | 39.578947 | 752 |
15,183 | py | PYTHON | 15.0 | # Copyright 2016 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
# Copyright 2020 Sygel Technology - Valentin Vinagre
# Copyright 2018-2022 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
import base64
import time
from lxml import etree
from odoo.exceptions impo... | 40.488 | 15,183 |
639 | py | PYTHON | 15.0 | # Copyright 2017-2020 Akretion - Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import fields, models
class AccountPaymentLine(models.Model):
_inherit = "account.payment.line"
# Local_instrument 'INST' used for instant credit tr... | 37.588235 | 639 |
9,364 | py | PYTHON | 15.0 | # Copyright 2010-2020 Akretion (www.akretion.com)
# Copyright 2014-2022 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from lxml import etree
from odoo import _, fields, models
from odoo.exceptions import UserError
class AccountPaymentOrder(models.Model):
_inher... | 44.590476 | 9,364 |
1,604 | py | PYTHON | 15.0 | # Copyright 2016-2020 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import api, fields, models
class AccountPaymentMethod(models.Model):
_inherit = "account.payment.method"
pain_version = fields.Selection(
s... | 32.734694 | 1,604 |
787 | py | PYTHON | 15.0 | import logging
from odoo.tools import sql
logger = logging.getLogger(__name__)
def pre_init_hook(cr):
"""Prepare new payment_mode fields.
Add columns to avoid Memory error on an existing Odoo instance
with lots of data.
The payment_mode_id fields are introduced by this module and computed only
f... | 39.35 | 787 |
1,042 | py | PYTHON | 15.0 | # Copyright 2014 Akretion - Alexis de Lattre <alexis.delattre@akretion.com>
# Copyright 2014 Tecnativa - Pedro M. Baeza
# Copyright 2018 Tecnativa - Carlos Dauden
# Copyright 2021 Tecnativa - Víctor Martínez
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Account Payment Partner",
... | 37.142857 | 1,040 |
22,832 | py | PYTHON | 15.0 | # Copyright 2017 ForgeFlow S.L.
# Copyright 2021 Tecnativa - Víctor Martínez
# License AGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
from odoo import _, fields
from odoo.exceptions import UserError, ValidationError
from odoo.fields import Date
from odoo.tests.common import Form, TransactionCase
class T... | 38.694915 | 22,830 |
7,268 | py | PYTHON | 15.0 | # Copyright 2014-16 Akretion - Alexis de Lattre <alexis.delattre@akretion.com>
# Copyright 2014 Serv. Tecnol. Avanzados - Pedro M. Baeza
# 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 AccountMove(models.Mode... | 42.491228 | 7,266 |
1,436 | py | PYTHON | 15.0 | # Copyright 2016 Akretion (http://www.akretion.com/)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import api, fields, models
class AccountMoveLine(models.Model):
_inherit = "account.move.line"
payment_mode_id = fields.Many2one(
comodel_name="account.payment.mode",
... | 33.395349 | 1,436 |
2,706 | py | PYTHON | 15.0 | # Copyright 2017 ForgeFlow S.L.
# Copyright 2018 Tecnativa - Carlos Dauden
# Copyright 2021 Tecnativa - Víctor Martínez
# License AGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
from odoo import _, api, fields, models
from odoo.exceptions import ValidationError
class AccountPaymentMode(models.Model):
... | 35.116883 | 2,704 |
1,136 | py | PYTHON | 15.0 | # Copyright 2014 Akretion - Alexis de Lattre <alexis.delattre@akretion.com>
# Copyright 2014 Tecnativa - Pedro M. Baeza
# 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"
supplier_payment_mode_id ... | 35.5 | 1,136 |
510 | py | PYTHON | 15.0 | # Copyright 2021 Tecnativa - Víctor Martínez
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class AccountInvoiceReport(models.Model):
_inherit = "account.invoice.report"
payment_mode_id = fields.Many2one(
comodel_name="account.payment.mode",
s... | 28.222222 | 508 |
652 | py | PYTHON | 15.0 | # Copyright 2016 Akretion (<http://www.akretion.com>).
# Copyright 2017 Tecnativa - Vicent Cubells
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Account Payment Purchase",
"version": "15.0.1.0.0",
"category": "Banking addons",
"license": "AGPL-3",
"summary": "Adds ... | 38.352941 | 652 |
5,262 | py | PYTHON | 15.0 | # Copyright 2013-2015 Tecnativa - Pedro M. Baeza
# Copyright 2017 Tecnativa - Vicent Cubells
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
from odoo import fields
from odoo.tests import Form, TransactionCase, tagged
@tagged("-at_install", "post_install")
class TestAccountPaymentPurchase(Transactio... | 38.691176 | 5,262 |
1,545 | py | PYTHON | 15.0 | # Copyright 2016 Akretion (<http://www.akretion.com>).
# Copyright 2017 Tecnativa - Vicent Cubells.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import _, api, models
class AccountMove(models.Model):
_inherit = "account.move"
@api.onchange("purchase_vendor_bill_id", "purcha... | 38.625 | 1,545 |
1,550 | py | PYTHON | 15.0 | # Copyright 2016 Akretion (<http://www.akretion.com>).
# 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 PurchaseOrder(models.Model):
_inherit = "purchase.order"
supplier_partner_bank_id = fields.Many2... | 37.804878 | 1,550 |
610 | py | PYTHON | 15.0 | # Copyright 2016 Akretion (<http://www.akretion.com>).
# Copyright 2017 Tecnativa - Vicent Cubells
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Account Payment Purchase Stock",
"version": "15.0.1.0.0",
"category": "Banking addons",
"license": "AGPL-3",
"summary": ... | 38.125 | 610 |
4,828 | py | PYTHON | 15.0 | # Copyright 2013-2015 Tecnativa - Pedro M. Baeza
# Copyright 2017 Tecnativa - Vicent Cubells
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
from odoo import fields
from odoo.tests import Form
from odoo.addons.account_payment_purchase.tests.test_account_payment_purchase import (
TestAccountPaymen... | 40.571429 | 4,828 |
789 | py | PYTHON | 15.0 | # Copyright 2015 Tecnativa - Pedro M. Baeza
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
from odoo import models
class StockRule(models.Model):
_inherit = "stock.rule"
def _prepare_purchase_order(self, company_id, origins, values):
"""Propagate payment mode on MTO/drop shipping."... | 35.863636 | 789 |
582 | py | PYTHON | 15.0 | # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
"name": "Account Payment Order - Generate grouped moves",
"version": "15.0.1.0.1",
"license": "AGPL-3",
"author": "ACSONE SA/NV, Therp BV, Tecnativa, Akretion, "
"Odoo Community Association (OCA)",
"website": "https://githu... | 32.333333 | 582 |
783 | py | PYTHON | 15.0 | # Copyright 2022 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo.tests.common import tagged
from odoo.addons.account_payment_order.tests.test_payment_order_inbound import (
TestPaymentOrderInboundBase,
)
@tagged("post_install", "-at_install")
class TestPayme... | 37.285714 | 783 |
8,033 | py | PYTHON | 15.0 | # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import _, api, fields, models
class AccountPaymentOrder(models.Model):
_inherit = "account.payment.order"
grouped_move_ids = fields.One2many(
comodel_name="account.move",
inverse_name="grouped_payment_order_id",
... | 38.995146 | 8,033 |
426 | py | PYTHON | 15.0 | # Copyright 2022 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import fields, models
class AccountMove(models.Model):
_inherit = "account.move"
grouped_payment_order_id = fields.Many2one(
comodel_name="account.payment.order",
strin... | 26.625 | 426 |
353 | py | PYTHON | 15.0 | # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import fields, models
class AccountPaymentMode(models.Model):
_inherit = "account.payment.mode"
generate_move = fields.Boolean(
string="Generate Grouped Accounting Entries On File Upload", default=True
)
post_mov... | 29.416667 | 353 |
586 | py | PYTHON | 15.0 | # Copyright 2017 Tecnativa - Luis M. Ontalba
# Copyright 2021 Tecnativa - João Marques
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
{
"name": "Account Payment Order Return",
"version": "15.0.1.0.0",
"category": "Banking addons",
"author": "Tecnativa, Odoo Community Association (OCA)... | 36.5625 | 585 |
4,237 | py | PYTHON | 15.0 | # Copyright 2017 Tecnativa - Luis M. Ontalba
# Copyright 2021 Tecnativa - João Marques
# Copyright 2021 Tecnativa - Víctor Martínez
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0
from datetime import timedelta
from odoo import fields
from odoo.tests import common
from odoo.tests.common import Form
clas... | 38.144144 | 4,234 |
620 | py | PYTHON | 15.0 | # Copyright 2017 Tecnativa - Luis M. Ontalba
# Copyright 2021 Tecnativa - João Marques
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
from odoo import fields, models
class AccountPaymentLineCreate(models.TransientModel):
_inherit = "account.payment.line.create"
include_returned = fields.Bo... | 32.578947 | 619 |
504 | py | PYTHON | 15.0 | # © 2019 Today Akretion
# @author Pierrick Brun <pierrick.brun@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Base Product Mass Addition",
"version": "15.0.1.0.0",
"author": "Akretion, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/p... | 33.533333 | 503 |
3,676 | py | PYTHON | 15.0 | # Copyright 2022 Camptocamp SA (https://www.camptocamp.com).
# @author Iván Todorovich <ivan.todorovich@camptocamp.com>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo_test_helper import FakeModelLoader
from odoo.tests.common import TransactionCase
class TestProductMassAddition(Transactio... | 42.241379 | 3,675 |
1,245 | py | PYTHON | 15.0 | # Copyright 2022 Camptocamp SA (https://www.camptocamp.com).
# @author Iván Todorovich <ivan.todorovich@camptocamp.com>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields, models
class ModelOrder(models.Model):
_name = "model.order"
_description = "Test Model Order (base... | 34.555556 | 1,244 |
4,400 | py | PYTHON | 15.0 | # © 2014 Today Akretion
# @author Sébastien BEAU <sebastien.beau@akretion.com>
# @author Mourad EL HADJ MIMOUNE <mourad.elhadj.mimoune@akretion.com>
# @author Pierrick Brun <pierrick.brun@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import fields, models
from odoo.model... | 39.621622 | 4,398 |
2,417 | py | PYTHON | 15.0 | # © 2019 Today Akretion
# @author Pierrick Brun <pierrick.brun@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
import logging
from odoo import api, models
_logger = logging.getLogger(__name__)
class ProductMassAddition(models.AbstractModel):
_name = "product.mass.addition"
... | 33.09589 | 2,416 |
503 | py | PYTHON | 15.0 | # Copyright 2004 Tiny SPRL
# Copyright 2016 Sodexis
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
def pre_init_hook(cr):
"""
Updates existing codes matching the default '/' or
empty. Primarily this ensures installation does not
fail for demo data.
:param cr: database cursor
:... | 27.944444 | 503 |
665 | py | PYTHON | 15.0 | # Copyright 2004 Tiny SPRL
# Copyright 2016 Sodexis
# Copyright 2018 ForgeFlow S.L.
# (http://www.forgeflow.com)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Product Sequence",
"version": "15.0.2.1.0",
"author": "Zikzakmedia SL, Sodexis, Odoo Community Association (OCA)",
... | 30.227273 | 665 |
6,800 | py | PYTHON | 15.0 | # Copyright 2016 Sodexis
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo.exceptions import ValidationError
from odoo.tests.common import TransactionCase, tagged
from ..hooks import pre_init_hook
@tagged("post_install", "-at_install")
class TestProductSequence(TransactionCase):
"""Tests... | 40.236686 | 6,800 |
3,230 | py | PYTHON | 15.0 | # Copyright 2018 ForgeFlow S.L.
# (http://www.forgeflow.com)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import _, api, fields, models
from odoo.exceptions import ValidationError
class ProductCategory(models.Model):
_inherit = "product.category"
code_prefix = fields.Char(
... | 35.888889 | 3,230 |
2,594 | py | PYTHON | 15.0 | # Copyright 2004 Tiny SPRL
# Copyright 2016 Sodexis
# Copyright 2018 ForgeFlow S.L.
# (http://www.forgeflow.com)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import _, api, fields, models
class ProductProduct(models.Model):
_inherit = "product.product"
default_code = fields.Ch... | 41.174603 | 2,594 |
1,510 | py | PYTHON | 15.0 | # Copyright 2018 Eficent Business and IT Consulting Services S.L.
# (http://www.eficent.com)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import _, api, models
from odoo.exceptions import ValidationError
class IrSequence(models.Model):
_inherit = "ir.sequence"
@api.model
d... | 39.736842 | 1,510 |
560 | py | PYTHON | 15.0 | # Copyright 2004 Tiny SPRL
# Copyright 2016 Sodexis
# Copyright 2018 Eficent Business and IT Consulting Services S.L.
# (http://www.eficent.com)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class Company(models.Model):
_inherit = "res.company"
use_parent_... | 32.941176 | 560 |
498 | py | PYTHON | 15.0 | # Copyright 2004 Tiny SPRL
# Copyright 2016 Sodexis
# Copyright 2018 Eficent Business and IT Consulting Services S.L.
# (http://www.eficent.com)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class ResConfigSettings(models.TransientModel):
_inherit = "res.config... | 31.125 | 498 |
584 | py | PYTHON | 15.0 | # Copyright 2022 Tecnativa - Carlos Roca
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Product Pricelist Direct Print Company Group",
"summary": "Print Pricelist items using the company group model",
"version": "15.0.1.0.0",
"category": "Product",
"website": "https://gi... | 38.933333 | 584 |
772 | py | PYTHON | 15.0 | # Copyright 2022 Tecnativa - Carlos Roca
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import api, models
class ProductPricelistPrintCompanyGroup(models.TransientModel):
_inherit = "product.pricelist.print"
@api.model
def _get_sale_order_domain(self, partner):
domain ... | 36.761905 | 772 |
534 | py | PYTHON | 15.0 | {
"name": "Product Variant Attribute Name Manager",
"summary": "Manage how to display the attributes on the product variant name.",
"author": "ForgeFlow, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/product-attribute",
"category": "Product",
"version": "15.0.1.0.0",
... | 38.142857 | 534 |
4,318 | py | PYTHON | 15.0 | # Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo.tests import tagged
from odoo.tests.common import TransactionCase
@tagged("post_install", "-at_install")
class TestProductTemplateAttributeValue(TransactionCase):
def setUp(self):
super(TestProductTemplateAttributeValue... | 36.285714 | 4,318 |
1,634 | py | PYTHON | 15.0 | from odoo import fields, models
class ProductAttribute(models.Model):
_inherit = "product.attribute"
short_name = fields.Char(help="Displayed as the variant attribute name.")
display_attribute_name = fields.Boolean(
"Display Attribute Name on Product Variant",
help="If checked, it will di... | 38 | 1,634 |
580 | py | PYTHON | 15.0 | # Copyright 2022 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Products - Drained Weight",
"summary": "Add 'Drained Weight' on product models",
"version": "15.0.1.0.0",
"category": "Product",
"author": "Tecnativa,Odoo Community Association (OCA... | 34.117647 | 580 |
2,730 | py | PYTHON | 15.0 | # Copyright 2022 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo.exceptions import ValidationError
from odoo.tests.common import Form, TransactionCase
class TestProductDrainedWeight(TransactionCase):
@classmethod
def setUpClass(cls):
super().setUpCl... | 37.916667 | 2,730 |
1,596 | py | PYTHON | 15.0 | # Copyright 2022 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class ProductTemplate(models.Model):
_inherit = "product.template"
drained_weight = fields.Float(
compute="_compute_drained_weight",
inverse="_inve... | 38.926829 | 1,596 |
745 | py | PYTHON | 15.0 | # Copyright 2022 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import _, api, fields, models
from odoo.exceptions import ValidationError
class ProductProduct(models.Model):
_inherit = "product.product"
drained_weight = fields.Float(
digits="Stoc... | 33.863636 | 745 |
687 | py | PYTHON | 15.0 | # Copyright 2018 Tecnativa - Vicent Cubells
# Copyright 2018 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Supplier info prices in sales pricelists",
"summary": "Allows to create priceslists based on supplier info",
"version": "15.0.1.0.2",
"catego... | 36.157895 | 687 |
11,774 | py | PYTHON | 15.0 | # Copyright 2018 Tecnativa - Vicent Cubells
# Copyright 2018 Tecnativa - Pedro M. Baeza
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
from datetime import date
from odoo.tests import common
class TestProductSupplierinfo(common.TransactionCase):
@classmethod
def setUpClass(cls):
su... | 36.006116 | 11,774 |
1,892 | py | PYTHON | 15.0 | # Copyright 2018 Tecnativa - Vicent Cubells
# Copyright 2018 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import fields, models
class ProductPricelist(models.Model):
_inherit = "product.pricelist"
def _compute_price_rule(self, products_qty_partner... | 39.416667 | 1,892 |
628 | py | PYTHON | 15.0 | # Copyright 2020 Akretion - Mourad EL HADJ MIMOUNE
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import fields, models
class ProductSupplierinfo(models.Model):
_inherit = "product.supplierinfo"
sale_margin = fields.Float(
default=0,
digits=(16, 2),
he... | 29.904762 | 628 |
4,208 | py | PYTHON | 15.0 | # Copyright 2018 Tecnativa - Vicent Cubells
# Copyright 2018 Tecnativa - Pedro M. Baeza
# Copyright 2019 Tecnativa - Carlos Dauden
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from datetime import datetime
from odoo import fields, models, tools
class ProductTemplate(models.Model):
_inher... | 44.765957 | 4,208 |
1,558 | py | PYTHON | 15.0 | # Copyright 2018 Tecnativa - Vicent Cubells
# Copyright 2018 Tecnativa - Pedro M. Baeza
# Copyright 2019 Tecnativa - Carlos Dauden
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import models
class ProductProduct(models.Model):
_inherit = "product.product"
def _prepare_seller... | 42.108108 | 1,558 |
591 | py | PYTHON | 15.0 | # Copyright 2021 Camptocamp SA
# @author Iván Todorovich <ivan.todorovich@gmail.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Sale Product Template Tags",
"summary": "Show product tags menu in Sale app",
"version": "15.0.1.0.1",
"license": "AGPL-3",
"author": "Camp... | 36.875 | 590 |
528 | py | PYTHON | 15.0 | # Copyright 2020 Tecnativa - Ernesto Tejeda
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import SUPERUSER_ID, api
def post_init_hook(cr, registry):
env = api.Environment(cr, SUPERUSER_ID, {})
group_id = env.ref("product_multi_price.group_show_multi_prices").id
default_user =... | 37.714286 | 528 |
769 | py | PYTHON | 15.0 | # Copyright 2020 Tecnativa - David Vidal
# Copyright 2020 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Product Multi Price",
"version": "15.0.1.0.1",
"author": "Tecnativa," "Odoo Community Association (OCA)",
"website": "https://github.com/OCA/pr... | 34.954545 | 769 |
3,692 | py | PYTHON | 15.0 | # Copyright 2020 Tecnativa - David Vidal
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo.tests.common import TransactionCase
class TestProductMultiPrice(TransactionCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
cls.price_name_obj = cls.env["product.mul... | 38.863158 | 3,692 |
1,452 | py | PYTHON | 15.0 | # Copyright 2020 Tecnativa - David Vidal
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields, models
class ProductPricelist(models.Model):
_inherit = "product.pricelist"
def _compute_price_rule(self, products_qty_partner, date=False, uom_id=False):
"""Recompute pr... | 39.243243 | 1,452 |
1,924 | py | PYTHON | 15.0 | # Copyright 2020 Tecnativa - David Vidal
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class ProductTemplate(models.Model):
_inherit = "product.template"
price_ids = fields.One2many(
comodel_name="product.multi.price",
compute="_compute_... | 36.301887 | 1,924 |
2,656 | py | PYTHON | 15.0 | # Copyright 2020 Tecnativa - David Vidal
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields, models, tools
class ProductProduct(models.Model):
_inherit = "product.product"
price_ids = fields.One2many(
comodel_name="product.multi.price",
inverse_name="prod... | 40.861538 | 2,656 |
1,640 | py | PYTHON | 15.0 | # Copyright 2020 Tecnativa - David Vidal
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class ProductMultiPrice(models.Model):
_name = "product.multi.price"
_rec_name = "name_text"
_description = "Product Multiple Prices"
name = fields.Many2one("... | 27.79661 | 1,640 |
762 | py | PYTHON | 15.0 | # © 2015 David BEAL @ Akretion
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Product Profile",
"version": "15.0.1.0.0",
"author": "Akretion, Odoo Community Association (OCA)",
"summary": "Allow to configure a product in 1 click",
"category": "product",
"develop... | 33.086957 | 761 |
529 | py | PYTHON | 15.0 | # Copyright 2023 bosd
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openupgradelib import openupgrade
def rename_type_to_detailed_type(env):
if openupgrade.column_exists(env.cr, "product_profile", "type"):
openupgrade.rename_columns(
env.cr,
{
... | 25.190476 | 529 |
566 | py | PYTHON | 15.0 | # © 2015 David BEAL @ Akretion
# 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"
group_product_profile = fields.Boolean(
string="Display Product Profile fields",
... | 35.3125 | 565 |
11,024 | py | PYTHON | 15.0 | # © 2015 David BEAL @ Akretion
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
import logging
from copy import deepcopy
from lxml import etree
from odoo import _, api, fields, models
from odoo.exceptions import UserError
# Prefix name of profile fields setting a default value,
# not an immutabl... | 37.493197 | 11,023 |
1,538 | py | PYTHON | 15.0 | # © 2015 David BEAL @ Akretion
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import api, fields, models
class ProductTemplate(models.Model):
_inherit = ["product.template", "product.mixin.profile"]
_name = "product.template"
profile_id = fields.Many2one(comodel_name="pro... | 33.413043 | 1,537 |
808 | py | PYTHON | 15.0 | # Copyright (C) 2021 - 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": "Products - Net Weight",
"summary": "Add 'Net Weight' on product models",
"version": "15.0.2.0.0",
"catego... | 32.32 | 808 |
2,678 | py | PYTHON | 15.0 | # Copyright 2023 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo.exceptions import ValidationError
from odoo.tests.common import Form, TransactionCase
class TestProductNetWeight(TransactionCase):
@classmethod
def setUpClass(cls):
super().setUpClass(... | 37.194444 | 2,678 |
1,647 | py | PYTHON | 15.0 | # Copyright (C) 2021 - Today: GRAP (http://www.grap.coop)
# @author: Sylvain LE GAL (https://twitter.com/legalsylvain)
# Copyright 2023 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import api, fields, models
class ProductTemplate(models.Model):
_inheri... | 38.302326 | 1,647 |
879 | py | PYTHON | 15.0 | # Copyright (C) 2021 - 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).
from odoo import _, api, fields, models
from odoo.exceptions import ValidationError
class ProductProduct(models.Model):
_inhe... | 33.807692 | 879 |
555 | py | PYTHON | 15.0 | {
"name": "Product Attribute Value Menu",
"summary": """Product attributes values tree and form. Import attribute values.""",
"version": "15.0.1.1.1",
"website": "https://github.com/OCA/product-attribute",
"author": "Ilyas, Ooops404, Odoo Community Association (OCA)",
"license": "LGPL-3",
"c... | 34.6875 | 555 |
1,313 | py | PYTHON | 15.0 | # Copyright 2022 ForgeFlow, S.L.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class ProductAttributeValue(models.Model):
_inherit = "product.attribute.value"
product_count = fields.Integer(string="Product", compute="_compute_product_count")
@api.d... | 35.486486 | 1,313 |
603 | py | PYTHON | 15.0 | # Copyright 2021 Camptocamp SA
# @author Iván Todorovich <ivan.todorovich@gmail.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Purchase Product Template Tags",
"summary": "Show product tags menu in Purchase app",
"version": "15.0.1.0.0",
"license": "AGPL-3",
"author... | 37.625 | 602 |
682 | py | PYTHON | 15.0 | # Copyright 2023 Moduon Team S.L. <info@moduon.team>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Product Sticker",
"version": "15.0.1.1.0",
"author": "Moduon, Odoo Community Association (OCA)",
"license": "AGPL-3",
"website": "https://github.com/OCA/product-attri... | 29.652174 | 682 |
1,739 | py | PYTHON | 15.0 | from .common import ProductStickerCommon
class TestStickersOnProducts(ProductStickerCommon):
def test_global_stickers(self):
stickers = self.product_as500.get_product_stickers()
self.assertEqual(len(stickers), 1, "Global sticker must be present")
def test_product_template_stickers(self):
... | 38.644444 | 1,739 |
4,430 | py | PYTHON | 15.0 | import base64
import io
from PIL import Image
from odoo.tests import common, tagged
@tagged("post_install", "-at_install")
class ProductStickerCommon(common.TransactionCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
pa_model = cls.env["product.attribute"]
pav_model = cl... | 36.01626 | 4,430 |
276 | py | PYTHON | 15.0 | from odoo import fields, models
class ProductAttributeValue(models.Model):
_name = "product.attribute.value"
_inherit = ["product.attribute.value", "product.sticker.mixin"]
sticker_ids = fields.One2many(
inverse_name="product_attribute_value_id",
)
| 27.6 | 276 |
1,084 | py | PYTHON | 15.0 | from odoo import api, models
class ProductTemplate(models.Model):
_inherit = "product.template"
def action_view_stickers(self):
"""Action to open the Stickers related to this Product Template"""
stickers = self.get_product_stickers()
action = self.env.ref("product_sticker.action_produ... | 37.37931 | 1,084 |
1,150 | py | PYTHON | 15.0 | from odoo import api, models
class ProductProduct(models.Model):
_inherit = "product.product"
def action_view_stickers(self):
"""Action to open the Stickers related to this Product"""
stickers = self.get_product_stickers()
action = self.env.ref("product_sticker.action_product_sticker"... | 37.096774 | 1,150 |
877 | py | PYTHON | 15.0 | from odoo import api, fields, models
class ProductStickerMixin(models.AbstractModel):
_name = "product.sticker.mixin"
_description = "Product Sticker Mixin"
sticker_ids = fields.One2many(
comodel_name="product.sticker",
# `inverse_name` will be needed in every _inherit
string="Pro... | 33.730769 | 877 |
253 | py | PYTHON | 15.0 | from odoo import fields, models
class ProductAttribute(models.Model):
_name = "product.attribute"
_inherit = ["product.attribute", "product.sticker.mixin"]
sticker_ids = fields.One2many(
inverse_name="product_attribute_id",
)
| 25.3 | 253 |
6,496 | py | PYTHON | 15.0 | from odoo import api, fields, models
from odoo.osv import expression
class ProductSticker(models.Model):
_name = "product.sticker"
_description = "Product Sticker"
_inherit = ["image.mixin"]
_order = "sequence, id"
company_id = fields.Many2one(
comodel_name="res.company",
string="... | 35.497268 | 6,496 |
469 | py | PYTHON | 15.0 | # Copyright 2021 Akretion
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Product Attribute Archive",
"summary": """
Add an active field on product attributes""",
"version": "15.0.1.0.1",
"license": "AGPL-3",
"author": "Akretion,Odoo Community Association (OCA)",
... | 29.3125 | 469 |
252 | py | PYTHON | 15.0 | # Copyright 2021 Akretion
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class ProductAttributeValue(models.Model):
_inherit = "product.attribute.value"
active = fields.Boolean(default=True)
| 25.2 | 252 |
241 | py | PYTHON | 15.0 | # Copyright 2021 Akretion
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class ProductAttribute(models.Model):
_inherit = "product.attribute"
active = fields.Boolean(default=True)
| 24.1 | 241 |
879 | py | PYTHON | 15.0 | # Copyright 2017 Tecnativa - Carlos Dauden
# Copyright 2020 Tecnativa - João Marques
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
"name": "Product Pricelist Direct Print",
"summary": "Print price list from menu option, product templates, "
"products variants or price lists",
"... | 39.909091 | 878 |
497 | py | PYTHON | 15.0 | # Copyright 2023 Tecnativa - Carlos Roca
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openupgradelib import openupgrade
@openupgrade.migrate()
def migrate(env, version):
openupgrade.load_data(
env.cr,
"product_pricelist_direct_print",
"migrations/15.0.1.1.1/no... | 27.611111 | 497 |
8,368 | py | PYTHON | 15.0 | # Copyright 2017 Carlos Dauden <carlos.dauden@tecnativa.com>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo.exceptions import ValidationError
from odoo.tests.common import TransactionCase, tagged
@tagged("post_install", "-at_install")
class TestProductPricelistDirectPrint(Transaction... | 38.92093 | 8,368 |
5,783 | 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 ProductPricelistXlsx(models.AbstractModel):
_name = "report.product_pricelist_direct_print.product_pricelist_xlsx"
_inherit = "report.report_xlsx.abstract"
_de... | 43.481203 | 5,783 |
13,961 | py | PYTHON | 15.0 | # Copyright 2017 Tecnativa - Carlos Dauden
# Copyright 2018 Tecnativa - David Vidal
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from collections import defaultdict
from odoo import _, api, fields, models
from odoo.exceptions import ValidationError
from odoo.osv import expression
@api.model... | 40.233429 | 13,961 |
592 | py | PYTHON | 15.0 | # Copyright 2022 Tecnativa - Carlos Roca
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
"name": "Product ABC Classification",
"summary": "Includes ABC classification for inventory management",
"version": "15.0.1.0.1",
"author": "Tecnativa, Odoo Community Association (OCA)",
... | 39.466667 | 592 |
3,901 | py | PYTHON | 15.0 | # Copyright 2021 Tecnativa - David Vidal
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from freezegun import freeze_time
from odoo.tests import Form, common
@freeze_time("2021-04-01 00:00:00")
class TestSaleProductClassificationCase(common.TransactionCase):
@classmethod
def setUpClass(cls... | 42.402174 | 3,901 |
3,051 | py | PYTHON | 15.0 | # Copyright 2021 Tecnativa - David Vidal
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from freezegun import freeze_time
from .test_sale_product_classification_common import TestSaleProductClassificationCase
@freeze_time("2021-04-01 00:00:00")
class TestSaleProductClassification(TestSaleProductCl... | 47.671875 | 3,051 |
1,688 | py | PYTHON | 15.0 | # Copyright 2022 Tecnativa - Carlos Roca
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class ProductTemplate(models.Model):
_inherit = "product.template"
seasonality_classification = fields.Selection(
selection=[
("very high", "Very ... | 36.695652 | 1,688 |
641 | py | PYTHON | 15.0 | # Copyright 2022 Tecnativa - Carlos Roca
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields, models
class ProductProduct(models.Model):
_inherit = "product.product"
seasonality_classification = fields.Selection(
selection=[
("very high", "Very high"),... | 30.52381 | 641 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.