优化odoo16工单视图展示问题

This commit is contained in:
gqh
2022-12-12 14:46:54 +08:00
parent 096cd44b9c
commit e0a0b3d411
17 changed files with 228 additions and 196 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: