The image that is set based on the type should not be colorized as it has no
transparency (image_colorize method would fail).
The _get_default_image is called explicitely to pass False to colorize attribute.
A proper refactoring of the method _get_default_image has been done at 66d4de7
but for 9.0 versions, makes this minimal hack without changing signature method.
Fixes#11027
The former `domain` and `context` values were dropped at revision
e021a08b30, as they referred to fields
that do not exist in Odoo 9.0.
Resetting them to empty values is required in order to force
the new value for upgraded databases.
From revision cb01be2,
the purchase stat button is only on product template form,
and no longer on the product variant form.
The domain of the list that this purchase button
opens has not been adapted according to this change,
the domain was still applied as coming from a product
variant form rather than a product template form.
As a result, it opened the purchases of products variants
having as ID the product template ID from which you came
from before hitting this button.
opw-669618
In the interest of being flexible and customizeable all of the defined
classes in the POS should be exported so people can easily inherit them
and change their behavior. A lot of the time you can get to them even if
they're not exported if you get creative enough, but noone should have
to resort to such ugly methods.
This commit does this for all of the modules except for
point_of_sale.popups. It has been omitted because currently it exports a
single object (PopupWidget). Modifying this to export an object of
objects could potentially break other unofficial modules which we do not
want in a stable release.
By shadowing the `product` variable, the suggested products option had
the side effect of showing the comments of the last suggested product
instead of the current product ones.
The methods calling `reverse_moves` expects a list
as returned result.
For instance, in `account_move.py`, `account.partial.reconcile`,
method unlink:
```
reversed_moves = exchange_rate_entries.reverse_moves()
for rev_move in self.env['account.move'].browse(reversed_moves):
```
If there was no reversed moves, the method returned a boolean,
and a list otherwise. It should always return a list, empty
in the above first case.
opw-669790
When printing a receipt in the PoS, the debug manager and the Livechat
content are displayed in the receipt. That's obviously something we
don't want.
opw-668675
If a customer had several delivery address,
and at checkout, choose another one than the default one,
his choice was applied, the delivery address remained the default
one.
This is a regression in Odoo 9.0 introduced in revision:
0414c9d.
The checkout shipping was applied only when it was a new
delivey address, due to the identation.
Part of the indentation issue was solved in 0f25a8c
opw-669787
When attempting to uninstall a module
for which models are no longer in the pool
(the module is no longer is the addons path /
no longer in the current release),
- This isn't possible to drop the constraints,
as this is no longer possible to know the table
of the model.
- This is no longer possible to check if the
model log the accesses (`_log_access`), as
the model is no longer loaded in the pool.
opw-669130
For textual attachments (like assets), the indexed content is the
content itself. Avoid prefetching this potential huge field.
When deleting attachments, only delete files once.
Previous implementation was expecting exactly the same number of
attachments than the number of assets in a bundle. However it's
possible that duplicated assets are created due to concurrent first
generation.
This duplication cannot be avoid, but is cleaned upon next bundle
regeneration.
Joint work with @sle-odoo and @odony
Allow easy modification of ClientListScreenWidget by other modules. If
you get creative you can actually get to it without this, but it's not
clean and needlessly complicated.
opw-669686
On deletion of a pricelist,
the pricelist items were not deleted.
Meaning, if you deleted a pricelist,
and this pricelist was used in the product pricing,
the line with the pricing remained, but without any
pricelist set. Besides, as the field is required
in the view, this prevented to edit anything without
correcting the pricing line first.
opw-669652
Rather than trust the user-controlled mimetype or extension of imported
files which may be incorrect (because the user is lying, because the
system is misconfigured, because software is not installed, because
software is registering non-standard mimetypes, etc...), start by trying
to guess the mimetype *then* fallback on trying the type/ext.
Of note: CSV is becoming less and less great as it's nigh impossible to
guess for it.
* move guess_mimetype from ir_attachment to a misc submodule so it can
be used outside of attachments (in base_import in this case)
* fix the broken detection of zip and OpenDocument files (would all be
detected as msword files)
* correctly implement detection of OOXML files (including returning the
right MIME type)
* attempt to correctly detect OLECF Excel files (.xls)
* add PPT detection (untested)
* remove duplicate patterns in GIF detection
If the user provides a known mimetype which doesn't actually match the
file as far as we're concerned, warn and fallback on extension rather
than blow up.
This comes up when a user installs Excel on Windows: it associates CSV
files with itself and sets their mime type to application/vnd.ms-excel,
which is not correct and leads to us trying to load a CSV with xlrd (an
excel-parsing library).
Fixes#9779
The unsubscribe URL is used within the `mass_mailing` module,
e.g. in `_get_unsubscribe_url` & `send_get_email_dict`.
Basically, there is the possibility to add the unsubscription
link in the mass mailings while having only
`mass_mailing` installed.
But, the unsubscription route is defined within
the module `website_mass_mailing`.
Therefore, if you added the unsubscription link
within your mailings while not having
`website_mass_mailing` installed, trying
to follow the unsubscription link leaded to
a `404 Not Found` page.
We therefore define the route within `mass_mailing`
directly, which does the basic stuff (the basic
unsubscribe and confirmation), and override this route
in `website_mass_mailing`, where the advanced stuff is done
(the mailing lists list unsubscription and the better
looking page).
opw-669425
The button 'mark all as read' used to mark all messages as read, which
is not usually what the user wants when there is an active filter in the
search view. This commit make sure that the domain is send to the
server and used correctly.