询价单查询

This commit is contained in:
guanhuan
2024-12-03 15:59:10 +08:00
parent 778d2c4ec5
commit d6afd556d3

View File

@@ -283,7 +283,8 @@ class ResMrpWorkOrder(models.Model):
# if technology_design.is_auto is False:
# domain = [('origin', '=', order.production_id.name)]
# else:
domain = [('purchase_type', '=', 'consignment'), ('origin', '=', order.production_id.name)]
domain = [('purchase_type', '=', 'consignment'), ('origin', '=', order.production_id.name),
('state', '!=', 'cancel')]
purchase = self.env['purchase.order'].search(domain)
purchase_num = 0
if not purchase:
@@ -313,7 +314,8 @@ class ResMrpWorkOrder(models.Model):
# if technology_design.is_auto is False:
# domain = [('origin', '=', self.production_id.name)]
# else:
domain = [('origin', '=', self.production_id.name), ('purchase_type', '=', 'consignment')]
domain = [('origin', '=', self.production_id.name), ('purchase_type', '=', 'consignment'),
('state', '!=', 'cancel')]
purchase_orders = self.env['purchase.order'].search(domain)
purchase_orders_id = None
for po in purchase_orders: