summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/framework/session.js
AgeCommit message (Collapse)Author
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