| Age | Commit message (Collapse) | Author |
|
|
|
|
|
Up to this commit, the JS module system only notified failed modules as
an 'information' instead of an 'error'. This was annoying, since the
runbot takes the result into account, and might be green even though a
module failed to load.
|
|
|
|
this js module centralizes all odoo initialization
|
|
This commit introduces a mechanism to add information into the session
from a different module, without having to fetch it manually with a rpc.
This is intended to be used with small pieces of info required at the
start of the web client, such as currency informations.
To add information to the session, one can simply inherit from ir.http
and modify the session_info method.
|
|
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
|
|
The module system allow modules to return a deferred. When that
deferred resolves, the module is considered to have succesfully loaded,
and the result value is its value. Then, the boot.js code used a
setTimeout (via _.defer) to load all its dependencies.
This is not wrong per se, but it empties the call stack, which give
other code the opportunity to interfere. In particular, it is an issue
in phantomjs tests, because it causes a window between the
domcontentloaded event (which is a key event in website) and the actual
loading of all dependent modules. This execution window can be used to
start some tours, but the code of those tours is waiting the next tick
to load, so horrible crashes happens.
This commit calls immediately process_jobs to avoid those issues.
|
|
- Differentiate between the Community and Enterprise editions
in the version number. By adding this attribute on the global
odoo JS object in the web client bootstrap controller /web,
we can differentiate between versions easily on the client
side without extra RPC calls.
- Remove a couple of version-related RPC calls in case
the global version info is present in the JS environment
- Update "About" panel to display the edition info
- This commit also reverts 07fe5afc874b9527eac5408d9adc53a9a700aad3
which implemented the idea in a more limited way.
Closes #9625
|
|
Warning messages are automatically displayed if a module takes more than 1000ms to load, but this delay is a bit short if you make multiple rpc calls (sorry for all the dead kittens)
|
|
framework
It was bound to happen: some functionnality need to be triggered depending on the current edition of Odoo. To do this, we add a property 'version' on the global odoo object.
This change is mirrored on the enterprise repo.
|
|
boot loader waited for only 100 ms before logging failed modules.
However, modules can now wait for deferred before completing their
loading, so this delay is increasingly getting too short.
|
|
|
|
Otherwise the display in the server log (when spammed by phantomjs) is completely useless
|
|
boot.js log:
* ``Missing dependencies``:
These modules do not appear in the page. It is possible that the JavaScript
file is not in the page or that the module name is wrong
* ``Failed modules``:
A javascript error is detected
* ``Rejected modules``:
The module returns a rejected deferred. It (and its dependent modules) is not
loaded.
* ``Rejected linked modules``:
Modules who depend on a rejected module
* ``Non loaded modules``:
Modules who depend on a missing or a failed module
|
|
Each module can return a deferred. In that case, the module is marked as loaded
only when the deferred is resolved, and its value is equal to the resolved value.
The module can be rejected (unloaded). This will be logged in the console as info.
Remove if_dom_contains from the website, the modules return a rejected deferred if
the DOM doesn't contains the seleted values.
|
|
in red when there's an error in a javascript module
|
|
dependents, and remove failed modules from the missing module list
|
|
failed modules, unloaded modules). Add odoo.init in the website to display debugging informations.
|
|
get_missing_jobs and get_waited_jobs
|
|
|
|
wrong. Adds the list of missing modules in modules can not be started.
|
|
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.
|
|
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
|
|
|
|
bzr revid: nicolas.vanhoren@openerp.com-20130807095457-gdm1ixzk0rcev2sg
|
|
Still has some retro-compatibility for other addons.
bzr revid: nicolas.vanhoren@openerp.com-20130806125022-bzjbtn0nqk40ak4g
|
|
bzr revid: nicolas.vanhoren@openerp.com-20130806122623-pq6bpkjk65jx0fnp
|
|
the openerp.web namespace.
bzr revid: nicolas.vanhoren@openerp.com-20130806085812-ek8v8k0x4m7ocu4f
|
|
bzr revid: nicolas.vanhoren@openerp.com-20130729092512-1ip4abjrypf74qr2
|
|
retro-compatibility layer
bzr revid: nicolas.vanhoren@openerp.com-20130726121514-ss0omrhed76ybv5a
|
|
bzr revid: odo@openerp.com-20121130175249-yrbcdsn2z1io79dz
|
|
when creating the instance, set instance.session.uid to 42 so the evaluator has something to chew on when it tries to create the evaluation context
bzr revid: xmo@openerp.com-20121120101733-b0ire11bbuywfi8u
|
|
dependencies
bzr revid: xmo@openerp.com-20121026084543-fobkc3ta5q2jc3q6
|
|
bzr revid: xmo@openerp.com-20121005124919-yfkbzk3mjm0tot4e
|
|
bzr revid: al@openerp.com-20120812222901-tjz9443oylidd7sy
|
|
corelib, as well as the standard evaluation context building (and related objects)
bzr revid: xmo@openerp.com-20120806094627-8c9lwtfkbfws2bmj
|
|
bzr revid: vme@tinyerp.com-20120730091815-scj8dt3j1tr1jpvx
|
|
bzr revid: chs@openerp.com-20120719111414-ivf6lq2iymws0ytm
|
|
template like any other widget as qweb template are loaded. This make the code cleaner as show_common() does not return a deferred anymore.
bzr revid: chs@openerp.com-20120718131004-gvn63r3ihzxyzvy3
|
|
bzr revid: fme@openerp.com-20120611091909-269ukzc2gftkwuma
|
|
bzr revid: al@openerp.com-20120505162323-ggqwrd4t1c2wcxcd
|
|
bzr revid: al@openerp.com-20120426222552-rqm974o8c9v1s4lk
|
|
bzr revid: al@openerp.com-20120409205551-pjp7caybh0os5y9j
|
|
bzr revid: al@openerp.com-20120409003901-uo5wn6lj27yb6w7x
|
|
bzr revid: al@openerp.com-20111227194405-rz3kxbib03orbpr8
|
|
bzr revid: rlo@openerp.com-20111129143911-ac4ptj0nh2nsbdqo
|
|
bzr revid: fme@openerp.com-20111109145902-cs2ivnki2t4tlcfm
|
|
bzr revid: nicolas.vanhoren@openerp.com-20111103101952-a5zk1wgi1qkd6pr3
|
|
bzr revid: sma@tinyerp.com-20110926105300-72fwa60uvvdf1qgg
bzr revid: sma@tinyerp.com-20111003112731-uobxur1ryqb5laxy
|