Public release from ruodoo-project: 19.0 - 2026-05-10 21:19:01 UTC

This commit is contained in:
CI Publish Bot
2026-05-10 21:19:11 +00:00
commit cbf9e6e6d6
1213 changed files with 183945 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