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 |
|---|---|---|---|---|---|---|
778 | py | PYTHON | 15.0 | # Copyright 2018 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Purchase Order Secondary Unit",
"summary": "Purchase product in a secondary unit",
"version": "15.0.1.1.0",
"development_status": "Beta",
"category": "Purchase",
"website": "htt... | 35.363636 | 778 |
3,380 | py | PYTHON | 15.0 | # Copyright 2018 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields
from odoo.tests.common import Form, TransactionCase, tagged
@tagged("-at_install", "post_install")
class TestPurchaseOrderSecondaryUnit(TransactionCase):
@classmethod
def setUpCl... | 45.675676 | 3,380 |
1,665 | py | PYTHON | 15.0 | # Copyright 2018 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class PurchaseOrderLine(models.Model):
_inherit = ["purchase.order.line", "product.secondary.unit.mixin"]
_name = "purchase.order.line"
_secondary_unit_fields = ... | 39.642857 | 1,665 |
448 | py | PYTHON | 15.0 | # Copyright 2018 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields, models
class ProductTemplate(models.Model):
_inherit = "product.template"
purchase_secondary_uom_id = fields.Many2one(
comodel_name="product.secondary.unit",
st... | 34.461538 | 448 |
640 | py | PYTHON | 15.0 | # Copyright 2023 Tecnativa - Ernesto Tejeda
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields, models
class ProductProduct(models.Model):
_inherit = "product.product"
purchase_secondary_uom_id = fields.Many2one(
comodel_name="product.secondary.unit",
str... | 37.647059 | 640 |
706 | py | PYTHON | 15.0 | # Copyright 2019-2020 ForgeFlow S.L.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Purchase Request Tier Validation",
"summary": "Extends the functionality of Purchase Requests to "
"support a tier validation process.",
"version": "15.0.1.0.0",
"category": "Purchase Man... | 37.157895 | 706 |
745 | py | PYTHON | 15.0 | # Copyright 2017-2020 ForgeFlow S.L.
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl-3.0).
from odoo.tests import common
class TestPurchaseRequest(common.TransactionCase):
def setUp(self):
super(TestPurchaseRequest, self).setUp()
# common models
self.purchase_request = self... | 32.391304 | 745 |
549 | py | PYTHON | 15.0 | # Copyright 2019-2020 ForgeFlow S.L.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import api, models
class PurchaseRequest(models.Model):
_name = "purchase.request"
_inherit = ["purchase.request", "tier.validation"]
_state_from = ["draft"]
_state_to = ["approved"]
_t... | 30.5 | 549 |
401 | py | PYTHON | 15.0 | # Copyright 2019-2020 ForgeFlow S.L.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import api, models
class TierDefinition(models.Model):
_inherit = "tier.definition"
@api.model
def _get_tier_validation_model_names(self):
res = super(TierDefinition, self)._get_tier_va... | 30.846154 | 401 |
596 | py | PYTHON | 15.0 | # Copyright 2022 Tecnativa - Víctor Martínez
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Sale Purchase Force Vendor",
"version": "15.0.1.0.1",
"category": "Purchase Management",
"website": "https://github.com/OCA/purchase-workflow",
"author": "Tecnativa, Odoo Communit... | 34.941176 | 594 |
1,426 | py | PYTHON | 15.0 | # Copyright 2022 Tecnativa - Víctor Martínez
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
import json
from .common import TestSalePurchaseForceVendorBase
class TestSalePurchaseForceVendor(TestSalePurchaseForceVendorBase):
def test_misc(self):
self.sale_order.action_confirm()
p... | 44.5 | 1,424 |
1,820 | py | PYTHON | 15.0 | # Copyright 2022 Tecnativa - Víctor Martínez
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo.tests import Form, common
class TestSalePurchaseForceVendorBase(common.TransactionCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
cls.partner = cls.env["res.par... | 41.318182 | 1,818 |
2,032 | 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 json
from odoo import api, fields, models
class SaleOrder(models.Model):
_inherit = "sale.order"
sale_purchase_force_vendor_restrict = fields.Boolean(
related="company_id.sale_pur... | 33.278689 | 2,030 |
862 | 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 odoo import models
class StockMove(models.Model):
_inherit = "stock.move"
def _prepare_procurement_values(self):
"""Inject the preferred vendor in case of a MTO that first creates th... | 39.090909 | 860 |
356 | 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 odoo import fields, models
class ResCompany(models.Model):
_inherit = "res.company"
sale_purchase_force_vendor_restrict = fields.Boolean(
string="Restrict allowed vendors in sale ord... | 29.5 | 354 |
448 | 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 odoo import fields, models
class ResConfigSettings(models.TransientModel):
_inherit = "res.config.settings"
sale_purchase_force_vendor_restrict = fields.Boolean(
string="Restrict all... | 34.307692 | 446 |
838 | 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": "Purchase Invoice Plan",
"summary": "Add to purchases order, ability to manage future invoice plan",
"version": "15.0.1.0.2",
"author": "Ecosoft,Odoo Community Associ... | 36.434783 | 838 |
9,857 | py | PYTHON | 15.0 | # Copyright 2019 Ecosoft (http://ecosoft.co.th)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)
from freezegun import freeze_time
from odoo import fields
from odoo.exceptions import UserError, ValidationError
from odoo.tests.common import Form, TransactionCase
class TestPurchaseInvoicePlan(Trans... | 43.808889 | 9,857 |
1,419 | 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
from odoo.exceptions import ValidationError
class PurchaseCreateInvoicePlan(models.TransientModel):
_name = "purchase.create.invoice.plan"
_de... | 31.533333 | 1,419 |
927 | 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
class PurchaseAdvancePaymentInv(models.TransientModel):
_name = "purchase.make.planned.invoice"
_description = "Wizard when create invoice by plan"
def c... | 40.304348 | 927 |
11,831 | 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 dateutil.relativedelta import relativedelta
from odoo import _, api, fields, models
from odoo.exceptions import UserError, ValidationError
from odoo.tools.float_utils import float_compar... | 35.960486 | 11,831 |
585 | py | PYTHON | 15.0 | # Copyright 2019 ForgeFlow S.L.
# Copyright 2019 Aleph Objects, Inc.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html)
{
"name": "Purchase Force Invoiced",
"summary": "Allows to force the billing status of the purchase order to "
'"Invoiced"',
"version": "15.0.1.0.1",
"author": "... | 34.411765 | 585 |
5,334 | py | PYTHON | 15.0 | # Copyright 2019 Eficent Business and IT Consulting Services S.L.
# Copyright 2019 Aleph Objects, Inc.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html)
from odoo import fields
from odoo.tests.common import TransactionCase
class TestPurchaseForceInvoiced(TransactionCase):
def setUp(self):
... | 36.786207 | 5,334 |
880 | py | PYTHON | 15.0 | # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html)
from odoo import api, fields, models
class PurchaseOrder(models.Model):
_inherit = "purchase.order"
force_invoiced = fields.Boolean(
readonly=True,
states={"done": [("readonly", False)]},
copy=False,
help="W... | 33.846154 | 880 |
709 | py | PYTHON | 15.0 | # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html)
# Copyright 2022 Tecnativa - Pedro M. Baeza
from odoo import models
class PurchaseReport(models.Model):
_inherit = "purchase.report"
def _select(self):
"""Put quantity to be billed as 0 if it has been forced."""
select_str ... | 33.761905 | 709 |
686 | py | PYTHON | 15.0 | # Copyright 2021 Tecnativa - Carlos Roca
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Purchase Order Product Recommendation XLSX",
"summary": "Add a way to print recommended products for supplier",
"version": "15.0.1.0.0",
"category": "Purchases",
"website": "https://gi... | 38.111111 | 686 |
612 | py | PYTHON | 15.0 | # Copyright 2021 Tecnativa - Carlos Roca
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo.addons.purchase_order_product_recommendation.tests import test_recommendation
class RecommendationCase(test_recommendation.RecommendationCase):
def test_export_wizard(self):
"""Recommendation... | 43.714286 | 612 |
4,726 | py | PYTHON | 15.0 | # Copyright 2021 Tecnativa - Carlos Roca
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import _, models
class RecommendationXlsx(models.AbstractModel):
_name = "report.purchase_order_product_recommendation_xlsx.summary"
_inherit = "report.report_xlsx.abstract"
_description = "... | 41.823009 | 4,726 |
952 | py | PYTHON | 15.0 | # Copyright 2021 Tecnativa - Carlos Roca
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class PurchaseOrderRecommendation(models.TransientModel):
_inherit = "purchase.order.recommendation"
def export_xlsx(self):
self.ensure_one()
return self.en... | 38.08 | 952 |
493 | py | PYTHON | 15.0 | # Copyright 2022 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Purchase Receipt Expectation",
"version": "15.0.1.0.0",
"category": "Purchase Management",
"author": "Camptocamp SA, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/purcha... | 27.388889 | 493 |
4,092 | py | PYTHON | 15.0 | # Copyright 2022 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from datetime import datetime
from odoo import fields, models
from odoo.tests.common import TransactionCase
class TestPurchaseReceiptExpectation(TransactionCase):
@classmethod
def setUpClass(cls):
super().... | 38.242991 | 4,092 |
1,804 | py | PYTHON | 15.0 | # Copyright 2022 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from collections import defaultdict
from odoo import fields, models
class PurchaseOrder(models.Model):
_inherit = "purchase.order"
# New values added to this selection also require the definition
# of methods... | 40.088889 | 1,804 |
743 | py | PYTHON | 15.0 | # Copyright 2019 David Vidal <david.vidal@tecnativa.com>
# Copyright 2020 Manuel Calero - Tecnativa
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Purchase Order Product Recommendation",
"summary": "Recommend products to buy to supplier based on history",
"version": "15.0.1.0.1",... | 37.15 | 743 |
14,163 | py | PYTHON | 15.0 | # Copyright 2019 David Vidal <david.vidal@tecnativa.com>
# Copyright 2020 Manuel Calero - Tecnativa
# Copyright 2020 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields
from odoo.tests.common import TransactionCase
class RecommendationCase(TransactionCase... | 44.121495 | 14,163 |
15,224 | py | PYTHON | 15.0 | # Copyright 2019 David Vidal <david.vidal@tecnativa.com>
# Copyright 2020 Manuel Calero - Tecnativa
# Copyright 2020 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from datetime import datetime, timedelta
from odoo import _, api, fields, models
from odoo.exceptions import U... | 38.541772 | 15,224 |
527 | py | PYTHON | 15.0 | # Copyright 2020 ForgeFlow S.L.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Purchase Representative",
"summary": "Purchase Representatives will be the point of contact for "
"RFQ's and PO's",
"version": "15.0.1.0.0",
"category": "Purchases",
"website": "https://gi... | 35.133333 | 527 |
756 | py | PYTHON | 15.0 | # Copyright 2020-21 ForgeFlow S.L.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import models
class StockRule(models.Model):
_inherit = "stock.rule"
def _run_buy(self, procurements):
for procurement, _rule in procurements:
procurement.values["propagate_creat... | 36 | 756 |
502 | py | PYTHON | 15.0 | # Copyright 2021 Tecnativa - Víctor Martínez
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Purchase Partner Selectable Option",
"version": "15.0.1.0.1",
"category": "Purchase",
"website": "https://github.com/OCA/purchase-workflow",
"author": "Tecnativa, Odoo Community A... | 35.714286 | 500 |
717 | py | PYTHON | 15.0 | # Copyright 2021 Tecnativa - Víctor Martínez
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from lxml import etree
from odoo.tests import common
class TestPurchasePartnerSelectableOption(common.TransactionCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
def test_sa... | 34.047619 | 715 |
1,062 | py | PYTHON | 15.0 | # Copyright 2021 Tecnativa - Víctor Martínez
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from lxml import etree
from odoo import api, models
class PurchaseOrder(models.Model):
_inherit = "purchase.order"
@api.model
def fields_view_get(
self, view_id=None, view_type="form", ... | 33.125 | 1,060 |
315 | py | PYTHON | 15.0 | # Copyright 2021 Tecnativa - Víctor Martínez
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields, models
class Partner(models.Model):
_inherit = "res.partner"
purchase_selectable = fields.Boolean(
string="Selectable in purchase orders", default=True
)
| 26.083333 | 313 |
657 | py | PYTHON | 15.0 | # © 2017 Akretion (http://www.akretion.com) Payment
# @author Mourad EL HADJ MIMOUNE <mourad.elhadj.mimoune@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Purchase Free-Of-Payment shipping",
"version": "15.0.1.0.0",
"author": "Akretion,Odoo Community Associa... | 32.8 | 656 |
2,267 | py | PYTHON | 15.0 | # © 2017 Akretion (http://www.akretion.com)
# @author Mourad EL HADJ MIMOUNE <mourad.elhadj.mimoune@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import fields
from odoo.exceptions import UserError
from odoo.tests.common import TransactionCase
class TestPurchaseOrder(... | 34.333333 | 2,266 |
476 | py | PYTHON | 15.0 | # © 2014-2016 Akretion (http://www.akretion.com)
# @author Mourad EL HADJ MIMOUNE <mourad.elhadj.mimoune@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import fields, models
class ResPartner(models.Model):
_inherit = "res.partner"
fop_shipping = fields.Float(... | 27.941176 | 475 |
2,036 | py | PYTHON | 15.0 | # Copyright 2017 Akretion (http://www.akretion.com)
# @author Mourad EL HADJ MIMOUNE <mourad.elhadj.mimoune@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import _, api, fields, models
from odoo.exceptions import UserError
from odoo.tools import float_compare
class Pur... | 33.377049 | 2,036 |
686 | py | PYTHON | 15.0 | # Copyright 2019 David Vidal <david.vidal@tecnativa.com>
# Copyright 2020 Manuel Calero - Tecnativa
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Purchase Order Product Recommendation Brand Filter",
"summary": "Allow to filter recommendations by brand",
"version": "15.0.1.0.0",
... | 42.875 | 686 |
2,360 | py | PYTHON | 15.0 | # Copyright 2019 Tecnativa
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo.addons.purchase_order_product_recommendation.tests import test_recommendation
class BrandRecommendationCase(test_recommendation.RecommendationCase):
@classmethod
def setUpClass(cls):
super().setUpClass... | 42.909091 | 2,360 |
2,340 | py | PYTHON | 15.0 | # Copyright 2019 Tecnativa
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class PurchaseOrderRecommendation(models.TransientModel):
_inherit = "purchase.order.recommendation"
product_brand_ids = fields.Many2many(comodel_name="product.brand", string="Brand... | 39.661017 | 2,340 |
892 | py | PYTHON | 15.0 | # Copyright 2019-22 ForgeFlow S.L. (https://www.forgeflow.com)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Purchase Blanket Orders",
"category": "Purchase",
"license": "AGPL-3",
"author": "ForgeFlow, Odoo Community Association (OCA)",
"version": "15.0.1.3.1",
"web... | 35.68 | 892 |
9,089 | py | PYTHON | 15.0 | # Copyright (C) 2018 ForgeFlow S.L. (https://www.forgeflow.com)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from datetime import date, timedelta
from odoo import fields
from odoo.exceptions import UserError
from odoo.tests import common
class TestPurchaseBlanketOrders(common.TransactionCase)... | 39.864035 | 9,089 |
7,730 | py | PYTHON | 15.0 | # Copyright (C) 2018 ForgeFlow S.L. (https://www.forgeflow.com)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from datetime import date, timedelta
from odoo import fields
from odoo.tests import common
class TestPurchaseOrder(common.TransactionCase):
def setUp(self):
super().setUp()... | 38.267327 | 7,730 |
8,049 | py | PYTHON | 15.0 | # Copyright (C) 2018 ForgeFlow S.L. (https://www.forgeflow.com)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from collections import defaultdict
from odoo import _, api, fields, models
from odoo.exceptions import UserError
from odoo.tools import float_is_zero
class BlanketOrderWizard(models.Transi... | 36.420814 | 8,049 |
22,133 | py | PYTHON | 15.0 | # Copyright (C) 2018 ForgeFlow S.L. (https://www.forgeflow.com)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from datetime import datetime
from odoo import SUPERUSER_ID, _, api, fields, models
from odoo.exceptions import UserError
from odoo.tools import float_is_zero
class BlanketOrder(models.Mode... | 35.583601 | 22,133 |
481 | py | PYTHON | 15.0 | # Copyright (C) 2018 ForgeFlow S.L. (https://www.forgeflow.com)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class PurchaseConfigSettings(models.TransientModel):
_inherit = "res.config.settings"
group_purchase_blanket_disable_adding_lines = fields.Boolean(
... | 34.357143 | 481 |
6,904 | py | PYTHON | 15.0 | # Copyright (C) 2018 ForgeFlow S.L. (https://www.forgeflow.com)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from datetime import date, timedelta
from odoo import _, api, fields, models
from odoo.exceptions import ValidationError
class PurchaseOrder(models.Model):
_inherit = "purchase.order"
... | 37.934066 | 6,904 |
695 | py | PYTHON | 15.0 | # Copyright 2015 Camptocamp SA
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
"name": "Purchase Order Type",
"version": "15.0.1.0.0",
"author": "Camptocamp, Odoo Community Association (OCA)",
"license": "AGPL-3",
"category": "Purchase Management",
"depends": ["purchase"... | 31.590909 | 695 |
3,487 | py | PYTHON | 15.0 | # Copyright 2019 Oihane Crucelaegui - AvanzOSC
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
import time
from odoo.exceptions import ValidationError
from odoo.tests import common, tagged
from odoo.tools import DEFAULT_SERVER_DATETIME_FORMAT
@tagged("post_install", "-at_install")
class TestPu... | 40.08046 | 3,487 |
2,255 | py | PYTHON | 15.0 | # Copyright 2015 Camptocamp SA
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import _, api, fields, models
from odoo.exceptions import ValidationError
from odoo.addons.purchase.models.purchase import PurchaseOrder as Purchase
class PurchaseOrder(models.Model):
_inherit = "purch... | 34.166667 | 2,255 |
1,468 | py | PYTHON | 15.0 | # Copyright (C) 2015 Camptocamp SA
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import api, fields, models
class PurchaseOrderType(models.Model):
_name = "purchase.order.type"
_description = "Type of purchase order"
_order = "sequence"
@api.model
def _get_domai... | 32.622222 | 1,468 |
314 | py | PYTHON | 15.0 | # Copyright 2015 Camptocamp SA
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import fields, models
class ResPartner(models.Model):
_inherit = "res.partner"
purchase_type = fields.Many2one(
comodel_name="purchase.order.type", string="Purchase Order Type"
)
| 26.166667 | 314 |
1,272 | py | PYTHON | 15.0 | # Copyright 2018-2019 ForgeFlow, S.L.
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl-3.0).
{
"name": "Purchase Request",
"author": "ForgeFlow, Odoo Community Association (OCA)",
"version": "15.0.1.1.1",
"summary": "Use this module to have notification of requirements of "
"materials ... | 38.545455 | 1,272 |
16,799 | py | PYTHON | 15.0 | # Copyright 2018-2019 ForgeFlow, S.L.
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl-3.0)
from odoo import SUPERUSER_ID
from odoo.tests import common
class TestPurchaseRequestToRfq(common.TransactionCase):
def setUp(self):
super(TestPurchaseRequestToRfq, self).setUp()
self.purchas... | 41.684864 | 16,799 |
17,281 | py | PYTHON | 15.0 | # Copyright 2018-2019 ForgeFlow, S.L.
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl-3.0)
from odoo import SUPERUSER_ID
from odoo.tests import common
class TestPurchaseRequestToRfq(common.TransactionCase):
def setUp(self):
super(TestPurchaseRequestToRfq, self).setUp()
self.purchas... | 42.355392 | 17,281 |
3,999 | py | PYTHON | 15.0 | # Copyright 2018-2019 ForgeFlow, S.L.
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl-3.0)
from odoo import SUPERUSER_ID, fields
from odoo.tests import common
class TestPurchaseRequestProcurement(common.TransactionCase):
def setUp(self):
super(TestPurchaseRequestProcurement, self).setUp()
... | 35.705357 | 3,999 |
10,312 | py | PYTHON | 15.0 | # Copyright 2018-2019 ForgeFlow, S.L.
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl-3.0)
from odoo import SUPERUSER_ID, exceptions
from odoo.exceptions import UserError
from odoo.tests.common import Form, TransactionCase
class TestPurchaseRequest(TransactionCase):
def setUp(self):
super(... | 42.262295 | 10,312 |
15,608 | py | PYTHON | 15.0 | # Copyright 2018-2019 ForgeFlow, S.L.
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl-3.0).
from datetime import datetime
from odoo import _, api, fields, models
from odoo.exceptions import UserError
class PurchaseRequestLineMakePurchaseOrder(models.TransientModel):
_name = "purchase.request.line... | 39.816327 | 15,608 |
9,940 | py | PYTHON | 15.0 | # Copyright 2018-2019 ForgeFlow, S.L.
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl-3.0)
from odoo import _, api, fields, models
from odoo.exceptions import UserError
_STATES = [
("draft", "Draft"),
("to_approve", "To be approved"),
("approved", "Approved"),
("rejected", "Rejected"),
... | 32.37785 | 9,940 |
14,869 | py | PYTHON | 15.0 | # Copyright 2018-2019 ForgeFlow, S.L.
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl-3.0)
from odoo import _, api, fields, models
from odoo.exceptions import UserError
_STATES = [
("draft", "Draft"),
("to_approve", "To be approved"),
("approved", "Approved"),
("rejected", "Rejected"),
... | 36.002421 | 14,869 |
5,109 | py | PYTHON | 15.0 | # Copyright 2017 ForgeFlow, S.L.
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl-3.0)
from odoo import _, api, models
class StockMoveLine(models.Model):
_inherit = "stock.move.line"
@api.model
def _purchase_request_confirm_done_message_content(self, message_data):
title = _(
... | 40.547619 | 5,109 |
792 | py | PYTHON | 15.0 | # Copyright 2018-2019 ForgeFlow, S.L.
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl-3.0)
from odoo import models
class Orderpoint(models.Model):
_inherit = "stock.warehouse.orderpoint"
def _quantity_in_progress(self):
res = super(Orderpoint, self)._quantity_in_progress()
for... | 36 | 792 |
9,142 | py | PYTHON | 15.0 | # Copyright 2018-2019 ForgeFlow, S.L.
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl-3.0)
from odoo import _, api, exceptions, fields, models
class PurchaseOrder(models.Model):
_inherit = "purchase.order"
def _purchase_request_confirm_message_content(self, request, request_dict=None):
... | 39.068376 | 9,142 |
424 | py | PYTHON | 15.0 | # Copyright 2018-2019 ForgeFlow, S.L.
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl-3.0)
from odoo import fields, models
class ProductTemplate(models.Model):
_inherit = "product.template"
purchase_request = fields.Boolean(
help="Check this box to generate Purchase Request instead of... | 30.285714 | 424 |
5,043 | py | PYTHON | 15.0 | # Copyright 2018-2019 ForgeFlow, S.L.
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl-3.0)
from odoo import _, api, fields, models
from odoo.exceptions import ValidationError
class StockMove(models.Model):
_inherit = "stock.move"
created_purchase_request_line_id = fields.Many2one(
com... | 36.021429 | 5,043 |
4,799 | py | PYTHON | 15.0 | # Copyright 2018-2020 ForgeFlow, S.L.
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl-3.0)
from odoo import api, fields, models
class StockRule(models.Model):
_inherit = "stock.rule"
@api.model
def _prepare_purchase_request_line(self, request_id, procurement):
procurement_uom_po_q... | 37.787402 | 4,799 |
4,460 | py | PYTHON | 15.0 | # Copyright 2019 ForgeFlow, S.L.
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl-3.0)
from odoo import _, api, fields, models
class PurchaseRequestAllocation(models.Model):
_name = "purchase.request.allocation"
_description = "Purchase Request Allocation"
purchase_request_line_id = fields... | 33.787879 | 4,460 |
672 | py | PYTHON | 15.0 | # Copyright 2014-2016 Numérigraphe SARL
# Copyright 2017 ForgeFlow, S.L.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
"name": "Purchase Delivery Split Date",
"version": "15.0.1.0.0",
"summary": "Allows Purchase Order you confirm to generate one Incoming "
"Shipment for each e... | 39.470588 | 671 |
9,258 | py | PYTHON | 15.0 | # Copyright 2014-2016 Numérigraphe SARL
# Copyright 2017 ForgeFlow, S.L.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo.tests.common import TransactionCase
class TestDeliverySingle(TransactionCase):
def setUp(self):
super(TestDeliverySingle, self).setUp()
self.pro... | 37.938525 | 9,257 |
6,424 | py | PYTHON | 15.0 | # Copyright 2014-2016 Numérigraphe SARL
# Copyright 2017 ForgeFlow, S.L.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from itertools import groupby
from odoo import api, fields, models
class PurchaseOrderLine(models.Model):
_inherit = "purchase.order.line"
@api.model
def _get_g... | 41.43871 | 6,423 |
1,977 | py | PYTHON | 15.0 | # Copyright 2020 Opener B.V. <https://opener.amsterdam>
# Copyright 2020 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
import logging
from psycopg2 import sql
def pre_init_hook(cr):
"""Precreate financial_type and fill with appropriate values to prevent
a MemoryEr... | 42.978261 | 1,977 |
994 | py | PYTHON | 15.0 | # Copyright 2016 Lorenzo Battistini - Agile Business Group
# Copyright 2016 Tecnativa - Antonio Espinosa
# Copyright 2016 ACSONE SA/NV - Stéphane Bidoul
# Copyright 2017 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Tax Balance",
"summary": "Compute tax ba... | 38.192308 | 993 |
10,940 | py | PYTHON | 15.0 | # Copyright 2016 Lorenzo Battistini - Agile Business Group
# Copyright 2016 Giovanni Capalbo <giovanni@therp.nl>
# Copyright 2019 Andrea Stirpe <a.stirpe@onestein.nl>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from datetime import datetime, timedelta
from dateutil.rrule import MONTHLY
import odo... | 35.868852 | 10,940 |
2,995 | py | PYTHON | 15.0 | # Copyright 2016 Lorenzo Battistini - Agile Business Group
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import _, api, fields, models
class WizardOpenTaxBalances(models.TransientModel):
_name = "wizard.open.tax.balances"
_description = "Wizard Open Tax Balances"
company_ids ... | 36.084337 | 2,995 |
7,953 | py | PYTHON | 15.0 | # Copyright 2016 Lorenzo Battistini - Agile Business Group
# Copyright 2016 Antonio Espinosa <antonio.espinosa@tecnativa.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import _, api, fields, models
class AccountTax(models.Model):
_inherit = "account.tax"
balance = fields.Floa... | 38.052632 | 7,953 |
1,903 | py | PYTHON | 15.0 | # Copyright 2016 Antonio Espinosa <antonio.espinosa@tecnativa.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import _, api, fields, models
class AccountMove(models.Model):
_inherit = "account.move"
@api.model
def _selection_financial_type(self):
return [
... | 35.240741 | 1,903 |
684 | py | PYTHON | 15.0 | # Copyright 2017 ACSONE SA/NV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import models
class AccountMoveLine(models.Model):
_inherit = "account.move.line"
def init(self):
res = super().init()
self._cr.execute(
"""
SELECT indexname FROM ... | 26.307692 | 684 |
2,172 | py | PYTHON | 15.0 | # Author: Damien Crier
# Author: Julien Coux
# Copyright 2016 Camptocamp SA
# Copyright 2020 ForgeFlow S.L. (https://www.forgeflow.com)
# Copyright 2021 Tecnativa - João Marques
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Account Financial Reports",
"version": "15.0.2.8.4",
... | 36.183333 | 2,171 |
28,893 | py | PYTHON | 15.0 | # Author: Julien Coux
# Copyright 2016 Camptocamp SA
# Copyright 2020 ForgeFlow S.L. (https://www.forgeflow.com)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
import time
from datetime import date
from odoo import api, fields
from odoo.tests import tagged
from odoo.addons.account.tests.common ... | 39.962656 | 28,893 |
10,844 | py | PYTHON | 15.0 | # Copyright 2017 ACSONE SA/NV
# Copyright 2019-20 ForgeFlow S.L. (https://www.forgeflow.com)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from datetime import datetime
from dateutil.relativedelta import relativedelta
from odoo.fields import Date
from odoo.tests import tagged
from odoo.tests.common... | 39.721612 | 10,844 |
1,214 | py | PYTHON | 15.0 | # Copyright 2021 Simone Rubino - Agile Business Group
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo.tests import TransactionCase
from odoo.tools import DEFAULT_SERVER_DATE_FORMAT, test_reports
class TestAgedPartnerBalance(TransactionCase):
def setUp(self):
super().setUp... | 35.705882 | 1,214 |
26,163 | py | PYTHON | 15.0 | # Author: Julien Coux
# Copyright 2016 Camptocamp SA
# Copyright 2020 ForgeFlow S.L. (https://www.forgeflow.com)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo.tests import tagged
from odoo.addons.account.tests.common import AccountTestInvoicingCommon
@tagged("post_install", "-at_ins... | 38.875186 | 26,163 |
14,478 | py | PYTHON | 15.0 | # Copyright 2018 Forest and Biomass Romania
# Copyright 2020 ForgeFlow S.L. (https://www.forgeflow.com)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
import time
from datetime import date
from odoo import fields
from odoo.tests import tagged
from odoo.tests.common import Form
from odoo.addons... | 37.314433 | 14,478 |
1,198 | py | PYTHON | 15.0 | # Author: Julien Coux
# Copyright 2016 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo.tests import tagged
from odoo.addons.account.tests.common import AccountTestInvoicingCommon
@tagged("post_install", "-at_install")
class TestOpenItems(AccountTestInvoicingCommon):
... | 38.645161 | 1,198 |
12,557 | py | PYTHON | 15.0 | # Author: Damien Crier
# Author: Julien Coux
# Author: Jordi Ballester
# Copyright 2016 Camptocamp SA
# Copyright 2017 Akretion - Alexis de Lattre
# Copyright 2017 ForgeFlow, S.L.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
import time
from ast import literal_eval
from odoo import _, api, fi... | 38.996894 | 12,557 |
5,673 | py | PYTHON | 15.0 | # Author: Damien Crier, Andrea Stirpe, Kevin Graveman, Dennis Sluijk
# Author: Julien Coux
# Copyright 2016 Camptocamp SA, Onestein B.V.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import api, fields, models
class AgedPartnerBalanceWizard(models.TransientModel):
"""Aged partner... | 39.124138 | 5,673 |
3,424 | py | PYTHON | 15.0 | # Copyright 2018 Forest and Biomass Romania
# 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 VATReportWizard(models.TransientModel):
_name = "vat.report.wizard"
_description = "VAT Report Wizard"
... | 34.24 | 3,424 |
5,546 | py | PYTHON | 15.0 | # Copyright 2017 ACSONE SA/NV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import _, api, fields, models
class JournalLedgerReportWizard(models.TransientModel):
"""Journal Ledger report wizard."""
_name = "journal.ledger.report.wizard"
_description = "Journal Ledger Report W... | 35.324841 | 5,546 |
1,584 | py | PYTHON | 15.0 | # Copyright 2019 Lorenzo Battistini @ TAKOBI
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import fields, models
class AbstractWizard(models.AbstractModel):
_name = "account_financial_report_abstract_wizard"
_description = "Abstract Wizard"
def _get_partner_ids_domain(se... | 31.058824 | 1,584 |
6,537 | py | PYTHON | 15.0 | # Author: Damien Crier
# Author: Julien Coux
# Copyright 2016 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import api, fields, models
class OpenItemsReportWizard(models.TransientModel):
"""Open items report wizard."""
_name = "open.items.report.wizard"
_de... | 38.680473 | 6,537 |
10,662 | py | PYTHON | 15.0 | # Author: Julien Coux
# Copyright 2016 Camptocamp SA
# Copyright 2017 Akretion - Alexis de Lattre
# Copyright 2018 ForgeFlow, S.L.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import _, api, fields, models
from odoo.exceptions import UserError, ValidationError
from odoo.tools import d... | 40.233962 | 10,662 |
989 | py | PYTHON | 15.0 | # Copyright 2020 Onestein (<https://www.onestein.eu>)
# 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 _prepare_account_financial_report_context(self, data):
lang = dat... | 39.56 | 989 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.