Commit Graph
94366 Commits
Author SHA1 Message Date
Laurent Mignon (ACSONE) cafcd65b6d [FIX] Take a copy of the context.
If the method `import_file` is called with the new API, the context is a
frozendict and the update will raise `NotImplementedError: 'update' not
supported on frozendict`

closes #5798
2015-03-19 10:02:45 +01:00
Géry Debongnie 21e38e3851 [FIX] web: fix database manager
database manager is the only html file we have, and because of that,
regularly escapes the greps.  It was still trying to load old files
before the javascript modules.  It has now been updated to the new
file structure.

Also, I had to guard the nv customization from happening in misc.js
because the nvd3 library is not loaded in the database manager, but
the misc.js file is required.  Not really happy about the misc.js file,
but this is for another commit.
2015-03-19 09:50:53 +01:00
Yannick Tivisse 882f1b3721 [IMP] hr_expense: Filter to find expenses of former employees 2015-03-18 15:11:16 +01:00
Yannick Tivisse 7ecd9299b5 [IMP] account: usability in "Payment terms" wizard 2015-03-18 14:06:35 +01:00
Géry Debongnie 55acc522b9 [FIX] web_calendar: don't focus quick create when disabled
web_calendar tried to focus the quick create instance, even when it has
been disabled.  Result: boom (example: hr/leave request: click on
calendar).
2015-03-18 12:21:22 +01:00
Géry Debongnie 2283e6a9da [FIX] website_blog: fix undefined variable
The editor variable shadowed the outer editor variable, which is the
imported module.
2015-03-18 10:19:39 +01:00
Géry Debongnie 7d088d7de9 [MERGE] add module system to javascript code
This branch introduces a new module system for our javascript
code, inspired by requirejs.  It is a really large change,
since all the javascript code had to be updated to use the
new system.

Some important remarks:
* the openerp global variable has been deprecated.  Do not use
  it in the future
* a new global variable has been introduced: odoo.  It contains
  the 'define' function used to create new modules.  Use it
  to create modules, not as a global bag of things.
* the web client code has been refactored.  Most files have
  been split into smaller files.  The code should be easier to
  understand now

More documentation can be found at:
www.odoo.com/documentation/master/reference/javascript.html#web-client
2015-03-18 09:42:10 +01:00
dka-odoo dcd3702782 [FIX] hr_recruitment : use _track_subtype method instead of _track dict. 2015-03-18 09:27:20 +01:00
Géry Debongnie b517e5a2b2 [IMP] web: documents the new module system.
This add a basic overview of how the modules work.  This is a work in
progress, more documentation needs to be updated, such as the
tutorial.
2015-03-18 09:23:37 +01:00
Géry Debongnie ebc39b8788 [FIX] update tests to new module system
Various tests (mostly tours) were broken with the large changes in the
way the js code works.
2015-03-18 09:23:37 +01:00
Géry Debongnie 4fdf74fe21 [IMP] web+addons: improvement to module system
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 09:23:37 +01:00
Géry Debongnie 59a4706dd9 [REF] website_twitter: update to the new module system 2015-03-18 09:23:37 +01:00
Géry Debongnie d6254a264b [REF] website_version: update to the new module system 2015-03-18 09:23:36 +01:00
Géry Debongnie 65586f8ef3 [REF] website_slides: update to the new module system 2015-03-18 09:23:36 +01:00
Géry Debongnie 4289319f62 [REF] website_sale: update to the new module system 2015-03-18 09:23:36 +01:00
Géry Debongnie f05d9aea0a [REF] website_quote: update to the new module system 2015-03-18 09:23:36 +01:00
Géry Debongnie 131ca70d83 [REF] website_mail: update to the new module system 2015-03-18 09:23:36 +01:00
Géry Debongnie 838cfe6664 [REF] website_links: update to the new module system 2015-03-18 09:23:36 +01:00
Géry Debongnie 43ed24c375 [REF] website_gengo: update to the new module system 2015-03-18 09:23:35 +01:00
Géry Debongnie be8adf2769 [REF] website_forum: update to the new module system 2015-03-18 09:23:35 +01:00
Géry Debongnie da73f624b2 [REF] website_event: update to the new module system 2015-03-18 09:23:35 +01:00
Géry Debongnie a78655e71f [REF] website_crm: update to the new module system 2015-03-18 09:23:35 +01:00
Géry Debongnie 93d96ff871 [REF] website_blog: update to the new module system 2015-03-18 09:20:33 +01:00
Géry Debongnie 88fbbd7362 [REF] survey: update to the new module system 2015-03-18 09:09:23 +01:00
Géry Debongnie 0e274fde7d [REF] stock: update to the new module system 2015-03-18 09:09:22 +01:00
Géry Debongnie eccda7dff6 [REF] planner: update to the new module system 2015-03-18 09:09:22 +01:00
Géry Debongnie 81333ade84 [REF] mass_mailing: update to the new module system 2015-03-18 09:09:22 +01:00
Géry Debongnie 5e6171bb6f [REF] various addons: update to the new module system 2015-03-18 09:09:22 +01:00
Géry Debongnie 90050c24bb [REF] pos_X: update to the new module system 2015-03-18 09:09:22 +01:00
Géry Debongnie 996b6571b7 [REF] website: update to the new module system 2015-03-18 09:09:22 +01:00
Géry Debongnie 1d23c24d79 [REF] point_of_sale: update to the new module system 2015-03-18 09:01:52 +01:00
Géry Debongnie 1ca7f9f6aa [REF] im_odoo_support: update to the new module system 2015-03-18 09:01:52 +01:00
Géry Debongnie ee90ae3b48 [REF] chat/livechat: update to the new module system 2015-03-18 09:01:52 +01:00
Géry Debongnie 2ebe3076d2 [REF] hr: update to the new module system 2015-03-18 09:01:52 +01:00
Géry Debongnie 858e46e977 [REF] update various small addons to the new module system 2015-03-18 09:01:52 +01:00
Géry Debongnie 824dbe13ad [REF] board: update to the new module system 2015-03-18 09:01:51 +01:00
Géry Debongnie 156787155a [REF] base_import: update to the new module system 2015-03-18 09:01:51 +01:00
Géry Debongnie 0dcc559cdd [REF] barcodes: update to the new module system 2015-03-18 09:01:51 +01:00
Géry Debongnie d2e90989b7 [REF] auth_openid: update to the new module system 2015-03-18 09:01:51 +01:00
Géry Debongnie 6a8524cfb9 [REF] account_analytic_plans: update to the new module system 2015-03-18 09:01:51 +01:00
Géry Debongnie 0cfbbb6b7f [REF] web_calendar: update to the new module system 2015-03-18 09:01:50 +01:00
Géry Debongnie 0ceeff515c [REF] mail: update to the new module system 2015-03-18 09:01:50 +01:00
Géry Debongnie 97f4ba3e3d [REF] account: update to the new module system 2015-03-18 09:01:50 +01:00
Géry Debongnie b960f8ad52 [REF] web: update test suite to new module system
The test suite needs to be adapted to the modules.  Also, the update
of qunit changes the API, so the tests needs to be changed as well.
2015-03-18 09:01:50 +01:00
Géry Debongnie 7165ac08aa [IMP] web: update qunit to last version (1.17)
The testing framework was done with an old version of qunit.  We had to
program our layer on top of it to provide support for promises in tests.
The last version of qunit now supports promises, and the testing
framework needs to be reworked anyway with the new modules.
2015-03-18 09:01:50 +01:00
Géry Debongnie c8a8fec622 [REF] web_X: update to the new module system 2015-03-18 09:01:49 +01:00
Géry Debongnie 4b77bbf51c [REF] web_kanban: update to the new module system 2015-03-18 09:01:49 +01:00
Géry Debongnie 99b8674761 [REF] base: update apps to the new module system 2015-03-18 09:01:49 +01:00
Géry Debongnie 5ed9c00e30 [IMP] web: add compatibility layer
This compatibility file reexports every symbols from the modules to the
old openerp namespace.  The goal is to allow old unconverted odoo addons
to interact seamlessly with the new web client.
2015-03-18 09:01:49 +01:00
Géry Debongnie e8a00bc50d [REF] web: add module system to the web client
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
2015-03-18 09:01:49 +01:00