Commit Graph
12146 Commits
Author SHA1 Message Date
Mohammed Shekha 0ac4055504 [IMP] web: do not set focus on form when lastActivatedFieldIndex is not set
When opening a dialog using mouse and closing it, form_dialog_discarded is
triggered, which tries to set focus on form while lastActivatedFieldIndex
is -1, as dialog is opened using mouse directly

do not set focus back to form widget if lastActivatedFieldIndex is -1

task-2031706

closes odoo/odoo#34684

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-07-22 10:23:29 +00:00
Odoo Translation Bot 72339a5301 [I18N] Update translation terms from Transifex 2019-07-21 01:18:28 +02:00
Aaron Bohy eba0325355 [FIX] web: add href to main menus
This was already the case for sub menus. This allows to right-click
and open menu in a new tab.

Closes #29345

closes odoo/odoo#34983

Signed-off-by: Julien Mougenot (JUM) <Arcasias@users.noreply.github.com>
2019-07-18 13:07:25 +00:00
Nimesh Jethva 7766b89aa0 [FIX] web: restore kanban progressbar animation
With BS4 migration, the progressbar 'active' class should have been
renamed 'progress-bar-animated'.

closes odoo/odoo#26868

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-07-16 08:25:17 +00:00
Lucas Perais (lpe) c8d10d228e [FIX] web: boolean widgets in editable list should activate the row
Put toogle_button or a favorite widget to handle a boolean field in an editable list
click straight up on the widget's button or link

Before this commit, the widget changed its appearence, but the changes were not
propagated to the model. This is because the controller will not force_save if its mode is edit
(to let changes piling up and save everything when clicking save), which is the case
of the editable list

After this commit, following what has been done at 2f5e44d40b
clicking on a widget in an editable list just activates the row for editing
but doesn't change the widget's value

OPW 2033700

closes odoo/odoo#34878

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-07-15 13:53:48 +00:00
Odoo Translation Bot 5306fbb2c5 [I18N] Update translation terms from Transifex 2019-07-14 01:19:24 +02:00
Aaron Bohy 8f9e1e40a3 [FIX] web: batch read of m2m in o2m after onchange
Let's assume a one2many field (editable list) in a form view with
a many2many (e.g. many2many_tags), and an onchange on the one2many
such that, when a row is added to the relation, the server returns
update commands for (a subset of) the records being already in the
relation. For thoses updated records, the many2many field needs to
be read (the onchange only returns the ids in the relation).

Before this rev., the many2many field was read independently for
each record in the one2many. This could cause a performance issue
on large relations. For instance, this was the case on
account.invoice records with a lot of lines.

This commit must be forwardported up to 12.2, not further.

Issue 2027356

closes odoo/odoo#34771

Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2019-07-11 09:38:03 +00:00
Xavier-Do 95b4f2ab4b [IMP] core: improve test_tags
Add the support to be able to specify exlicitely module, class and method name in test_tags

Before this commit, there is no distinction between module tag and test tag. Meaning
that --test-tag module_name will replace the default +standard tag and execute all test
of the module.

This commit tries to keep the initial behaviour, while addind new features, like explicit
modules tag with /module_name, as well as class (:class) and method (.method)

Some usage examples:
--test_tags /module will execute all standard test of module
--test_tags :class will execute all standard test with class name 'class'
--test_tags .method will execute all standard test with method name 'method'
--test_tags external/module will execute all external test of module
--test_tags */module will execute all tests of module,
--test_tags */module,-standard will execute all non standard tests of module,
--test_tags -/website:TestUiTranslate.test_admin_tour_rte_translator will disable only rte translator test

closes odoo/odoo#34756

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-07-11 09:03:14 +00:00
Martin Trigaux 3b1d00acda [MERGE] Forward port of saas-11.3 to 12.0 up to db5261b19e
closes odoo/odoo#34723

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-10 08:27:12 +00:00
Martin Trigaux db5261b19e [MERGE] Forwardport of 11.0 to saas-11.3 up to 198b5ecce2
closes odoo/odoo#34719

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-10 07:14:38 +00:00
Martin Trigaux 198b5ecce2 [MERGE] Forwardport of saas-15 to 11.0 up to 239af6ee99 2019-07-10 08:58:50 +02:00
Julien Castiaux 5038f777a0 [FIX] web: prevent db_manager modal close on empty pwd
Go to the database manager, configure a password either via the
interface either via the `admin_passwd` `.odoorc` config file. Click on
the backup menu, let the `password` field empty and submit the form. The
modal is closed without any warning and no query is sent.

The problem is that even if the field is marked as `required`, there is
a event listener that catch the `onsubmit` event and close the modal
even if it is not valid.

opw-2031461

closes odoo/odoo#34669

Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com>
2019-07-09 13:44:41 +00:00
Romeo Fragomeli 885a7b5689 [FIX] web: jSignature not able to sign on "pen touch" device
Before this commit, on a device with a "pen" (e.g. Surface Pro, ...),
it was not possible to sign a document on some browsers recently
updated (e.g. Chrome, Firefox, ...) only Internet Explorer was working.
Instead of drawing continuous lines only few dots appeared.

For Chrome and Firefox we have to catch events with "addEventListener".
For Edge we add touch-action property to convert touch events into click.

Steps to reproduce:
1) Go to sales app
2) Then go to quotations (menu Sales)
3) Create a new quotation
4) Click on preview
5) Click on the "Accept" button at the end of the preview
6) Use the "pen" to draw the signature (BUG)

We use a custom version of the jSignature lib (c.f. odoo/odoo@eddcb46),
so we have to patch the file in the Odoo repo with a mix of some
pull request found in the official repo and forks.

Link:
https://github.com/brinley/jSignature/pull/109
https://github.com/brinley/jSignature/pull/159
https://github.com/willowsystems/jSignature/pull/96

opw-2029684
2019-07-08 10:23:50 +02:00
Odoo Translation Bot 57320593f7 [I18N] Update translation terms from Transifex 2019-07-07 01:19:07 +02:00
Odoo Translation Bot 0f5a08f4df [I18N] Update translation terms from Transifex 2019-07-07 03:07:34 +02:00
Odoo Translation Bot eedcaca503 [I18N] Update translation terms from Transifex 2019-06-30 03:07:11 +02:00
Christophe Simonis 2f2bc67c06 [MERGE] forward port branch 11.0 up to b1d43cc80e 2019-06-27 14:40:32 +02:00
Christophe Simonis b1d43cc80e [MERGE] forward port branch saas-15 up to d090c92782 2019-06-27 14:25:31 +02:00
Christophe Simonis d090c92782 [MERGE] forward port branch saas-14 up to 1985a49b92 2019-06-27 12:41:55 +02:00
Christophe Simonis 1985a49b92 [MERGE] forward port branch 10.0 up to 5eb15c01b5 2019-06-27 12:41:15 +02:00
Priyanka Kakadiya 5eb15c01b5 [FIX] base, web: missing extension on binary downloads
It's currently possible for binary downloads to be missing an
extension entirely. Generate an extension from the mimetype and use
that. Also ensure the existing extension (if any) matches the
mimetype.

Warning: this may require adding new mimetype/extensions pairs to the
local mimetype database similar to
f413d155df.

Also fix missing or incorrect filenames on records without a filename
field: in some Odoo versions the client would send a filename of
"null", resulting in a download of e.g. "null.pdf" instead of the
attachment or inferred name.

Task 2025716

closes odoo/odoo#34299

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-06-27 08:26:49 +00:00
Odoo Translation Bot 2cc3ec0b8a [I18N] Update translation terms from Transifex 2019-06-30 01:17:50 +02:00
Christophe Simonis cd21c016b0 [MERGE] forward port branch saas-11.3 up to 2f2bc67c06 2019-06-27 17:24:24 +02:00
Mathieu Duckerts-Antoine 89d5cc3b3d [FIX] web: measure/groupby many2one variation in pivot view
In case a many2one field (let us say 'foo') is used
simultaneously as a groupby and a measure in the pivot view,
the values returned by a read_group for that many2one are of
the form [id, label] and the aggregated values (always 1) are
missing in the read_group results (datapoints).
Thus typically, a datapoint is of the form

{'foo': [1, 'Bar'], '__count': 4, ...}

and does not contain information on the 'foo:count_distinct'
value (this is a read_group bug).

As a consequence, a special processing of the read_group
datapoints is done in the pivot model to handle that
situation and the value for 'foo:count_distinct' is infered
correctly to be 1.

In the pivot comparison mode, datapoints comming from the
period and the comparison period (data and comparisonData
sets) are identified if they have same values for the groupby
fields and the measure values become small objects containing
information on the the measure values for data and for
comparisonData and on the related variation.

Thus

{foo: [1, 'Bar'], __count: 4, ...}

from data and

{foo: [1, 'Bar'], __count: 3, ...}

from comparisonData should become a single datapoint

{
foo: [1, 'Bar'],
__count: {
data: 4,
comparisonData: 3,
variation: {
magnitude: +33 (%)
}
}
fooAggregate: {
data: 1,
comparisonData: 1,
variation: {
magnitude: 0 (%)
}
}

It turns out that the code responsible for merging the data
and comparison datapoints made a mistake by mixing the keys
'foo' and 'fooAggregate', with the consequence that the
variations were not correctly computed in the situation
described above.

This is fixed in this commit.

closes odoo/odoo#33118

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-06-25 11:18:02 +00:00
Odoo Translation Bot 149783fb19 [I18N] Update translation terms from Transifex 2019-06-23 03:06:47 +02:00
Odoo Translation Bot 53b6ab9f05 [I18N] Update translation terms from Transifex 2019-06-23 01:17:13 +02:00
Julien Castiaux 81147140ac [FIX] calendar: shift midnight to current locale
Configure your system to be in the Mexico timezone, configure your Odoo
profile accordingly. Go to calendar, show daily events, add an event at
the end of the day (like 10pm). The resulting event is not visible on
the daily view although it is on the weekly view. The same problem
occurs on the weekly view if the event was create late the last day.

The problem is the initial `search_read` has a domain to filter the
events using 00:00 UTC to 23:59 UTC boundaries. Those boundaries are not locale
aware, they should be shifted to the MX timezone.

opw-2009877

closes odoo/odoo#34247

Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com>
2019-06-19 14:38:00 +00:00
Nicolas Lempereur 97cd3dfdf9 [FIX] web: update moment ar locale for month
The months name in momentjs used an arabic translation with the month
then some crap (or the month said a second time) after.

This does not seem expected, and has been solved in moment.js library 2
years ago:
https://github.com/moment/moment/pull/4271

This PR apply this change in moment.js localization included in Odoo.

opw-2006265
closes #34248

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-06-19 15:00:27 +00:00
Mathieu Duckerts-Antoine 92a1f215c0 [FIX] web: pie chart structure not modified by favorites
A pie chart widget aims to instantiate a graph view in mode
'pie', with a measure and a single groupby specified via some
attributes. It turns out that if a pie chart is instantiated
in a context in which the keys 'graph_mode', 'graph_measure',
and 'graph_groupbys' are present, that keys prevail over the
pie chart specification. This can produce a line chart for
instance. This fix corrects that situation.

A test has been added in a corresponding commit in enterprise
(historically, the pie chart widgets are tested in dashboard
views).

closes odoo/odoo#34234

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-06-19 08:36:44 +00:00
Nicolas Martinelli 32603da5ba [FIX] web: avatar on empty field
- Create a calendar event
- In debug mode, remove the responsible

The 'Avatar Undefined' string is displayed at the botton of the
responsibles' list.

Do no fetch an image for a falsy value (= falsy id)

opw-2010007

closes odoo/odoo#34215

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-06-18 13:09:28 +00:00
Jakub Hrubý 36abc4641c [FIX] web: keep the search options visibility state
The search buttons visibility is saved in the local storage. Rev.
6448420 changed the API of the LocalStorage servive (by JSON
parsing the values), and didn't adapt the calls done for the
search buttons.

Closes #33833

closes odoo/odoo#34206

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-06-18 10:13:39 +00:00
Christophe Simonis a2582c4252 [MERGE] forward port branch 11.0 up to bdc62d8031 2019-06-07 13:00:07 +02:00
Odoo Translation Bot 34ae29e68b [I18N] Update translation terms from Transifex 2019-06-09 03:07:58 +02:00
Odoo Translation Bot 25eac59ffa [I18N] Update translation terms from Transifex 2019-06-16 01:18:49 +02:00
Julien Mougenot d7d7d92e92 [FIX] web: binary fields correctly resets
When uploading a file to a binary file, then clicking on the
"clear" button, then reuploading the same file...

Before this commit:

The actual input of the field was only changed on user input.
This means that the "clear" action didn't reset the actual value
of the input, and the browser's default behaviour when getting
the same path twice is not to change anything. In the use case,
you couldn't upload the same file until you uploaded another one.

After this commit:

The "clear" action now also clears the value, allowing reuploading
the same file over again.

closes odoo/odoo#33843

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-06-03 15:01:57 +00:00
Odoo Translation Bot 72a0963d2d [I18N] Update translation terms from Transifex 2019-06-02 03:08:27 +02:00
Julien Legros 9993f9c9f9 [FIX] web: typo in font-family for boxed layouts
closes odoo/odoo#34091

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-05-31 12:19:32 +00:00
Odoo Translation Bot 0ebee56da5 [I18N] Update translation terms from Transifex 2019-06-09 01:17:53 +02:00
Christophe Simonis 9e9e9acef1 [MERGE] forward port branch saas-11.3 up to a2582c4252 2019-06-07 19:04:43 +02:00
Odoo Translation Bot 28382b76d8 [I18N] Update translation terms from Transifex 2019-06-02 01:18:32 +02:00
Christophe Simonis 8a0e819d0b [MERGE] forward port branch 11.0 up to 3e12f2ff56 2019-05-29 11:10:34 +02:00
Christophe Simonis cffd147cfd [MERGE] forward port branch 11.0 up to a20a31486c 2019-05-28 15:52:00 +02:00
Christophe Simonis 8d7ee39213 [MERGE] forward port branch saas-11.3 up to 8a0e819d0b 2019-05-29 14:06:12 +02:00
Romain Derie e9350993ca [FIX] web: restore /apps/<app> controller
Since JS refactoring of ActionManager at 32b8cec536, the /apps/<app> controller
was not working anymore as the refactoring dropped the support of `sa` as URL
state.

closes odoo/odoo#33679

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-05-27 11:44:08 +00:00
Luis 0379c51be3 [FIX] web: refresh calendar if error
If an error is raised when saving a calendar event, the transaction is
correctly rolled back. However, the view is not refreshed and the
incorrect information is displayed.

We simply reload in all cases.

opw-2002186

closes odoo/odoo#33028

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-05-24 10:45:48 +00:00
Julien Castiaux 042966ccae [IMP] web: better logging of errors
When an error is raised server-side, the complete traceback is displayed
in the JS console. This traceback can be very useful since it might
contain information not recorded anywhere else by default. For example,
access errors due to record rules or SQL constrains do not have their
traceback displayed in the UI or recorded in the log [1], but it is
logged in the JS console.

However, the information is logged in the JS console as a stringified
version of the `result.error` object. The final result is a long and
non-formatted string which is unreadable.

We replace by a new format more convenient for technical teams. The
error is now formatted as:

Error code
Error message
Error data message
Error data debug

This will hopefully give a better starting point for debugging purposes.

[1] SQL constrains tracebacks are only recorded in the log in debug
mode:

https://github.com/odoo/odoo/blob/ec792da72b92b22349b6f325e53fd37d953c7db3/odoo/service/model.py#L122

closes odoo/odoo#33650

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-05-27 06:41:56 +00:00
Odoo Translation Bot ec792da72b [I18N] Update translation terms from Transifex 2019-05-26 03:07:48 +02:00
Grzegorz Krukar 8869677669 [FIX] web: form: remove invisible fields spacing
Invisible fields in form view and group reserve space.
This looks bad with many invisible fields in a form.

Fixes: #29505 and #28370

closes odoo/odoo#33598

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-05-23 08:33:32 +00:00
Priyanka Kakadiya 5adb6b62d2 [FIX] web: update buttons in editable list
In an editable view when editing a row, then apply or remove any groupby or
filter the control panel buttons are not updated.

When record is in edit mode in editable listview and applying groupby then
control panel buttons 'Save' and 'Discard' buttons are always displaying, this
issue occurs because when applying or removing filters control panel buttons not
updated i.e. _updateButtons not called.

With this commit button are updated when _update of list controller is called,
_update of list controller is also called from search.

Task-1967278

closes odoo/odoo#33572

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-05-23 07:39:13 +00:00
Odoo Translation Bot 7237b8f2a2 [I18N] Update translation terms from Transifex 2019-05-19 03:08:16 +02:00