Files
Odoo-18.0-20251222/sale_packaging_default/models/product_packaging.py
tocmo0nlord adbe430761
Some checks failed
pre-commit / pre-commit (push) Has been cancelled
tests / Detect unreleased dependencies (push) Has been cancelled
tests / test with OCB (push) Has been cancelled
tests / test with Odoo (push) Has been cancelled
Initial commit: Odoo 18.0-20251222 extra-addons
2026-03-13 20:43:25 +00:00

14 lines
503 B
Python
Executable File

# Copyright 2023 Moduon Team S.L.
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl-3.0)
from odoo import models
class ProductPackaging(models.Model):
_inherit = "product.packaging"
def _find_suitable_product_packaging(self, product_qty, uom_id):
"""Find nothing if you want to keep what was there."""
if self.env.context.get("keep_product_packaging"):
return self.browse()
return super()._find_suitable_product_packaging(product_qty, uom_id)