t-field handles better the currency rounding than t-esc.
When setting the currency rounding to 0.05 instead
of 0.01 (e.g. Switzerland), for 600.00:
- t-esc returns 600.0
- t-field returns 600.00, as expected.
opw-669945
DO NOT FORWARD-PORT: the functionality is not used anymore in v9
Commit aaf9badb filters the returned ids by keeping the domain in the
request. However, `this.dataset.domain` might be empty, while
`self.dataset.get_domain()` will retrieve it from the model.
Since `get_domain` is not always defined on the dataset, we keep
`this.dataset.domain` as a fallback. The fix is not great, and a better
solution should be found in master branch when the web refactoring is
done.
opw-666755
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
When an "hr.holliday" record is created or modified, the employee_id
linked to this record has to be added in the followers.
Inspired from ff1d384
opw:668515
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.
The copied textarea used in autoresize was a valid target for focus when
using the tab key. This is a major issue in editable list views,
because when the user leaves a textarea, the list view jumps up, with no
visible focused field.