Indeed using fromkeys with a list / dict as argument leads to the creation
of shared list / dict. This could create some ugly side effects when
used in loops. This commit fixes or cleans this kind of statement to avoid
unwanted side effects.
This field is needed to retrieve the list of inherited fields (instead of only the fields of a current model) of a model using domain such as ('model_id', 'in', model.inherited_model_ids) on ir.model.fields
When a decimal_precision record is created/modified, the float fields of the
models in the registry must be reset. This was done on old-API columns only.
It is now handled by the new-API fields.
When a one2many field uses an integer field as inverse, the onchange method on
the second model may receive a dictionary for the value of the integer field.
This is because the client expects that field to be a many2one.
If the server was started without -i or -u and
happened to initialize a fresh database,
auto-installed modules that depend
on `base` only would stay in status "to install"
without actually being installed (until the next
installation round was triggered).
This was of little consequence in 7.0, but causes
a crash in 8.0.
Fixes#953
Refactored and fixed tools.image_resize_image() that converted to RGBA
after making thumbnails, resulting in bad looking picture in case the
source is in 'P' mode (indexed palette)
As the whitespace is stripped when exporting terms
to translate, it must be done as well when matching
translations at runtime.
Fixes issue #1755 partly
The changes for QWeb template translation have introduced
res_id values in PO comments for all `#: view:` terms, as
the real database id needs to be resolved when loading them.
For non-QWeb views this is not necessary and actually caused
the terms to be dropped when the res_id could not be resolved.
Rather than having a different PO comment format for QWeb and
non-QWeb views, we can extend the QWeb hack to force the
res_id to 0 for non-QWeb views.
Fixes issue #1755
Distributing our version of pyPdf is not required anymore since we
introduced the new reporting tool.
In order to keep reports working, the standard python library
`python-pypdf` has to be installed instead (through pip or your
distribution's package manager)
The method was expecting that name_get() returns complete and in-order values.
Because of this, some records in the recordset could end up without a value.
During the update of a module, the existing foreign keys are dropped if they have a different ondelete_rule than the one specified on the field.
The foreign keys for many2one transiant -> non-transiant are created with cascade rule by default (see `m2o_add_foreign_key_checked` method) so the check needs to be realised in the same conditions.
When computing a field on a recordset, a subset of the records may be missing
or forbidden by access rules. In that case, evaluate the compute method record
by record, and mark failed records as such in cache.
The method onchange() executes onchange methods in cascade. Suppose onchange()
is called and a field F=1 in the form. If an onchange method set F=2, that
value is put in the result variable. If another onchange method set it back to
F=1, the binding F=2 must be removed from the result variable.
Fixes#2309
When sending an email, both formats 'Name <email>' or '"Name" <email>' can be used for fields 'From', 'To' and others. If the name contains unicode characters, a regex only matching '"Name" <email>' was used to encode the name with RFC2047. That meant that the name was not encoded and eventually dropped, using only the email part.
Instead of using a limited regex, use the parseaddr method from email library.
Fixes lp:1272610, opw 607683
Cascading onchanges can be caused by a related field computed in cache. This
causes a bug in sale order lines, were setting the uom field forces reading
product fields, which are inherited from product templates. The inherited
fields are computed as related fields, which marks the product record as dirty.
This subsequently triggers an onchange on the product field, which resets the
uom field!