With 3e82c94d we use the timezone in the context to format date
sequences when formatting an ir.sequence.
This commit adds the other missing context when getting a sequence, so
these sequences are also dependant on the timezone.
closes#8351
opw-646487
Due to commit 1576bc9891,
when name_search() is called on analytic accounts with
multiple path components (e.g. A/B/C), the intermediary
searches are done without the extra domain criterions,
because they should only apply to the leaf.
However because the limit was applied for each step
of the multi-path search, it was quite likely that
no valid results were found in the final filtering,
returning no result at all.
In fact the intermediary steps should not apply the
limit at all, because the leaves we're looking for
may actually be located under parents that are not
found when the limit is applied on each step.
This commits removes the limit (hopefully without
too much of an extra penalty for large databases)
It also introduces a better fallback in case the
multi-path search did not produce any result,
for example if the name of the lead really contains
a '/', and it was not meant to be a path separator.
When name_search is called with an extra domain
filter (args) and a pattern (name) containing
multi-level accounts, such as `A / B / C`, only
the last account (`C`) has to match the domain.
The intermediary parent accounts do not have to
match.
The domain was previously applied for each parent
in the lookup. This prevented searching for
multi-level accounts or copy-pasting full account
names whenever a domain was present and did not
match every account in the hierarchy.
When duplicating analytic accounts, child accounts are duplicated as well.
The custom copy method removes the analytic lines but this applies only on the
first copy. As the copy_data method recursively copies child accounts, these
child accounts did not use the custom copy method but the basic copy_data.
Move to copy_data
Fixes#6368, lp:1149676
The name_search was hardcoding ilike operator while it could be different. This means that a name_search "name != Agrolait" would return accounts with agrolait.
A side effect of this was the impossibility to import account_analytic_account whose parent is a substring of another - opw 607315
A squashed merge is required as the conversion of the apiculture branch from
bzr to git was not correctly done. The git history contains irrelevant blobs
and commits. This branch brings a lot of changes and fixes, too many to list
exhaustively.
- New orm api, objects are now used instead of ids
- Environements to encapsulates cr uid context while maintaining backward compatibility
- Field compute attribute is a new object oriented way to define function fields
- Shared browse record cache
- New onchange protocol
- Optional copy flag on fields
- Documentation update
- Dead code cleanup
- Lots of fixes