修复工件装夹岗无法创建采购订单

This commit is contained in:
jinling.yang
2024-05-18 16:45:01 +08:00
parent 2e151a2292
commit 9f2415cfac

View File

@@ -877,7 +877,7 @@ class ResMrpWorkOrder(models.Model):
'product_qty': 1,
'product_uom': server_product.uom_id.id
}))
self.env['purchase.order'].create({
self.env['purchase.order'].sudo().create({
'partner_id': server_product.seller_ids.partner_id.id,
'origin': record.production_id.name,
'state': 'draft',