When generating the accounting entries, to compute the name, the invoice
reference (e.g. origin purchase order name) was first used before the supplier
invoice number. To facilate reconciliation of bank statements, the supplier
invoice number makes more sense.
Fixes#3839, opw 618765
When opening entries are generated, the reconcile_id field is updated in SQL
(probably for performances reasons) but the computed and stored field
reconcile_ref is not recomputed by the ORM.
Force the recomputation of the field by calling ORM method _store_set_values.
Fixes#4267, opw 620369
When printing the general ledger with "With Currency"
checked, two currencies were displayed in the colum
"Currency" when an amount was set, one time the company
currency, one time the move line currency. Only
the move line currency should be displayed.
Besides, the total of currencies amount
for each account should not display the currency symbol
at all, as the total may be composed of multiple currencies.
opw-632086
In the partner ledger wizard, you can check
a boolean to display the amount within the
currency the amount has been invoiced.
This feature was simply no more working
in Odoo 8.0.
opw-630268
The report generated by this wizard considered all the partners without taking into account
the filters and target entries set.
To show the right partner the function _set_context
must consider the "self.query" which sets the period, the dates, the states, the accounts and
the journals of the sql query used to give the demanded partner.
opw:631649
If a customer changed of company while having
account.move.line records in the former company he was in
It wasn't possible for someone else than the admin
to print the partner ledger report including this partner.
opw-631800
On an invoice, tax lines are generated in tax_line field. When modifying
manually the tax amount, the recomputed tax_amount field was incorrect in
multicurrency environment, leading to an entry with different tax amount and
debit value.
opw 611474
"Invoiced" stat button on the res.partner form view must not include cancelled and draft invoices.
The button triggered an action which shows a tree view with invoices where:
type in ['out_invoice'] and all states.
Now the button triggers a tree view with invoices where: type in ['out_invoice' , 'out_refund']
and state not in ['draft', 'cancel'].
opw:472318
On a line write in a account.move.line tree view, the on_write return all the
sibling move lines of the written move line. The lines are then displayed even
if they do not match the current search domain.
This fix adds the context on the given on_write callback request, and in
on_create_write use a on_write_domain in this context to filter the returned ids.
fixes#3161, closes#5727
opw-630093
It is possible, if the user created a new country by himself, to have a country without a code, we then need to check that.
Fixes opw 629891, where the customer wrote "Belgie" trying to find "België", didn't find it and created a new "Belgie" country without code.
The domain on the partner field in the bank statement lines
was too restrictive: You should be able to select partners
that aren't either customer or suppliers. For instance, your
employees.
opw-630017
when a customer invoice is created directly,
if a product variant is selected,
it now computes the price from the product variant and
not from the product template.
opw: 629285
When having account installed, but having as only
access right "Contacts creation", it wasn't possible to
display the partner form.
Setting the "groups" on the button itself has as effect
to hide the button, but not to prevent its value computation.
If you did not had the access rights required to compute the
buttons values, it leaded to security issues.
Put the "groups" on the view instead prevent the button to be loaded,
and its value to be computed. It therefore avoids both
a useless computation (computing the value of a hidden button
is not really useful), and prevent any access rights warnings.
Besides, 3 different groups were needed to display the
three buttons:
- account.group_account_invoice
- account.group_account_user
- analytic.group_analytic_accounting
Not having one of these tree groups could lead to security
warnings. We therefore split this view into three sub-views,
with each one a group set (and a button)
opw-628668
Many trivial changes to journal items, such as the
"blocked" flag for litigation (follow-up), do not affect
the balance of the whole entry. These should not cause
the account.move to be (re)validated.
For example it should be possible to change trivial
fields even on journal entries recorded in a closed
fiscal period.
Since all the lines in a partial reconciliation share the same state and the same amount_residual, we need to keep only one 'result' line.
It was the first line found that was kept ; now it's the line whose amount is greater than amount_residual, whiwh most likely is the significant one.
Fixes#5129
In a workflow context (for instance, in the invoice workflow),
context is not passed.
Therefore, relying on the 'recompute' key being the context
in order to not recompute the fields does not work with Workflows.
It leads to huge performance issues,
as fields are recomputed recursively (instead of sequentially)
when several records are implied.
For instance, when reconciling several invoices with one payment
(100 invoices with 1 payment for instance),
records of each invoice are recomputed uselessly in each workflow call
(for each "confirm_paid" method done for each invoice).
With a significant number of invoices (100, for instance),
it even leads to a "Maximum recursion depth reached" errror.
closes#4905