Commit Graph
34 Commits
Author SHA1 Message Date
Christophe Simonis ed99894ac6 [MERGE] forward port branch 10.0 up to 13e321325b 2018-07-16 16:25:59 +02:00
len-odoo 02afc0e0aa [FIX] web: groupby product on package types triggers a js error
On a database where many modules are installed (e.g.  runbot all), with
the option "manage available packaging options per products", doing a groupby
"product" on the "package type" list view triggers a js error.
It comes from the fact that the fixed_group variable contains a "length"
attribute; the _().each function uses this to determine (erroneously)
that the object is an array.
It thus uses fixed_group[0] to get an undefined, and then tries to access
a method of undefined.

We replace the each by a simple js loop.

opw 1863576
2018-07-16 08:47:06 +02:00
Yannick Tivisse 98cb4719db [REM] workflow: Remove workflow engine, documentation and tests 2016-11-23 11:52:39 +01:00
Christophe Simonis 6f8e40cdec [MERGE] forward port branch saas-11 up to 1304d13 2016-10-27 17:55:47 +02:00
Christophe Simonis 1304d13c7f [MERGE] forward port branch 9.0 up to 25616b9 2016-10-27 17:35:49 +02:00
Nicolas Lempereur f82ab99c1a [FIX] web: BufferedDataSet write to length field
Underscore method _.each expects an array like object when a
"length" property is present.

This was an issue with a record having a numeric "length" field set
to a non-negative value.

opw-691070
2016-10-24 15:57:43 +02:00
Christophe Simonis 7a02b90e17 [MERGE] forward port branch saas-11 up to dc4d6b6 2016-09-09 15:43:06 +02:00
Christophe Simonis dc4d6b6a7a [MERGE] forward port branch saas-10 up to e1bd405 2016-09-09 15:14:39 +02:00
Pierre Masereel 8e65b57df7 [FIX] web, web-kanban: update dataset size at record's drop in a column
When we drag and drop a record in a folded column, the number of elements
in this column displayed  in the column title is not updated.
This issue is present because when a record is droped in a column
its id is not added to the dataset of its new column.

To fix this, we had to add the id of the record in the dataset, and
override the method 'add_ids' in 'DataSetSearch' to have the size
of the dataset equal to the number of ids in it. We have replicated
the behaviour of the function 'remove_ids' in the new function 'add_ids'.
2016-09-06 17:15:44 +02:00
Christophe Simonis 9ad5f26b3f [MERGE] forward port branch saas-11 up to 3a2147d 2016-08-20 17:18:31 +02:00
Christophe Simonis 3a2147d95c [MERGE] forward port branch saas-10 up to bc1a0a3 2016-08-20 16:57:36 +02:00
Denis Ledoux 8787476b50 [FIX] web: fix DataSetSearch to avoid race conditions
This is a following of revision
ab8a93c852

This revision solves a new case:
when quickly performing a second search
after one which has not been resolved yet in a kanban view, and the second
search is resolved before the first, it was not possible to load the form
by clicking the card of the kanban, it leaded to a
`Could not find id in dataset` web client error

This was because the ids of the dataset were altered with
the ids of the first search (the one that lasted longer), while
the records displayed were the ones of the second search
(the one that finished first)

opw-682362
2016-08-17 12:26:16 +02:00
Géry Debongnie 611322c36b [REF] web: add ajax.rpc and change some dependencies 2016-06-17 13:24:54 +02:00
Géry Debongnie cfe4b337af [REF] web: move async_when to utils 2016-06-17 13:24:54 +02:00
qsm-odoo d4f8096790 [FIX] web,base: m2o empty name results
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.
2016-05-23 17:08:50 +02:00
Aaron Bohy 977db823c7 [REF] web: stop duplicating web
Avoid duplicating web addon in enterprise by extracting a common basis.
Enterprise features stay in enterprise, but use that common basis.

Mainly:
 - JS refactoring and linting
 - Conversion of .sass into .less split into multiple files
 - Templates cleaning and DOM simplification
 - Re-generation of web.pot, and update of .po files
2016-04-21 15:21:39 +02:00
Géry Debongnie ab8a93c852 [FIX] web: fix dataset to avoid race conditions
The read_slice method in dataset is problematic, because it alters the
dataset ids.  So, if 2 consecutive read_slice are started, but the first
one ends after the second one, we don't have the correct ids in the
dataset.

This commit just make sure that previous read_slice do not alter the ids
of the next read_slice.
2016-04-20 17:20:25 +02:00
Christophe Matthieu a395a54a7c [FIX] web: dataset alter_ids method must use options
x2m send_commands add options for all command to avoid onchange trigger for internal change.
2016-03-14 10:14:16 +01:00
Christophe Matthieu feeac2a4f1 [FIX] web: various small issues in form view onchange/one2many
- Issue: Edit sale.order form view, add new line, change product who have
  taxes and click quickly on save (with slow network) => error message.
  Because some deferreds are lost.
- reduce number of reads and onchange for x2m widgets
- remove before_save method and use commit_value (the issue was that if the
  before_save and the change trigger an onchange, the onchange deferred is not
  checked before saving the content.
2016-03-14 10:14:16 +01:00
Raphael Collet 2c571f1114 [FIX] web: method BufferedDataSet._update_cache must purge changes from useless changes 2015-11-23 10:20:32 +01:00
Christophe Matthieu 8ebe4b2d56 [FIX] web: can remove record in many2many kanban view
Wrong underscore method called.

Issue: go on customer form view, remove a contacts in the many2many kanban view and save. The record is not unlink.
2015-10-29 15:31:42 +01:00
Nicolas Martinelli 058db89876 [FIX] web: proper update of the dataset
The method evict_record calls _update_cache with an empty dictionary,
which will not replace any cached value. Therefore, the cache is never
cleaned.

opw-652393
2015-10-26 13:03:47 +01:00
Christophe Matthieu ce30ee7066 [FIX] web: use _.clone to avoid change of 'default_value' 2015-10-01 15:35:26 +02:00
Christophe Matthieu 7a465bf7c7 [FIX] web: clone values in read_ids (avoid external changes)
Some widgets like list editable use and change values dictionary. When the write is called, the values in the cache is equal to the changes send => field no dirty => no change triggered.
2015-09-24 14:13:55 +02:00
Christophe Matthieu c53bd36655 [FIX] web: BufferedDataSet must update the cache when reset_ids is called 2015-08-28 16:58:00 +02:00
Christophe Matthieu 0592305126 [REF] web: data.js: refactoring of BufferedDataSet (less code and speed up) 2015-08-27 15:01:09 +02:00
Christophe Matthieu 6538c67c2b [FIX] web: many2one try to read a creating record but the cache doesn't yet contain the record 2015-08-19 17:05:30 +02:00
Christophe Matthieu 03e982b93f [FIX] web: need to initialize values into the cache 2015-08-17 16:17:22 +02:00
Raphael Collet e0cd26376c [FIX] web: make the web client process the new output format of onchange
The dataset implementation has been improved to handle the result of a `read`
on ids that are already modified in the dataset: the lists `to_create` and
`to_write` are updated properly.
2015-08-14 15:09:04 +02:00
Christophe Simonis 2cf91d16a5 [MERGE] forward port of branch saas-6 up to 63e92cb 2015-07-22 16:17:54 +02:00
Christophe Matthieu 26a5ef4f7c [FIX] web: one2many list
Error when click on other record after an update on a one2many record in list editable which have an 'add an item' by checkbox selection
2015-06-17 18:22:21 +02:00
qsm-odoo 46bf047e86 [IMP] web, web_*, mail, board : New modals and dialogs 2015-06-17 09:49:46 +02:00
Géry Debongnie 4fdf74fe21 [IMP] web+addons: improvement to module system
The module system needs to know the dependencies of a given module
before executing the function.  This is why the dependencies were
defined once in an array, and then were described one more times in the
call to require.

But a trick can simplify this: the boot function can parse the string
representation of the module and extract the calls to require from it.
It is more work for the processor, but it leads to simpler module
definitions.
2015-03-18 09:23:37 +01:00
Géry Debongnie e8a00bc50d [REF] web: add module system to the web client
This commit introduces a new module system for the javascript code.
Instead of using global (namespaced) variables everywhere (like
openerp.web.whatever, ...), each file declare one (or more) module
with its dependencies.  Each module will be loaded after its
dependencies, and will be given a reference to the return values.

This change is a massive departure from the way the client worked
previously.  It will sadly break some/most history, but I am sure that
the future git ecosystem will allow you to easily browse the history
past this revision (one can dream).

This commit feature:
* main namespace is now odoo instead of openerp
* a way to define modules and dependencies (inspired by requirejs)
* many files have been splitted in simpler subfiles
* basic support for debugging in odoo.__DEBUG__
* no global variable (i.e. nothing in window.openerp)
* many bug fixes, many new bugs

Future vision: this modularization should simplify future code
development, simplify debugging and will allow a serious testing effort
2015-03-18 09:01:49 +01:00