summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/boot.js
AgeCommit message (Collapse)Author
2016-11-08[MERGE] forward port branch saas-11 up to c19f546Christophe Simonis
2016-11-08[MERGE] forward port branch 9.0 up to b795755Christophe Simonis
2016-11-04[FIX] web: display error when js modules failsChristophe Matthieu
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.
2016-06-17[REF] web: refactor and simplify web.coreGéry Debongnie
2016-06-17[REF] web, *: move QWeb odoo init to web.QWebGéry Debongnie
this js module centralizes all odoo initialization
2016-05-30[REF] point_of_sale,web(site): move session info into page sourceGéry Debongnie
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.
2016-04-21[REF] web: stop duplicating webAaron Bohy
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-01-27[FIX] web: load async js modules as soon as possibleGéry Debongnie
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.
2015-11-25[FIX] web, openerp: make the webclient edition awareDamien Bouvy
- 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
2015-11-17[FIX] web: longer delay for module load warningDamien Bouvy
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)
2015-11-17[IMP] web: distinction between community and enterprise version in the js ↵Damien Bouvy
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.
2015-10-01[FIX] web: increase log timerGéry Debongnie
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.
2015-09-03[IMP] web: boot.js display the log only on error or with the debug modeChristophe Matthieu
2015-08-12[FIX] web: serialize debug_jobsxmo-odoo
Otherwise the display in the server log (when spammed by phantomjs) is completely useless
2015-07-22[IMP] web: web modules return readable logs and phantomjs logsChristophe Matthieu
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
2015-07-22[IMP] web: module can be asynchronous loaded if it return a deferredChristophe Matthieu
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.
2015-07-14[IMP] boot.js: use console.error instead of console.warn to make the runbot ↵Christophe Matthieu
in red when there's an error in a javascript module
2015-06-16[IMP] boot: add failed modules in unloaded modules to add informations like ↵Christophe Matthieu
dependents, and remove failed modules from the missing module list
2015-06-15[IMP] web: boot.js add some informations for debugging (missing modules, ↵Christophe Matthieu
failed modules, unloaded modules). Add odoo.init in the website to display debugging informations.
2015-06-11[IMP] boot.js: add debugging features on odoo.__DEBUG__ object: ↵Christophe Matthieu
get_missing_jobs and get_waited_jobs
2015-05-15[FIX] web: better warning message when missing dependenciesGéry Debongnie
2015-04-02[IMP] web: allow to start the functional modules even if other modules are ↵Christophe Matthieu
wrong. Adds the list of missing modules in modules can not be started.
2015-03-18[IMP] web+addons: improvement to module systemGéry Debongnie
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[REF] web: add module system to the web clientGéry Debongnie
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
2014-05-12[IMP] Include openerpframework in common assets. Add module list in bundleFabien Meghazi
2013-08-07[FIX] regression that made the qweb modules be loaded 2 timesniv-openerp
bzr revid: nicolas.vanhoren@openerp.com-20130807095457-gdm1ixzk0rcev2sg
2013-08-06[IMP] Removed old JavaScript module loading system in the 'web' addons. ↵niv-openerp
Still has some retro-compatibility for other addons. bzr revid: nicolas.vanhoren@openerp.com-20130806125022-bzjbtn0nqk40ak4g
2013-08-06[IMP] Merged corelib.js and coresetup.js into core.jsniv-openerp
bzr revid: nicolas.vanhoren@openerp.com-20130806122623-pq6bpkjk65jx0fnp
2013-08-06Put everything in the framework directly in the openerp namespace instead of ↵niv-openerp
the openerp.web namespace. bzr revid: nicolas.vanhoren@openerp.com-20130806085812-ek8v8k0x4m7ocu4f
2013-07-29Added strict mode and es3 mode to framework and corrected some problemsniv-openerp
bzr revid: nicolas.vanhoren@openerp.com-20130729092512-1ip4abjrypf74qr2
2013-07-26[IMP] Removed openerp's ineffective JavaScript module loader and added ↵niv-openerp
retro-compatibility layer bzr revid: nicolas.vanhoren@openerp.com-20130726121514-ss0omrhed76ybv5a
2012-11-30[IMP] instance.init: less offensive constantOlivier Dony
bzr revid: odo@openerp.com-20121130175249-yrbcdsn2z1io79dz
2012-11-20[MERGE] from trunkXavier Morel
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
2012-10-26[IMP] port search test to new framework, add handling of web.{submodule} ↵Xavier Morel
dependencies bzr revid: xmo@openerp.com-20121026084543-fobkc3ta5q2jc3q6
2012-10-05[MERGE] from trunkXavier Morel
bzr revid: xmo@openerp.com-20121005124919-yfkbzk3mjm0tot4e
2012-08-13[IMP] load all modules at boot in single db modeAntony Lesuisse
bzr revid: al@openerp.com-20120812222901-tjz9443oylidd7sy
2012-08-06[IMP] move eval functions for domains, groupbys and contexts outside of ↵Xavier Morel
corelib, as well as the standard evaluation context building (and related objects) bzr revid: xmo@openerp.com-20120806094627-8c9lwtfkbfws2bmj
2012-07-30[IMP]removed view editor from web to web addons.Vidhin Mehta (OpenERP)
bzr revid: vme@tinyerp.com-20120730091815-scj8dt3j1tr1jpvx
2012-07-19[FIX] Client must do the session_bindChristophe Simonis
bzr revid: chs@openerp.com-20120719111414-ivf6lq2iymws0ytm
2012-07-18[IMP] session_bind is done by openerp.init(). As result, Clients can have ↵Christophe Simonis
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
2012-06-11[REM] Removed openerp.logFabien Meghazi
bzr revid: fme@openerp.com-20120611091909-269ukzc2gftkwuma
2012-05-05[IMP] module loading add a second namespaced argument module(instance,module)Antony Lesuisse
bzr revid: al@openerp.com-20120505162323-ggqwrd4t1c2wcxcd
2012-04-27rename Connection into Session, now that we use instanceAntony Lesuisse
bzr revid: al@openerp.com-20120426222552-rqm974o8c9v1s4lk
2012-04-09bye bye page view2Antony Lesuisse
bzr revid: al@openerp.com-20120409205551-pjp7caybh0os5y9j
2012-04-09core refactoring, split core into corelib.js and coresetup.jsAntony Lesuisse
bzr revid: al@openerp.com-20120409003901-uo5wn6lj27yb6w7x
2011-12-27[IMP] initial module loading improvementsAntony Lesuisse
bzr revid: al@openerp.com-20111227194405-rz3kxbib03orbpr8
2011-11-29[ADD] page view split out from form viewRoberto López López (OpenERP)
bzr revid: rlo@openerp.com-20111129143911-ac4ptj0nh2nsbdqo
2011-11-09[ADD] Added <instance>.log() ( -> console.log() in debug mode)Fabien Meghazi
bzr revid: fme@openerp.com-20111109145902-cs2ivnki2t4tlcfm
2011-11-03[merge] improvements to the view editorniv-openerp
bzr revid: nicolas.vanhoren@openerp.com-20111103101952-a5zk1wgi1qkd6pr3
2011-10-03[MERGE]sma (Tiny)
bzr revid: sma@tinyerp.com-20110926105300-72fwa60uvvdf1qgg bzr revid: sma@tinyerp.com-20111003112731-uobxur1ryqb5laxy