Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ def default_get(self, fields): # pylint: disable=redefined-outer-name
or "is_customer_return" in fields
):
return res
picking = self.env["stock.picking"].browse(self.env.context["active_id"])
picking = self.env["stock.picking"].browse(self.env.context.get("active_id"))
if not picking:
return res
charge_restocking_fee = picking.partner_id.charge_restocking_fee
if "is_customer_return" in fields:
res["is_customer_return"] = picking.picking_kind == "customer_out"
Expand Down