debugging carrier account issue with logging
This commit is contained in:
parent
31892a892a
commit
c08f4779d8
1 changed files with 4 additions and 4 deletions
|
|
@ -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}"
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue