Merge branch 'feature/客供料入库单优化' into feature/采购优化

This commit is contained in:
yuxianghui
2024-11-25 09:17:40 +08:00
4 changed files with 15 additions and 16 deletions

View File

@@ -475,6 +475,8 @@ class ProductionLot(models.Model):
[('company_id', '=', company.id), ('product_id', '=', product.id),
('name', 'ilike', product.name.split('[')[0])],
limit=1, order='name desc')
if not last_serial:
return "%s-%03d" % (product.name, 1)
return self.env['stock.lot'].generate_lot_names1(product.name, last_serial.name, 2)[1]
now = datetime.now().strftime("%Y%m%d")
if product.cutting_tool_model_id: