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:
- CRM
- e-Commerce
- Comptabilité
- Inventaire
- PoS
- Project
- MRP
Cette question a été signalée
1821
Vues
Vous appréciez la discussion ? Ne vous contentez pas de lire, rejoignez-nous !
Créez un compte dès aujourd'hui pour profiter de fonctionnalités exclusives et échanger avec notre formidable communauté !
S'inscrirePublications associées | Réponses | Vues | Activité | |
---|---|---|---|---|
|
1
juin 23
|
2239 | ||
|
1
juin 23
|
4009 | ||
|
1
janv. 23
|
2134 | ||
|
0
sept. 22
|
1972 | ||
|
1
août 22
|
2818 |