summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/framework/mixins.js
AgeCommit message (Collapse)Author
2017-04-11[REF] web, *: redesign all JS viewsGéry Debongnie
This commit introduce a full redesign of all JS views. We started basically from scratch. The goal was to unify all the various views under a common framework, to make them testable, to make then usable in different conditions (in studio, or in the frontend), and to make our lives easier. Some important points are: - we introduced new coding guidelines (camelCase, 80 chars width, ...) - we have a brand new testing framework (still QUnit based) - kanban view moved to the web addon - calendar view (formerly web_calender) moved to web as well - the tree view was removed - all new code should be documented We hope that this code is the start of a new era for the Odoo web client, we want to have a high quality codebase, well documented, well tested, well designed. Work done by the framework team: mostly aab, ged, chm, dmo, qsm
2016-04-05[MERGE] forward port of branch 9.0 up to 9e2de9bChristophe Simonis
2016-04-04[FIX] web: some float fields silently ignores their changesGéry Debongnie
We have an interesting problem when editing all custom float fields and all fields with no explicit digit attributes: the propertiesmixin tries to check if the number was changed, according to their declared precision. But for these specific fields, it does not find a digit attribute, and defaults to 2. Then, it makes sure that the changes are ignored if the new value is too close to the old value (with 2 digits precision) For example, if the user sets the value to 1.234, then save, then change it to 1.235, then save, the form view will display 1.234 and totally ignore the change. Not that handling the digit precision is done in the propertiesmixin and in the field float widget. Also, they do different things, and in some case, may not be the same. All this logic should be moved to the fieldfloat widget.
2015-11-25[MERGE] forward port of branch 9.0 up to b293953Christophe Simonis
2015-11-25[FIX] web: local var parent typoNicolas Lempereur
fixes #8516 note: was already solved in enterprise with 7ab5075
2015-11-02[IMP] web: add a generic notification feature inside form viewsRaphael Collet
The notification box remains on the form until either: - the user closes it explicitly, or - the user edits the record, or - the form view is refreshed (switch to another record, or refresh form). Add a method `once` to `EventDispatcherMixin`, as it is convenient. Make `FormView` trigger events `to_view_mode` and `to_edit_mode`.
2015-05-15[IMP] web: introduces event bubbling in widgetsGéry Debongnie
This commit adds event bubbling in the event dispatcher mixin (which inherits from parentedmixins). To do this, it introduces a new small class 'OdooEvent', which register the target and if the event is stopped. Also, widgets have a new 'custom_events' dictionary to easily register callbacks like the event dictionary.
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-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