Persist total_due on credit.control.communication for QWeb templates
Project description
This module persists the total_due field on credit.control.communication as a stored database column and adds a pre-formatted companion total_due_formatted, so both values are reachable from mail.template QWeb bodies.
The upstream OCA account_credit_control module defines total_due as a non-stored computed field. Because QWeb rendering of stored objects does not recompute non-stored functional fields, the total amount due cannot be embedded directly in credit control follow-up emails. This module overrides the field with store=True (keeping the exact same compute body and @api.depends chain as upstream) and provides a ready-to-render formatted variant.
Usage
To embed the total due in a credit control email template:
<p>The total amount due is: <strong t-out="object.total_due_formatted"/>.</p>
Or the raw value:
<p>Total due: <span t-esc="object.total_due"/></p>
Bug Tracker
Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported.
Credits
Contributors
SOMIT
Maintainer
This module is maintained by the OCA.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file odoo_addon_credit_control_communication_total_due-16.0.1.0.0.5.tar.gz.
File metadata
- Download URL: odoo_addon_credit_control_communication_total_due-16.0.1.0.0.5.tar.gz
- Upload date:
- Size: 7.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
33f2583ade01330db5b1396320c6e51c546033ffa6a5a57ae47b8bbeaa961ae0
|
|
| MD5 |
bd5870501a2a8db1f23ce810a7c0ae46
|
|
| BLAKE2b-256 |
501cf366674ff4f940dd5aff626a799dd44de9f7ab34eef7834d29e692674a05
|