picking_ids = self.env['stock.picking'].search(
[('sale_id.sample_id', '=', line.id)])
# for loop condition to check each line by line of the product lines
for pick in picking_ids.move_ids_without_package:
# check Condition if sample Qty returned less than means status will be partial returned
if pick.state != 'done':
print("half delivered")
picking_ids.write({'state': 'partially_delivered'})
else:
print("delivered")
# print(sample_qty, return_qty)
# active_id.write({'return_date': self.return_date, 'return_by': self.responsible_person,
# 'state': 'return'})
Odoo is the world's easiest all-in-one management software.
 It includes hundreds of business apps:
- 客户关系管理
- e-Commerce
- 会计
- 库存
- PoS
- Project
- MRP
此问题已终结
            
                2911
                
                    查看
                
            
        
    | 相关帖文 | 回复 | 查看 | 活动 | |
|---|---|---|---|---|
|  | 1 6月 23  | 3612 | ||
|  | 1 6月 23  | 5349 | ||
|  | 1 1月 23  | 3487 | ||
|  | 0 9月 22  | 3236 | ||
|  | 1 8月 22  | 4082 | 
