* 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.
In certain scenarios involving mutliple payments for multiple
invoices, where the reconciliation happens together and the debit
move is the smaller item the aging duplicates its value, making
the balance greater than it should be.
This fix works by preventing moves where different lines are both partial
reconciled being grouped together by adding the lines id
to the group by clause of _show_buckets_sql_q1
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
Use core account test base, helping to ensure we have the correct accounting environment setup.
If any of the localization modules are loaded, this will make this tests be skipped, instead of simply failing
TT28423
On multi-company settings, we need to make sure we are searching and creating objects with the correct company associated.
Also take into account previously created account groups
TT28423
Since v14, Odoo defines the `__slots__` attribute in the `BaseModel` class (ea3e39506a)
This makes it impossible to add attributes to an instance like it was done here in v13.
The use of the `report_data` dictionary passed between method is the closes and simples solution to this "issue".
TT26415
Co-authored-by: Alex Cuellar <acuellar@grupoyacck.com>
Depending on the calling method, data can be something different from a dictionary
(like `None` if no keyword argument is provided), so this will crash. Example:
mis_builder is crashing in its tests.
We prevent that checking for a falsy value before trying to access the dictionary.
We also avoid context mangling for non AFR reports (those without the key
`account_financial_report_lang` in the dictionary), not callign to `with_context`
in that case.