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 |
|---|---|---|---|---|---|---|
910 | py | PYTHON | 15.0 | # Copyright 2017 Camptocamp SA - Damien Crier, Alexandre Fayolle
# Copyright 2017 Eficent Business and IT Consulting Services S.L.
# Copyright 2017 Serpent Consulting Services Pvt. Ltd.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
"name": "Stock picking lines with sequence number",
"... | 35 | 910 |
5,314 | py | PYTHON | 15.0 | # Copyright 2017 Camptocamp SA - Damien Crier, Alexandre Fayolle
# Copyright 2017 Eficent Business and IT Consulting Services S.L.
# Copyright 2017 Serpent Consulting Services Pvt. Ltd.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo.tests import common
class TestStockMove(common.Tran... | 41.193798 | 5,314 |
3,496 | py | PYTHON | 15.0 | # Copyright 2017 Camptocamp SA - Damien Crier, Alexandre Fayolle
# Copyright 2017 Eficent Business and IT Consulting Services S.L.
# Copyright 2017 Serpent Consulting Services Pvt. Ltd.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import api, fields, models
class StockMove(models.M... | 35.673469 | 3,496 |
534 | py | PYTHON | 15.0 | # © 2017 Sergio Teruel <sergio.teruel@tecnativa.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
{
"name": "Stock Picking Sale Order Link",
"summary": "Link between picking and sale order",
"version": "15.0.1.0.2",
"category": "Inventory",
"website": "https://github.com/OCA/stoc... | 35.533333 | 533 |
2,210 | py | PYTHON | 15.0 | # © 2017 Sergio Teruel <sergio.teruel@tecnativa.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo.tests import tagged
from odoo.tests.common import TransactionCase
@tagged("post_install", "-at_install")
class TestStockPickingSaleOrderLink(TransactionCase):
def setUp(self):
su... | 38.754386 | 2,209 |
736 | py | PYTHON | 15.0 | # © 2017 Sergio Teruel <sergio.teruel@tecnativa.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import models
class StockPicking(models.Model):
_inherit = "stock.picking"
def action_view_sale_order(self):
"""This function returns an action that display existing sales o... | 36.75 | 735 |
314 | py | PYTHON | 15.0 | # Copyright 2019 Camptocamp - Iryna Vyshnevska
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import SUPERUSER_ID, api
def post_init_hook(cr, registry):
env = api.Environment(cr, SUPERUSER_ID, {})
env["res.company"].search([]).write({"use_oca_batch_validation": True})
| 31.4 | 314 |
1,141 | py | PYTHON | 15.0 | # Copyright 2012-2014 Alexandre Fayolle, Camptocamp SA
# Copyright 2018-2020 Tecnativa - Carlos Dauden
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Stock batch picking extended",
"summary": "Allows manage a lot of pickings in batch",
"version": "15.0.2.3.0",
"author": "Ca... | 39.344828 | 1,141 |
463 | py | PYTHON | 15.0 | # Copyright 2022 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from openupgradelib import openupgrade
def _update_assigned_state_to_inprogress(env):
query = """
UPDATE stock_picking_batch
SET state = 'in_progress'
WHERE state='assigned'
"""... | 25.722222 | 463 |
15,339 | py | PYTHON | 15.0 | # Copyright 2018 Tecnativa - Carlos Dauden
from odoo.exceptions import UserError
from odoo.tests import Form
from odoo.tests.common import TransactionCase, tagged
@tagged("post_install", "-at_install")
class TestBatchPicking(TransactionCase):
def _create_product(self, name, product_type="consu"):
return s... | 41.909836 | 15,339 |
6,790 | py | PYTHON | 15.0 | # Copyright 2012-2016 Camptocamp SA
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
import json
from odoo import _, api, fields, models
from odoo.exceptions import UserError
class StockPickingToBatch(models.TransientModel):
"""Create a stock.picking.batch from stock.picking"""
_inherit = "s... | 37.103825 | 6,790 |
390 | py | PYTHON | 15.0 | # Copyright 2016 Camptocamp SA
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields, models
class StockWarehouse(models.Model):
_inherit = "stock.warehouse"
default_user_id = fields.Many2one(
"res.users",
"Default Picker",
help="the user to which t... | 26 | 390 |
338 | py | PYTHON | 15.0 | # Copyright 2012-2014 Alexandre Fayolle, Camptocamp SA
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields, models
class Product(models.Model):
_inherit = "product.product"
# TODO: Integrate in existent field
description_warehouse = fields.Text("Warehouse Description"... | 33.8 | 338 |
540 | py | PYTHON | 15.0 | # Copyright 2019 Camptocamp - Iryna Vyshnevska
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import fields, models
class ResConfigSettings(models.TransientModel):
_inherit = "res.config.settings"
use_oca_batch_validation = fields.Boolean(
string="Use OCA approach to... | 27 | 540 |
4,231 | py | PYTHON | 15.0 | # Copyright 2012-2014 Alexandre Fayolle, Camptocamp SA
# Copyright 2018-2020 Tecnativa - Carlos Dauden
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import _, api, fields, models
from odoo.exceptions import UserError
class StockPickingBatch(models.Model):
"""This object allow to manag... | 37.442478 | 4,231 |
3,436 | py | PYTHON | 15.0 | # Copyright 2018 Tecnativa - Carlos Dauden
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
import logging
from odoo import api, fields, models
from odoo.tools import float_is_zero
_logger = logging.getLogger(__name__)
class ReportPrintBatchPicking(models.AbstractModel):
_name = "report.stock_pi... | 31.814815 | 3,436 |
488 | py | PYTHON | 15.0 | # Copyright 2020 Camptocamp
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Stock Putaway Hooks",
"summary": "Add hooks allowing modules to add more putaway strategies",
"version": "15.0.1.0.0",
"category": "Hidden",
"website": "https://github.com/OCA/stock-logistics... | 32.533333 | 488 |
1,481 | py | PYTHON | 15.0 | # Copyright 2022 ACSONE SA/NV
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo.tests.common import TransactionCase
from .common import PutawayHookCommon
class TestPutawayHook(PutawayHookCommon, TransactionCase):
def test_putaway_hook(self):
"""
The first location has no ... | 32.911111 | 1,481 |
437 | py | PYTHON | 15.0 | # Copyright 2022 ACSONE SA/NV
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields, models
class StockPutawayRule(models.Model):
_inherit = "stock.putaway.rule"
foo = fields.Boolean()
class StockLocation(models.Model):
_inherit = "stock.location"
@property
... | 21.85 | 437 |
2,163 | py | PYTHON | 15.0 | # Copyright 2022 ACSONE SA/NV
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo_test_helper import FakeModelLoader
class PutawayHookCommon:
@classmethod
def setUpClass(cls):
super().setUpClass()
cls.loader = FakeModelLoader(cls.env, cls.__module__)
cls.loader.b... | 33.276923 | 2,163 |
4,166 | py | PYTHON | 15.0 | # Copyright 2020 Camptocamp
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from lxml import etree
from odoo import models
from odoo.osv.expression import AND, OR
from odoo.tools.safe_eval import safe_eval
from odoo.addons.base.models.ir_ui_view import (
transfer_modifiers_to_node,
trans... | 37.531532 | 4,166 |
4,072 | py | PYTHON | 15.0 | # Copyright 2020 Camptocamp
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import models
from odoo.fields import first
class StockLocation(models.Model):
_inherit = "stock.location"
@property
def _putaway_strategies(self):
"""List of plugged put-away strategies
... | 38.056075 | 4,072 |
435 | py | PYTHON | 15.0 | {
"name": "Stock Restrict Lot",
"summary": "Base module that add back the concept of restrict lot on stock move",
"version": "15.0.0.0.2",
"category": "Warehouse Management",
"website": "https://github.com/OCA/stock-logistics-workflow",
"author": "Akretion, Odoo Community Association (OCA)",
... | 36.25 | 435 |
9,168 | py | PYTHON | 15.0 | from odoo.tests.common import TransactionCase
class TestRestrictLot(TransactionCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
cls.customer_loc = cls.env.ref("stock.stock_location_customers")
cls.output_loc = cls.env.ref("stock.stock_location_output")
cls.product ... | 40.387665 | 9,168 |
2,934 | py | PYTHON | 15.0 | from odoo import _, api, exceptions, fields, models
class StockMove(models.Model):
_inherit = "stock.move"
# seems better to not copy this field except when a move is splitted, because a move
# can be copied in multiple different occasions and could even be copied with a
# different product...
re... | 31.891304 | 2,934 |
236 | py | PYTHON | 15.0 | from odoo import models
class StockRule(models.Model):
_inherit = "stock.rule"
def _get_custom_move_fields(self):
fields = super()._get_custom_move_fields()
fields += ["restrict_lot_id"]
return fields
| 23.6 | 236 |
570 | py | PYTHON | 15.0 | # Copyright 2018 Tecnativa - Carlos Dauden
# Copyright 2018 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Stock Move Quick Lot",
"summary": "Set lot name and end date directly on picking operations",
"version": "15.0.1.0.0",
"category": "Stock",
... | 38 | 570 |
2,361 | py | PYTHON | 15.0 | # Copyright 2018 Tecnativa - Carlos Dauden
# Copyright 2018 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo.exceptions import ValidationError
from odoo.tests.common import TransactionCase
class TestStockMoveQuickLot(TransactionCase):
@classmethod
def setUp... | 42.160714 | 2,361 |
2,891 | py | PYTHON | 15.0 | # Copyright 2018 Carlos Dauden - Tecnativa <carlos.dauden@tecnativa.com>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import _, api, fields, models
from odoo.exceptions import ValidationError
class StockMove(models.Model):
_inherit = "stock.move"
line_lot_name = fields.Char(
... | 35.691358 | 2,891 |
727 | py | PYTHON | 15.0 | # Copyright 2020 Carlos Dauden - Tecnativa
# Copyright 2020 Sergio Teruel - Tecnativa
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Stock Owner Restriction",
"summary": "Do not reserve quantity with assigned owner",
"version": "15.0.1.1.0",
"development_status": "Beta",
... | 40.388889 | 727 |
7,229 | py | PYTHON | 15.0 | # Copyright 2020 Carlos Dauden - Tecnativa
# Copyright 2020 Sergio Teruel - Tecnativa
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo.tests.common import TransactionCase
class TestStockOwnerRestriction(TransactionCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
... | 46.63871 | 7,229 |
2,226 | py | PYTHON | 15.0 | # Copyright 2020 Carlos Dauden - Tecnativa
# Copyright 2020 Sergio Teruel - Tecnativa
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import api, models
from odoo.osv import expression
class StockQuant(models.Model):
_inherit = "stock.quant"
def _gather(
self,
produ... | 30.081081 | 2,226 |
606 | py | PYTHON | 15.0 | # Copyright 2020 Carlos Dauden - Tecnativa
# Copyright 2020 Sergio Teruel - Tecnativa
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields, models
class StockPickingType(models.Model):
_inherit = "stock.picking.type"
owner_restriction = fields.Selection(
[
... | 33.666667 | 606 |
2,335 | py | PYTHON | 15.0 | # Copyright 2020 Carlos Dauden - Tecnativa
# Copyright 2020 Sergio Teruel - Tecnativa
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from collections import defaultdict
from odoo import models
class StockMove(models.Model):
_inherit = "stock.move"
def _action_assign(self):
# Split ... | 34.850746 | 2,335 |
337 | py | PYTHON | 15.0 | # Copyright 2020 Carlos Dauden - Tecnativa
# Copyright 2020 Sergio Teruel - Tecnativa
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields, models
class StockPicking(models.Model):
_inherit = "stock.picking"
owner_restriction = fields.Selection(related="picking_type_id.own... | 33.7 | 337 |
1,481 | py | PYTHON | 15.0 | # Copyright 2020 Carlos Dauden - Tecnativa
# Copyright 2020 Sergio Teruel - Tecnativa
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import models
class ProductProduct(models.Model):
_inherit = "product.product"
def _compute_quantities_dict(
self, lot_id, owner_id, package... | 41.138889 | 1,481 |
446 | py | PYTHON | 15.0 | # Copyright 2020 Tecnativa - Carlos Roca
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Stock Picking Return Restricted Qty",
"summary": "Restrict the return to delivered quantity",
"version": "15.0.1.0.0",
"license": "AGPL-3",
"author": "Tecnativa," "Odoo Community Asso... | 34.307692 | 446 |
3,369 | py | PYTHON | 15.0 | # Copyright 2020 Tecnativa - Carlos Roca
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo.exceptions import UserError
from odoo.tests import Form, common
class StockPickingReturnRestrictedQtyTest(common.TransactionCase):
def setUp(self):
super().setUp()
partner = sel... | 41.592593 | 3,369 |
2,333 | py | PYTHON | 15.0 | # Copyright 2020 Tecnativa - Carlos Roca
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import _, api, models
from odoo.exceptions import UserError
from odoo.tools import float_compare
class ReturnPicking(models.TransientModel):
_inherit = "stock.return.picking"
@api.model
... | 38.245902 | 2,333 |
828 | py | PYTHON | 15.0 | # Copyright 2013-2015 Camptocamp SA - Nicolas Bessi
# Copyright 2013-2015 Camptocamp SA - Guewen Baconnier
# Copyright 2013-2015 Camptocamp SA - Yannick Vaucher
# Copyright 2017 Tecnativa - Vicent Cubells
# Copyright 2021 ForgeFlow
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Split pic... | 34.5 | 828 |
6,840 | py | PYTHON | 15.0 | # Copyright 2017 Tecnativa - Vicent Cubells <vicent.cubells@tecnativa.com>
# Copyright 2018 Camptocamp SA - Julien Coux
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo.exceptions import UserError
from odoo.tests.common import TransactionCase
class TestStockSplitPicking(TransactionCase):
... | 40.958084 | 6,840 |
4,911 | py | PYTHON | 15.0 | # Copyright 2013-2015 Camptocamp SA - Nicolas Bessi
# Copyright 2018 Camptocamp SA - Julien Coux
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import _, models
from odoo.exceptions import UserError
from odoo.tools.float_utils import float_compare
class StockPicking(models.Model):
"""A... | 41.618644 | 4,911 |
1,872 | py | PYTHON | 15.0 | # Copyright 2020 Hunki Enterprises BV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class StockSplitPicking(models.TransientModel):
_name = "stock.split.picking"
_description = "Split a picking"
mode = fields.Selection(
[
("done", "Do... | 32.842105 | 1,872 |
638 | py | PYTHON | 15.0 | # ?? 2015-2016 Akretion (http://www.akretion.com)
# @author Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Stock Disallow Negative",
"version": "15.0.1.0.0",
"category": "Inventory, Logistic, Storage",
"license": "AGPL-3",
... | 37.529412 | 638 |
4,094 | py | PYTHON | 15.0 | # Copyright 2015-2016 Akretion (http://www.akretion.com) - Alexis de Lattre
# Copyright 2016 ForgeFlow (http://www.forgeflow.com)
# Copyright 2016 Serpent Consulting Services (<http://www.serpentcs.com>)
# Copyright 2018 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from o... | 38.261682 | 4,094 |
442 | py | PYTHON | 15.0 | # Copyright 2018 ForgeFlow (https://www.forgeflow.com)
# @author Jordi Ballester <jordi.ballester@forgeflow.com.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class StockLocation(models.Model):
_inherit = "stock.location"
allow_negative_stock = fields.Bo... | 31.571429 | 442 |
2,280 | py | PYTHON | 15.0 | # Copyright 2015-2017 Akretion (http://www.akretion.com)
# @author Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import _, api, models
from odoo.exceptions import ValidationError
from odoo.tools import config, float_compare
class StockQuant(... | 43.018868 | 2,280 |
949 | py | PYTHON | 15.0 | # Copyright 2015-2016 Akretion (http://www.akretion.com)
# @author 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 ProductCategory(models.Model):
_inherit = "product.category"
allow_negative_stock = fields.... | 36.5 | 949 |
558 | py | PYTHON | 15.0 | # Copyright 2019 Vicent Cubells <vicent.cubells@tecnativa.com>
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
{
"name": "Purchase Stock Picking Invoice Link",
"version": "15.0.1.0.0",
"category": "Warehouse Management",
"summary": "Adds link between purchases, pickings and invoices",
... | 39.857143 | 558 |
8,718 | py | PYTHON | 15.0 | # Copyright 2019 Vicent Cubells <pedro.baeza@tecnativa.com>
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
from odoo import fields
from odoo.tests import Form, common, tagged
@tagged("-at_install", "post_install")
class TestPurchaseSTockPickingInvoiceLink(common.TransactionCase):
@classmethod
... | 43.373134 | 8,718 |
2,360 | py | PYTHON | 15.0 | # Copyright 2022 Tecnativa - Carlos Roca
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
from odoo import models
from odoo.tools import float_compare, float_is_zero
class PurchaseOrderLine(models.Model):
_inherit = "purchase.order.line"
def get_stock_moves_link_invoice(self):
moves_l... | 36.307692 | 2,360 |
1,547 | 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 StockMove(models.Model):
_inherit = "stock.move"
def write(self, vals):
"""Method used to associate the stock.move with the created account.move.line
whe... | 37.731707 | 1,547 |
535 | py | PYTHON | 15.0 | # Copyright 2020 Tecnativa - Carlos Roca
# License AGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
{
"name": "Stock Picking Product Assortment",
"version": "15.0.1.0.0",
"category": "Warehouse Management",
"website": "https://github.com/OCA/stock-logistics-workflow",
"author": "Tecnativa, Odo... | 35.666667 | 535 |
4,919 | py | PYTHON | 15.0 | # Copyright 2020 Tecnativa - Carlos Roca
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo.tests.common import Form, TransactionCase
class TestStockPickingProductAssortment(TransactionCase):
def setUp(self):
super().setUp()
self.filter_obj = self.env["ir.filters"]
... | 47.757282 | 4,919 |
626 | py | PYTHON | 15.0 | # Copyright 2020 Tecnativa - Carlos Roca
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl).
from odoo import api, fields, models
# We overwrite this class as a trick to repeat the product_id field with different
# attributes on the view.
class StockMoveLine(models.Model):
_inherit = "stock.move.line... | 34.777778 | 626 |
617 | py | PYTHON | 15.0 | # Copyright 2020 Tecnativa - Carlos Roca
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl).
from odoo import api, fields, models
# We overwrite this class as a trick to repeat the product_id field with different
# attributes on the view.
class StockMove(models.Model):
_inherit = "stock.move"
as... | 34.277778 | 617 |
1,531 | py | PYTHON | 15.0 | # Copyright 2020 Tecnativa - Carlos Roca
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl).
from odoo import api, fields, models
from odoo.osv import expression
class StockPicking(models.Model):
_inherit = "stock.picking"
assortment_product_ids = fields.Many2many(
comodel_name="product.... | 40.289474 | 1,531 |
679 | py | PYTHON | 15.0 | # Copyright 2018 Tecnativa - Sergio Teruel
# Copyright 2020 ACSONE SA/NV
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Stock Picking Auto Create Lot",
"summary": "Auto create lots for incoming pickings",
"version": "15.0.1.0.0",
"development_status": "Production/Stable",
... | 39.941176 | 679 |
2,409 | py | PYTHON | 15.0 | # Copyright 2018 Tecnativa - Sergio Teruel
# Copyright 2020 ACSONE SA/NV
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
class CommonStockPickingAutoCreateLot(object):
def assertUniqueIn(self, element_list):
elements = []
for element in element_list:
if element in elem... | 37.640625 | 2,409 |
5,634 | py | PYTHON | 15.0 | # Copyright 2018 Tecnativa - Sergio Teruel
# Copyright 2020 ACSONE SA/NV
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo.exceptions import UserError
from odoo.tests import TransactionCase
from .common import CommonStockPickingAutoCreateLot
class TestStockPickingAutoCreateLot(CommonStockPic... | 36.584416 | 5,634 |
1,407 | py | PYTHON | 15.0 | # Copyright 2020 ACSONE SA/NV
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import models
from odoo.fields import first
class StockMoveLine(models.Model):
_inherit = "stock.move.line"
def _prepare_auto_lot_values(self):
"""
Prepare multi valued lots per line to u... | 36.076923 | 1,407 |
256 | py | PYTHON | 15.0 | # Copyright 2018 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields, models
class StockPickingType(models.Model):
_inherit = "stock.picking.type"
auto_create_lot = fields.Boolean()
| 28.444444 | 256 |
716 | py | PYTHON | 15.0 | # Copyright 2020 ACSONE SA/NV
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import api, models
class StockMove(models.Model):
_inherit = "stock.move"
@api.depends(
"has_tracking",
"picking_type_id.auto_create_lot",
"product_id.auto_create_lot",
"p... | 29.833333 | 716 |
921 | py | PYTHON | 15.0 | # Copyright 2018 Tecnativa - Sergio Teruel
# Copyright 2020 ACSONE SA/NV
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import models
class StockPicking(models.Model):
_inherit = "stock.picking"
def _set_auto_lot(self):
"""
Allows to be called either by button or t... | 29.709677 | 921 |
253 | py | PYTHON | 15.0 | # Copyright 2018 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields, models
class ProductTemplate(models.Model):
_inherit = "product.template"
auto_create_lot = fields.Boolean()
| 28.111111 | 253 |
643 | py | PYTHON | 15.0 | # Copyright 2015 - Sandra Figueroa Varela
# Copyright 2017 Tecnativa - Vicent Cubells
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Stock Picking by Mail",
"summary": "Send stock picking by email",
"version": "15.0.1.0.1",
"author": "Sandra Figueroa Varela, "
"Tecn... | 33.789474 | 642 |
1,621 | py | PYTHON | 15.0 | # Copyright 2017 Tecnativa <vicent.cubells@tecnativa.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo.tests import common
class TestStockPickingSendByMail(common.TransactionCase):
@classmethod
def setUpClass(cls):
super(TestStockPickingSendByMail, cls).setUpClass()
... | 40.525 | 1,621 |
1,188 | py | PYTHON | 15.0 | # Copyright 2015 - Sandra Figueroa Varela
# Copyright 2017 Tecnativa - Vicent Cubells
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import _, models
class StockPicking(models.Model):
_inherit = "stock.picking"
def action_picking_send(self):
self.ensure_one()
... | 33 | 1,188 |
456 | py | PYTHON | 15.0 | # Copyright 2020 ForgeFlow S.L.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Stock Push Delay",
"summary": "Manual evaluation of Push rules",
"version": "15.0.1.0.0",
"category": "Inventory",
"author": "ForgeFlow, " "Odoo Community Association (OCA)",
"license": "AG... | 35.076923 | 456 |
1,677 | py | PYTHON | 15.0 | from odoo.tests import Form
from odoo.tests.common import TransactionCase
class TestPacking(TransactionCase):
@classmethod
def setUpClass(cls):
super(TestPacking, cls).setUpClass()
cls.stock_location = cls.env.ref("stock.stock_location_stock")
cls.warehouse = cls.env["stock.warehouse"]... | 39 | 1,677 |
460 | py | PYTHON | 15.0 | # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import models
class StockMove(models.Model):
_inherit = "stock.move"
def _push_apply(self):
"""Manual triggering"""
if self.env.context.get("manual_push", False):
new_move = super(StockMove, self)._push_ap... | 27.058824 | 460 |
365 | py | PYTHON | 15.0 | # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import models
class StockPicking(models.Model):
_inherit = "stock.picking"
def _action_done(self):
res = super(StockPicking, self)._action_done()
for picking in self.with_context(manual_push=True):
picking... | 26.071429 | 365 |
636 | py | PYTHON | 15.0 | # Copyright 2022 Tecnativa - César A. Sánchez
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Stock landed costs security",
"version": "15.0.1.0.0",
"category": "Inventory",
"website": "https://github.com/OCA/stock-logistics-workflow",
"author": "Tecnativa, Odoo Commu... | 35.222222 | 634 |
602 | py | PYTHON | 15.0 | # Copyright 2018 ACSONE SA/NV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Picking backordering strategies",
"version": "15.0.1.0.0",
"development_status": "Production/Stable",
"author": """ACSONE SA/NV,
Odoo Community Association (OCA)""",
"maintainer... | 33.444444 | 602 |
3,887 | py | PYTHON | 15.0 | # Copyright 2018 ACSONE SA/NV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo.tests import Form, TransactionCase
class TestBackorderStrategy(TransactionCase):
@classmethod
def setUpClass(cls):
"""Create the picking."""
super().setUpClass()
cls.env = cls.env(c... | 35.990741 | 3,887 |
514 | 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 StockPickingType(models.Model):
_inherit = "stock.picking.type"
backorder_strategy = fields.Selection(
[
("manual", "Manual"),
("create", "Creat... | 25.7 | 514 |
339 | py | PYTHON | 15.0 | # Copyright 2018 ACSONE SA/NV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import models
class StockMove(models.Model):
_inherit = "stock.move"
def _cancel_remaining_quantities(self):
to_cancel = self.filtered(lambda m: m.state not in ("done", "cancel"))
to_cance... | 28.25 | 339 |
1,003 | py | PYTHON | 15.0 | # Copyright 2018 ACSONE SA/NV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import models
class StockPicking(models.Model):
_inherit = "stock.picking"
def _check_backorder(self):
# If strategy == 'manual', let the normal process going on
self = self.filtered(lambd... | 37.148148 | 1,003 |
717 | py | PYTHON | 15.0 | # Copyright 2018 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Stock Picking Whole Scrap",
"summary": "Create whole scrap from a picking for move lines",
"version": "15.0.1.0.1",
"development_status": "Production/Stable",
"category": "Warehouse... | 35.85 | 717 |
3,482 | py | PYTHON | 15.0 | # Copyright 2018 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo.exceptions import UserError
from odoo.tests.common import TransactionCase, tagged
@tagged("post_install", "-at_install")
class TestStockPickingScrapQuick(TransactionCase):
@classmethod
def set... | 38.688889 | 3,482 |
543 | 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 button_whole_scrap(self):
self.ensure_one()
return {
"name": _("Whole Scrap"),
... | 30.166667 | 543 |
4,880 | py | PYTHON | 15.0 | # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import _, api, fields, models
from odoo.exceptions import UserError
from odoo.tools.float_utils import float_compare, float_round
class StockPickingScrapLine(models.TransientModel):
_name = "wiz.stock.picking.scrap.line"
_description =... | 40.666667 | 4,880 |
647 | py | PYTHON | 15.0 | # Copyright 2022 Camptocamp SA (https://www.camptocamp.com).
# @author Iván Todorovich <ivan.todorovich@camptocamp.com>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Stock Picking Product Availability Search",
"summary": "Filter pickings by their products availability state",
... | 40.375 | 646 |
5,453 | py | PYTHON | 15.0 | # Copyright 2022 Camptocamp SA (https://www.camptocamp.com).
# @author Iván Todorovich <ivan.todorovich@camptocamp.com>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import Command
from odoo.tests import TransactionCase
class TestSearch(TransactionCase):
@classmethod
def setUpCla... | 37.342466 | 5,452 |
1,986 | py | PYTHON | 15.0 | # Copyright 2022 Camptocamp SA (https://www.camptocamp.com).
# @author Iván Todorovich <ivan.todorovich@camptocamp.com>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import _, api, fields, models
from odoo.exceptions import UserError
from odoo.osv.expression import OR, distribute_not, norm... | 41.354167 | 1,985 |
661 | py | PYTHON | 15.0 | # Copyright 2022 Tecnativa - Ernesto Tejeda
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Stock Picking Product Availability Inline",
"summary": "Show product availability in product drop-down in stock picking form view.",
"version": "15.0.1.0.0",
"development_status": "Bet... | 47.214286 | 661 |
2,902 | py | PYTHON | 15.0 | # Copyright 2022 Tecnativa - Ernesto Tejeda
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo.tests import Form, TransactionCase, tagged
@tagged("post_install", "-at_install")
class TestStockPickingProductAvailabilityInline(TransactionCase):
@classmethod
def setUpClass(cls):
s... | 38.693333 | 2,902 |
746 | py | PYTHON | 15.0 | # Copyright 2022 Tecnativa - Ernesto Tejeda
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import models
class ProductProduct(models.Model):
_inherit = "product.product"
def name_get(self):
res = super().name_get()
if self.env.context.get("sp_product_stock_inline"... | 35.52381 | 746 |
1,724 | py | PYTHON | 15.0 | # Copyright 2022 Tecnativa - Ernesto Tejeda
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class StockPicking(models.Model):
_inherit = "stock.picking"
picking_type_warehouse_id = fields.Many2one(
comodel_name="stock.warehouse",
string="... | 32.528302 | 1,724 |
589 | py | PYTHON | 15.0 | # © 2016 Lorenzo Battistini - Agile Business Group
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Pickings back to draft",
"summary": "Reopen cancelled pickings",
"version": "15.0.1.0.1",
"category": "Warehouse Management",
"website": "https://github.com/OCA/stock-logisti... | 36.75 | 588 |
2,841 | py | PYTHON | 15.0 | # © 2016 Lorenzo Battistini - Agile Business Group
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo.exceptions import UserError
from odoo.tests.common import TransactionCase
class TestPickingBackToDraft(TransactionCase):
def _create_picking(self, partner, p_type, src=None, dest=None):
... | 43.692308 | 2,840 |
452 | py | PYTHON | 15.0 | # © 2016 Lorenzo Battistini - Agile Business Group
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import _, models
from odoo.exceptions import UserError
class StockMove(models.Model):
_inherit = "stock.move"
def action_back_to_draft(self):
if self.filtered(lambda m: m.stat... | 32.214286 | 451 |
324 | py | PYTHON | 15.0 | # © 2016 Lorenzo Battistini - Agile Business Group
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import models
class StockPicking(models.Model):
_inherit = "stock.picking"
def action_back_to_draft(self):
moves = self.mapped("move_lines")
moves.action_back_to_draft... | 26.916667 | 323 |
3,097 | py | PYTHON | 15.0 | # Copyright 2019 Tecnativa - David
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
import logging
from odoo import SUPERUSER_ID, api
_logger = logging.getLogger(__name__)
def pre_init_hook(cr):
"""Speed up the installation of the module on an existing Odoo instance"""
cr.execute(
""... | 33.301075 | 3,097 |
766 | py | PYTHON | 15.0 | # Copyright 2019 Tecnativa - David Vidal
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Stock Return Request",
"version": "15.0.1.0.0",
"category": "Stock",
"website": "https://github.com/OCA/stock-logistics-workflow",
"author": "Tecnativa, " "Odoo Community Association (... | 31.916667 | 766 |
8,664 | py | PYTHON | 15.0 | # Copyright 2019 Tecnativa - David Vidal
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from .test_stock_return_request_common import StockReturnRequestCase
class PurchaseReturnRequestCase(StockReturnRequestCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
def test_01... | 40.111111 | 8,664 |
16,221 | py | PYTHON | 15.0 | # Copyright 2019 Tecnativa - David Vidal
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from dateutil.relativedelta import relativedelta
from odoo import fields
from odoo.tests.common import TransactionCase
class StockReturnRequestCase(TransactionCase):
@classmethod
def setUpClass(cls):
... | 39.757353 | 16,221 |
4,033 | py | PYTHON | 15.0 | # Copyright 2020 Tecnativa - David Vidal
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class SuggestReturnRequestLot(models.TransientModel):
_name = "suggest.return.request.lot"
_description = "Suggest lots for the return request line"
request_line_i... | 38.409524 | 4,033 |
2,156 | py | PYTHON | 15.0 | # Copyright 2019 Tecnativa - David Vidal
# 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"
qty_returnable = fields.Float(
digits="Product Unit of Measure",
string="Returnable Quantity",
... | 38.5 | 2,156 |
780 | py | PYTHON | 15.0 | # Copyright 2019 Tecnativa - David Vidal
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields, models
class StockPicking(models.Model):
_inherit = "stock.picking"
stock_return_request_id = fields.Many2one(
comodel_name="stock.return.request",
)
def _create... | 35.454545 | 780 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.