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 |
|---|---|---|---|---|---|---|
264 | py | PYTHON | 15.0 | # Copyright 2020 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)
from odoo import models
class AccountMove(models.Model):
_inherit = "account.move"
def _validate_invoice(self):
return self.sudo().action_post()
| 24 | 264 |
593 | py | PYTHON | 15.0 | # Copyright 2020 Camptocamp SA
# 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"
invoicing_mode = fields.Selection([("standard", "Standard")], default="standard")
one_invoice_per_order = field... | 28.238095 | 593 |
884 | py | PYTHON | 15.0 | # Copyright 2017-2020 Akretion France (http://www.akretion.com/)
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Invoice Transmit Method",
"version": "15.0.1.1.0",
"category": "Accounting/Accounting",
"license": "AGP... | 36.833333 | 884 |
1,382 | py | PYTHON | 15.0 | # Copyright 2017-2020 Akretion France (http://www.akretion.com/)
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
# Copyright 2021 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... | 39.457143 | 1,381 |
1,552 | py | PYTHON | 15.0 | # Copyright 2017-2020 Akretion France (http://www.akretion.com)
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class AccountMove(models.Model):
_inherit = "account.move"
transmit_method_id = fie... | 34.488889 | 1,552 |
920 | py | PYTHON | 15.0 | # Copyright 2017-2020 Akretion France (http://www.akretion.com)
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields, models
class TransmitMethod(models.Model):
_name = "transmit.method"
_description = "Transmit Me... | 38.333333 | 920 |
1,408 | py | PYTHON | 15.0 | # Copyright 2017-2020 Akretion France (http://www.akretion.com)
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class ResPartner(models.Model):
_inherit = "res.partner"
customer_invoice_transmit_... | 34.341463 | 1,408 |
583 | py | PYTHON | 15.0 | # Copyright 2023 Moduon Team S.L.
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl).
{
"name": "Receipts Print and Send",
"summary": "Send receipts",
"version": "15.0.1.0.1",
"category": "Accounting & Finance",
"website": "https://github.com/OCA/account-invoicing",
"author": "Moduo... | 29.15 | 583 |
953 | py | PYTHON | 15.0 | # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo.tests import tagged
from odoo.addons.account.tests.common import AccountTestInvoicingCommon
@tagged("post_install", "-at_install")
class TestAccountReceipt(AccountTestInvoicingCommon):
@classmethod
def setUpClass(cls, chart_template_... | 35.296296 | 953 |
319 | py | PYTHON | 15.0 | from odoo import models
class AccountMove(models.Model):
_inherit = "account.move"
def _get_mail_template(self):
if all(move.move_type in {"out_receipt", "in_receipt"} for move in self):
return "account_receipt_send.email_template_edi_receipt"
return super()._get_mail_template()
| 31.9 | 319 |
604 | py | PYTHON | 15.0 | # Copyright 2022 ForgeFlow, S.L.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Account Move Tier Validation - Forward Option",
"version": "15.0.1.0.0",
"category": "Accounting",
"website": "https://github.com/OCA/account-invoicing",
"author": "ForgeFlow,Odoo Community A... | 37.75 | 604 |
595 | py | PYTHON | 15.0 | # Copyright 2018 QubiQ (http://www.qubiq.es)
# Copyright 2017 Tecnativa - David Vidal
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Account Invoice Triple Discount",
"version": "15.0.1.0.1",
"category": "Accounting & Finance",
"author": "QubiQ, Tecnativa, Odoo Community Asso... | 39.666667 | 595 |
5,894 | py | PYTHON | 15.0 | # Copyright 2017 Tecnativa - David Vidal
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo.tests import TransactionCase
from odoo.tests.common import Form
class TestInvoiceTripleDiscount(TransactionCase):
@classmethod
def setUpClass(cls):
super(TestInvoiceTripleDiscount, cls).... | 35.293413 | 5,894 |
1,890 | py | PYTHON | 15.0 | # Copyright 2017 Tecnativa - David Vidal
# Copyright 2017 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import models
class AccountMove(models.Model):
_inherit = "account.move"
def _recompute_tax_lines(self, **kwargs):
"""
As the taxes ... | 39.375 | 1,890 |
4,038 | py | PYTHON | 15.0 | # Copyright 2020 ACSONE SA/NV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
import functools
from odoo import api, fields, models
from odoo.tools import float_compare
class AccountMoveLine(models.Model):
_inherit = "account.move.line"
discount2 = fields.Float(
string="Discount 2 ... | 37.738318 | 4,038 |
535 | py | PYTHON | 15.0 | # Copyright 2023 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Sales order invoicing by percentage of the quantity",
"version": "15.0.1.0.0",
"category": "Sales Management",
"license": "AGPL-3",
"author": "Tecnativa, Odoo Community Association... | 35.666667 | 535 |
1,539 | py | PYTHON | 15.0 | # Copyright 2023 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo.tests import Form, TransactionCase
class TestSaleOrderInvoicingQtyPercentage(TransactionCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
cls.env = cls.env(context... | 38.475 | 1,539 |
525 | py | PYTHON | 15.0 | # Copyright 2023 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import models
class SaleOrder(models.Model):
_inherit = "sale.order.line"
def _prepare_invoice_line(self, **optional_values):
"""If invoicing by quantity percentage, modify quantitie... | 35 | 525 |
922 | py | PYTHON | 15.0 | from odoo import fields, models
class SaleAdvancePaymentInv(models.TransientModel):
_inherit = "sale.advance.payment.inv"
advance_payment_method = fields.Selection(
# Added before "Down payment (percentage)" option
selection_add=[
("qty_percentage", "Percentage of the quantity"),
... | 38.416667 | 922 |
639 | py | PYTHON | 15.0 | # Copyright 2022 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Sale Invoicing Date Selection",
"summary": "Set date invoice when you create invoices",
"version": "15.0.1.0.0",
"development_status": "Beta",
"category": "Accounting & Finance",
... | 37.588235 | 639 |
1,864 | py | PYTHON | 15.0 | # Copyright 2022 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields
from odoo.tests import Form, TransactionCase
class TestSaleInvoicingDateSelection(TransactionCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
cls.par... | 45.463415 | 1,864 |
750 | py | PYTHON | 15.0 | # Copyright 2022 Sergio Teruel <sergio.teruel@tecnativa.com>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields, models
class SaleAdvancePaymentInv(models.TransientModel):
_inherit = "sale.advance.payment.inv"
invoice_date = fields.Date()
def create_invoices(self):... | 31.25 | 750 |
505 | py | PYTHON | 15.0 | # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Account - Pricelist on Invoices",
"version": "15.0.1.0.2",
"summary": "Add partner pricelist on invoices",
"category": "Accounting & Finance",
"author": "GRAP," "Therp BV," "Tecnativa," "Odoo Community Association (OCA)",
... | 36.071429 | 505 |
13,431 | py | PYTHON | 15.0 | # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
import hashlib
import inspect
from odoo.exceptions import UserError
from odoo.tests import common
from odoo.addons.sale.models.sale_order_line import SaleOrderLine as upstream
# if this hash fails then the original function it was copied from
# needs t... | 40.577039 | 13,431 |
9,564 | py | PYTHON | 15.0 | # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import _, api, fields, models
from odoo.exceptions import UserError
class AccountMove(models.Model):
_inherit = "account.move"
pricelist_id = fields.Many2one(
comodel_name="product.pricelist",
string="Pricelist",
... | 42.318584 | 9,564 |
735 | py | PYTHON | 15.0 | # Copyright 2021 ForgeFlow (http://www.forgeflow.com)
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
{
"name": "Sale Line Refund To Invoice Qty",
"summary": """Allow deciding whether refunded quantity should be considered
as quantity to reinvoice""",
"version": "15.0.1... | 36.75 | 735 |
3,360 | py | PYTHON | 15.0 | # Copyright 2021 ForgeFlow (http://www.forgeflow.com)
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
from odoo.tests.common import TransactionCase, tagged
@tagged("post_install", "-at_install")
class TestSaleLineRefundToInvoiceQty(TransactionCase):
@classmethod
def setUpClass(cls):
... | 42.531646 | 3,360 |
903 | py | PYTHON | 15.0 | # Copyright 2021 ForgeFlow (http://www.forgeflow.com)
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
from odoo import fields, models
class AccountMove(models.Model):
_inherit = "account.move"
def _reverse_move_vals(self, default_values, cancel=True):
# Set the sale_qty_to_reinv... | 34.730769 | 903 |
2,199 | py | PYTHON | 15.0 | # Copyright 2021 ForgeFlow (http://www.forgeflow.com)
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
from odoo import api, fields, models
class SaleOrderLine(models.Model):
_inherit = "sale.order.line"
qty_refunded_not_invoiceable = fields.Float(
compute="_compute_qty_refunded_... | 38.578947 | 2,199 |
679 | py | PYTHON | 15.0 | # Copyright 2021 ForgeFlow (http://www.forgeflow.com)
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
from odoo import fields, models
class AccountMoveReversal(models.TransientModel):
_inherit = "account.move.reversal"
sale_qty_to_reinvoice = fields.Boolean(
string="This credit ... | 33.95 | 679 |
648 | py | PYTHON | 15.0 | # Copyright 2020 - TODAY, Escodoo
# Copyright (C) 2022 Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Purchase Default Terms Conditions",
"summary": """
This module allows purchase default terms & conditions""",
"version": "15.0.1.0.2",
"licen... | 30.857143 | 648 |
2,130 | py | PYTHON | 15.0 | # Copyright (C) 2022 Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo.tests import tagged
from odoo.addons.account.tests.common import AccountTestInvoicingCommon
@tagged("post_install", "-at_install")
class TestPurchase(AccountTestInvoicingCommon):
@classmethod
... | 33.28125 | 2,130 |
687 | py | PYTHON | 15.0 | # Copyright (C) 2022 Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, models
from odoo.tools import is_html_empty
class PurchaseOrder(models.Model):
_inherit = "purchase.order"
@api.onchange("partner_id", "company_id")
def onchange_partner_id... | 31.227273 | 687 |
325 | py | PYTHON | 15.0 | # Copyright 2020 - TODAY, Marcel Savegnago - Escodoo
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class ResCompany(models.Model):
_inherit = "res.company"
purchase_note = fields.Html(
string="Purchase Default Terms and Conditions", translate=True
... | 25 | 325 |
552 | py | PYTHON | 15.0 | # Copyright 2020 - TODAY, Marcel Savegnago - Escodoo
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class ResConfigSettings(models.TransientModel):
_inherit = "res.config.settings"
purchase_note = fields.Html(
related="company_id.purchase_note",
... | 27.6 | 552 |
317 | py | PYTHON | 15.0 | # Copyright (C) 2022 Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class ResPartner(models.Model):
_inherit = "res.partner"
purchase_note = fields.Html(
string="Purchase Default Terms and Conditions", translate=True
)
| 24.384615 | 317 |
630 | py | PYTHON | 15.0 | # Copyright 2020 Jarsa Sistemas
# Copyright 2021 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/lgpl).
{
"name": "Purchase Stock Secondary Unit",
"summary": "Get product quantities in a secondary unit",
"version": "15.0.1.0.0",
"development_status": "Beta",
"cate... | 37.058824 | 630 |
4,558 | py | PYTHON | 15.0 | # Copyright 2020 Jarsa Sistemas
# Copyright 2021 Tecnativa - Sergio Teruel
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl).
import logging
from odoo.tests import Form, TransactionCase
_logger = logging.getLogger(__name__)
class TestPurchaseStockSecondaryUnit(TransactionCase):
@classmethod
de... | 46.989691 | 4,558 |
1,705 | py | PYTHON | 15.0 | # Copyright 2020 Jarsa Sistemas
# Copyright 2021 Tecnativa - Sergio Teruel
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl).
from odoo import models
class PurchaseOrderLine(models.Model):
_inherit = "purchase.order.line"
def _get_secondary_uom_for_move(self, product_uom_qty):
if not s... | 38.75 | 1,705 |
508 | py | PYTHON | 15.0 | # Copyright 2021 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import models
class StockMove(models.Model):
_inherit = "stock.move"
def _action_assign(self):
res = super()._action_assign()
if self.env.context.get("secondary_uom_for_update... | 33.866667 | 508 |
748 | py | PYTHON | 15.0 | # Copyright 2017 Tecnativa - David Vidal
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Purchase Order Triple Discount",
"version": "15.0.1.1.0",
"category": "Purchase Management",
"author": "Tecnativa," "GRAP," "Odoo Community Association (OCA)",
"website": "https://gith... | 34 | 748 |
9,812 | py | PYTHON | 15.0 | # Copyright 2017-19 Tecnativa - David Vidal
# Copyright 2019 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo.tests import common
from odoo.tests.common import Form
class TestPurchaseOrder(common.TransactionCase):
@classmethod
def setUpClass(cls):
s... | 37.59387 | 9,812 |
1,046 | py | PYTHON | 15.0 | # Copyright 2019 Tecnativa - David Vidal
# Copyright 2019 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class ProductSupplierInfo(models.Model):
_inherit = "product.supplierinfo"
discount2 = fields.Float(
string="Discou... | 33.741935 | 1,046 |
1,712 | py | PYTHON | 15.0 | # Copyright 2017-19 Tecnativa - David Vidal
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class PurchaseOrderLine(models.Model):
_inherit = "purchase.order.line"
# adding discount2 and discount3 to depends
@api.depends("discount2", "discount3")
d... | 27.612903 | 1,712 |
729 | py | PYTHON | 15.0 | # Copyright 2019 Tecnativa - David Vidal
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class ResPartner(models.Model):
_inherit = "res.partner"
default_supplierinfo_discount2 = fields.Float(
string="Default Supplier Discount 2 (%)",
digits="Di... | 36.45 | 729 |
1,288 | py | PYTHON | 15.0 | # Copyright 2019 GRAP (http://www.grap.coop)
# Sylvain LE GAL (https://twitter.com/legalsylvain)
# Copyright 2019 Tecnativa - Pedro M. Baeza
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
from odoo import fields, models
class PurchaseReport(models.Model):
_inherit = "purchase.report"
disco... | 29.953488 | 1,288 |
611 | py | PYTHON | 15.0 | # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
"name": "Purchase Order security",
"version": "15.0.2.0.0",
"category": "Purchase",
"development_status": "Production/Stable",
"author": "Tecnativa, Odoo Community Association (OCA)",
"summary": "See only your purchase orde... | 35.941176 | 611 |
4,345 | py | PYTHON | 15.0 | # Copyright 2020 Tecnativa - Víctor Martínez
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
import logging
from odoo.tests.common import TransactionCase
_logger = logging.getLogger(__name__)
class TestPurchaseOrderSecurity(TransactionCase):
@classmethod
def setUpClass(cls):
s... | 33.666667 | 4,343 |
614 | py | PYTHON | 15.0 | # Copyright (C) 2021 Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Purchase Order Line Menu",
"version": "15.0.1.0.0",
"author": "Open Source Integrators, Odoo Community Association (OCA)",
"summary": "Adds Purchase Order Lines Menu",
"website": ... | 32.315789 | 614 |
760 | py | PYTHON | 15.0 | # Copyright 2017 Akretion (http://www.akretion.com)
# Mourad EL HADJ MIMOUNE <mourad.elhadj.mimoune@akretion.com>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
"name": "Purchase Exception",
"summary": "Custom exceptions on purchase order",
"version": "15.0.1.0.0",
"category": ... | 36.190476 | 760 |
4,937 | py | PYTHON | 15.0 | # Copyright 2017 Akretion (http://www.akretion.com)
# Copyright 2020 Camptocamp SA
# Mourad EL HADJ MIMOUNE <mourad.elhadj.mimoune@akretion.com>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from datetime import datetime
from odoo.tests.common import TransactionCase
from odoo.tools import DEFAU... | 40.801653 | 4,937 |
784 | py | PYTHON | 15.0 | # Copyright 2017 Akretion (http://www.akretion.com)
# Copyright 2020 Camptocamp SA
# Mourad EL HADJ MIMOUNE <mourad.elhadj.mimoune@akretion.com>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import fields, models
class PurchaseExceptionConfirm(models.TransientModel):
_name = "pu... | 35.636364 | 784 |
805 | py | PYTHON | 15.0 | # Copyright 2017 Akretion (http://www.akretion.com)
# Copyright 2020 Camptocamp SA
# Mourad EL HADJ MIMOUNE <mourad.elhadj.mimoune@akretion.com>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import api, fields, models
class PurchaseOrderLine(models.Model):
_inherit = ["purchase.... | 30.961538 | 805 |
1,841 | py | PYTHON | 15.0 | # Copyright 2017 Akretion (http://www.akretion.com)
# Copyright 2020 Camptocamp SA
# Mourad EL HADJ MIMOUNE <mourad.elhadj.mimoune@akretion.com>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import api, models
class PurchaseOrder(models.Model):
_inherit = ["purchase.order", "bas... | 32.298246 | 1,841 |
668 | py | PYTHON | 15.0 | # Copyright 2017 Akretion (http://www.akretion.com)
# Copyright 2020 Camptocamp SA
# Mourad EL HADJ MIMOUNE <mourad.elhadj.mimoune@akretion.com>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import fields, models
class ExceptionRule(models.Model):
_inherit = "exception.rule"
... | 35.157895 | 668 |
596 | py | PYTHON | 15.0 | # © 2014 Today Akretion
# @author Sébastien BEAU <sebastien.beau@akretion.com>
# @author Pierrick Brun <pierrick.brun@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Quick Purchase order",
"version": "15.0.1.0.0",
"author": "Akretion, Odoo Community Association... | 37.125 | 594 |
9,462 | py | PYTHON | 15.0 | # @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.exceptions import AccessError, ValidationError
from odoo.tests.common import Form, TransactionCase
class TestQuickPurchase(TransactionCase):
@classmethod
def _a... | 43.805556 | 9,462 |
2,471 | 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 _, models
from odoo.exceptions i... | 36.264706 | 2,466 |
3,750 | 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 api, fields, models
class Pr... | 40.301075 | 3,748 |
603 | py | PYTHON | 15.0 | # Copyright 2017 ForgeFlow S.L.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Purchase Tier Validation",
"summary": "Extends the functionality of Purchase Orders to "
"support a tier validation process.",
"version": "15.0.1.0.0",
"category": "Purchases",
"website": ... | 37.6875 | 603 |
674 | py | PYTHON | 15.0 | # Copyright 2018 ForgeFlow S.L.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields, models
class TierValidationTester(models.Model):
_name = "tier.validation.tester"
_description = "Tier Validation Tester"
_inherit = ["tier.validation"]
state = fields.Selection(... | 28.083333 | 674 |
2,371 | py | PYTHON | 15.0 | # Copyright 2018 ForgeFlow S.L.
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
from odoo_test_helper import FakeModelLoader
from odoo.tests import common
from odoo.tests.common import tagged
@tagged("post_install", "-at_install")
class TestPurchaseTierValidation(common.TransactionCase):
@c... | 34.362319 | 2,371 |
376 | py | PYTHON | 15.0 | # Copyright 2017 ForgeFlow S.L.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import models
class PurchaseOrder(models.Model):
_name = "purchase.order"
_inherit = ["purchase.order", "tier.validation"]
_state_from = ["draft", "sent", "to approve"]
_state_to = ["purchase", ... | 28.923077 | 376 |
395 | py | PYTHON | 15.0 | # Copyright 2017 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_valida... | 28.214286 | 395 |
789 | py | PYTHON | 15.0 | # © 2016 Chafique DELLI @ Akretion
# © 2017 Today Mourad EL HADJ MIMOUNE @ Akretion
# 2020 Manuel Calero - Tecnativa
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Purchase and Invoice Allowed Product",
"summary": "This module allows to select only products that can be "
"su... | 37.47619 | 787 |
2,862 | py | PYTHON | 15.0 | # Copyright 2017 Today Mourad EL HADJ MIMOUNE @ Akretion
# Copyright 2020 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo.tests.common import Form, TransactionCase
class TestPurchaseAllowedProduct(TransactionCase):
def setUp(self):
super().setUp(... | 39.205479 | 2,862 |
787 | py | PYTHON | 15.0 | # © 2017 Today Mourad EL HADJ MIMOUNE @ Akretion
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import api, fields, models
class SuppliedProductMixin(models.AbstractModel):
_name = "supplied.product.mixin"
_description = "Mixin for documents that want to restrict products"
... | 35.727273 | 786 |
250 | py | PYTHON | 15.0 | # © 2016 Chafique DELLI @ Akretion
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import models
class AccountMove(models.Model):
_inherit = ["account.move", "supplied.product.mixin"]
_name = "account.move"
| 27.666667 | 249 |
288 | py | PYTHON | 15.0 | # © 2017 Today Mourad EL HADJ MIMOUNE @ Akretion
# 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"
name = fields.Many2one("res.partner", index=True)
| 28.7 | 287 |
270 | py | PYTHON | 15.0 | # © 2017 Today Mourad EL HADJ MIMOUNE @ Akretion
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import models
class PurchaseOrder(models.Model):
_inherit = ["purchase.order", "supplied.product.mixin"]
_name = "purchase.order"
| 29.888889 | 269 |
1,329 | py | PYTHON | 15.0 | # Copyright 2017 Today Mourad EL HADJ MIMOUNE @ Akretion
# Copyright 2020 Tecnativa - Manuel Calero
# Copyright 2020 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import api, models
class ProductProduct(models.Model):
_inherit = "product.product"
@... | 30.204545 | 1,329 |
569 | py | PYTHON | 15.0 | # © 2016 Chafique DELLI @ Akretion
# 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"
use_only_supplied_product = fields.Boolean(
string="Order and invoice only supplied products",
help... | 35.5 | 568 |
507 | py | PYTHON | 15.0 | # Copyright 2021 Tecnativa - Ernesto Tejeda
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Purchase Order Supplierinfo Update",
"summary": "Update product supplierinfo with the last purchase price",
"version": "15.0.1.0.0",
"category": "Purchase",
"website": "https://git... | 39 | 507 |
5,486 | py | PYTHON | 15.0 | # Copyright 2021 Tecnativa - Ernesto Tejeda
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from dateutil.relativedelta import relativedelta
from odoo import fields
from odoo.tests import Form, TransactionCase
class TestPurchaseOrderSupplierinfoUpdate(TransactionCase):
@classmethod
def setU... | 42.527132 | 5,486 |
2,682 | py | PYTHON | 15.0 | # Copyright 2021 Tecnativa - Ernesto Tejeda
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class PurchaseOrder(models.Model):
_inherit = "purchase.order"
def write(self, vals):
no_updated = self.filtered(lambda r: r.state not in ["purchase", "do... | 37.25 | 2,682 |
530 | 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 Requisition Order Remaining Qty",
"version": "15.0.1.0.0",
"category": "Purchases",
"website": "https://github.com/OCA/purchase-workflow",
"author": "Tecnativa, Odoo Comm... | 37.714286 | 528 |
3,141 | 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.tests import Form, TransactionCase
class TestPurchaseRequisitionOrderRemainingQty(TransactionCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
cls.requisition_typ... | 48.292308 | 3,139 |
417 | 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 PurchaseRequisitionType(models.Model):
_inherit = "purchase.requisition.type"
quantity_copy = fields.Selection(
selection_add=([("remaining_qty", "Use r... | 31.923077 | 415 |
1,403 | 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 api, fields, models
class PurchaseRequisitionLine(models.Model):
_inherit = "purchase.requisition.line"
proposed_qty = fields.Float(compute="_compute_proposed_qty", store=True)
... | 35.923077 | 1,401 |
575 | 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 api, models
class PurchaseOrder(models.Model):
_inherit = "purchase.order"
@api.onchange("requisition_id")
def _onchange_requisition_id(self):
"""In this function the li... | 35.8125 | 573 |
522 | py | PYTHON | 15.0 | # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
{
"name": "Purchase Product Last Price Info",
"version": "15.0.2.0.1",
"category": "Purchase Management",
"license": "AGPL-3",
"author": "AvanzOSC, Tecnativa, Odoo Community Association (OCA)",
"development_status": "Production/St... | 34.8 | 522 |
4,040 | py | PYTHON | 15.0 | # Copyright 2019 ForgeFlow S.L.
# Copyright 2021 Tecnativa - Víctor Martínez
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
import odoo.tests.common as common
from odoo import fields
class TestPurchaseLastPriceInfo(common.TransactionCase):
def setUp(self):
super().setUp()
self.cu... | 44.373626 | 4,038 |
2,211 | py | PYTHON | 15.0 | # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
# Copyright 2019 ForgeFlow S.L.
# Copyright 2021 Tecnativa - Víctor Martínez
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class ProductTemplate(models.Model):
_inherit = "product.template... | 40.907407 | 2,209 |
3,429 | py | PYTHON | 15.0 | # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
# Copyright 2019 ForgeFlow S.L.
# Copyright 2021 Tecnativa - Víctor Martínez
# 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"
... | 39.848837 | 3,427 |
644 | py | PYTHON | 15.0 | # Copyright 2017-2020 Forgeflow S.L.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
import logging
from odoo import SUPERUSER_ID, api
_logger = logging.getLogger(__name__)
def post_init_hook(cr, registry):
"""Loaded after installing the module."""
with api.Environment.manage():
env... | 33.894737 | 644 |
531 | py | PYTHON | 15.0 | # Copyright 2017-2020 Forgeflow S.L.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Purchase Request Department",
"author": "ForgeFlow, Odoo Community Association (OCA)",
"version": "15.0.1.0.0",
"website": "https://github.com/OCA/purchase-workflow",
"category": "Purcha... | 35.4 | 531 |
3,473 | py | PYTHON | 15.0 | # Copyright 2017-2020 Forgeflow S.L.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo.tests.common import TransactionCase
class TestPurchaseRequest(TransactionCase):
def setUp(self):
super(TestPurchaseRequest, self).setUp()
self.pr_model = self.env["purchase.request"]
... | 39.465909 | 3,473 |
1,064 | py | PYTHON | 15.0 | # Copyright 2017-2020 Forgeflow S.L.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class PurchaseRequest(models.Model):
_inherit = "purchase.request"
def _get_my_department(self):
employees = self.env.user.employee_ids
return (
... | 28 | 1,064 |
580 | py | PYTHON | 15.0 | # Copyright 2018 Tecnativa - Vicent Cubells <vicent.cubells@tecnativa.com>
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3
{
"name": "Purchase Order Line Deep Sort",
"version": "15.0.1.0.0",
"author": "Tecnativa, Odoo Community Association (OCA)",
"license": "AGPL-3",
"category": "Purchas... | 38.666667 | 580 |
7,638 | py | PYTHON | 15.0 | # Copyright 2018 Tecnativa - Vicent Cubells
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields
from odoo.tests import common
class TestPurchaseOrderLineDeepSort(common.TransactionCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
po_model = cls.... | 46.290909 | 7,638 |
2,490 | py | PYTHON | 15.0 | # Copyright 2018 Tecnativa - Vicent Cubells <vicent.cubells@tecnativa.com>
# Copyright 2019 Tecnativa - Pedro M. Baeza
# Copyright 2019 Tecnativa - Sergio Teruel
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3
from odoo import api, fields, models
from .res_company import SORTING_CRITERIA, SORTING_DIRECTION
... | 31.125 | 2,490 |
953 | py | PYTHON | 15.0 | # Copyright 2018 Tecnativa - Vicent Cubells <vicent.cubells@tecnativa.com>
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3
from odoo import fields, models
SORTING_CRITERIA = [
("name", "By name"),
("product_id.name", "By product name"),
("product_id.default_code", "By product reference"),
("... | 28.878788 | 953 |
845 | py | PYTHON | 15.0 | # Copyright 2018 Tecnativa - Vicent Cubells <vicent.cubells@tecnativa.com>
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3
from odoo import api, fields, models
class ResConfigSettings(models.TransientModel):
_inherit = "res.config.settings"
po_line_order_default = fields.Selection(
related... | 33.8 | 845 |
691 | py | PYTHON | 15.0 | # Copyright 2019 David Vidal <david.vidal@tecnativa.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Purchase Order Product Recommendation Secondary Unit",
"summary": "Add secondary unit to recommend products wizard",
"version": "15.0.1.0.0",
"category": "Purchases",
"... | 38.388889 | 691 |
2,460 | py | PYTHON | 15.0 | # Copyright 2023 Tecnativa - Pilar Vargas
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo.tests.common import Form, TransactionCase, tagged
@tagged("-at_install", "post_install")
class TestPurchaseOrderProductRecommendationSecondaryUnit(TransactionCase):
@classmethod
def setUpClass(... | 41.694915 | 2,460 |
3,725 | py | PYTHON | 15.0 | # Copyright 2019 David Vidal <david.vidal@tecnativa.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from math import ceil
from odoo import api, fields, models
from odoo.tools.float_utils import float_compare, float_round
class PurchaseOrderRecommendation(models.TransientModel):
_inherit = "... | 33.863636 | 3,725 |
622 | py | PYTHON | 15.0 | # Copyright 2021 Tecnativa - David Vidal
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Purchase Order Product Recommendation Forecast",
"summary": "Obtain linear progression forecast from reference years",
"version": "15.0.1.0.0",
"category": "Purchases",
"website": "ht... | 41.466667 | 622 |
5,100 | py | PYTHON | 15.0 | # Copyright 2021 Tecnativa - David Vidal
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields
from odoo.addons.purchase_order_product_recommendation.tests import test_recommendation
class TestSaleProductClassification(test_recommendation.RecommendationCase):
@classmethod
d... | 43.965517 | 5,100 |
6,558 | py | PYTHON | 15.0 | # Copyright 2021 Tecnativa - David Vidal
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from dateutil.relativedelta import relativedelta
from odoo import _, api, fields, models
class PurchaseOrderRecommendation(models.TransientModel):
_inherit = "purchase.order.recommendation"
@api.model
... | 41.770701 | 6,558 |
639 | py | PYTHON | 15.0 | # Copyright 2017 ForgeFlow S.L.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Purchase Order Approved",
"summary": "Add a new state 'Approved' in purchase orders.",
"version": "15.0.1.0.0",
"category": "Purchases",
"website": "https://github.com/OCA/purchase-workflow",
... | 33.631579 | 639 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.