oca-pos/odoo-bringout-oca-pos-pos_lot_selection/pos_lot_selection/models/stock_lot.py
Ernad Husremovic 377f346a99 Move all OCA POS modules from oca-technical to dedicated oca-pos submodule
Reorganized 74 POS-related modules for better structure:
- Moved all odoo-bringout-oca-pos-* packages from packages/oca-technical/
- Now organized in dedicated packages/oca-pos/ submodule
- Includes payment, receipt, loyalty, order, product, and partner modules
- Maintains all module functionality while improving project organization

This creates a cleaner separation between general technical modules
and Point of Sale specific functionality.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-30 17:15:35 +02:00

30 lines
786 B
Python

# Copyright 2022 Camptocamp SA
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl)
from odoo import api, models
from odoo.tools import float_compare
class ProductionLot(models.Model):
_inherit = "stock.lot"
@api.model
def get_available_lots_for_pos(self, product_id, company_id):
lots = self.sudo().search(
[
"&",
["product_id", "=", product_id],
"|",
["company_id", "=", company_id],
["company_id", "=", False],
]
)
lots = lots.filtered(
lambda l: float_compare(
l.product_qty, 0, precision_digits=l.product_uom_id.rounding
)
> 0
)
return lots.mapped("name")