Skip to content

Commit

Permalink
Merge PR #85 into 12.0
Browse files Browse the repository at this point in the history
Signed-off-by legalsylvain
  • Loading branch information
github-grap-bot committed Dec 19, 2023
2 parents 8a5e67e + 56c642d commit 7fa089a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions joint_buying_sale/models/joint_buying_transport_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ def _get_depends_can_change(self):
def _compute_origin(self):
super(
JointBuyingTransportRequest, self.filtered(lambda x: not x.sale_order_id)
)._compute_request_type()
)._compute_origin()

for request in self.filtered(lambda x: x.sale_order_id):
request.origin = request.sale_order_id.name
request.origin = request.sale_order_id.sudo().name

def _compute_request_type(self):
super(
Expand All @@ -74,15 +74,15 @@ def _compute_amount_untaxed(self):
)._compute_amount_untaxed()

for request in self.filtered(lambda x: x.sale_order_id):
request.amount_untaxed = request.sale_order_id.amount_untaxed
request.amount_untaxed = request.sale_order_id.sudo().amount_untaxed

def _compute_total_weight(self):
super(
JointBuyingTransportRequest, self.filtered(lambda x: not x.sale_order_id)
)._compute_total_weight()

for request in self.filtered(lambda x: x.sale_order_id):
request.total_weight = request.sale_order_id.total_ordered_weight
request.total_weight = request.sale_order_id.sudo().total_ordered_weight

def _compute_description(self):
super(
Expand All @@ -91,7 +91,7 @@ def _compute_description(self):

for request in self.filtered(lambda x: x.sale_order_id):
description = ""
for line in request.sale_order_id.order_line.filtered(
for line in request.sale_order_id.sudo().order_line.filtered(
lambda x: x.display_type not in ["line_note", "line_section"]
and x.product_id.type != "service"
):
Expand All @@ -116,7 +116,7 @@ def _compute_can_change(self):
def _get_report_tour_data_sale(self):
self.ensure_one()
res = []
for line in self.sudo().sale_order_id.order_line.filtered(
for line in self.sale_order_id.sudo().order_line.filtered(
lambda x: x.display_type not in ["line_note", "line_section"]
and x.product_id.type != "service"
):
Expand Down

0 comments on commit 7fa089a

Please sign in to comment.