Skip to content

Commit

Permalink
[FIX] joint_buying_sale : correct compute sudo, to display correctly …
Browse files Browse the repository at this point in the history
…transport request, on sale.order
  • Loading branch information
legalsylvain committed Dec 4, 2023
1 parent ea6ec67 commit 6caf64e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions joint_buying_sale/models/sale_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@ class SaleOrder(models.Model):

@api.depends("joint_buying_transport_request_ids")
def _compute_joint_buying_transport_request_id(self):
for order in self.sudo():
for order in self:
sudo_order = order.sudo()
order.joint_buying_transport_request_id = (
order.joint_buying_transport_request_ids
and order.joint_buying_transport_request_ids[0]
sudo_order.joint_buying_transport_request_ids
and sudo_order.joint_buying_transport_request_ids[0]
or False
)

0 comments on commit 6caf64e

Please sign in to comment.