M2O use the autocomplete lib to display its content. The problem is
that if a result is empty (or only composed of whitespaces), a
divider is displayed in the dropdown.
Commit 1d9f7d279a was fixing this by only displaying non-empty
name results... but it did not work as many models implement the
name_search method the wrong way.
The new solution is to add a default display for record values which
are empty strings, at the right places in the webclient components.
Otherwise it is not visible when set on an instance of the new API.
self is a recordset instead of the model `res.users`
Without this patch a low priviledge user was not able to modify its own value
of `notify_email` through the preference window.
Before this commit, many2many list views in wizards did not
handle the blur event at all, which means that the last edited
line was ignored. This is quite a large bug, but not really
visible in our standard install, because we had no many2many
in wizards.
This commit add naive support for blur events. This is only
intended to help the MRP team. A complete solution would
probably involve moving most of the code in One2ManyListView
to X2ManyListView.
Before this revision, a small function in sale was extended by
sale_timesheet to know when to (or not to) create an analytic
account for a SO.
This was nice, but since it was extended only in this module,
there's no real need for the added complexity (*reading
complexity*)
This reverts commit d780f9476d.
Did not work due to the size=3 on name field that strips the code to the first
three letters only (removing the " (copy)" part).
Copying a currency has a few business cases as the rates are not copied.
As can not increase the size of a field in stable, remove the method that had no
effect.
Fixes#11036
Like for most of accounting, these fields should be company dependent
since they generates accounting entries in certain journal & accounts
that depend on the company, while your products usually don't.
The mimetime fetching in /web/image/... may fail if:
- calendar is installed
- `id` is a string (using ?id=42 in the URI)
- `id` is a negative number (company partners on odoo.com)
The `search` override of `ir.attachment` in calendar detects if a number is a
virtual ID when it contains a '-' and is a string.
While it is not optimal to allow both int and str format for paramter `id`, make
the verification of virtual ID in calendar more strict to only match the format
`<real>-<virtual>` and not `-<real>`
When we download a file (as can be done with attachments in Odoo),
firefox is opening the link in current window but cancel the action once
it is aware the resource is to be downloaded.
But this get firefox into a corrupt state for some contenteditable
features, for example document.queryCommandState which is needed for the
editor will after downloading a file throw an error consistently instead
of working as expected.
It can be reproduced on firefox (at least from version 32 to 46) with
the following snippet:
https://jsfiddle.net/s246u3ay/3/
The issue is probably linked to the following reported issue since 2005:
https://bugzilla.mozilla.org/show_bug.cgi?id=297494
This commit avoid the bug by opening attachments download links in a new
window instead of the current one.
closes#12109
opw-676918
- correct typos
- clarify some points, according to the community comments
- precise the xml notation : record tag vs act_window/menuitem/... tags
- add organization of report, wizard, data/demo, ... (directories and naming conventions)
- new conventions for 'symbols'
- ...
Thanks to @rim-odoo for its grammar extremist review, and @tde-banana-odoo for our long debates about wizard conventions.
A fonts.less file which contains the definition of Lato was created
in saas-11 and placed in the backend assets. It should have replaced
the lato/stylesheet.css in the common assets.
Also adapt point_of_sale assets to use the same file.
The company logo file extension is always '.png', even if the logo is of
another type such as 'jpg' or 'gif'. This is not an issue for decent
browsers, but IE might not display the image under specific
circumstancies, e.g. in combination with nginx.
opw-676836
There is several override of create and write that assumes that a bank account
is present on only one account (see 4530e5d).
It is very hard to change or remove the account bank once linked to a journal
(see 4a65bc38) so it should not be set in the first place when duplicating a
journal.
opw-676374
For the sake of consistency with other views and general usability, the user is allowed to create new tasks and projects from the timesheet lines list view.
When searching for the action of the form related to the button, the form is not necessarly the direct
parent of the button but could be upper in the architecture.
The widget selection only shows the first 120 results.
The selection was most likely set to avoid creating new entries but it can be
done with an option tag. This allows to use the search on many2one fields.
opw-677908
When no stage has been defined for a project, the new issues are
set in an undefined stage(stage_id = False). Then these issues must
be counted.
opw:676985
When clicking on save several time when editing a view form it can be
saved several times which can be an issue for one to many.
The normal happenstance when saving should be as follow:
-> save (click)
-> wait write result
-> received write result
-> reload the form with updated data and updates buttons
But when clicking several time, it could become:
-> save (click)
-> wait write result
-> received write result
-> save (click)
-> wait write result
-> received write result
-> reload the form with updated data and updates buttons
This commit only reinstate the saving feature once the form is reloaded.
related to opw-671793
backport of 8.0's dd714ac
note: no need to forward-port
The html_translate fields (e.g. website_descripton on product.product) were not
serialised and the raw value from the web_editor was saved as a translation.
This was an issue in case of special characters that may be present in the
translation. A translation containing non-breaking space was sent in html
(`foo bar`) while lxml converts such characters to unicode (`foo\xa0bar`).
When writing a translation, the value is checked against incorrect format using
```
value0 = field.translate(lambda term: None, record[fname])
value1 = field.translate({trans.src: trans.value}.get, value0)
value2 = field.translate({trans.value: trans.src}.get, value1)
if value2 != value0:
raise ValidationError(_("Translation is not valid:\n%s") % trans.value)
```
As value1 is the unicode version of the translation and `trans.value` is the
html version of the translation, the last substitution in the callback method
was never made and the ValidationError was raised.
This commit forces the serialisation through lxml to be sure the compared
strings are using the same parser instead of comparing value from summernote and
lxml that may be both valid but still different.
opw-675767
Used case:
If you add a user which has no acces on a model(ex:purchase.order)
as follower on a record of this model. When someone responded by email on
this record, and when a message is sent on this record, an exception is raised
at the connection of the user added as a follower.
Fix:
To have the rights to read the message, a read notification for this follower must
be added to all parents of this message.
Closes#11902
opw:676699