Public release from ruodoo-project: 19.0 - 2026-07-26 21:17:35 UTC

This commit is contained in:
CI Publish Bot
2026-07-26 21:17:45 +00:00
commit 4f7b594ec8
1335 changed files with 191620 additions and 0 deletions

View File

@ -0,0 +1,18 @@
# -*- coding: utf-8 -*-
from odoo import models, fields
class VirtualBom(models.Model):
_inherit = 'mrp.bom'
is_virtual = fields.Boolean(string='Виртуальная (сгенерированная)')
def bom_available(self, qty=1):
"""Проверяет, что все компоненты BOM есть на складе в нужном количестве."""
for s in self:
for line in s.bom_line_ids:
if line.product_id.qty_available < line.product_qty * qty:
return False
return True