修改胚料部分

This commit is contained in:
jinling.yang
2022-12-09 17:23:07 +08:00
parent a18d55850a
commit 5e2d75b23e
21 changed files with 306 additions and 117 deletions

View File

@@ -51,10 +51,10 @@ class MrpProduction(models.Model):
def action_generate_serial(self):
self.ensure_one()
self.lot_producing_id = self.env['stock.production.lot'].create({
self.lot_producing_id = self.env['stock.lot'].create({
'product_id': self.product_id.id,
'company_id': self.company_id.id,
'name': self.env['stock.production.lot']._get_next_serial(self.company_id, self.product_id) or self.env[
'name': self.env['stock.lot']._get_next_serial(self.company_id, self.product_id) or self.env[
'ir.sequence'].next_by_code('stock.lot.serial'),
})
if self.move_finished_ids.filtered(lambda m: m.product_id == self.product_id).move_line_ids: