debugging carrier account issue with logging
This commit is contained in:
parent
236952924d
commit
6bb1d95fdb
1 changed files with 4 additions and 4 deletions
|
|
@ -276,13 +276,13 @@ class CarrierAccountMixin(models.AbstractModel):
|
|||
|
||||
if rec.delivery_billing_mode == "collect":
|
||||
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"]:
|
||||
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":
|
||||
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