Merge branch 'feature/修复报废-坯料序列号' into develop

This commit is contained in:
jinling.yang
2024-08-27 16:16:01 +08:00

View File

@@ -440,7 +440,7 @@ class ProductionLot(models.Model):
if product.tracking == "serial":
last_serial = self.env['stock.lot'].search(
[('company_id', '=', company.id), ('product_id', '=', product.id)],
limit=1, order='id DESC')
limit=1, order='name desc')
if last_serial:
if product.categ_id.name == '刀具':
return self.env['stock.lot'].get_tool_generate_lot_names1(company, product)