Commit Graph

325 Commits

Author SHA1 Message Date
Vo Minh Thu 08a082f63f [FIX] registry: Set the fields_by_model attribute in __init__(), use None to flag non-existing fields-per-model cache.
bzr revid: vmt@openerp.com-20121214141114-em9r66e3sfy21t2r
2012-12-14 15:11:14 +01:00
Vo Minh Thu 3667e3c619 [IMP] module loading: removed unnecessary indentation, added comments.
bzr revid: vmt@openerp.com-20121214105820-9nlgzu9pm7cvh1pz
2012-12-14 11:58:20 +01:00
Vo Minh Thu f668a123d9 [IMP] Reduce considerably the loading time of a new registry.
Loading time was mesured on the loading of a second database (identical to the
first one), i.e. by passing -d xx,yy on the command line, using cProfile. The
databases were installed with sale, mrp, and the crm.

The cProfile code is commited as part of this patch and should be removed (or
maybe guarded by some command-line flag) (just as the commenting-out of the
cron startup).

The patch was also applied on top of the trunk-simple-table-stats-vmt branch
which provides SQL queries counters.

Results indicate that the number of SQL queries are reduced from about 2100 to
27. Loading time is reduced from 1.3s to 0.26s (i.e. improved by 5).

Changes:

All calls to ir_model_fields to fetch manual (custom) fields are done in a
single call (prior to instanciate all models).

Checks for empty module descriptions are not done unless we are in init or
update mode. (The behavior was the opposite, which was probably a mistake).

Some calls to ir_translation, passing en_US because there was no lang in the
context, are not done anymore.

The improved time is also a result of a change in the decimal_precision module
where precision_get fetches all digits/applications instead of one at a time
(and thus implements its own caching instead of relying on
openerp.tools.ormache).

bzr revid: vmt@openerp.com-20121211105954-lwgs5js7yw3tzghs
2012-12-11 11:59:54 +01:00
Christophe Simonis 236df95b22 merge upstream
bzr revid: chs@openerp.com-20121210132406-9ro3amw6s6pzeez4
2012-12-10 14:24:06 +01:00
Antony Lesuisse ae45df93a4 misc
bzr revid: al@openerp.com-20121209190543-83hmvyfcu1af7wiv
2012-12-09 20:05:43 +01:00
Antony Lesuisse f4977b1f44 cron registrymanager removal
bzr revid: al@openerp.com-20121209175300-rhwf9n0y29o7ct19
2012-12-09 18:53:00 +01:00
Antony Lesuisse 42f292af93 cron cleanup, back to the Kernighan KISS roots 1min poll time, rely only on database, multiprocess/multiserver ready.
Nota: If we replace sequence signaling for cache invalidation with pg
listen/notify in the future, we will use the same mechanism for more accurate
cron timing.

bzr revid: al@openerp.com-20121209170447-zs0k3jazokylwvar
2012-12-09 18:04:47 +01:00
Antony Lesuisse f224ce1d8b [IMP] cli first command testjs
bzr revid: al@openerp.com-20121209024618-cae0ux1vmo38ccwr
2012-12-09 03:46:18 +01:00
Antony Lesuisse 3d2a09a973 multiprocessing signaling manually backported from 6.1
bzr revid: al@openerp.com-20121208181151-lfy956ysnok5b5hf
2012-12-08 19:11:51 +01:00
Christophe Simonis 69d057efc5 merge upstream
bzr revid: chs@openerp.com-20121201003326-j6n5r8juz16752j5
bzr revid: chs@openerp.com-20121204165557-u1oxocye3la4r6gf
bzr revid: chs@openerp.com-20121205143722-olswf8gsg8mhref3
2012-12-05 15:37:22 +01:00
Arnaud Pineux 133d581273 [FIX] _register_hook & loader
lp bug: https://launchpad.net/bugs/944197 fixed

bzr revid: api@openerp.com-20121204161029-3gagt4lcci93g5lk
2012-12-04 17:10:29 +01:00
Vo Minh Thu 7afd9783e8 [IMP] Use the loglevel TEST when logging test file loading and testsuite execution.
bzr revid: vmt@openerp.com-20121203104228-8a5on97pn9r1klls
2012-12-03 11:42:28 +01:00
Vo Minh Thu 001c451608 [REV] reverted install-all commit (vmt@openerp.com-20121128142106-pdkcruhyz0sjltk8)
bzr revid: vmt@openerp.com-20121129140745-wn2o9ek3beuf7y3y
2012-11-29 15:07:45 +01:00
Christophe Simonis a208447a3d merge upstream
bzr revid: chs@openerp.com-20121128184100-rkr90mrx38fh9q4l
2012-11-28 19:41:00 +01:00
Christophe Simonis e03f111704 [FIX] module: do not recreate categories when updating modules
bzr revid: chs@openerp.com-20121128183701-6d7p1jqu1hdlshcp
2012-11-28 19:37:01 +01:00
Vo Minh Thu 79eee180ea [FIX] The previous merge killed a line.
bzr revid: vmt@openerp.com-20121128141202-jncwohi169luyz0l
2012-11-28 15:12:02 +01:00
Vo Minh Thu 3f56350779 [MERGE] merged trunk.
bzr revid: vmt@openerp.com-20121128135101-ko52od4hpngc9btz
2012-11-28 14:51:01 +01:00
Arnaud Pineux 084371b51b [FIX] Automated action rules
bzr revid: api@openerp.com-20121126112205-bf80xlf1ja5o2f7i
2012-11-26 12:22:05 +01:00
Christophe Simonis 0e50931671 merge upstream
bzr revid: chs@openerp.com-20121116183109-v9ngqr1uehx1o0dy
bzr revid: chs@openerp.com-20121120140507-r86jl1lxqb7pxapj
bzr revid: chs@openerp.com-20121123110820-8w4dr0u5i8eusv8q
2012-11-23 12:08:20 +01:00
Vo Minh Thu 7c33378557 [IMP] loading: the warning about access rights give an example that can be copied.
bzr revid: vmt@openerp.com-20121115160611-9dkyx82d94pve2rx
2012-11-15 17:06:11 +01:00
Christophe Simonis 8200848b3f merge upstream
bzr revid: chs@openerp.com-20121114174352-a0xbech8o4dav16b
2012-11-14 18:43:52 +01:00
Vo Minh Thu 6fe4d55251 [MERGE] merged trunk.
bzr revid: vmt@openerp.com-20121114123943-oh8f0ni1e2itj1os
2012-11-14 13:39:43 +01:00
Vo Minh Thu 45f8c4adb7 [IMP] loading.py: be a bit more explicit about valid/invalid data/test files.
bzr revid: vmt@openerp.com-20121114103140-y0k40eb525ak99v1
2012-11-14 11:31:40 +01:00
Christophe Simonis 9bb5e47baf merge upstream
bzr revid: chs@openerp.com-20121107112830-fi0xu1poqt5cbb8u
2012-11-07 12:28:30 +01:00
Vo Minh Thu 38336593f7 [IMP] registry: the `assertion_report` is now a registry attribute.
This allow us to report failure or success by inspecting the registry.

bzr revid: vmt@openerp.com-20121102134732-5uy1vp59mp1bxgjs
2012-11-02 14:47:32 +01:00
Xavier Morel f579cc927f [FIX] files filtering when loading... stuff.
also, cleanup module file (remove extra imports, extra default key in manifest)

bzr revid: xmo@openerp.com-20121024105454-nqw9taxladjofz2v
2012-10-24 12:54:54 +02:00
Vo Minh Thu 7b6ef161d2 [MERGE] merged trunk.
bzr revid: vmt@openerp.com-20121022121718-92ur1vmbrih9j8hy
2012-10-22 14:17:18 +02:00
Christophe Simonis 7d3f3d475b merge upstream
bzr revid: chs@openerp.com-20121010115500-xz9oqr2g8vzr79jq
2012-10-10 13:55:00 +02:00
Fabien Pinckaers a48c57df40 [IMP] no certificate
bzr revid: fp@tinyerp.com-20120926121536-9836j42ulu8wcir8
2012-09-26 14:15:36 +02:00
Christophe Simonis 9c103b9a09 merge upstream
bzr revid: chs@openerp.com-20120905132230-0r6pv4nlegt3x0mb
2012-09-05 15:22:30 +02:00
Olivier Dony f9be81cb20 [MERGE] file_open: give precedence to directory before zip, courtesy of Florent Xicluna
bzr revid: odo@openerp.com-20120904074105-ql796z5c8b6o4cyf
2012-09-04 09:41:05 +02:00
Vo Minh Thu 4498663baf [FIX] ad_paths: makes sure the server addons path is absolute (needed when using cProfile).
bzr revid: vmt@openerp.com-20120903145828-8yflgc0lfqn6woai
2012-09-03 16:58:28 +02:00
Olivier Dony 869564ce28 [MERGE] file_open: give precedence to directory before zip, courtesy of Florent Xicluna
lp bug: https://launchpad.net/bugs/928376 fixed
lp bug: https://launchpad.net/bugs/928507 fixed

bzr revid: odo@openerp.com-20120903130536-5sqwp9tnhk1ntee3
2012-09-03 15:05:36 +02:00
Stephane Wirtel b3988436cb [REF] Replace the user id 1 by openerp.SUPERUSER_ID
bzr revid: stw@openerp.com-20120831135309-o4plzf5wp0kyuzgf
2012-08-31 15:53:09 +02:00
Christophe Simonis 9f9de9914a [FIX] automatically adapt version numbers of modules
bzr revid: chs@openerp.com-20120824142323-m503lc6tfj4vntop
2012-08-24 16:23:23 +02:00
Christophe Simonis 610c8d8078 [IMP] yaml import: log as TEST only for test files
bzr revid: chs@openerp.com-20120822101156-v5w2kljumas2cyq0
2012-08-22 12:11:56 +02:00
Vo Minh Thu abb47bc6d6 [MERGE] merged trunk.
bzr revid: vmt@openerp.com-20120816104804-k5pwjk3j3um5mow7
2012-08-16 12:48:04 +02:00
Christophe Simonis 3e251640d2 [IMP] add cursor() contextmanager on registry
bzr revid: chs@openerp.com-20120813150501-txkrphi7hyp2tgl1
2012-08-13 17:05:01 +02:00
Vo Minh Thu b0abe3a595 [MERGE] impex tests: added test module to unittest import/export.
bzr revid: vmt@openerp.com-20120810134544-f08mjga83ghlmnp7
2012-08-10 15:45:44 +02:00
Olivier Dony 256eae55b4 [FIX] db: module auto-install should work recursively during db bootstrap too
bzr revid: odo@openerp.com-20120808165904-hyyxn3djm75od67b
2012-08-08 18:59:04 +02:00
Xavier Morel fc36345ca0 [ADD] test cases for export of simple fields
bzr revid: xmo@openerp.com-20120723150306-6zgtr9ho0d3ud78u
2012-07-23 17:03:06 +02:00
Jigar Amin - OpenERP 67931a35d2 [Add] Add module summary on db install
bzr revid: jam@tinyerp.com-20120717085028-2jkbf9ymrftkui45
2012-07-17 14:20:28 +05:30
Vo Minh Thu 877ec2d7a8 [MERGE] merged trunk.
bzr revid: vmt@openerp.com-20120619132718-ag1j3itm69u8h419
2012-06-19 15:27:18 +02:00
Olivier Dony 2126f83a35 [IMP] modules, ir.ui.view: improve view validation + avoid validation errors during updates
As of 7.0, RNG validation is not possible for form views
that have a version attribute equal to "7.0", due to the
allowed usage of HTML syntax mixed with the regular OpenERP
view syntax. RNG validation is still enabled for regular
form views (@version missing or less than "7.0"), and for
all other views types.
Validation of 7.0 form views should be improved with the
addition of an assertion-based schema, still to be done.
 
The above is also complemented with an explicit call to fields_view_get()
during view installation, in order to immediately verify
that the updated view hierarchy does not cause any
issue when loaded along with its related views (i.e
parent and siblings, for inheriting views).
In addition to that, fields_view_get() will now only
consider loading views that belong to modules that have
already been loaded. This avoids a lot of validation errors
during a module update operation, which runs on top of
an existing database with all previous views visible,
even those whose module is not loaded yet.

bzr revid: odo@openerp.com-20120611122758-qcw9xdhupl24busq
2012-06-11 14:27:58 +02:00
Olivier Dony 5fd5165c20 [REVERT] db: revert incorrect change to auto_install logic
The auto_install flag means that the module will be automatically
installed as soon as all its dependencies are satisfied.
It does *not* mean that the module will be automatically installed
upon database creation. It can be used for that purpose by
setting it on a module that has no dependencies however.

bzr revid: odo@openerp.com-20120611103653-l7x0xxdqo4wixjvl
2012-06-11 12:36:53 +02:00
Fabien Pinckaers 9901961a2f fix
bzr revid: fp@tinyerp.com-20120610120614-oe3plgxr1364um0q
2012-06-10 14:06:14 +02:00
Vo Minh Thu 77ec840cb0 [FIX] ir_values: fix a test where some value was hard-coded.
bzr revid: vmt@openerp.com-20120605095210-0t5bmlyxrtnoqvr0
2012-06-05 11:52:10 +02:00
Mayur Maheshwari (OpenERP) 7c06e4a5b6 [IMP]module: improve tree and form view and remove complexity field from ir.module object
bzr revid: mma@tinyerp.com-20120518052939-51ps201qaq51g2bp
2012-05-18 10:59:39 +05:30
Thibault Delavallée 5959157cc5 [REM] Removed res.log feature in ORM. However, the res.log table stays, because it is still used notably in publisher_warranty, that must be checked to see how it should be updated with OpenChatter.
bzr revid: tde@openerp.com-20120402114746-unxkhxutivx2hp7f
2012-04-02 13:47:46 +02:00
Olivier Dony eb9b0021ff [IMP] Move uninstall behavior in modules.loading where it belongs
bzr revid: odo@openerp.com-20120330163422-jkatnkpw0cl8hd8t
2012-03-30 18:34:22 +02:00
Olivier Dony 9f8e297531 [IMP] modules.loading: lint cleanup
bzr revid: odo@openerp.com-20120322160806-y3g18dwn2z2xyuh2
2012-03-22 17:08:06 +01:00
Atul Patel (OpenERP) 258722cc1c [MERGE]: Merge with lp:openobject-server
bzr revid: atp@tinyerp.com-20120316042909-gb2e5cmrilyyhsef
bzr revid: atp@tinyerp.com-20120320050251-bgk9xhsfmb1fws1p
2012-03-20 10:32:51 +05:30
Olivier Dony 638a9102c5 [MERGE] Latest fixes from 6.1
bzr revid: odo@openerp.com-20120314142043-9jpk3dkss1hkvb3q
2012-03-14 15:20:43 +01:00
Atul Patel (OpenERP) 85dd5f6164 [MERGE]: Merge with lp:openobject-server
bzr revid: atp@tinyerp.com-20120313133708-lc4x4ekn2xv517b8
2012-03-13 19:07:08 +05:30
Atul Patel (OpenERP) 180a23c7cc [FIX]: uninstall module.
Remove foreign key references.
Remove sql constraint .
Remove workflow activity and transition based on deleted cascade.
Drop ir model fields columns and drop table.

bzr revid: atp@tinyerp.com-20120309124753-c4yzeoij5p2fmhgg
2012-03-09 18:17:53 +05:30
Vo Minh Thu 0cb86fc58d [IMP] tests: removed the severity concept from `assert` tags.
bzr revid: vmt@openerp.com-20120302112834-n1zyqf1g4v61ivje
2012-03-02 12:28:34 +01:00
Vo Minh Thu dc34d73695 [IMP] tests:
- pass around the assertion_report to the YAML importer
- removed TestReport, which was identical to assertion_report
- assertion_report is simpler (no more severity level)
- use the report to log a greppable sentence when some test failed.
Previously the runbot had to grep for a Traceback which was an
unreliable technique (e.g. an exception can be purposefuly
generated as part of a test and the associated traceback
visible in the logs). Now it can grep
  "At least one test failed when loading the modules".

bzr revid: vmt@openerp.com-20120302110227-nqrl7i46ju28ntdr
2012-03-02 12:02:27 +01:00
Vo Minh Thu 6323111950 [IMP] tests:
- moved a few YAML tests to unittest2 for demonstration purpose
- changed --test-disable to --test-enable (and swapped its meaning)

bzr revid: vmt@openerp.com-20120301134608-szuktuj8imdhmn0r
2012-03-01 14:46:08 +01:00
Vo Minh Thu ade3f174a5 [IMP] tests: move tests discovery and execution to openerp.modules.module, removed unexisting column name, filter out more test outputs
bzr revid: vmt@openerp.com-20120301121611-1gieqehm9wqog2fx
2012-03-01 13:16:11 +01:00
Vo Minh Thu dac45d4392 [IMP] unittest: run the fast_suite and checks tests when installing a module.
bzr revid: vmt@openerp.com-20120229172520-n0k1dmxo5p0h0bar
2012-02-29 18:25:20 +01:00
Atul Patel (OpenERP) 3465869df7 [FIX]: Remove workflow activity and drop constraint during uninstalling module.
bzr revid: atp@tinyerp.com-20120229135343-g0v04jb5nc723w9q
2012-02-29 19:23:43 +05:30
Olivier Dony 3f6524a6e2 [FIX] Correct remaining SQL now() calls, must use UTC
This is essential to have the proper behavior for
timestamps: on the database side we exclusively 
store UTC data (no DST issues, etc.) as naive
timestamps (to prevent Postgres from messing with them).
Inside OpenERP server/addons we work again with
pure UTC data (much simpler), and only render
them according to the user's timezone when they
are displayed in the user interface or rendered
in a PDF report.

lp bug: https://launchpad.net/bugs/918257 fixed

bzr revid: odo@openerp.com-20120220105943-v3m0i50phrurt8x6
2012-02-20 11:59:43 +01:00
Vo Minh Thu 965e55d7e6 [REV] REVERT TEH PREVIOUS SUTPID BROKD COMMIT.
bzr revid: vmt@openerp.com-20120210095946-dxs0e0cd4ffkccy9
2012-02-10 10:59:46 +01:00
Vo Minh Thu 3bb6596890 [IMP] import hook: allow and give precedence to our own modules.
This should be reverted for 6.2 when the openerp.addons namespace will
be the only option.

lp bug: https://launchpad.net/bugs/929466 fixed

bzr revid: vmt@openerp.com-20120209163016-1wiw1xsrppumjvfl
2012-02-09 17:30:16 +01:00
Vo Minh Thu 01449bfb37 [IMP] post_load: factored common code. This also fix bug lp:929466
lp bug: https://launchpad.net/bugs/929466 fixed

bzr revid: vmt@openerp.com-20120209152732-24ud1f70krliv2k5
2012-02-09 16:27:32 +01:00
Vo Minh Thu d14a3e9df0 [IMP] loading: call post-load hook in non-server-wide-module too.
bzr revid: vmt@openerp.com-20120209141444-12261k6zd2ovnltd
2012-02-09 15:14:44 +01:00
Olivier Dony 69a5eca5b4 [IMP] Give precedence to module directories instead of zips while locating resources
The previous behavior gave the precedence to zipped
modules, without any apparent reason, and this is
sub-optimal for several reasons:

1. The default is to have regular modules, not
zipped modules, so looking first for a regular
module is more efficient.
2. Keeping a zipped module next to a regular
module with the same name is not a documented
or supported feature.
3. Even if you were relying on this behavior
having the extracted module take precedence
is more practical: you could simply extract
the zipped module to test a quick fix.

We have another issue related to this feature
because the code looking for zipped modules
escapes the addons paths chroot and goes
up to the filesystem root looking for a zip
module at each step. This is described in
bug 928376 and a fix for it should follow.

lp bug: https://launchpad.net/bugs/928376 fixed

bzr revid: odo@openerp.com-20120208173932-pwhz53vxxdzbo8ja
2012-02-08 18:39:32 +01:00
Vo Minh Thu 876c61b052 [MERGE] merged logging changes: use a top-level `openerp` name space. Similar changes for the addons will be done after 6.1.
bzr revid: vmt@openerp.com-20120208105913-habqxas406osaz9z
2012-02-08 11:59:13 +01:00
Antony Lesuisse acc91886c6 [FIX] reintroduce a default value for auto_install (aka active) removed in 4003 revid:xmo@openerp.com-20120202154532-tq9x07ujf0bn9mcp
bzr revid: al@openerp.com-20120208005252-ke2v5mtkxpmyml6d
2012-02-08 01:52:52 +01:00
Vo Minh Thu 23eb63f139 [MERGE] merged trunk.
bzr revid: vmt@openerp.com-20120206203151-3snkz7usngwtv1xt
2012-02-06 21:31:51 +01:00
Xavier Morel df8af0ec4a [FIX] in load_information_from_description_file, f can be a StringIO (in case of zipped module) and StringIO are not contextmanagers.
So rollback the context management thingie

bzr revid: xmo@openerp.com-20120202154532-tq9x07ujf0bn9mcp
2012-02-02 16:45:32 +01:00
Antony Lesuisse 1a62602c86 [MERGE] trunk
bzr revid: al@openerp.com-20120131211744-whzzo0dh6w1kptng
2012-01-31 22:17:44 +01:00
Vo Minh Thu 084af04092 [FIX] import-hook: correctly import the server-wide-module (i.e
use the openerp.addons namespace), and correctly set the submodules in
sys.modules (instead of only the top-level package).

bzr revid: vmt@openerp.com-20120201152710-s7sxlgibwd3lwr5l
2012-02-01 16:27:10 +01:00
Antony Lesuisse 89e411fb39 remove warning
bzr revid: al@openerp.com-20120130210429-zw7aziwhkhi0yhqv
2012-01-30 22:04:29 +01:00
Vo Minh Thu c22e8190da [IMP] manifest: still support the old `active` entry (but deprecate it and display a warning).
bzr revid: vmt@openerp.com-20120130113116-msjaej7jxp96tbvh
2012-01-30 12:31:16 +01:00
Vo Minh Thu 0d86e08450 [IMP] manifest: `auto_installable` renamed to `auto_install`.
bzr revid: vmt@openerp.com-20120130095238-x2by4y11joeytipr
2012-01-30 10:52:38 +01:00
Vo Minh Thu 5b63c4f560 [IMP] ir.module.module: change `active` flag to
`auto_installable`. An auto-installable module is a module automatically
installed by the OpenERP server as soon as its dependencies are
satisfied, without explicit user action.

bzr revid: vmt@openerp.com-20120126164049-smrcvrojy0b1z6f8
2012-01-26 17:40:49 +01:00
Vo Minh Thu f22f2fc770 [IMP] openerp.{modules,osv}: _logger with fully qualified module name.
bzr revid: vmt@openerp.com-20120124124252-91g3ysf33zsq4nhd
2012-01-24 13:42:52 +01:00
Vo Minh Thu 4d77e87495 [IMP] import hook: correctly set the imported module __name__.
bzr revid: vmt@openerp.com-20120124102024-ziajbxfxjs1kyurv
2012-01-24 11:20:24 +01:00
Vo Minh Thu 6c1ad196bf [IMP] openerp.modules: updated initialize_sys_path() docstring (although its name is now inaccurate).
bzr revid: vmt@openerp.com-20120110092730-rqewzuo1wa5wy2q5
2012-01-10 10:27:30 +01:00
Vo Minh Thu d348a0de79 [IMP] import hook: moved to a proper location (openerp.modules.module instead of openerp-server).
bzr revid: vmt@openerp.com-20120109125243-qhtr070dvtc3akb5
2012-01-09 13:52:43 +01:00
Vo Minh Thu 455e47e5e8 [IMP] openerp.addons: openerp.addons is used instead of
openerp.modules as the namespace of the OpenERP addons.

bzr revid: vmt@openerp.com-20120109124120-06gguu3lzxv49i3j
2012-01-09 13:41:20 +01:00
Vo Minh Thu 1560538f8a [IMP] module: use the `openerp.addons.` namespace to load addons.
(openerp.modules will be changed in openerp.addons in the next commit).

bzr revid: vmt@openerp.com-20120109123123-jt3canjbg0ozs05j
2012-01-09 13:31:23 +01:00
Vo Minh Thu f24a29717e [FIX] orm: correctly set the module name on the model, even when imported with
`import openerp.modules.<module_name>`.

bzr revid: vmt@openerp.com-20120109101647-4hvy3n6eifzeozzq
2012-01-09 11:16:47 +01:00
Vo Minh Thu 34a3991174 [MERGE] merged trunk.
bzr revid: vmt@openerp.com-20120109083957-06ahuojw1d4m954g
2012-01-09 09:39:57 +01:00
Vo Minh Thu 64ec5f36df [IMP] modules: began to replace sys.path appending with an import hook.
bzr revid: vmt@openerp.com-20120109081206-p10yack8lhip11gt
2012-01-09 09:12:06 +01:00
Olivier Dony cf113c2316 [FIX] base: module sequence number removed from XML data, moved to individual module manifests
Having the sequence number living outside the module itself
causes various problems at initialization when modules are
missing (e.g. if creating a database with `base` only).
It is also cleaner to have the module sequence in the
module manifest, like other module metadata.
A corresponding commit in the addons project adds the
`sequence` field in the manifest of all modules who
have a non-default sequence (the main apps).

bzr revid: odo@openerp.com-20120107041745-tik3iu1b2qs4ym85
2012-01-07 05:17:45 +01:00
Vo Minh Thu 389257c009 [MERGE] merged trunk.
bzr revid: vmt@openerp.com-20120104131010-kbw2ej2rrdvyif96
2012-01-04 14:10:10 +01:00
Vo Minh Thu 4e2d5eba1c [IMP] module loading: iterate on the module graph in deterministic order (by sorting modules for each level).
bzr revid: vmt@openerp.com-20111222090156-us0zccgy50buoi13
2011-12-22 10:01:56 +01:00
Fabien Pinckaers dcfb40f18e [IMP] order of main apps/modules
bzr revid: fp@tinyerp.com-20111218204731-50g37bd7un5igr84
2011-12-18 21:47:31 +01:00
Xavier Morel 9e94b86bfe [IMP] icon management in modules
* If icon is present in descriptor file, use that path
* Else try to find #{module}/static/src/img/icon.png
* Else fallback on /base/static/src/img/icon.png

bzr revid: xmo@openerp.com-20111209122803-elwonegpl8kut7pf
2011-12-09 13:28:03 +01:00
Xavier Morel c25475879c [IMP] opening and getting data from module description file
bzr revid: xmo@openerp.com-20111209120207-3kkyvwedbjez29rl
2011-12-09 13:02:07 +01:00
Xavier Morel 80de80c7dd [IMP] reduce noise in setting default values of module descriptor file
bzr revid: xmo@openerp.com-20111209115316-2gqwmn2pi34vzu29
2011-12-09 12:53:16 +01:00
Antony Lesuisse 926041c8b8 [MERGE] module kanban
bzr revid: al@openerp.com-20111208224332-4wg6k0w1uzuwlyum
2011-12-08 23:43:32 +01:00
Antony Lesuisse 7e12f46469 [IMP] ir.module.module: rename is_application to application
bzr revid: al@openerp.com-20111208222241-n9raoe1jec4llh26
2011-12-08 23:22:41 +01:00
Minh Tran 3a84d1c8b0 Changed modules icons in the vignette
bzr revid: mit@openerp.com-20111208161124-o325usj9ikheewv8
2011-12-08 17:11:24 +01:00
Christophe Simonis 9b9d4f0928 [IMP] ir.module.module: rename 'core' to 'is_application'
bzr revid: chs@openerp.com-20111208145101-oth2k8xuymze7y2l
2011-12-08 15:51:01 +01:00
Fabien Pinckaers f7d4c3384d [IMP] Core features on modules, better views for modules
bzr revid: fp@tinyerp.com-20111206111531-qdkajwatqzb0dz45
2011-12-06 12:15:31 +01:00
Raphael Collet 9aa1ecbe58 [IMP] indicate tests in current thread, and prevent email sending during tests
bzr revid: rco@openerp.com-20111201153156-2ki7x22evf5ojyrz
2011-12-01 16:31:56 +01:00
Vo Minh Thu e9c405c244 [FIX] openerp.modules.loading: previous change disabled demo data altogether,
this should be now fixed by making sure that --withou-demo flag (or its absence)
is taken care of, and setting the base module demo field.
Normally the demo state of a module should have a ripple
effect on all modules depending on it. This might prove
not enough in this case and require some more testing.

bzr revid: vmt@openerp.com-20111117162824-yqswv6yk7bmiyj4s
2011-11-17 17:28:24 +01:00
Vo Minh Thu b6b25ea706 [IMP] openerp.modules.loading: -i all seems to work as documented in --help.
bzr revid: vmt@openerp.com-20111117150720-uaer043c2k55937n
2011-11-17 16:07:20 +01:00
Vo Minh Thu 99f99b6d83 [REF] openerp.modules.loading: preparing to support the -i=all option:
getting almost rid of the mess with tools.config[init|update].

bzr revid: vmt@openerp.com-20111117144628-pjpac87b5whg5cl0
2011-11-17 15:46:28 +01:00
Vo Minh Thu 330316672f [IMP] Clearer use of update_module arg.
- update_module was defined as config[init] or config[update]
- this means it is a mutable dictionary
- the code testing update_module is actually mutating
config[init] and config[update]...
- now update_module is really a True or False value.

bzr revid: vmt@openerp.com-20111117100608-0n8o99slgk42kiiv
2011-11-17 11:06:08 +01:00
Raphael Collet 3b3cf8e430 [IMP] mark as read all res_log entries created during a module installation
bzr revid: rco@openerp.com-20111017144615-e5b45twvm1s07ruf
2011-10-17 16:46:15 +02:00
Olivier Dony 0d2bc8f3ae [FIX] modules.graph: avoid crash when a module has been deleted from the filesystem
bzr revid: odo@openerp.com-20111012155818-u07arzkokf9zshr0
2011-10-12 17:58:18 +02:00
Antony Lesuisse 5dd1e2e43c [FIX] complexity default, and base category
bzr revid: al@openerp.com-20111004231534-ay78ghc46ihb91mx
2011-10-05 01:15:34 +02:00
Antony Lesuisse 2e00f144ec [MERGE] basesetup-dynamic-stw
bzr revid: al@openerp.com-20111004223410-pbwkn5k4zq9ze1mj
2011-10-05 00:34:10 +02:00
Xavier Morel 6d70751dd7 [FIX] deadlock between crons scheduling and new registry initialization creation
bzr revid: xmo@openerp.com-20110930150026-m0h99fqk6qgne8i1
2011-09-30 17:00:26 +02:00
Stephane Wirtel c9fe3b9200 [MERGE] Merge Upstream
bzr revid: stw@openerp.com-20110930102326-ic6hhmwu15i0r8l1
2011-09-30 12:23:26 +02:00
Stephane Wirtel 53554035ae [FIX] store the complexity field from the manifest during the database creation
bzr revid: stw@openerp.com-20110930095814-4o01upd0krmysbid
2011-09-30 11:58:14 +02:00
Stephane Wirtel ccfcb47149 [IMP] base: each ir.module.category will be assigned with an
autogenerated xml-id during the creation of the database
[IMP] base: Create the records for the categories of OpenERP

bzr revid: stw@openerp.com-20110929115515-rqlwqfzndxblxqtz
2011-09-29 13:55:15 +02:00
Olivier Dony f5fdb9f494 [FIX] cron/registry: typo
bzr revid: odo@openerp.com-20110928235048-ssfqeu7ug35isyfk
2011-09-29 01:50:48 +02:00
Olivier Dony f2b9b58fd3 [IMP] cron: misc renaming and minor changes to improve reviewability ;-)
bzr revid: odo@openerp.com-20110928224429-up0k4ts3cdks1u2s
2011-09-29 00:44:29 +02:00
Olivier Dony e7601e68cb [MERGE] sync with latest trunk
bzr revid: odo@openerp.com-20110928211326-0e51q7zlw4h2528z
2011-09-28 23:13:26 +02:00
Olivier Dony 209390d627 [MERGE] sync with latest trunk
bzr revid: odo@openerp.com-20110927165133-uwl7px6bxl6eu7us
2011-09-27 18:51:33 +02:00
Antony Lesuisse 7a88d9058d [MERGE] trunk
bzr revid: al@openerp.com-20110924145258-16r9qi7hr3dip1jz
2011-09-24 16:52:58 +02:00
Olivier Dony 334dee0479 [IMP] orm: fix Model hierarchy to avoid TransientModel leaking downstream
bzr revid: odo@openerp.com-20110923174018-8l2b4qc1vecgs0sc
2011-09-23 19:40:18 +02:00
Olivier Dony 2fbd4dfcdf [FIX] loading: remove leftover debugging breakpoint
bzr revid: odo@openerp.com-20110923134413-d71l4y5265z3nwcb
2011-09-23 15:44:13 +02:00
Olivier Dony 2e7a134228 [IMP] orm: introduce cleaner class hierarchy for models
We'll now have a BaseModel with 3 subclasses, AbstractModel,
TransientModel and Model. Model is for regular models, 
TransientModel for automatically-vacuumed models, and
AbstractModel for common superclasses meant to be 
inherited by other models only, and not directly used.

bzr revid: odo@openerp.com-20110923124525-jfzk55dk3ban2ps2
2011-09-23 14:45:25 +02:00
Olivier Dony 0d3085d14f [MERGE] sync with latest trunk
bzr revid: odo@openerp.com-20110922154155-jq811w768d9zfgim
2011-09-22 17:41:55 +02:00
Olivier Dony 6e4a93cd22 [MERGE] sync w/ latest trunk
bzr revid: odo@openerp.com-20110921162128-22sp59cn4xv983q5
2011-09-21 18:21:28 +02:00
Vo Minh Thu 20d7d05a60 [IMP] openerp.modules.db: nice critical logging, and nice IOError exception
when the base.sql is not found.

bzr revid: vmt@openerp.com-20110916121315-lklf5nib8u1pztk5
2011-09-16 14:13:15 +02:00
Xavier Morel 556a17d5bc [FIX] race condition in RegistryManager
When two requests arrive simultanously for the same uninitialized db,
the first request starts the db initialization, but the second one
immediately gets the partially uninitialized registry (actually just
created, so generally completely uninitialized), leading to an access
error in later code (as soon as a registry object is accessed).

Add a GRML (Global RegistryManager Lock) to ensure the RegistryManager
*never* returns a partially initialized registry.

The current implementation is simple (just lock all RegistryManager
methods before they manipulate registries), but overly broad. This is
an area which might be optimizable if there are perf/responsivity
issues (e.g. each Registry instance could have a lock, and the
RegistryManager would grab the instance's, allowing the inititlization
of registry A not to block registry B from being returned in heavily
concurrent uses).

However this is not an issue in multiprocessing scenarios, which are
being planned for the near future. So for now, being correct is
probably the best idea.

bzr revid: xmo@openerp.com-20110916075227-0zutzlxn2dcd94c4
2011-09-16 09:52:27 +02:00
Vo Minh Thu 46ad605226 [IMP] wsgi:
- added Microsoft specific header for webdav.
- serve WSGI handlers with werkzeug when available.
- effectively use WSGI instead of netsvc HTTP stack.

bzr revid: vmt@openerp.com-20110914104300-n0l3dnmdu3jau7w2
2011-09-14 12:43:00 +02:00
Olivier Dony caef9821a3 [MERGE] latest trunk
bzr revid: odo@openerp.com-20110906080822-tyadkxvycrx7bl1d
2011-09-06 10:08:22 +02:00
Vo Minh Thu 8ca1a87201 [IMP] wsgi: modules can be pre-loaded and expose a WSGI handler.
An option --load is added to list the modules to pre-load.
sys.path and sys.modules are initialized when the config is
parsed.

bzr revid: vmt@openerp.com-20110902133136-4v7fgptyd0g1kc5s
2011-09-02 15:31:36 +02:00
Vo Minh Thu 79d0e39c4c [FIX] loading: load base only once.
bzr revid: vmt@openerp.com-20110902132712-j9bgfnzbmddarr7h
2011-09-02 15:27:12 +02:00
Vo Minh Thu b8a633e578 [MERGE] merged trunk.
bzr revid: vmt@openerp.com-20110831091325-t5gfm57tmkr0fbee
2011-08-31 11:13:25 +02:00
Vo Minh Thu 2e7927331d [FIX] registry: forgot the self/cls args.
bzr revid: vmt@openerp.com-20110831075639-0ywrg01e6zdff7l7
2011-08-31 09:56:39 +02:00
Vo Minh Thu bdd0c7cf3f [IMP] simplified cache implementation (and stored on the osv), does not support contexts.
bzr revid: vmt@openerp.com-20110830121541-abov2wezdn6kl2dc
2011-08-30 14:15:41 +02:00
Antony Lesuisse be328ad7c3 [MERGE] trunk
bzr revid: al@openerp.com-20110827213628-4kflylkgtln6o4k4
2011-08-27 23:36:28 +02:00
Olivier Dony 3f00bfc405 [FIX] registry: use a unique list of models to load per module
This is necessary to preserve the model loading order
as defined in the module. This was broken when the 
metaclass was introduced to make the explicit model
constructor call optional.
One consequence is that the order in which the classes
are declared in the module really defines their
initialization order, even if the constructors are 
later called explcitly in a different order.
This latter case should be fairly rare, and easy to
fix too - simply putting the class declaration in the
right order.

bzr revid: odo@openerp.com-20110826161736-lgnpurtbcqtbseey
2011-08-26 18:17:36 +02:00
Vo Minh Thu dad3528ab7 [FIX] registry.py: typos (invalid syntax).
I wonder how come I made the previous commit.

bzr revid: vmt@openerp.com-20110826121026-da90yx3iapj6y1v1
2011-08-26 14:10:26 +02:00
Vo Minh Thu 6fdadb04f5 [IMP] tools.cache: added missing clean_caches_for_db replacement.
bzr revid: vmt@openerp.com-20110825124711-y2uckmvcoa0arz4h
2011-08-25 14:47:11 +02:00
Olivier Dony 3fa9dcea34 [MERGE] latest trunk
bzr revid: odo@openerp.com-20110819150201-pas7z2md5sa3bk7e
2011-08-19 17:02:01 +02:00
Vo Minh Thu 51117db344 [REF] osv: replace isinstance(m,osv_memory) by m.is_transient().
bzr revid: vmt@openerp.com-20110816095755-2g5cblolcvchtewx
2011-08-16 11:57:55 +02:00
Vo Minh Thu 9964cd1d84 [REF] osv: previous diff makes unneccessary one of makeInstance/createInstance.
bzr revid: vmt@openerp.com-20110816074431-v16wfzcy55ojkhwi
2011-08-16 09:44:31 +02:00
Vo Minh Thu 7797702a9f [MERGE] merged trunk.
bzr revid: vmt@openerp.com-20110812130941-z2x2bjr310r4ynu8
2011-08-12 15:09:41 +02:00
Vo Minh Thu 2f5e8d48b3 [REF] osv: moved (and adapted) vacuum code to osv_memory.
bzr revid: vmt@openerp.com-20110812113355-lylavdsc3mqjovrj
2011-08-12 13:33:55 +02:00
Vo Minh Thu 6251434cb9 [IMP] unaccent: support for the postgres unaccent contrib module.
OpenERP is now able to use the SQL unaccent() function when available,
and when the server is run with the --unaccent flag.

bzr revid: vmt@openerp.com-20110811110118-cyx2l6c3wk58083p
2011-08-11 13:01:18 +02:00
Vo Minh Thu 091e9989d5 [MERGE] merged trunk.
bzr revid: vmt@openerp.com-20110809154337-5l5hbbhot347ci82
2011-08-09 17:43:37 +02:00
Vo Minh Thu e93d018a39 [IMP] cron: added yaml test.
The test should probably be a standalone program as the YAML
infrastructure isnt really suited for this purpose.

bzr revid: vmt@openerp.com-20110809111008-vxh0bm08n3drw1o2
2011-08-09 13:10:08 +02:00
Xavier Morel 4ae3738376 [IMP] sort imports, improve functional shortcuts to _load_data (include cr partial application)
bzr revid: xmo@openerp.com-20110801085728-hg81gop09evfzuzu
2011-08-01 10:57:28 +02:00
Xavier Morel 4f6bc445a9 [IMP] use logging in db initialization
bzr revid: xmo@openerp.com-20110801085506-5qjuq36mx3ql7b93
2011-08-01 10:55:06 +02:00
Xavier Morel f4fef55e2b [IMP] don't manually manage extracted indexes when enumerate() can do it for us
bzr revid: xmo@openerp.com-20110801085457-bw0x6af0xwqmf7e5
2011-08-01 10:54:57 +02:00
Vo Minh Thu 266cad9a2e [IMP] unaccent: added an unaccent command-line flag, and a function to test unaccent availability.
bzr revid: vmt@openerp.com-20110722081030-ltxuqknpe1arduw5
2011-07-22 10:10:30 +02:00
Olivier Dony 05cbf2acbf [FIX] modules.loading: no warning about access right for osv inheriting from osv_memory
bzr revid: odo@openerp.com-20110718172943-jyfew63ruy9npqk5
2011-07-18 19:29:43 +02:00
Vo Minh Thu 4b8708fb10 [IMP] cron: minor cleaning.
bzr revid: vmt@openerp.com-20110714151113-v07yr2rneqafbnni
2011-07-14 17:11:13 +02:00
Vo Minh Thu 2f115c21aa [IMP] cron: moved netsvc.Agent to openerp.cron.
bzr revid: vmt@openerp.com-20110714143209-bebn6xg91fcrxro9
2011-07-14 16:32:09 +02:00
Vo Minh Thu b5daffc115 [IMP] registry: whene deleting a registry, also delete its cache and cron.
bzr revid: vmt@openerp.com-20110713153521-isn9bllnggbxwi0z
2011-07-13 17:35:21 +02:00
Olivier Dony 8874fb058f [FIX] module.loading: ensure installed modules are all loaded before installing new ones
After the recent change to make module install
atomically (code *and* data), we ran into issues
when installing a new module indirectly triggers
code of a not-yet-loaded-but-installed module,
via its data that is already in the database
(e.g. worflows or reports modified by this module
within another module, that now refer to its
code).
To avoid this, we now make sure that we only
install new modules on top of a consistent system
(code *and* data), by loading all installed or
'to upgrade' modules *before* starting to install
new ones.

lp bug: https://launchpad.net/bugs/809168 fixed

bzr revid: odo@openerp.com-20110712133343-unf610k23fa6d3pk
2011-07-12 15:33:43 +02:00
Vo Minh Thu 0568b08bea [FIX] loading: pool.get("ir.module.module") was done before it was available.
bzr revid: vmt@openerp.com-20110711141045-c3pyqe0zuwxlljip
2011-07-11 16:10:45 +02:00
Olivier Dony cc7fae257f [IMP] module.loading: attempt to load each module atomically within load_module_graph (untested, work-in-progress)
bzr revid: odo@openerp.com-20110711124958-p91752exwv21sdf8
2011-07-11 14:49:58 +02:00
Vo Minh Thu abb606aa7c [MERGE] orm: _auto_init made of smaller methods, use a metaclass to discover new models.
bzr revid: vmt@openerp.com-20110615160123-7bk8u94y916mdpkj
2011-06-15 18:01:23 +02:00
Vo Minh Thu 26f22874d9 [LINT] removed unused variable, forgot to change two variables in last commit, corrected typo introduced at 3417.6.6.
bzr revid: vmt@openerp.com-20110615072231-jh977xk1jupekkpp
2011-06-15 09:22:31 +02:00
Vo Minh Thu e375049414 [REF] osv: moved osv_pool to modules/registry.
bzr revid: vmt@openerp.com-20110614142226-yd3y39a8z3ubwvxm
2011-06-14 16:22:26 +02:00
Vo Minh Thu 1b45a892dd [REF] orm: defer foreign key creation.
bzr revid: vmt@openerp.com-20110610140521-mdd6zvvzeoubier4
2011-06-10 16:05:21 +02:00
Vo Minh Thu a87ebe9600 [REF] osv:
- make it more explcicit in osv_pool that afreshly instanciated object is added to the pool
- osv_pool.init_set() is called just once with False, so
  no need to check if it is the first time it is called or
  if is called with True
- and rename it in do_parent_store as it is what it does.

bzr revid: vmt@openerp.com-20110526210532-a8i91shptz5h4k48
2011-05-26 23:05:32 +02:00
Vo Minh Thu 16ac84af68 [REF] moved openerp/registry/manager.py => openerp/modules/registry.py
- Maybe it should be called registries.py... Argh, consistency...

bzr revid: vmt@openerp.com-20110519073935-81kwuhlqcxxw1z32
2011-05-19 09:39:35 +02:00
Vo Minh Thu a09b91d8fd [REF] simplified init_db/load_modules:
- removed unnecessary call to openerp.modules.db.initialize() in openerp/service/web_services.py
  as the pooler.restart_pool() call just next after is already doing it.
- made the try/finally section bigger in openerp/modules/loading.py, to inlcude
  the first cr.execute.
- abstracted the test to check if a database is initialized.
- removed unnecessary "if cr:" as the cr is nevertheless used after that.

bzr revid: vmt@openerp.com-20110517091822-pjtw6sc1s5assbr5
2011-05-17 11:18:22 +02:00
Vo Minh Thu 40bce2fead [REF] renamed modules.__init__ to modules.loading.
bzr revid: vmt@openerp.com-20110511174841-wk1yyr9971pu0pwh
2011-05-11 19:48:41 +02:00
Vo Minh Thu 1fe579d8ec [REF] module code goes into openerp.modules.module.
bzr revid: vmt@openerp.com-20110511172448-p12p1rizvf3lqv97
2011-05-11 19:24:48 +02:00
Vo Minh Thu fb476648e0 [REF] openerp.modules: migration manager code moved to openerp.modules.migration.
bzr revid: vmt@openerp.com-20110511164144-8o1bl6jfb8k7keak
2011-05-11 18:41:44 +02:00
Vo Minh Thu 52d1291506 [REF] moved graph code from modules.__init__ to modules.graph
- made upgrade_graph a method of Graph called add_modules
- removed unnecessary create_graph function.

bzr revid: vmt@openerp.com-20110511152810-etqru9pct1zwyqno
2011-05-11 17:28:10 +02:00
Vo Minh Thu 5ca0f64b4e [REF] moved init_db from tools.misc to modules.db.
bzr revid: vmt@openerp.com-20110511144754-m06exg4dsn2jbdgz
2011-05-11 16:47:54 +02:00
Vo Minh Thu b158805af7 [REF] module info (descriptor) dictionary default values in one place.
bzr revid: vmt@openerp.com-20110511135332-87kd5vo4rdeb6b3l
2011-05-11 15:53:32 +02:00
Vo Minh Thu 8b878de82d [REF] modules.__init__:
- added some comments
- the "updating modules list" log appears only when actually updating the list
- similar code to read the module descriptor file is combined
- default values for some descriptor entries are given only once
- in particular, the default version is always 0, instead of 0 when
  reading a descriptor for migration and 1.0 when writing its value in
  database.

bzr revid: vmt@openerp.com-20110511103455-lqezcrjf2996j7mc
2011-05-11 12:34:55 +02:00
Vo Minh Thu 71de92dc44 [FIX] db.get_progress was broken:
- the status dictionary was ignored
- it is still slightly broken (see added comment in openerp/modules/__init__.py)

bzr revid: vmt@openerp.com-20110510142849-p9kcd60agybpm8bd
2011-05-10 16:28:49 +02:00
Vo Minh Thu 853e354b55 [REF] modules.__init__: combined _load_data and _load_xml:
- pass the report argument to xml_import
- allow .sql in demo
- noupdate is True for both init and demo
- the pathname given to convert_csv_import is different
  but the way it is processed in convert_csv_import should
  make it alright.

bzr revid: vmt@openerp.com-20110510125242-ig74vtich2g3bjhc
2011-05-10 14:52:42 +02:00
Vo Minh Thu e82aeba808 [REF] it seems ok to get the ir.module.module model only once.
bzr revid: vmt@openerp.com-20110519090410-a89n7ivs2nvn60bt
2011-05-19 11:04:10 +02:00
Vo Minh Thu 7963da3f94 [REF] modules.__init__:
- combined code from load_init_update_xml and load_demo_xml
- made explicit the "report" kwarg of load_module_graph

bzr revid: vmt@openerp.com-20110510094908-txzj3oeypz7iralk
2011-05-10 11:49:08 +02:00
Vo Minh Thu 4ba3f3c804 [REF] osv, modules/__init__cosmetic renaming, added comments.
bzr revid: vmt@openerp.com-20110519090300-bodss011798ep5cy
2011-05-19 11:03:00 +02:00
Vo Minh Thu 0770057935 [REF] explicit service objects instanciation.
bzr revid: vmt@openerp.com-20110507112129-hfrly9easfby9hns
2011-05-07 13:21:29 +02:00
Vo Minh Thu 081b6d98ab [REF] separate/expose some code.
bzr revid: vmt@openerp.com-20110428151330-m8qkggoqmsry3w2z
2011-04-28 17:13:30 +02:00
Vo Minh Thu 545a438c03 [REF] openerp.modules
- for the moment it is a copy of openerp.addons

bzr revid: vmt@openerp.com-20110420152718-eok61oule6p2x58z
2011-04-20 17:27:18 +02:00