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 |
|---|---|---|---|---|---|---|
303 | py | PYTHON | 15.0 | from odoo import models
class Picking(models.Model):
_inherit = "stock.picking"
def action_confirm(self):
res = super().action_confirm()
picking_priority = self.env.context.get("sale_priority", False)
self.write({"priority": picking_priority or 0})
return res
| 27.545455 | 303 |
1,500 | py | PYTHON | 15.0 | # Copyright 2018 Simone Rubino - Agile Business Group
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
from odoo.addons.stock.models import stock_move
class SaleOrderLine(models.Model):
_inherit = "sale.order.line"
priority = fields.Selection(stock_move.... | 32.608696 | 1,500 |
468 | py | PYTHON | 15.0 | # Copyright 2021 Tecnativa - Ernesto Tejeda
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Sale Stock Cancel Restriction",
"version": "15.0.1.0.1",
"author": "Tecnativa, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/sale-workflow",
"category": "S... | 33.428571 | 468 |
1,645 | py | PYTHON | 15.0 | # Copyright 2021 Tecnativa - Ernesto Tejeda
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo.exceptions import UserError
from odoo.tests import Form, TransactionCase
class TestSaleStockCancelRestriction(TransactionCase):
@classmethod
def setUpClass(cls):
super().setUpClass()... | 39.166667 | 1,645 |
539 | py | PYTHON | 15.0 | # Copyright 2021 Tecnativa - Ernesto Tejeda
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import models
class SaleOrder(models.Model):
_inherit = "sale.order"
def action_cancel(self):
"""Force to call the cancel method on done picking for having the
expected erro... | 33.6875 | 539 |
474 | py | PYTHON | 15.0 | # Copyright 2022 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
def pre_init_hook(cr):
"""Create computed columns if not exists when the module is instelled"""
cr.execute(
"""
ALTER TABLE sale_order_line
ADD COLUMN IF NOT EXISTS is_elaboratio... | 27.882353 | 474 |
1,043 | py | PYTHON | 15.0 | # Copyright 2018 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Sale Elaboration",
"summary": "Set an elaboration for any sale line",
"version": "15.0.3.2.0",
"development_status": "Production/Stable",
"category": "Sale",
"website": "https:/... | 35.965517 | 1,043 |
799 | py | PYTHON | 15.0 | # Copyright 2023 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from openupgradelib import openupgrade
@openupgrade.migrate()
def migrate(env, version):
# Copy elaborations from sale order lines to stock moves
openupgrade.logged_query(
env.cr,
"""
... | 34.73913 | 799 |
289 | py | PYTHON | 15.0 | # Copyright 2023 Tecnativa - Ernesto Tejeda
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from openupgradelib import openupgrade
@openupgrade.migrate()
def migrate(env, version):
openupgrade.rename_columns(env.cr, {"sale_order_line": [("elaboration_id", None)]})
| 32.111111 | 289 |
393 | py | PYTHON | 15.0 | # Copyright 2023 Tecnativa - Ernesto Tejeda
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from openupgradelib import openupgrade
@openupgrade.migrate()
def migrate(env, version):
openupgrade.m2o_to_x2m(
env.cr,
env["sale.order.line"],
"sale_order_line",
"elabor... | 24.5625 | 393 |
6,983 | py | PYTHON | 15.0 | # Copyright 2018 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo.tests import Form, TransactionCase, tagged
@tagged("post_install", "-at_install")
class TestSaleElaboration(TransactionCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
... | 41.076471 | 6,983 |
1,310 | py | PYTHON | 15.0 | # Copyright 2023 Tecnativa - Sergio Teruel
# Copyright 2023 Tecnativa - Carlos Dauden
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class ProductElaborationMixin(models.AbstractModel):
_name = "product.elaboration.mixin"
_description = "Product Elaborati... | 34.473684 | 1,310 |
3,128 | py | PYTHON | 15.0 | # Copyright 2018 Tecnativa - Sergio Teruel
# Copyright 2019 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
def _execute_onchanges(records, field_name):
"""Helper methods that executes all onchanges associated to a field."""
for ... | 38.146341 | 3,128 |
1,717 | py | PYTHON | 15.0 | # Copyright 2019 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class ProductTemplate(models.Model):
_inherit = "product.template"
is_elaboration = fields.Boolean()
elaboration_profile_id = fields.Many2one(
comodel_n... | 39.930233 | 1,717 |
819 | py | PYTHON | 15.0 | # Copyright 2023 Tecnativa - Sergio Teruel
# Copyright 2023 Tecnativa - Carlos Dauden
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class StockMove(models.Model):
_inherit = ["stock.move", "product.elaboration.mixin"]
_name = "stock.move"
@api.model... | 35.608696 | 819 |
1,869 | py | PYTHON | 15.0 | # Copyright 2018 Tecnativa - Sergio Teruel
# Copyright 2019 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class Elaboration(models.Model):
_name = "product.elaboration"
_description = "Product elaborations"
name = fields.C... | 33.981818 | 1,869 |
702 | py | PYTHON | 15.0 | # Copyright 2023 Tecnativa - Sergio Teruel
# Copyright 2023 Tecnativa - Carlos Dauden
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields, models
class ProductElaborationProfile(models.Model):
_name = "product.elaboration.profile"
_description = "Product elaboration profil... | 35.1 | 702 |
700 | py | PYTHON | 15.0 | # Copyright 2018 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import models
class StockPicking(models.Model):
_inherit = "stock.picking"
def _action_done(self):
res = super()._action_done()
for pick in self.filtered(lambda x: x.picking_t... | 38.888889 | 700 |
336 | py | PYTHON | 15.0 | # Copyright 2019 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields, models
class ProductProduct(models.Model):
_inherit = "product.product"
elaboration_profile_id = fields.Many2one(
comodel_name="product.elaboration.profile", ondelete="... | 30.545455 | 336 |
1,267 | py | PYTHON | 15.0 | # Copyright 2023 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.795455 | 1,267 |
434 | 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, models
class ResConfigSettings(models.TransientModel):
_inherit = "res.config.settings"
group_elaboration_note_on_delivery_slip = fields.Boolean(
"Display Elaboration ... | 33.384615 | 434 |
483 | py | PYTHON | 15.0 | # Copyright 2017-2020 Onestein (<https://www.onestein.eu>)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Sale Order Archive",
"summary": "Archive Sale Orders",
"author": "Onestein, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/sale-workflow",
"c... | 32.2 | 483 |
1,538 | py | PYTHON | 15.0 | # Copyright 2020 Camptocamp SA
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl)
from odoo.exceptions import UserError
from odoo.tests import Form, TransactionCase
class TestSaleOrderArchive(TransactionCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
test_context = c... | 43.942857 | 1,538 |
543 | py | PYTHON | 15.0 | # Copyright 2017-2020 Onestein (<https://www.onestein.eu>)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import _, fields, models
from odoo.exceptions import UserError
class SaleOrder(models.Model):
_inherit = "sale.order"
active = fields.Boolean(default=True)
def toggle_ac... | 33.9375 | 543 |
537 | py | PYTHON | 15.0 | # Copyright 2013-15 Agile Business Group sagl (<http://www.agilebg.com>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Sale order line description",
"version": "15.0.1.0.0",
"category": "Sales Management",
"author": "Agile Business Group, " "Odoo Community Association (OCA)"... | 41.307692 | 537 |
2,873 | py | PYTHON | 15.0 | # Copyright 2017 Simone Rubino - Agile Business Group
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
import odoo.tests.common as common
from odoo.tests import tagged
@tagged("post_install", "-at_install")
class TestSaleOrderLineDescriptionChange(common.TransactionCase):
def setUp(self):
... | 37.311688 | 2,873 |
936 | py | PYTHON | 15.0 | # Copyright 2013-15 Agile Business Group sagl (<http://www.agilebg.com>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, models
class SaleOrderLine(models.Model):
_inherit = "sale.order.line"
@api.onchange("product_id")
def product_id_change(self):
res = sup... | 33.428571 | 936 |
634 | py | PYTHON | 15.0 | # Copyright 2013-15 Agile Business Group sagl (<http://www.agilebg.com>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class ResConfigSettings(models.TransientModel):
_inherit = "res.config.settings"
group_use_product_description_per_so_line = fields.Boolean... | 37.294118 | 634 |
498 | 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 Partner Selectable Option",
"version": "15.0.1.0.1",
"category": "Sales Management",
"website": "https://github.com/OCA/sale-workflow",
"author": "Tecnativa, Odoo Community A... | 35.428571 | 496 |
697 | 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 TestSalePartnerSelectableOption(common.TransactionCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
def test_sale_o... | 33.095238 | 695 |
1,050 | 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 SaleOrder(models.Model):
_inherit = "sale.order"
@api.model
def fields_view_get(
self, view_id=None, view_type="form", toolbar=... | 32.75 | 1,048 |
293 | 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"
sale_selectable = fields.Boolean(string="Selectable in sale orders", default=True)
| 29.1 | 291 |
705 | py | PYTHON | 15.0 | # © 2016 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Sale Commercial Partner",
"summary": "Add stored related field 'Commercial Entity' on sale orders",
"version": "15.0.1.0.2",
"development_status": "Production/S... | 39.111111 | 704 |
443 | py | PYTHON | 15.0 | # © 2016 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class SaleOrder(models.Model):
_inherit = "sale.order"
commercial_partner_id = fields.Many2one(
comodel_name="res.partner",
stri... | 27.625 | 442 |
607 | py | PYTHON | 15.0 | # Copyright 2016 Cédric Pigeon, ACSONE SA/NV (<http://acsone.eu>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Sale Product Multi Add",
"summary": """
Sale Product Multi Add """,
"author": "ACSONE SA/NV, Odoo Community Association (OCA)",
"website": "https://gi... | 33.666667 | 606 |
1,342 | py | PYTHON | 15.0 | # © 2016 Cédric Pigeon, 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 TestSale(common.TransactionCase):
def setUp(self):
super(TestSale, self).setUp()
self.product_9 = self.env.ref("product.produc... | 33.5 | 1,340 |
2,621 | py | PYTHON | 15.0 | # Copyright 2016 Cédric Pigeon, 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 SaleImportProducts(models.TransientModel):
_name = "sale.import.products"
_description = "Sale Import Products"
products = fie... | 34.933333 | 2,620 |
604 | py | PYTHON | 15.0 | # Copyright 2018 Alex Comba - Agile Business Group
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Sale Delivery Split Date",
"version": "15.0.1.0.0",
"summary": "Sale Deliveries split by date",
"category": "Sales Management",
"license": "AGPL-3",
"author": "Agile Bus... | 30.2 | 604 |
4,920 | py | PYTHON | 15.0 | # Copyright 2018 Alex Comba - Agile Business Group
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
import datetime
from odoo.tests.common import TransactionCase
from odoo.tools import format_date
class TestSaleDelivery(TransactionCase):
@classmethod
def setUpClass(cls):
super().setUp... | 35.652174 | 4,920 |
1,257 | py | PYTHON | 15.0 | # Copyright 2018 Alex Comba - Agile Business Group
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import models
from odoo.tools import format_date
class SaleOrderLine(models.Model):
_inherit = "sale.order.line"
def _prepare_procurement_group_vals(self):
vals = super()._pre... | 35.914286 | 1,257 |
584 | py | PYTHON | 15.0 | # Copyright 2019 Tecnativa - Ernesto Tejeda
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Partner contact sale info propagation",
"summary": "Propagate Salesperson and Sales Channel " "from Company to Contacts",
"version": "15.0.1.0.0",
"category": "Sales Management",
"... | 38.933333 | 584 |
2,741 | py | PYTHON | 15.0 | # Copyright 2019 Tecnativa - Ernesto Tejeda
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from lxml import etree
from odoo.tests.common import TransactionCase
class TestPartnerContactSaleInfoPropagation(TransactionCase):
def setUp(self):
super().setUp()
self.partner_model = se... | 39.724638 | 2,741 |
3,326 | py | PYTHON | 15.0 | # Copyright 2019 Tecnativa - Ernesto Tejeda
# 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
from odoo.tools import config
class ResPartner(models.Model):
_inherit = "res.partner"
def _check_pro... | 38.206897 | 3,324 |
1,228 | py | PYTHON | 15.0 | # Copyright 2015 Carlos Sánchez Cifuentes <csanchez@grupovermon.com>
# Copyright 2015-2016 Oihane Crucelaegui <oihane@avanzosc.com>
# Copyright 2015-2020 Tecnativa - Pedro M. Baeza
# Copyright 2016 Lorenzo Battistini
# Copyright 2016 Carlos Dauden <carlos.dauden@tecnativa.com>
# Copyright 2018 David Vidal <david.vidal@... | 35.057143 | 1,227 |
1,931 | py | PYTHON | 15.0 | from odoo.tests import tagged
from odoo.addons.sale.tests.common import TestSaleCommon
@tagged("post_install", "-at_install")
class TestSaleReport(TestSaleCommon):
@classmethod
def setUpClass(cls, chart_template_ref=None):
super().setUpClass(chart_template_ref=chart_template_ref)
cls.sale_or... | 35.109091 | 1,931 |
1,930 | py | PYTHON | 15.0 | from odoo import fields
from odoo.tests import tagged
from odoo.addons.account.tests.common import AccountTestInvoicingCommon
@tagged("post_install", "-at_install")
class TestAccountInvoiceReport(AccountTestInvoicingCommon):
@classmethod
def setUpClass(cls, chart_template_ref=None):
super().setUpClas... | 32.711864 | 1,930 |
11,372 | py | PYTHON | 15.0 | # Copyright 2015 Oihane Crucelaegui - AvanzOSC
# Copyright 2017 Pierre Faniel - Niboo SPRL (<https://www.niboo.be/>)
# Copyright 2020 Tecnativa - Pedro M. Baeza
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
from freezegun import freeze_time
import odoo.tests.common as common
from odoo import fields
... | 42.59176 | 11,372 |
2,156 | py | PYTHON | 15.0 | # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
# Copyright 2020 Tecnativa - Pedro M. Baeza
from odoo import api, fields, models
class AccountMove(models.Model):
_inherit = "account.move"
sale_type_id = fields.Many2one(
comodel_name="sale.order.type",
string="Sale Type",
... | 39.2 | 2,156 |
2,567 | py | PYTHON | 15.0 | # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class SaleOrderTypology(models.Model):
_name = "sale.order.type"
_description = "Type of sale order"
_check_company_auto = True
@api.model
def _get_domain_sequence_id(self):
seq_type = se... | 34.226667 | 2,567 |
603 | py | PYTHON | 15.0 | # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class ResPartner(models.Model):
_inherit = "res.partner"
sale_type = fields.Many2one(
comodel_name="sale.order.type", string="Sale Order Type", company_dependent=True
)
def copy_data(self, defaul... | 31.736842 | 603 |
6,137 | py | PYTHON | 15.0 | # Copyright 2020 Tecnativa - Pedro M. Baeza
# Copyright 2023 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from datetime import datetime, timedelta
from odoo import _, api, fields, models
class SaleOrder(models.Model):
_inherit = "sale.order"
type_id = fields.Man... | 39.089172 | 6,137 |
630 | py | PYTHON | 15.0 | # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
# Copyright 2021 Ecosoft Co., Ltd (http://ecosoft.co.th)
from odoo import models
class SaleAdvancePaymentInv(models.TransientModel):
_inherit = "sale.advance.payment.inv"
def _prepare_invoice_values(self, order, name, amount, so_line):
... | 35 | 630 |
478 | py | PYTHON | 15.0 | # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields, models
class AccountInvoiceReport(models.Model):
_inherit = "account.invoice.report"
sale_type_id = fields.Many2one(
comodel_name="sale.order.type",
string="Sale Order Type",
)
def _select(self... | 25.157895 | 478 |
579 | py | PYTHON | 15.0 | # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields, models
class SaleReport(models.Model):
_inherit = "sale.report"
type_id = fields.Many2one(
comodel_name="sale.order.type",
string="Type",
)
# flake8: noqa
# pylint:disable=dangerous-default... | 30.473684 | 579 |
920 | py | PYTHON | 15.0 | # Copyright 2013 Agile Business Group sagl (<http://www.agilebg.com>)
# Copyright 2016 Serpent Consulting Services Pvt. Ltd.
# Copyright 2018 Dreambits Technologies Pvt. Ltd. (<http://dreambits.in>)
# Copyright 2020 Ecosoft Co., Ltd. (<http://ecosoft.co.th>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl... | 36.8 | 920 |
3,167 | 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.tests import Form
from odoo.addons.base_revision.tests import test_base_revision
class TestSaleOrderRevision(test_base_revision.TestBaseRevision):
@classmethod
def setUpClass(cls):
... | 40.576923 | 3,165 |
1,516 | py | PYTHON | 15.0 | # Copyright 2013 Agile Business Group sagl (<http://www.agilebg.com>)
# Copyright 2016 Serpent Consulting Services Pvt. Ltd.
# Copyright 2018 Dreambits Technologies Pvt. Ltd. (<http://dreambits.in>)
# Copyright 2020 Ecosoft Co., Ltd. (<http://ecosoft.co.th>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl... | 33.688889 | 1,516 |
665 | py | PYTHON | 15.0 | # Copyright 2019 Tecnativa - David Vidal
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import SUPERUSER_ID, api
def post_init_hook(cr, registry, vals=None):
"""Archive the ir.rules we want to override"""
env = api.Environment(cr, SUPERUSER_ID, {})
env.ref("sale.sale_order_rule... | 39.117647 | 665 |
594 | py | PYTHON | 15.0 | # Copyright 2018-19 Tecnativa S.L. - David Vidal
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Portal Sale Personal Data Only",
"version": "15.0.1.0.0",
"category": "Sale",
"author": "Tecnativa, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/s... | 37.125 | 594 |
3,069 | py | PYTHON | 15.0 | # Copyright 2021 Tecnativa - Víctor Martínez
# Copyright 2022 Moduon
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl)
from odoo.tests.common import Form, tagged
from odoo.addons.account.tests.common import TestAccountReconciliationCommon
@tagged("post_install", "-at_install")
class TestPartnerAccess(... | 39.320513 | 3,067 |
652 | py | PYTHON | 15.0 | # Copyright (C) 2021 ForgeFlow S.L.
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html)
{
"name": "Sale Order Invoice Amount",
"version": "15.0.1.0.0",
"author": "ForgeFlow, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/sale-workflow",
"category": "Sales",
... | 32.6 | 652 |
4,070 | py | PYTHON | 15.0 | # Copyright (C) 2021 ForgeFlow S.L.
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html)
from odoo.tests import common
class TestSaleOrderInvoiceAmount(common.TransactionCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
# Partners
cls.res_partner_1 = cls.e... | 35.701754 | 4,070 |
2,387 | py | PYTHON | 15.0 | # Copyright (C) 2021 ForgeFlow S.L.
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html)
import json
from odoo import api, fields, models
from odoo.tools.misc import formatLang
class SaleOrder(models.Model):
_inherit = "sale.order"
invoiced_amount = fields.Monetary(
compute="_compute... | 33.152778 | 2,387 |
626 | py | PYTHON | 15.0 | # Copyright 2018 Akretion (http://www.akretion.com).
# @author Pierrick BRUN <pierrick.brun@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Sale delivery State",
"summary": "Show the delivery state on the sale order",
"version": "15.0.1.0.0",
"category": "Produc... | 29.809524 | 626 |
3,422 | py | PYTHON | 15.0 | # Copyright 2018 Akretion (http://www.akretion.com).
# @author Benoît GUILLOT <benoit.guillot@akretion.com>
# Copyright 2018 Camptocamp
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
import mock
from odoo.tests import TransactionCase
class TestDeliveryState(TransactionCase):
@classmethod
de... | 36.784946 | 3,421 |
2,990 | py | PYTHON | 15.0 | # Copyright 2018 Akretion (http://www.akretion.com).
# @author Pierrick BRUN <pierrick.brun@akretion.com>
# Copyright 2018 Camptocamp
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
from odoo.tools import float_compare, float_is_zero
class SaleOrder(models.Model):... | 33.595506 | 2,990 |
1,397 | py | PYTHON | 15.0 | # Copyright 2020 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Sale planner calendar",
"summary": "Sale planner calendar",
"version": "15.0.1.2.1",
"development_status": "Beta",
"category": "Sale",
"website": "https://github.com/OCA/sale-wo... | 37.756757 | 1,397 |
780 | py | PYTHON | 15.0 | # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openupgradelib import openupgrade # pylint: disable=W7936
def link_target_partner_id_to_recurrent_events(env):
events = env["calendar.event"].search([("target_partner_id", "!=", False)])
for event in events:
to_assign_events =... | 33.913043 | 780 |
11,619 | py | PYTHON | 15.0 | # Copyright 2021 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from freezegun import freeze_time
from odoo.exceptions import AccessError
from odoo.tests.common import Form, TransactionCase, tagged
@tagged("-at_install", "post_install")
@freeze_time("2022-02-04 09:00:00")... | 41.645161 | 11,619 |
9,739 | py | PYTHON | 15.0 | # Copyright 2021 Tecnativa - Sergio Teruel
# Copyright 2021 Tecnativa - Carlos Dauden
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from datetime import timedelta
from odoo import api, fields, models
class SalePlannerCalendarReassignWiz(models.TransientModel):
_name = "sale.planner.calendar.r... | 38.192157 | 9,739 |
2,227 | 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 SalePlannerCalendarWizard(models.TransientModel):
_name = "sale.planner.calendar.wizard"
_description = "Sale planner calendar Wizard"
user_id = fields.M... | 32.75 | 2,227 |
676 | py | PYTHON | 15.0 | # Copyright 2020 Tecnativa - Carlos Dauden
# Copyright 2020 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import fields, models
class SaleInvoicePaymentWiz(models.TransientModel):
_inherit = "sale.invoice.payment.wiz"
sale_planner_calendar_event_id... | 33.8 | 676 |
317 | py | PYTHON | 15.0 | # Copyright 2021 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields, models
class SaleEventPlannerIssueType(models.Model):
_name = "sale.planner.calendar.issue.type"
_description = "Sale planner calendar issue type"
name = fields.Char()
| 28.818182 | 317 |
338 | py | PYTHON | 15.0 | # Copyright 2021 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields, models
class SalePaymentSheetLine(models.Model):
_inherit = "sale.payment.sheet.line"
sale_planner_calendar_event_id = fields.Many2one(
comodel_name="sale.planner.cale... | 28.166667 | 338 |
8,056 | 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
from odoo.tools.safe_eval import safe_eval
class SalePlannerCalendarEvent(models.Model):
_name = "sale.planner.calendar.event"
_description = "Sale planner calendar... | 34.42735 | 8,056 |
4,895 | py | PYTHON | 15.0 | # Copyright 2021 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import _, fields, models
from odoo.tools import relativedelta
class SaleOrder(models.Model):
_inherit = "sale.order"
sale_planner_calendar_event_id = fields.Many2one(
comodel_name="s... | 41.483051 | 4,895 |
250 | py | PYTHON | 15.0 | # Copyright 2021 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields, models
class CalendarEventType(models.Model):
_inherit = "calendar.event.type"
duration = fields.Float()
| 25 | 250 |
8,032 | py | PYTHON | 15.0 | # Copyright 2021 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from datetime import timedelta
import pytz
from odoo import api, fields, models
from odoo.osv import expression
from odoo.tools.date_utils import relativedelta
# from odoo.addons.calendar.models.calendar impo... | 37.70892 | 8,032 |
12,517 | py | PYTHON | 15.0 | # Copyright 2021 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from datetime import timedelta
import pytz
from odoo import _, api, fields, models
from odoo.exceptions import ValidationError
class SalePlannerCalendarSummary(models.Model):
_name = "sale.planner.calenda... | 36.386628 | 12,517 |
1,391 | py | PYTHON | 15.0 | # Copyright 2020 Sergio Teruel - Tecnativa
# Copyright 2021 Tecnativa - Carlos Dauden
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
from odoo import fields, models
class ResConfigSettings(models.TransientModel):
_inherit = "res.config.settings"
susbscriptions_backward_days = fields.I... | 30.911111 | 1,391 |
3,264 | py | PYTHON | 15.0 | # Copyright 2021 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from datetime import timedelta
from odoo import _, fields, models
from odoo.exceptions import ValidationError
from odoo.tools.date_utils import relativedelta
class ResPartner(models.Model):
_inherit = "res... | 37.953488 | 3,264 |
587 | py | PYTHON | 15.0 | # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Sale Order Partner Restrict",
"summary": "Apply restrictions when selecting from the list of customers on SO.",
"version": "15.0.1.0.0",
"category": "Sales Management",
"website": "https://github.com/OCA/sale-workflow",
... | 41.928571 | 587 |
4,345 | py | PYTHON | 15.0 | from odoo.exceptions import ValidationError
from odoo.tests import tagged
from odoo.tests.common import TransactionCase
@tagged("post_install", "-at_install")
class TestSaleOrderPartnerRestrict(TransactionCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
cls.main_company = cls.env... | 37.136752 | 4,345 |
495 | py | PYTHON | 15.0 | # Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import fields, models
class ResCompany(models.Model):
_inherit = "res.company"
sale_order_partner_restrict = fields.Selection(
[
("all", "All partners"),
("only_parents", "Only parent account... | 29.117647 | 495 |
379 | py | PYTHON | 15.0 | # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields, models
class ResConfigSettings(models.TransientModel):
_inherit = "res.config.settings"
sale_order_partner_restrict = fields.Selection(
related="company_id.sale_order_partner_restrict",
string="Partner ... | 29.153846 | 379 |
2,379 | py | PYTHON | 15.0 | from odoo import _, api, fields, models
from odoo.exceptions import ValidationError
from odoo.osv import expression
class SaleOrder(models.Model):
_inherit = "sale.order"
sale_order_partner_restrict = fields.Selection(
related="company_id.sale_order_partner_restrict",
string="Partner Restrict... | 36.045455 | 2,379 |
788 | py | PYTHON | 15.0 | # Copyright 2010-2012 Andy Lu <andy.lu@elico-corp.com> (Elico Corp)
# Copyright 2013 Agile Business Group sagl (<http://www.agilebg.com>)
# Copyright 2017 valentin vinagre <valentin.vinagre@qubiq.es> (QubiQ)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
{
"name": "Sale Quotation Numeration",
... | 37.52381 | 788 |
3,018 | py | PYTHON | 15.0 | # Copyright 2018 Simone Rubino - Agile Business Group
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo.exceptions import UserError
from odoo.tests.common import TransactionCase
class TestSaleOrder(TransactionCase):
def setUp(self, *args, **kwargs):
super(TestSaleOrder, self).set... | 35.928571 | 3,018 |
1,843 | py | PYTHON | 15.0 | # © 2010-2012 Andy Lu <andy.lu@elico-corp.com> (Elico Corp)
# © 2013 Agile Business Group sagl (<http://www.agilebg.com>)
# © 2017 valentin vinagre <valentin.vinagre@qubiq.es> (QubiQ)
# © 2020 Manuel Regidor <manuel.regidor@sygel.es>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
from odoo import api... | 36.058824 | 1,839 |
777 | py | PYTHON | 15.0 | # © 2010-2012 Andy Lu <andy.lu@elico-corp.com> (Elico Corp)
# © 2013 Agile Business Group sagl (<http://www.agilebg.com>)
# © 2017 valentin vinagre <valentin.vinagre@qubiq.es> (QubiQ)
# © 2020 Manuel Regidor <manuel.regidor@sygel.es>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
from odoo import fie... | 32.208333 | 773 |
1,381 | py | PYTHON | 15.0 | # Copyright 2018 ACSONE SA/NV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
import logging
from odoo import SUPERUSER_ID
from odoo.api import Environment
from odoo.tools.sql import column_exists, create_column
_logger = logging.getLogger(__name__)
COLUMNS = (
("sale_order", "price_total_no_disc... | 27.078431 | 1,381 |
611 | py | PYTHON | 15.0 | # Copyright 2018 ACSONE SA/NV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Sale Discount Display Amount",
"summary": """
This addon intends to display the amount of the discount computed on
sale_order_line and sale_order level""",
"version": "15.0.1.0.1",
"... | 35.941176 | 611 |
1,680 | py | PYTHON | 15.0 | # Copyright 2018 ACSONE SA/NV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo.tests.common import TransactionCase
class TestDiscountDisplay(TransactionCase):
def test_sale_discount_value(self):
product1 = self.env["product.product"].create(
{"name": "Product TEST", "... | 43.076923 | 1,680 |
1,127 | py | PYTHON | 15.0 | # Copyright 2018 ACSONE SA/NV
# 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"
discount_total = fields.Monetary(
compute="_compute_discount_total",
string="Discount Subtotal",
... | 31.305556 | 1,127 |
1,600 | py | PYTHON | 15.0 | # Copyright 2018 ACSONE SA/NV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class SaleOrderLine(models.Model):
_inherit = "sale.order.line"
discount_total = fields.Monetary(
compute="_compute_amount", string="Discount Subtotal", store=True
... | 33.333333 | 1,600 |
815 | py | PYTHON | 15.0 | # Copyright 2013-2017 Agile Business Group sagl
# (<http://www.agilebg.com>)
# Copyright 2021 ForgeFlow S.L. (https://www.forgeflow.com)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Product Supplierinfo for Customer Sale",
"version": "15.0.1.1.0",
"summary": "Loads in ... | 38.809524 | 815 |
3,354 | py | PYTHON | 15.0 | # Copyright 2017 Vauxoo (https://www.vauxoo.com) info@vauxoo.com
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)
from odoo.tests.common import TransactionCase
class TestProductNameSearch(TransactionCase):
"""Test for:
- Assign a configuration customer for product.
- Test product name_... | 42.455696 | 3,354 |
6,590 | py | PYTHON | 15.0 | # Copyright 2017 ForgeFlow S.L.
# (http://www.forgeflow.com)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo.tests.common import TransactionCase
class TestProductSupplierinfoForCustomerSale(TransactionCase):
def setUp(self):
super(TestProductSupplierinfoForCustomerSale, s... | 39.939394 | 6,590 |
2,321 | py | PYTHON | 15.0 | # Copyright 2013-2017 Agile Business Group sagl
# (<http://www.agilebg.com>)
# Copyright 2021 ForgeFlow S.L. (https://www.forgeflow.com)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import api, fields, models
class SaleOrderLine(models.Model):
_inherit = "sale.order.line"
... | 37.435484 | 2,321 |
655 | 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": "Sales Stock Invoice Plan",
"summary": "Add to sales order, ability to manage future invoice plan",
"version": "15.0.1.0.1",
"author": "Ecosoft,Odoo Community Associa... | 36.388889 | 655 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.