Detected cases where account_partial_reconcile has null currency_id, thus giving falsy amount_currency, and thus making some reconciled invoices appearing in the outstanding. Used _amount_residual of account move lines as reference to fix it.
* show partner name at the top.
* simplify view logic for `name` and `ref` printing.
* fallback to journal entry `ref` when the journal item has no
`ref` set.
* little query formatting changes to enhance readability.
By default we checked for an empty data dict in _get_report_values
however the mail template sends a file type and editor key by default.
We now check if the required company_id is in the dictionary. We also support
supplying force_company in context for setting the company for auto generated
emails.
Before this change, if a payment was reconciled using the bank statement widget
the move was seperated into many multiples of lines making activity
statements twice as long as necessary.
Now payments are a single line