Invoice Listing with Payment Link #196

Open
opened 2025-09-12 08:06:53 +00:00 by tobru · 0 comments
Owner

Stories

As a user, I want to see all my invoices with their state and a payment link

Implementation Notes

Listing

Retrieve all invoices from the Odoo model account.move where state=posted for the current organization. Invoices to show are referenced in the many2many field invoice_ids in the sale.order model.

Fields to display from account.move model:

  • Invoice: name
  • Date: date
  • Due Date: date_due
  • Payment State: payment_state
  • Amount: amount_residual

The currency can be retrieved via the currency_id field, which is a tuple: [id, name] e.g. [1, 'USD']

Show a payment link when the invoice hasn't been paid yet (payment_state=not_paid). The payment link is the "share link" from Odoo in the form "https://central.vshn.ch/mail/view?model=account.move&res_id=424242&access_token=TOKEN"

The share link can be retrieved this way:

result = self.models.execute_kw(
    self.database, self.uid, self.password,
    'account.move', 'get_portal_url',
    [invoice_id]
)

Configuration per Organization Origin

Allow to configure in the organization origin how the invoice listing behaves:

  • Show the invoice listing
  • Don't show the invoice listing; instead, show a configurable text that explains how to get the invoice.

Example: "To see your invoices, please connect to the Exoscale Portal at [link here]"

## Stories _As a user, I want to see all my invoices with their state and a payment link_ ## Implementation Notes ### Listing Retrieve all invoices from the Odoo model `account.move` where `state=posted` for the current organization. Invoices to show are referenced in the many2many field `invoice_ids` in the `sale.order` model. Fields to display from `account.move` model: * Invoice: `name` * Date: `date` * Due Date: `date_due` * Payment State: `payment_state` * Amount: `amount_residual` The currency can be retrieved via the `currency_id` field, which is a tuple: `[id, name]` e.g. `[1, 'USD']` ### Payment Link Show a payment link when the invoice hasn't been paid yet (`payment_state=not_paid`). The payment link is the "share link" from Odoo in the form "https://central.vshn.ch/mail/view?model=account.move&res_id=424242&access_token=TOKEN" The share link can be retrieved this way: ``` result = self.models.execute_kw( self.database, self.uid, self.password, 'account.move', 'get_portal_url', [invoice_id] ) ``` ### Configuration per Organization Origin Allow to configure in the organization origin how the invoice listing behaves: - Show the invoice listing - Don't show the invoice listing; instead, show a configurable text that explains how to get the invoice. Example: "To see your invoices, please connect to the Exoscale Portal at [link here]"
tobru added the
enhancement
label 2025-09-12 08:06:53 +00:00
tobru added this to the Development Planning project 2025-09-12 08:06:53 +00:00
tobru changed title from Invoice Listing to Invoice Listing with Payment Link 2025-09-26 11:07:50 +00:00
tobru added the
Billing
label 2025-10-30 15:46:51 +00:00
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: servala/servala-portal#196
No description provided.