Skip to content

Commit 3955d48

Browse files
[FIX] delivery: assure stock user can validate pickings
Steps to reproduce: - Delivery module is installed. - User_1 is stock_manager and sale_manager. - User_1 creates sale_order with set carrier_id and confirms it (Automatically is created a picking P). - User_2 is stock user/manager but in sale is "Own documents only". - User_2 open picking P and validates it. => Error: cannot validate due to access rules. closes odoo#92870 Signed-off-by: Arnold Moyaux (arm) <[email protected]>
1 parent 64f00fd commit 3955d48

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

addons/delivery/models/stock_picking.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ def _send_confirmation_email(self):
125125
for pick in self:
126126
if pick.carrier_id:
127127
if pick.carrier_id.integration_level == 'rate_and_ship' and pick.picking_type_code != 'incoming':
128-
pick.send_to_shipper()
128+
pick.sudo().send_to_shipper()
129129
pick._check_carrier_details_compliance()
130130
return super(StockPicking, self)._send_confirmation_email()
131131

0 commit comments

Comments
 (0)