With this change,
* some modules are now set to be automatically installed by default
* the setup bar of accounting has been changed in order to allow more easiliy the configuration of bank accounts/journals (and the step to oversee the opening entry has been removed)
* the kanban view in the dashboard has been enhanced (mostly for bank journals, but not only)
Was task: 32668
Was PR #23049
Allow the user to set taxes on lines when creating manually a new journal entry, and tax lines will be computed automatically thanks to an onchange based on new unstored fields.
Was task: 33802
Was PR #19029
This allows to set up a mail alias per purchase journal. Then share that email address to your supplier, or use it internally to forward the vendor bills received by mail, to automatically create an empty vendor bill with the mail attachments linked, and the partner might be filled if the source email matches a supplier.
Thanks to the document preview on the side, it's now super easy and super fast to copy the vendor bill info from the received PDF into the account.invoice object. This would eventually be improved later on (IAP).
Was task: 37703
Was PR #22158
Make one Payment
Reverse the entry of this payment.
Before this commit, only the lines in the receivable were reconciled.
The lines in the liquidity were'nt, leaving the two entries appearing
in some reports
After this commit, the four lines are reconciled two by two, even in the liquidity
account
OPW 1816641
closes#25026
Commit https://github.com/odoo/odoo/commit/2eb344f23b3a9daa8e7c7ddaead145a8b05b39bf changed the dependancies of l10n_fr_certification which is not acceptable on stable. Instead, the method to check is now moved in account module (to avoid duplicated) and it is called by l10n_fr_certification and account_lock module.
Commit 5439e72a4e introduces the automatic creation of a journal
for a payment provider. However, the journal created doesn't have a
default payment method, to avoid showing it in the backend.
In the case of the eCommerce with automatic invoice creation, this
set-up returns a 500 error after an online payment. Solving the problem
is not obvious for the end-user.
The error comes from the fact that the 'Manual' payment method is not
available on the journal. We can remove this check.
opw-1853011
See https://github.com/odoo/odoo/issues/20804
We don't turn invoice_ids into a computed field, because we need it erverywhere for technical reasons. Instead, we use a new computed field only there to ensure consistency of the displayed data.
Was task: 1819501
Was PR #24290
When clicking on button "Invoices" from a payment, it always displayed
the supplier views instead of taking care about the type of the payment.
opw:1849397
Purpose
=======
The method _name_search and _search add support to search as another user.
All the overrides of name_search and search redefine the behavior of the search.
This bring inconsistencies as the result of a call to _name_search and name_search
could differ on certain modules, which is not acceptable.
Specification
=============
Example:
~~~~~~~~
If the name_search method is overridden to search also on the driver name,
then calling name_search with a label 'JF' will return all the cars with a name containing
'JF' or all the cars with a driver name containing 'JF'. Let's say that we have a ir.rule
preventing a user to read the cars of another company. Then the call to name search only returns
the cars satisfying the previous condition AND belonging to his company.
Now, we want to overpass this constraint. We call _name_search with the attribute name_get_uid=1.
Then the call to _name_search returns all the cars from all the companies with a name like 'JF',
but nothing is done about the driver_name.
Example of wrong search redefinition on a model
-----------------------------------------------
@api.model
def name_search(self, name, args=None, operator='ilike', limit=100):
domain = args or []
domain = expression.AND([domain, [('name', 'ilike', name)]])
partners = self.env['res.partner'].search([('name', operator, name)])
if partners and name:
domain = expression.OR([domain, ['|', ('driver_id', 'in', partners.ids), ('driver_id', '=', False)]])
rec = self.search(domain, limit=limit)
return rec.name_get()
Example of correct search redefinition on a model
-------------------------------------------------
@api.model
def _name_search(self, name, args=None, operator='ilike', limit=100, name_get_uid=None):
domain = args or []
domain = expression.AND([domain, [('name', operator, name)]])
partner_ids = self.env['res.partner']._search([('name', operator, name)], access_rights_uid=name_get_uid)
if partner_ids:
domain = expression.OR([domain, ['|', ('driver_id', 'in', partner_ids), ('driver_id', '=', False)]])
rec = self._search(domain, limit=limit, access_rights_uid=name_get_uid)
return self.browse(rec).name_get()
The same logic should be applied on the overrides of the search method.
Since revision 4acec418ce
it was no longer possible for an accounting adviser
to create taxes.
This is because when creating a taxes,
as the related field `hide_tax_exigibility` wasn't readonly,
it attempted to write on the field
`tax_exigibility` of the model `res.company`,
and the adviser do not has that access right.
There is no reason for this field not to be readonly,
as it is used only to compute an invisible attrs
for the tax form view.
opw-1846265
- When creating analytic account lines when posting account moves, the lines' company id were set to the current user's company.
If the analytic account has a company set, the lines must be set on the same company (due to a python constraint).
So when creating the lines, we now check if the analytic account has a company, if so, we use it to create the lines.
* budgetary position nor analytic account aren't required anymore (although one of the 2 have to be given)
* by extension, the computation of practical amount is not either based on the analytic lines or the account.move.line
* usability improved (for eaxmple: there's a button to open the list of items on which the practical amount computation is done)
* addition of a pivot and graph views of the budget lines
Was PR: #22342
Was task: 31995
* Avoid to invalidate the cache if no actual deletion has been
made when recomputing the taxes
* Avoid to create analytic entries to delete them right away
few lines further in the same method:
- Analytic entries are created at line 903
- account_invoice.py:751 `move_line_dict['analytic_line_ids'] = [(0, 0, line._get_analytic_line())]`
- account_invoice.py:840 `iml = inv.invoice_line_move_line_get()`
- account_invoice.py:886 `line = inv.group_lines(iml, line)`
- account_invoice.py:894 `'line_ids': line,`
- account_invoice.py:903 `move = account_move.with_context(ctx_nolang).create(move_vals)`
- Then, at line 907, they are deleted and others are created again:
- account_invoice.py:907 `move.post()`
- account_move.py:130 `move.line_ids.create_analytic_lines()`
- account_move.py:1258 `self.mapped('analytic_line_ids').unlink()`
- account_move.py:1262 `self.env['account.analytic.line'].create(vals_line)`
Deleting these analytic entries indeed implies the invalidation of the cache.
Besides, generally speaking, we should avoid to waste resources
by creating/unlinking records without a good reason.
When a move or move line is supposed to use the company currency, its currency_id field is empty. _compute_matched_percentage did not take this into account, causing the rounding method to sometimes be called with a precision equal to False, resulting in erronous and weird behavior (0 was considered different from 0, causing a division by zero in the following condition).
This constraint was added during the Great Accounting Reform of v9, in
an attempt to help users avoid reconciliation mistakes.
It turns out that such mistakes are difficult to make in normal
situations, since the system only offers matching entries to reconcile,
so the constraint is largely redundant.
On the other hand, it does block legit cases of reconciliation,
such as those where a large number of lines with different partners are
reconciled together. This often happens when reversing a Journal Entry
that encompasses multiple customers, such as a POS closing entry, or a
manual entry.
To make the system more flexible, let's consider that when a manual
reconciliation breaks the "single partner" rule explicitly, it's for a
good reason, so we should allow it.
OPW: 1840437
Backport of 8e73023f68