Public release from ruodoo-project: 19.0 - 2026-09-20 21:17:41 UTC

This commit is contained in:
CI Publish Bot
2026-09-20 21:17:50 +00:00
commit ebd298dbf0
1234 changed files with 187334 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