[FIX] account: display credit notes on portal

- Create an invoice for a portal user
- Add a credit note for that invoice
- Connect with portal user
- On Invoices & Bills menu, the correct count is displayed (i.e. 2)
- Open Invoices & Bills page
The "All" filter only displays out_invoice and in_invoice, making impossible to view
the other types (out_refund, in_refund, out_receipt, in_receipt).

opw-2486471

closes odoo/odoo#69792

X-original-commit: 159bc7b0c081fd54df2f2396b18e9a63892caa2e
Signed-off-by: William André (wan) <wan@odoo.com>
This commit is contained in:
Anh Thao Pham (pta)
2021-04-23 17:11:09 +00:00
parent 1129e5727d
commit e09cb7a27d
+3 -3
View File
@@ -49,9 +49,9 @@ class PortalAccount(CustomerPortal):
order = searchbar_sortings[sortby]['order']
searchbar_filters = {
'all': {'label': _('All'), 'domain': [('move_type', 'in', ['in_invoice', 'out_invoice'])]},
'invoices': {'label': _('Invoices'), 'domain': [('move_type', '=', 'out_invoice')]},
'bills': {'label': _('Bills'), 'domain': [('move_type', '=', 'in_invoice')]},
'all': {'label': _('All'), 'domain': []},
'invoices': {'label': _('Invoices'), 'domain': [('move_type', '=', ('out_invoice', 'out_refund'))]},
'bills': {'label': _('Bills'), 'domain': [('move_type', '=', ('in_invoice', 'in_refund'))]},
}
# default filter by value
if not filterby: