debugging carrier account issue with logging

This commit is contained in:
Marc Durepos 2025-02-27 15:22:19 -05:00
parent 31892a892a
commit c08f4779d8

View file

@ -276,13 +276,13 @@ class CarrierAccountMixin(models.AbstractModel):
if rec.delivery_billing_mode == "collect": if rec.delivery_billing_mode == "collect":
raise UserError( raise UserError(
"Carrier account is not associated with the recipient, but billing mode is collect." f"Carrier account is not associated with the recipient, but billing mode is collect. Current object: {rec}"
) )
elif rec.delivery_billing_mode in ["prepaid", "ppc", "no charge"]: elif rec.delivery_billing_mode in ["prepaid", "ppc", "no charge"]:
raise UserError( raise UserError(
"Carrier account is not associated with the sender, but billing mode is prepaid, ppc or no charge." f"Carrier account is not associated with the sender, but billing mode is prepaid, ppc or no charge. Current object: {rec}"
) )
elif rec.delivery_billing_mode == "third party": elif rec.delivery_billing_mode == "third party":
raise UserError( raise UserError(
"Third party carrier account cannot belong to sender or recipient." f"Third party carrier account cannot belong to sender or recipient. Current object: {rec}"
) )