删除无用代码
This commit is contained in:
@@ -137,17 +137,6 @@ class PurchaseOrderLine(models.Model):
|
|||||||
)
|
)
|
||||||
record.part_number = filtered_order_line.product_id.part_number if filtered_order_line else None
|
record.part_number = filtered_order_line.product_id.part_number if filtered_order_line else None
|
||||||
record.part_name = filtered_order_line.product_id.part_name if filtered_order_line else None
|
record.part_name = filtered_order_line.product_id.part_name if filtered_order_line else None
|
||||||
elif record.product_id.categ_id.name == '表面工艺':
|
|
||||||
domain = [('name', '=', self.production_id.name),
|
|
||||||
('purchase_type', '=', 'consignment')]
|
|
||||||
purchase_orders = self.env['purchase.order'].search(domain)
|
|
||||||
purchase_orders_id = self.env['purchase.order']
|
|
||||||
for po in purchase_orders:
|
|
||||||
for line in po.order_line:
|
|
||||||
if line.product_id.server_product_process_parameters_id == self.surface_technics_parameters_id:
|
|
||||||
if line.product_qty == 1:
|
|
||||||
purchase_orders_id = line.order_id
|
|
||||||
return purchase_orders_id
|
|
||||||
else:
|
else:
|
||||||
record.part_number = record.product_id.part_number
|
record.part_number = record.product_id.part_number
|
||||||
record.part_name = record.product_id.part_name
|
record.part_name = record.product_id.part_name
|
||||||
|
|||||||
Reference in New Issue
Block a user