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 |
|---|---|---|---|---|---|---|
633 | py | PYTHON | 15.0 | # Copyright 2019 Akretion (<http://www.akretion.com>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Sale Sub State",
"version": "15.0.1.0.0",
"category": "Tools",
"author": "Akretion, " "Odoo Community Association (OCA)",
"website": "https://github.com/OCA/sale-workflow... | 30.142857 | 633 |
2,645 | py | PYTHON | 15.0 | # Copyright 2019 Akretion Mourad EL HADJ MIMOUNE
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo.exceptions import ValidationError
from odoo.tests.common import TransactionCase
class TestBaseSubstate(TransactionCase):
def setUp(self):
super(TestBaseSubstate, self).setUp()
... | 38.897059 | 2,645 |
1,961 | py | PYTHON | 15.0 | # Copyright 2019 Akretion
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import _, api, fields, models
from odoo.exceptions import ValidationError
class BaseSubstateType(models.Model):
_inherit = "base.substate.type"
model = fields.Selection(
selection_add=[("sale.order", ... | 37 | 1,961 |
649 | py | PYTHON | 15.0 | # Copyright 2020 Iván Todorovich
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "CRM documents permissions by teams",
"summary": "Integrates sales_team_security with crm",
"version": "15.0.1.0.0",
"category": "Customer Relationship Management",
"website": "https://github.... | 38.058824 | 647 |
898 | py | PYTHON | 15.0 | # Copyright 2021 Tecnativa - Víctor Martínez
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
from odoo import SUPERUSER_ID, api
def migrate(cr, version):
"""Adjust record rules according new definition."""
if not version:
return
env = api.Environment(cr, SUPERUSER_ID, {})
reco... | 40.727273 | 896 |
650 | 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.addons.sales_team_security.tests.common import TestCommon
class TestSalesTeamSecurityCrm(TestCommon):
@classmethod
def setUpClass(cls):
super().setUpClass()
cls.record = cls.... | 30.857143 | 648 |
506 | py | PYTHON | 15.0 | # Copyright 2017 ForgeFlow S.L.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
"name": "Sale Force Invoiced",
"summary": "Allows to force the invoice status of the sales order to Invoiced",
"version": "15.0.1.0.0",
"author": "ForgeFlow, Odoo Community Association (OCA)",
"c... | 33.733333 | 506 |
3,293 | py | PYTHON | 15.0 | # 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 TestSaleForceInvoiced(TransactionCase):
def setUp(self):
super(TestSaleForceInvoiced, self).setUp()
self.sale_order_model = self.env["sale.orde... | 34.663158 | 3,293 |
875 | py | PYTHON | 15.0 | # Copyright 2017 ForgeFlow S.L.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import api, fields, models
class SaleOrder(models.Model):
_inherit = "sale.order"
force_invoiced = fields.Boolean(
help="When you set this field, the sales order will be considered as "
... | 33.653846 | 875 |
464 | py | PYTHON | 15.0 | # Copyright 2019 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Sale Wishlist",
"summary": """
Handle sale wishlist for partners""",
"version": "15.0.1.0.0",
"license": "AGPL-3",
"author": "Camptocamp SA,Odoo Community Association (OCA)",
"websi... | 33.142857 | 464 |
2,151 | py | PYTHON | 15.0 | # Copyright 2019 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo.tests import common
class TestWishlist(common.TransactionCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
cls.sale_order = cls.env["sale.order"]
cls.product_set = ... | 40.584906 | 2,151 |
312 | py | PYTHON | 15.0 | # Copyright 2019 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class ProductSet(models.Model):
_inherit = "product.set"
typology = fields.Selection(
selection=[("set", "Default"), ("wishlist", "Wishlist")], default="set"
)
| 24 | 312 |
1,351 | py | PYTHON | 15.0 | # Copyright 2019 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import _, fields, models
class ResPartner(models.Model):
_inherit = "res.partner"
wishlists_count = fields.Integer(
compute="_compute_wishlists_count", string="# Wishlists"
)
def _compu... | 31.418605 | 1,351 |
650 | py | PYTHON | 15.0 | # Copyright 2018 Tecnativa - Carlos Dauden
# Copyright 2021 Tecnativa - Víctor Martínez
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Sale Stock Picking Note",
"summary": "Add picking note in sale and purchase order",
"version": "15.0.1.0.1",
"category": "Sales",
"websi... | 34.105263 | 648 |
1,374 | py | PYTHON | 15.0 | # Copyright 2018 Tecnativa - David Vidal
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo.tests import common
class TestSaleStockPickingNote(common.TransactionCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
cls.partner = cls.env["res.partner"].create({"n... | 39.257143 | 1,374 |
786 | py | PYTHON | 15.0 | # Copyright 2018 Tecnativa - Carlos Dauden
# 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 SaleOrder(models.Model):
_inherit = "sale.order"
picking_note = fields.Html(string="Picking Internal Note")
picki... | 31.36 | 784 |
273 | 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 StockPicking(models.Model):
_inherit = "stock.picking"
customer_note = fields.Text(string="Customer Comments")
| 27.1 | 271 |
546 | py | PYTHON | 15.0 | # Copyright 2015 Opener B.V. (<https://opener.am>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Default sales incoterm per partner",
"version": "15.0.1.1.0",
"category": "Sales Management",
"license": "AGPL-3",
"summary": "Set the customer preferred incoterm on each sa... | 36.4 | 546 |
738 | py | PYTHON | 15.0 | # Copyright 2015 Opener B.V. (<https://opener.am>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo.tests.common import TransactionCase
class TestSalePartnerIncoterm(TransactionCase):
def test_sale_partner_incoterm(self):
"""
Check that the customer's default incoterm is ... | 41 | 738 |
394 | py | PYTHON | 15.0 | # Copyright 2015 Opener B.V. (<https://opener.am>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, models
class SaleOrder(models.Model):
_inherit = "sale.order"
@api.onchange("partner_id")
def onchange_partner_id(self):
res = super().onchange_partner_id()
... | 28.142857 | 394 |
415 | py | PYTHON | 15.0 | # Copyright 2015 Opener B.V. (<https://opener.am>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class Partner(models.Model):
_inherit = "res.partner"
sale_incoterm_id = fields.Many2one(
string="Default Sales Incoterm",
comodel_name="account.... | 29.642857 | 415 |
557 | py | PYTHON | 15.0 | # Copyright 2020 Camptocamp (https://www.camptocamp.com)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Sale Automatic Workflow Job",
"summary": "Execute sale automatic workflows in queue jobs",
"version": "15.0.1.0.0",
"category": "Sales Management",
"license": "AGPL-3"... | 34.8125 | 557 |
5,629 | py | PYTHON | 15.0 | # Copyright 2020 Camptocamp (https://www.camptocamp.com)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo.tests import tagged
from odoo.addons.queue_job.job import identity_exact
from odoo.addons.queue_job.tests.common import mock_with_delay
from odoo.addons.sale_automatic_workflow.tests.comm... | 40.789855 | 5,629 |
3,342 | py | PYTHON | 15.0 | # Copyright 2020 Camptocamp (https://www.camptocamp.com)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import _, models
from odoo.addons.queue_job.job import identity_exact
class AutomaticWorkflowJob(models.Model):
_inherit = "automatic.workflow.job"
def _do_validate_sale_order_j... | 39.317647 | 3,342 |
575 | py | PYTHON | 15.0 | # Copyright 2020 Ecosoft Co., Ltd. (http://ecosoft.co.th)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import _, models
class QueueJob(models.Model):
"""Job status and result"""
_inherit = "queue.job"
def _related_action_sale_automatic_workflow(self):
obj = self.ar... | 27.380952 | 575 |
603 | py | PYTHON | 15.0 | # Copyright 2019 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Sale Stock Secondary Unit",
"summary": "Get product quantities in a secondary unit",
"version": "15.0.1.0.1",
"development_status": "Production/Stable",
"category": "stock",
"we... | 37.6875 | 603 |
3,069 | py | PYTHON | 15.0 | # Copyright 2019 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo.tests import TransactionCase, tagged
@tagged("post_install", "-at_install")
class TestSaleStockOrderSecondaryUnit(TransactionCase):
@classmethod
def setUpClass(cls):
super().setUpClass... | 37.888889 | 3,069 |
1,261 | py | PYTHON | 15.0 | # Copyright 2019 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import models
class StockRule(models.Model):
_inherit = "stock.rule"
def _get_stock_move_values(
self,
product_id,
product_qty,
product_uom,
location_i... | 28.659091 | 1,261 |
540 | py | PYTHON | 15.0 | # Copyright 2020 Manuel Regidor <manuel.regidor@sygel.es>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Sale Product Category Menu",
"summary": "Shows 'Product Categories' menu item in Sales",
"version": "15.0.1.0.0",
"category": "Product",
"website": "https://github.co... | 36 | 540 |
554 | py | PYTHON | 15.0 | # Copyright 2020 Camptocamp SA
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl)
{
"name": "Sale Order Carrier Auto Assign",
"summary": "Auto assign delivery carrier on sale order confirmation",
"version": "15.0.1.0.1",
"development_status": "Alpha",
"category": "Operations/Inventory/D... | 36.933333 | 554 |
1,936 | py | PYTHON | 15.0 | # Copyright 2020 Camptocamp SA
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl)
from odoo.tests import Form, TransactionCase
class TestSaleOrderCarrierAutoAssign(TransactionCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
test_context = cls.env.context.copy()
... | 48.4 | 1,936 |
1,221 | py | PYTHON | 15.0 | # Copyright 2020 Camptocamp SA
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl)
from odoo import models
from odoo.tools import config
class SaleOrder(models.Model):
_inherit = "sale.order"
def action_confirm(self):
if config["test_enable"] and not self.env.context.get(
"te... | 35.911765 | 1,221 |
399 | py | PYTHON | 15.0 | # Copyright 2022 Camptocamp SA
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Sale Invoice No Mail",
"version": "15.0.1.0.1",
"category": "Sales Management",
"author": "Camptocamp SA," "Odoo Community Association (OCA)",
"website": "https://github.com/OCA/sale-workflow"... | 30.692308 | 399 |
1,313 | py | PYTHON | 15.0 | # Copyright 2022 Camptocamp SA
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo.tests.common import TransactionCase
class TestSaleInvoiceNoMail(TransactionCase):
def test_00_invoice_without_mail(self):
partner = self.env["res.partner"].create({"name": "Test Partner"})
pr... | 36.472222 | 1,313 |
550 | py | PYTHON | 15.0 | # Copyright 2022 Camptocamp SA
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import models
class SaleAdvancePaymentInv(models.TransientModel):
_inherit = "sale.advance.payment.inv"
def create_invoices(self):
skip = self._skip_invoice_mail()
wiz = self.with_contex... | 32.352941 | 550 |
575 | py | PYTHON | 15.0 | # Copyright 2019 ACSONE SA/NV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Product Form Sale Link",
"summary": """
Adds a button on product forms to access Sale Lines""",
"version": "15.0.1.0.1",
"license": "AGPL-3",
"category": "Sales",
"author": "ACSONE S... | 30.263158 | 575 |
690 | py | PYTHON | 15.0 | # Copyright 2022 ForgeFlow S.L. (https://www.forgeflow.com)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
import logging
from odoo import api, fields, models
_logger = logging.getLogger(__name__)
class ProductTemplate(models.Model):
_inherit = "product.template"
sale_lines_count = f... | 31.363636 | 690 |
1,041 | py | PYTHON | 15.0 | # Copyright 2022 ForgeFlow S.L. (https://www.forgeflow.com)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import fields, models
class ProductProduct(models.Model):
_inherit = "product.product"
sale_lines_count = fields.Integer(
compute="_compute_sale_lines_count", st... | 34.7 | 1,041 |
589 | py | PYTHON | 15.0 | # Copyright (C) 2021 Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Sale Order Line Menu",
"version": "15.0.1.0.1",
"author": "Open Source Integrators, Odoo Community Association (OCA)",
"summary": "Adds a Sale Order Lines Menu",
"website": "https... | 31 | 589 |
788 | py | PYTHON | 15.0 | # Copyright 2015 ADHOC SA (http://www.adhoc.com.ar)
# Copyright 2017 - 2019 Alex Comba - Agile Business Group
# Copyright 2017 Tecnativa - David Vidal
# Copyright 2018 Jacques-Etienne Baudoux (BCIM sprl) <je@bcim.be>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Sale Triple Discount",... | 41.473684 | 788 |
9,312 | py | PYTHON | 15.0 | # Copyright 2017 Tecnativa - David Vidal
# Copyright 2018 Simone Rubino - Agile Business Group
# Copyright 2022 Manuel Regidor - Sygel Technology
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
import json
from odoo.tests import common
class TestSaleOrder(common.TransactionCase):
@classmethod
... | 44.132701 | 9,312 |
2,625 | py | PYTHON | 15.0 | # Copyright 2018 Simone Rubino - Agile Business Group
# Copyright 2018 Jacques-Etienne Baudoux (BCIM sprl) <je@bcim.be>
# Copyright 2017 - 2019 Alex Comba - Agile Business Group
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
import json
from odoo import api, models
class SaleOrder(models.Model):
... | 38.602941 | 2,625 |
4,492 | py | PYTHON | 15.0 | # Copyright 2015 ADHOC SA (http://www.adhoc.com.ar)
# Copyright 2017 - 2019 Alex Comba - Agile Business Group
# Copyright 2017 Tecnativa - David Vidal
# Copyright 2018 Simone Rubino - Agile Business Group
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import _, api, fields, models
from odoo... | 34.553846 | 4,492 |
243 | py | PYTHON | 15.0 | # Copyright 2021 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
def pre_init_hook(cr):
cr.execute(
"""
ALTER TABLE sale_order_line ADD COLUMN last_delivery_date TIMESTAMP;"""
)
| 27 | 243 |
638 | py | PYTHON | 15.0 | # Copyright 2018 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Sale Stock Last Date",
"summary": "Displays last delivery date in sale order lines",
"version": "15.0.1.0.0",
"development_status": "Beta",
"category": "Sales",
"website": "http... | 37.529412 | 638 |
3,138 | py | PYTHON | 15.0 | # Copyright 2021 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo.tests import Form, TransactionCase
class TestSaleStockLastDate(TransactionCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
cls.warehouse = cls.env.ref("stock.ware... | 41.84 | 3,138 |
801 | py | PYTHON | 15.0 | # Copyright 2021 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class SaleOrderLine(models.Model):
_inherit = "sale.order.line"
last_delivery_date = fields.Datetime(
string="Last delivery date", compute="_compute_last_de... | 34.826087 | 801 |
626 | py | PYTHON | 15.0 | # Copyright 2021 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html)
from odoo import fields, models
class SaleReport(models.Model):
_inherit = "sale.report"
last_delivery_date = fields.Datetime(
string="Last delivery date",
)
def _query(self, with... | 34.777778 | 626 |
625 | py | PYTHON | 15.0 | # Copyright 2020 Iván Todorovich
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Sale documents permissions by teams",
"summary": "Integrates sales_team_security with sale",
"version": "15.0.1.0.0",
"category": "Sales",
"website": "https://github.com/OCA/sale-workflow",
... | 36.647059 | 623 |
1,243 | py | PYTHON | 15.0 | # Copyright 2021 Tecnativa - Víctor Martínez
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
from odoo import SUPERUSER_ID, api
def migrate(cr, version):
"""Adjust record rules according new definition."""
if not version:
return
env = api.Environment(cr, SUPERUSER_ID, {})
reco... | 42.793103 | 1,241 |
618 | 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.addons.sales_team_security.tests.common import TestCommon
class TestSalesTeamSecuritySale(TestCommon):
@classmethod
def setUpClass(cls):
super().setUpClass()
cls.record = cls... | 30.8 | 616 |
623 | py | PYTHON | 15.0 | # Copyright 2019 Open Source Integrators
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Sale Tier Validation",
"summary": "Extends the functionality of Sale Orders to "
"support a tier validation process.",
"version": "15.0.1.1.1",
"category": "Sale",
"website": "htt... | 38.9375 | 623 |
2,667 | py | PYTHON | 15.0 | # Copyright 2020 Sergio Teruel <sergio.teruel@tecnativa.com>
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
from odoo.exceptions import ValidationError
from odoo.tests import common, tagged
@tagged("-at_install", "post_install")
class TestSaleTierValidation(common.TransactionCase):
@classmet... | 35.56 | 2,667 |
728 | py | PYTHON | 15.0 | # Copyright 2019 Open Source Integrators
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import models
class SaleOrder(models.Model):
_name = "sale.order"
_inherit = ["sale.order", "tier.validation"]
_state_from = ["draft", "sent"]
_state_to = ["sale", "done"]
_tier_va... | 33.090909 | 728 |
380 | py | PYTHON | 15.0 | # Copyright 2019 Open Source Integrators
# 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()._get_tier_validation_model_... | 27.142857 | 380 |
833 | py | PYTHON | 15.0 | # Copyright 2018 Acsone
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Sale Blanket Orders",
"category": "Sale",
"license": "AGPL-3",
"author": "Acsone SA/NV, Odoo Community Association (OCA)",
"version": "15.0.1.2.0",
"website": "https://github.com/OCA/sale-workflow... | 33.32 | 833 |
16,108 | py | PYTHON | 15.0 | # Copyright (C) 2018 Eficent Business and IT Consulting Services S.L.
# 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 TestSaleBlanketOrders(common.TransactionCas... | 38.170616 | 16,108 |
7,561 | py | PYTHON | 15.0 | # Copyright (C) 2018 Eficent Business and IT Consulting Services S.L.
# 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 TestSaleOrder(common.TransactionCase):
def setUp(self):
super().setUp... | 38.576531 | 7,561 |
8,194 | py | PYTHON | 15.0 | # Copyright 2018 ACSONE SA/NV
# 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.TransientModel):
_name = "sale.blank... | 37.076923 | 8,194 |
26,900 | py | PYTHON | 15.0 | # Copyright 2018 ACSONE SA/NV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import SUPERUSER_ID, _, api, fields, models
from odoo.exceptions import UserError
from odoo.tools import float_is_zero
from odoo.tools.misc import format_date
class BlanketOrder(models.Model):
_name = "sale.bl... | 36.204576 | 26,900 |
6,042 | py | PYTHON | 15.0 | # Copyright 2018 ACSONE SA/NV
# Copyright 2019 Eficent and IT Consulting Services, S.L.
# 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 SaleOrder(models.Model):
_inherit ... | 36.841463 | 6,042 |
411 | py | PYTHON | 15.0 | # Copyright 2018 ACSONE SA/NV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class SaleConfigSettings(models.TransientModel):
_inherit = "res.config.settings"
group_blanket_disable_adding_lines = fields.Boolean(
string="Disable adding more lines to S... | 29.357143 | 411 |
791 | py | PYTHON | 15.0 | # Copyright 2015 Anybox
# Copyright 2018 Camptocamp, ACSONE SA/NV
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Sale product set",
"category": "Sale",
"license": "AGPL-3",
"author": "Anybox, Odoo Community Association (OCA)",
"version": "15.0.1.0.1",
"website": "htt... | 34.391304 | 791 |
8,360 | py | PYTHON | 15.0 | # Copyright 2015 Anybox S.A.S
# Copyright 2016-2018 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import exceptions
from odoo.tests import common
class TestProductSet(common.TransactionCase):
"""Test Product set"""
@classmethod
def setUpClass(cls):
s... | 41.386139 | 8,360 |
5,098 | py | PYTHON | 15.0 | # Copyright 2015 Anybox S.A.S
# Copyright 2016-2020 Camptocamp SA
# @author Simone Orsi <simahawk@gmail.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import _, api, exceptions, fields, models
class ProductSetAdd(models.TransientModel):
_name = "product.set.add"
_rec_name ... | 39.828125 | 5,098 |
1,410 | py | PYTHON | 15.0 | # Copyright 2015 Anybox S.A.S
# Copyright 2016-2018 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import fields, models
class ProductSetLine(models.Model):
_name = "product.set.line"
_description = "Product set line"
_rec_name = "product_id"
_order = "seq... | 36.153846 | 1,410 |
1,410 | py | PYTHON | 15.0 | # Copyright 2015 Anybox S.A.S
# Copyright 2016-2018 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import fields, models
class ProductSet(models.Model):
_name = "product.set"
_description = "Product set"
name = fields.Char(help="Product set name", required=Tr... | 31.333333 | 1,410 |
787 | py | PYTHON | 15.0 | # Copyright 2011 Akretion Sébastien BEAU <sebastien.beau@akretion.com>
# Copyright 2013 Camptocamp SA (author: Guewen Baconnier)
# Copyright 2016 Sodexis
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Sale Automatic Workflow",
"version": "15.0.1.0.1",
"category": "Sales Manageme... | 32.75 | 786 |
7,239 | py | PYTHON | 15.0 | # Copyright 2014 Camptocamp SA (author: Guewen Baconnier)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from datetime import timedelta
import mock
from odoo import fields
from odoo.tests import tagged
from .common import TestAutomaticWorkflowMixin, TestCommon
@tagged("post_install", "-at_install... | 39.774725 | 7,239 |
2,710 | py | PYTHON | 15.0 | # Copyright 2014 Camptocamp SA (author: Guewen Baconnier)
# Copyright 2020 Camptocamp SA (author: Simone Orsi)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo.tests.common import TransactionCase
class TestCommon(TransactionCase):
@classmethod
def setUpClass(cls):
super().set... | 35.657895 | 2,710 |
7,520 | py | PYTHON | 15.0 | # Copyright 2017 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo.tests import tagged
from .common import TestCommon
@tagged("post_install", "-at_install")
class TestMultiCompany(TestCommon):
def setUp(self):
super().setUp()
@classmethod
def create_company... | 37.412935 | 7,520 |
444 | py | PYTHON | 15.0 | # Copyright 2011 Akretion Sébastien BEAU <sebastien.beau@akretion.com>
# Copyright 2013 Camptocamp SA (author: Guewen Baconnier)
# Copyright 2016 Sodexis
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class AccountMove(models.Model):
_inherit = "account.move"
... | 31.642857 | 443 |
2,953 | py | PYTHON | 15.0 | # Copyright 2011 Akretion Sébastien BEAU <sebastien.beau@akretion.com>
# Copyright 2013 Camptocamp SA (author: Guewen Baconnier)
# Copyright 2016 Sodexis
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import _, api, fields, models
class SaleOrder(models.Model):
_inherit = "sale.order"
... | 39.36 | 2,952 |
9,369 | py | PYTHON | 15.0 | # Copyright 2011 Akretion Sébastien BEAU <sebastien.beau@akretion.com>
# Copyright 2013 Camptocamp SA (author: Guewen Baconnier)
# Copyright 2016 Sodexis
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
import logging
from contextlib import contextmanager
from odoo import api, fields, models
from odoo.... | 39.527426 | 9,368 |
544 | py | PYTHON | 15.0 | # Copyright 2011 Akretion Sébastien BEAU <sebastien.beau@akretion.com>
# Copyright 2013 Camptocamp SA (author: Guewen Baconnier)
# Copyright 2016 Sodexis
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import models
class StockMove(models.Model):
_inherit = "stock.move"
def _get_ne... | 31.941176 | 543 |
1,335 | py | PYTHON | 15.0 | # Copyright 2011 Akretion Sébastien BEAU <sebastien.beau@akretion.com>
# Copyright 2013 Camptocamp SA (author: Guewen Baconnier)
# Copyright 2016 Sodexis
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
from odoo.tools import float_compare
class StockPicking(models.Mode... | 37.055556 | 1,334 |
4,855 | py | PYTHON | 15.0 | # Copyright 2011 Akretion Sébastien BEAU <sebastien.beau@akretion.com>
# Copyright 2013 Camptocamp SA (author: Guewen Baconnier)
# Copyright 2016 Sodexis
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class SaleWorkflowProcess(models.Model):
"""A workflow pro... | 36.772727 | 4,854 |
655 | py | PYTHON | 15.0 | # Copyright 2015 Omar Castiñeira, Comunitea Servicios Tecnológicos S.L.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Sale Advance Payment",
"version": "15.0.1.0.3",
"author": "Comunitea, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/sale-workflow",
... | 34.368421 | 653 |
13,823 | py | PYTHON | 15.0 | # Copyright (C) 2021 ForgeFlow S.L.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html)
import json
from odoo import fields
from odoo.exceptions import ValidationError
from odoo.tests import common
class TestSaleAdvancePayment(common.TransactionCase):
@classmethod
def setUpClass(cls):
... | 36.472296 | 13,823 |
5,834 | py | PYTHON | 15.0 | # Copyright 2017 Omar Castiñeira, Comunitea Servicios Tecnológicos S.L.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import _, api, exceptions, fields, models
from odoo.exceptions import UserError
from odoo.tools import float_compare
class AccountVoucherWizard(models.TransientModel):
... | 36 | 5,832 |
950 | py | PYTHON | 15.0 | # Copyright 2022 Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
import json
from odoo import models
class AccountMove(models.Model):
_inherit = "account.move"
def action_post(self):
# Automatic reconciliation of payment when invoice confirmed.
res = ... | 36.538462 | 950 |
366 | py | PYTHON | 15.0 | # Copyright 2017 Omar Castiñeira, Comunitea Servicios Tecnológicos S.L.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class AccountPayment(models.Model):
_inherit = "account.payment"
sale_id = fields.Many2one(
"sale.order", "Sale", readonly=True, st... | 28 | 364 |
3,696 | py | PYTHON | 15.0 | # Copyright 2017 Omar Castiñeira, Comunitea Servicios Tecnológicos S.L.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
from odoo.tools import float_compare
class SaleOrder(models.Model):
_inherit = "sale.order"
account_payment_ids = fields.One2many(
... | 37.693878 | 3,694 |
565 | py | PYTHON | 15.0 | # Copyright 2021 Tecnativa - Víctor Martínez
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Sale Order Qty change no recompute",
"summary": "Prevent recompute if only quantity has changed in sale order line",
"version": "15.0.2.0.0",
"category": "Sale Workflow",
"website... | 37.533333 | 563 |
1,381 | 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.common import Form, TransactionCase
class TestSaleOrderQtyChange(TransactionCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
cls.product_1 = cls.env["produc... | 43.09375 | 1,379 |
1,218 | py | PYTHON | 15.0 | # Copyright 2021 Tecnativa - Víctor Martínez
# Copyright 2021 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import models
from odoo.tools import config
class SaleOrderLine(models.Model):
_inherit = "sale.order.line"
def _onchange_eval(self, field_name,... | 41.931034 | 1,216 |
448 | py | PYTHON | 15.0 | # Copyright 2017 ACSONE SA/NV (<http://acsone.eu>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
def post_init_hook(cr, registry):
"""
As we change the invoice policy to computed field, we must initialize
the default policy with original values
"""
query = """
UPDATE p... | 29.866667 | 448 |
689 | py | PYTHON | 15.0 | # Copyright 2017 ACSONE SA/NV (<http://acsone.eu>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Sale invoice Policy",
"summary": """
Sales Management: let the user choose the invoice policy on the
order""",
"author": "ACSONE SA/NV, Odoo Community Associatio... | 34.45 | 689 |
7,501 | py | PYTHON | 15.0 | # © 2017 Acsone SA/NV (http://www.acsone.eu)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
import odoo.tests.common as common
class TestSaleOrderInvoicePolicy(common.TransactionCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
cls.product_obj = cls.env["produ... | 40.106952 | 7,500 |
1,588 | py | PYTHON | 15.0 | # Copyright 2017 ACSONE SA/NV (<http://acsone.eu>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import api, fields, models
class SaleOrder(models.Model):
_inherit = "sale.order"
invoice_policy = fields.Selection(
[("order", "Ordered quantities"), ("delivery", "Deli... | 36.930233 | 1,588 |
2,748 | py | PYTHON | 15.0 | # Copyright 2017 ACSONE SA/NV (<http://acsone.eu>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import api, models
class SaleOrderLine(models.Model):
_inherit = "sale.order.line"
@api.depends(
"qty_invoiced",
"qty_delivered",
"product_uom_qty",
... | 39.826087 | 2,748 |
1,993 | py | PYTHON | 15.0 | # Copyright 2017 ACSONE SA/NV (<http://acsone.eu>)
# 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"
default_invoice_policy = fields.Selection(
[("order", "Ordered quantities"),... | 37.603774 | 1,993 |
1,462 | py | PYTHON | 15.0 | # Copyright 2018 ACSONE SA/NV (<http://acsone.eu>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import api, fields, models
class ResConfigSettings(models.TransientModel):
_name = "res.config.settings"
_inherit = "res.config.settings"
sale_default_invoice_policy = field... | 31.782609 | 1,462 |
569 | py | PYTHON | 15.0 | # Copyright 2020-21 ForgeFlow S.L.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
"name": "Sale Stock Delivery Address",
"version": "15.0.1.0.0",
"author": "ForgeFlow, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/sale-workflow",
"category": "Sales M... | 37.933333 | 569 |
5,565 | py | PYTHON | 15.0 | # Copyright 2020-22 ForgeFlow S.L.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo.tests import TransactionCase
class TestStockSourcingAddress(TransactionCase):
def setUp(self):
super(TestStockSourcingAddress, self).setUp()
self.partner_model = self.env["res.partne... | 45.243902 | 5,565 |
642 | py | PYTHON | 15.0 | # Copyright 2020-22 ForgeFlow S.L.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import api, models
class SaleOrder(models.Model):
_inherit = "sale.order"
@api.model
def _prepare_procurement_group_by_line(self, line):
vals = super(SaleOrder, self)._prepare_procu... | 35.666667 | 642 |
988 | py | PYTHON | 15.0 | # Copyright 2020-22 ForgeFlow S.L.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import fields, models
class SaleOrderLine(models.Model):
_inherit = "sale.order.line"
dest_address_id = fields.Many2one(
comodel_name="res.partner",
string="Destination Address"... | 34.068966 | 988 |
1,612 | py | PYTHON | 15.0 | # Copyright 2020-22 ForgeFlow S.L.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import api, models
class ProcurementGroup(models.Model):
_inherit = "procurement.group"
@api.model
def run(self, procurements, raise_user_error=True):
new_procs = []
Proc = ... | 41.333333 | 1,612 |
588 | py | PYTHON | 15.0 | # Copyright 2022 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Sale Discount Invoicing",
"version": "15.0.1.0.0",
"author": "Camptocamp, Odoo Community Association (OCA)",
"license": "AGPL-3",
"category": "Sales",
"depends": [
"account",
... | 28 | 588 |
16,040 | py | PYTHON | 15.0 | # Copyright 2022 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo.exceptions import ValidationError
from odoo.tests.common import Form, TransactionCase
class TestSaleInvoiceDiscount(TransactionCase):
# SETUP METHODS #
@classmethod
def setUpClass(cls):
supe... | 37.652582 | 16,040 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.