summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/framework/session.js
AgeCommit message (Collapse)Author
2016-05-30[IMP] web: remove rpc call to get module listGéry Debongnie
It is already in the web client page source (or more precisely, in the assets_backent bundle)
2016-05-30[IMP] web: move currency rpc to session_infoGéry Debongnie
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-05-27[REF] report,web(_editor): services extracted in their own filesGéry Debongnie
session_instance.js moved from framework/ to services/ and renamed into session.js, which required to change the bundles in report and web_editor addons.
2016-04-25[MERGE] forward port of branch saas-10 up to bb8f0f1Christophe Simonis
2016-04-25[MERGE] forward port of branch saas-9 up to 4d337f7Christophe Simonis
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-04-19[FIX] web: fix iOS file downloadingJoren Van Onder
e8a00bc50da435d3859118ca127d20a2eb9a0cab moved the get_file function from web.session to web.ajax. The issue is that get_file uses session.url() for iOS devices. Also, in order to prevent an infinite spinner options.complete() is called before actually opening up the new window. Although this resolves the issue it still requires the user to configure Safari to allow pop-ups, otherwise they are silently ignored. opw-672882
2016-01-11[REM] web: Proxy.loadXavier Morel
Not really useful at this point, if we ever go down the path of embedded web client we can probably make the relevant controllers CORS.
2015-12-01[FIX] web, openerp: debug mode now works without refererJeremy Kersten
In some cases the Referer HTTP header may be missing or stripped by a proxy, browser extension or anti-virus. This breaks debug mode because it was solely relying on the Referer header. Introducing an explicit X-Debug-Mode header for RPC calls allows for an alternative method that works even when the Referer is missing. This won't work in all cases, e.g. for direct $.ajax calls, for example. Closes #9824
2015-10-02[FIX] web: backport module web.config for enterprise compatibilityAaron Bohy
Addon mail needs to know if we are using a touch device to set or not the focus on the chat composer. However, this information was not available in the community webclient.
2015-04-18[FIX] web: session.js: use compatibility layer to avoid DependencyChristophe Simonis
error. Better solution welcome.
2015-04-17[FIX] web: break dependency cicle.Christophe Simonis
2015-04-17[FIX] *: correct previous forward portChristophe Simonis
Due to files renaming, some patched should be applied manually to the correct files. Forgot to `git add` these files when committing the forward port...
2015-04-09[ADD] new fields.Monetary + updated widgetsCedric Snauwaert
Enhance current widget="monetary" client-side feature and convert it to a first-class type of field, allowing proper server-side behavior. - fields: add field.Monetary, similar to fields.Float but supporting a `currency_field` attribute instead of the decimal_precision attribute. `currency_field` indicates the field holding the related currency on the same record. The symbol of that currency is used when displaying the field, and the rounding of the currency is applied instead of the usual decimal precision. - avoids application of a second decimal precision rounding, as was the case when the model field was a `fields.float`. - removes the need for adding explicit boilerplate to each view containing a monetary field, i.e.: widget="monetary" options="{'currency_field': 'currency_id'}" - res.currency: add new field decimal_places needed to round value at the correct decimal places - web: cache all currencies, rounding and symbols at webclient startup to speedup monetary fields - new widget monetary for list view + adapt widget monetary on form view Limitations: - if the currency_field is a related field, the server-side application of currency rounding will only work when the record already exists, not during creation (to be fixed) - this field is only supported in the new API
2015-03-24[IMP] web : add set_cookie in utils.js (framework) since the get_cookie ↵Jérome Maes
method already exists. The set_cookie of session.js is now using the one from utils.js
2015-03-19[FIX] web: session requires a name to properly workGéry Debongnie
For historic reasons, the session had a name (hardcoded to "instance0"), used in at least one place: the get and set cookie methods. The idea was most likely to allow multiple instances of the web client to coexist peacefully. This does not work at all at least for the last versions, and the new module system is a better way to do it anyway. However, before removing completely the prefix in cookies, we should actually check if no external code depends on it.
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