Commit Graph
496 Commits
Author SHA1 Message Date
Aaron Bohy 6eadb1f7f6 [FIX] web: update owl to last version
This commit updates owl from v1.0.0-beta5 to v1.0.4.
2020-02-03 09:15:02 +00:00
Jeremy Kersten 9f1fa0852d [FIX] web: backport fix from ace.js
Bug in ace-editor is present since that we updated in 1.3.1.
Because diff between 1.3.2 and 1.3.1 is big (-1288 +4661) with new feature...
We prefer just patch the library in stable branch applying part of commit:
https://github.com/ajaxorg/ace/commit/1890598a5da2259cfb0ceac38fed7bca582765db

To do in master? : upgrade ace.js

How to reproduce:
   > create ir.ui.view
   > be sure to empty all the content
   > type '<xpath expr=""'
   > Now if you type the > it will crash
        - Cannot read property 'type' of null

closes odoo/odoo#43955

X-original-commit: 1a90740b8e699fc3afa28c3ddb5490328facb995
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-01-24 17:56:06 +00:00
Julien Mougenot 3cf49e1913 [IMP] Owl: update to 1.0.0-beta5
Update of the Owl library.
Also added "_lt" to the default test environment properties.
2020-01-06 14:37:16 +00:00
Mohammed Shekha 5c7892fe6b [IMP] web: update pdfjs to 2.2.228
after this commit:
Worker disable is no longer supported by pdfjs since version 2.0, so
remove disabling worker code.
Used pre-built version of pdfjs as source version dependency with other
lib like SystemJS and we can not add dependency of these libs, so used
pre-built version which don't require any other dependent lib.
pdf.worker.js is always loaded and as we are using pre-built version we
don't need odoo's loader, previously we need it because worker loader of
pdfjs was loading files separately so to avoid it as we were loading
files in asset bundle we had odoo's loader file but we don't need it
anymore.

task-2124443
2020-01-07 05:21:22 +00:00
Géry Debongnie fc0f22f9b9 [FIX] web: update owl to last version
This commit updates owl from v1.0.0-beta1 to v1.0.0-beta2.
2019-12-12 13:34:48 +00:00
Adrien Dieudonne 6b9197244e [IMP] web: Chart.js update to 2.9.3
Update of Chart.js library to the latest version.

Before this commit, we weren't able to see all
x-axis dates labels like in Accounting Overview.
Tick label rotation on mobile has been fixed in
https://github.com/chartjs/Chart.js/pull/5961.

closes odoo/odoo#41582

X-original-commit: 24d8ae59e08143dc0ca7e05be37a3cd607d58a4a
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2019-12-09 14:15:05 +00:00
29726e8fd0 [ADD] web: add owl 1.0.0-beta1 to odoo
With this commit, we properly introduce the Owl library into our beloved
codebase. More information on the Owl library can be found in the project
repository: https://github.com/odoo/owl/

Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
2019-12-09 11:09:10 +00:00
Kevin Baptiste 6cbe824871 [REV] web: reverts update to fontawesome 5.11.2
This reverts commit ff1c35513a.

closes odoo/odoo#41480

X-original-commit: 116057b26e71db4692280463669f3e80d813ddcc
Related: odoo/enterprise#7110
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-12-09 10:33:36 +00:00
Kevin Baptiste ff1c35513a [IMP] web: update to fontawesome 4.7.0 to 5.11.2
FontAwesome 5 introduced new names for some icons as described on
https://fontawesome.com/how-to-use/on-the-web/setup/upgrading-from-version-4#name-changes

This commit replaces the old names to the new ones.

closes odoo/odoo#35826

Taskid: 2050241
Related: odoo/enterprise#5180
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-11-28 10:05:12 +00:00
Xavier Morel 9546a37599 [ADD] pyjs: support for conditional expressions
Conditional expressions were already parsed, but there was no support
for executing them (or stringifying them back though I'm not sure when
that's used).

closes odoo/odoo#40502

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-11-19 13:16:04 +00:00
Nicolas Lempereur 062735847c [FIX] web: guardedCatch on IE Edge async return
In IE Edge async and await are supported, but guardedCatch is added to
polyfilled MyPromise object and async methods return original Promise so
depending of chain guardedCatch can cause en error or not.

It seems that historically, the MyPromise patching has also had issue in
firefox with it sometimes working or not.

In this changeset we completely remove it (which will have the drawback
of more error shown in console in firefox).

opw-1964486
opw-2116839
closes #39953

closes odoo/odoo#40154

X-original-commit: 5ca38da66de00ca6efef307bcb39fc5037903221
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-11-12 17:13:56 +00:00
mreficent 355a5dfc36 [IMP] *: fix typos in comments
closes odoo/odoo#35404

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-08-07 10:28:33 +00:00
Thomas Werland f9bcf4c079 [IMP] web: Chart.js update
Update of Chart.js library to the latest version.
The onLeave listener was not avalaible in the previous version of the library.
This has also removed a bug in the graph view where
some groups were sometimes not shown in the legend.
2019-07-30 06:53:11 +00:00
Jigar Patel cda93a5c19 [IMP] web: add new date range picker field widget
Adds a new widget to support start & end date or datetime.

closes odoo/odoo#33266

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-07-18 12:13:34 +00:00
Martin Trigaux fd15ca1918 [MERGE] Forward port of saas-12.4 to master up to 1f5a4649a6
closes odoo/odoo#34850

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-15 08:12:26 +00:00
Martin Trigaux c962b2cd11 [MERGE] Forwardport of saas-12.2 to saas-12.3 up to 01365a3f62
closes odoo/odoo#34747

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-12 07:22:41 +00:00
Martin Trigaux 00ef2653da [MERGE] Forward port of 12.0 to saas-12.2 up to 3b1d00acda
closes odoo/odoo#34732

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-10 10:14:06 +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
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
Cedric Snauwaert 9cab694bf5 [IMP] web: add simple calculator on numeric fields
Add a new behavior to numeric fields, possibility to enter value manually or to use a simple arithmetic expression that will be evaluated.
Example: =20+3*2
In order for the computation of the arithmetic expression to be done, the value needs to starts with = and then an expression can be entered. We only support the basics mathematical operations + - * / ( ) ^
User locale and digits separator are taken into account. If the value entered can't be evaluated to a numeric, the field will be displayed in error.

closes odoo/odoo#34538

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-07-09 07:45:42 +00:00
Christophe Simonis 78b2063b29 [MERGE] forward port branch saas-12.2 up to 8747d72f1e 2019-06-21 15:16:54 +02:00
Christophe Simonis be780012bf [MERGE] forward port branch 12.0 up to 0e72b983c3 2019-06-21 11:06:04 +02: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
Aaron Bohy 7bc53ac30e [FIX] web: crash in editable lists with date field
Assume an editable list view with a date(time) widget, click to
edit a line, focus the date field (the datepicker opens), press
ESC: there is a crash in the lib, and the datepicker remains open
forever.

This fix is twofold:
 - we added a check in the lib to prevent it from crashing (it is
 easily reproducible: it crashes when an opened datepicker is
 removed from the DOM).
 - we added an event handler of ESC keydown event to hide the
 datepicker before the field is removed from the DOM.
2019-04-12 06:31:11 +00:00
Christophe Simonis 9b6e37a983 [MERGE] forward port branch 11.0 up to 7e33b54771 2019-03-18 16:51:57 +01:00
Christophe Simonis 2940ee6b35 [MERGE] forward port branch saas-15 up to c6353942ff 2019-03-18 14:17:54 +01:00
Christophe Simonis c6353942ff [MERGE] forward port branch saas-14 up to 5162ca7be7 2019-03-18 10:53:01 +01:00
Christophe Simonis 5162ca7be7 [MERGE] forward port branch 10.0 up to 36ba37a7a1 2019-03-18 10:20:06 +01:00
Denis Vermylen 791a38a655 [FIX] web: qweb2: allow null values in a foreach iteration
Before this commit iteration in a t-foreach containing null or
undefined values crashed because they have no attributes.

closes odoo/odoo#31828

Signed-off-by: Fabien Meghazi <amigrave@users.noreply.github.com>
2019-03-12 16:15:39 +00:00
Denis Ledoux fd0a10026c [MERGE] forward port branch saas-12.1 up to b11930047f 2019-05-02 09:45:14 +02:00
Denis Ledoux b11930047f [MERGE] forward port branch 12.0 up to c9913152ec 2019-04-26 18:14:18 +02:00
Aaron Bohy 3c40d732bf [FIX] web: crash in editable lists with date field
Backport of 7bc53ac30e.

Assume an editable list view with a date(time) widget, click to
edit a line, focus the date field (the datepicker opens), press
ESC: there is a crash in the lib, and the datepicker remains open
forever.

This fix is twofold:
 - we added a check in the lib to prevent it from crashing (it is
 easily reproducible: it crashes when an opened datepicker is
 removed from the DOM).
 - we added an event handler of ESC keydown event to hide the
 datepicker before the field is removed from the DOM.

closes odoo/odoo#32647

Signed-off-by: Martin Geubelle (mge) <mge@openerp.com>
2019-04-23 06:58:16 +00:00
Christophe Simonis 4eff0af02e [MERGE] forward port branch saas-12.1 up to 6878c9f342 2019-03-21 13:58:37 +01:00
Christophe Simonis c50d7d6bc5 [MERGE] forward port branch 12.0 up to 82c4393fd0 2019-03-19 15:14:23 +01:00
Christophe Simonis bd63913326 [MERGE] forward port branch saas-11.3 up to 4e39328a76 2019-03-18 20:03:24 +01:00
Christophe Simonis 0e7675847f [MERGE] forward port branch saas-12.1 up to 0f4abc5c22 2019-02-22 16:25:02 +01:00
Christophe Simonis 1d2b6f1bef [MERGE] forward port branch 12.0 up to 84143a34b3 2019-02-21 15:37:19 +01:00
Mathieu Duckerts-Antoine 596206cdf6 [IMP] web: remove nvd3 library
It has been decided to use Chart.js instead of nvd3 to render charts.
Now that nvd3 is no more in use, we remove it.

Task ID: 1946138
2019-04-01 14:40:51 +00:00
Mathieu Duckerts-Antoine a8d3ca771f [IMP] web: add library Chart.js
This commit makes possible to use the Chart.js library to create
various charts.

Task ID: 1946138
2019-04-01 14:40:51 +00:00
Christophe Simonis 5df4746c9a [MERGE] forward port branch saas-12.2 up to 230ad8c381
closes odoo/odoo#32088

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-03-25 11:13:41 +00:00
Aaron Bohy 5ee9e1d200 [FIX] web: correctly display crashes in firefox
After the update of jQuery, crashes were no longer displayed (in
dialogs) on browsers using the unhandled-rejection-polyfill lib
(e.g. firefox). This was due to a bad conversion from ES6 to ES5.

Issue reported on the jquery update pad.

closes odoo/odoo#31767

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-03-12 09:46:04 +00:00
Aaron Bohy 0bae5e2402 [FIX] web: bad conversion from ES6 to ES5
We had to manually convert the unhandled-rejection-polyfill lib,
and we forgot to replace this by self in two arrow functions.
This was causing crashes e.g. on Firefox.

We also forgot some uses of const, which is not really an issue as
const is supported on all browsers, but it is not ES5.

Issue reported on the jquery update pad.

closes odoo/odoo#31658

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-03-07 10:44:20 +00:00
Aaron Bohy 96b0319239 [ADD] web: unhandled-rejection-polyfill lib 2019-03-06 19:53:21 +01:00
Aaron Bohy ef88b8e408 [IMP] web: qunit: add hook at end of each test
This hook will be used to check that there are no leftovers in the
DOM.
2019-03-06 19:53:21 +01:00
David Monjoie aa24779cfa [REF] web: update qunit to v2.9.1
The new version of qunit better reports failures of promises then
the previous version.
2019-03-06 19:49:01 +01:00
David Monjoie 154c3dcda4 [REF] web: update select2 to v3.5.4 2019-03-06 19:49:01 +01:00
David Monjoie c8bab2ddb3 [REF] web: update jquery.ui to v1.12.1 2019-03-06 19:49:01 +01:00
David Monjoie bb004e3d7f [REF] web: update jquery to v3.3.1
Part of task 1896658
2019-03-06 19:49:01 +01:00