The short code is always required for the following reasons:
- The auto-generated code is useless for search purpose because user
cannot choose it (BNK or CSH is maybe not meaningful for him)
- If the system cannot generate an unused journal code, the user is
stuck since the field is read-only in the interface.
However, the code can still be auto-generated, although it is required
in the interface. This is to avoid breaking modules that would expect
this feature. At the same time, the logic has been improved to reduce
the number of search requests.
opw-674485
From 94ed4ce8c8
The original issue is the following:
- Go to the journal item creation
- Choose a partner
- Add a line => the partner on the journal item is removed
This is because `partner_id` on the account move is a related to
`partner_id` on the account move lines. This is likely to cause errors
during the manual encoding of a journal item, since the relation will
link the partner of the account move to the partner of the first account
move line only.
opw:672354
List of impacted models:
-account.account
-calendar.event
-crm.lead
-fleet.vehicle
-hr.applicant
-hr.employee
-mail.mass_mailing.campaign
-note.note
-project.task
-res.partner
Add a menuitem in the Configurations for these models, visible in debug mode
The code to fetch the fiscal position of a partner uses ACLs and
ir_rules to select the correct ones, but when calling the function
as admin, multi-company rules flight out the window.
By allowing to force a company in the context, we can get the fpos
as the admin from the pov of any company.
The price unit on the account move line is defined as a monetary field.
However, on a Sales Order or on a Purchase Order, the price unit is
defined as a float with precision 'Product Price'. Therefore, when an
invoice is generated from a SO or a PO, inconsistencies arise if the
product price precision is larger than the currency precision.
opw-673251
When a a refund is created from an open invoice and a different
date than today is selected as refund date, the invoice date of
this refund must be the selected date.
opw:673369
Problem: if we try to validate an invoice with a line with a discount of 100%,
this will create an aml with debit=credit=0 and reconciled flag as True.
So when trying to cancel invoice, it is not possible because the check tell us
that there is an entry which is reconciled and we can't unreconcile that entry,
so the check should just ignore line with debit-credit=0.
Also add readonly to general_account_id related field on account.analytic.line.
This is to prevent a write while creating the account_move_line in the case of an
invoice with analytic account.
`get_formview_id` returns a view id to open
the document with. This method is meant to be
overridden in addons that want to give
specific view ids for example.
A link to an invoice must open a different form view
according if this is a customer or a vendor invoice.
This is handled by overriding `get_formview_id`
and returning the view id that should be used
according to something in the record
(e.g. according to the `type` field).
It was present in 8.0, it was somehow
removed in Odoo 9.0 during the refactoring
of the accounting modules, probably
for a wrong reason.
opw-673246
When only a message argument is given to the crash manager, the popup display
"Error while validating constarint" and "None" with the warning message
which does not make any sense for the common user.
Currently there is a selection field 'account_type' on the
account.analytic.account model with 2 values : Active or Archived
Let's use an active field instead and add a Archive stat button on the
form. That way, we can remove all the domain ('account_type','=','normal')
which are implicit with the generic active field behavior