File tree 1 file changed +1
-13
lines changed
delivery_postlogistics/models
1 file changed +1
-13
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ def _get_origin_pickings(self):
19
19
self .ensure_one ()
20
20
move_line_model = self .env ["stock.move.line" ]
21
21
move_line = move_line_model .search ([("package_id" , "=" , self .id )])
22
- return move_line .mapped ("picking_id" )
22
+ return move_line .mapped ("picking_id.sale_id.picking_ids " )
23
23
24
24
def postlogistics_cod_amount (self ):
25
25
""" Return the PostLogistics Cash on Delivery amount of a package
@@ -59,16 +59,4 @@ def postlogistics_cod_amount(self):
59
59
)
60
60
)
61
61
62
- order_moves = order .mapped ("order_line.procurement_ids.move_ids" )
63
- package_moves = self .mapped ("quant_ids.history_ids" )
64
- # check if the package delivers the whole sales order
65
- if order_moves != package_moves :
66
- raise exceptions .Warning (
67
- _ (
68
- "The cash on delivery amount must be manually specified "
69
- "on the packages when a sales order is delivered "
70
- "in several packages."
71
- )
72
- )
73
-
74
62
return order .amount_total
You can’t perform that action at this time.
0 commit comments