Implement user-facing invoice listings #470
No reviewers
Labels
No labels
API
Billing
UI/UX
dependencies
bug
change
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
servala/servala-portal!470
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "196-invoice-listing"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR provides an invoice listing page showing a list of all available invoices and their status. If an invoice is unpaid, a "Pay" button redirects users to the Odoo payment page. Availability of invoice listings is configurable per Origin.
Open questions
This is good for now. Maybe at one point we'll introduce a "Billing" role (or similar) which only has access to invoices
Fine for now
Good to know, we'll figure out in practice if it's needed or not
That's perfect
@ -0,0 +25,4 @@<tbody>{% for invoice in invoices %}<tr><td>{{ invoice.name }}</td>Add the same link
{{ invoice.payment_url }}here, independent if paid or not. This allows to access the invoice in the Odoo portal anytime.@ -0,0 +46,4 @@<td>{{ invoice.amount_residual|floatformat:2 }} {{ invoice.currency }}</td><td>{% if invoice.payment_url %}<a href="{{ invoice.payment_url }}"This resolves to an URL like
http://127.0.0.1:8000/my/invoices/34039?access_token=UUID, but it should resolve to$SERVALA_ODOO_URL/my/invoices/34039?access_token=UUID@ -17,6 +17,15 @@{% translate 'Organization' %}</span></a></li>{% if request.user_role == "admin" or request.user_role == "owner" or request.user.is_staff %}The menu should also be hidden when
show_invoice_listingis False.Fixed the three issues and also made it so that the "Pay" button does not show up for paid invoices (oops).