Commit Graph

68 Commits

Author SHA1 Message Date
Vo Minh Thu c313b4073a [REF] logging: removed pseudo log-level TEST.
When --test-enable is used, it is expected that test output is visible,
thus using log-level INFO is natural.

On the down side you lose the nice blue hint that tests did actually
run when --log-level test was given.

bzr revid: vmt@openerp.com-20130326155844-83e2tcqokvblr0ln
2013-03-26 16:58:44 +01:00
Vo Minh Thu 69fefde965 [IMP] The open openerp namespace is removed.
bzr revid: vmt@openerp.com-20130209060246-o7qs51c2uc0kecjo
2013-02-09 07:02:46 +01:00
Christophe Simonis 4857a8a020 [FIX] module loading: call adapt_version() instead of computing it ourself
bzr revid: chs@openerp.com-20130117135108-a4wt4wtbtfdwiui3
2013-01-17 14:51:08 +01:00
Raphael Collet 95b41b40e9 [IMP] register_hook: improve a bit the code
bzr revid: rco@openerp.com-20121219132138-npf12n5l5ug6ujvx
2012-12-19 14:21:38 +01:00
Raphael Collet fd5dee2267 [MERGE] from trunk
bzr revid: rco@openerp.com-20121219130750-3ljqo3dyz05zww08
2012-12-19 14:07:50 +01:00
Olivier Dony f0c826cec6 [IMP] loading.py: lint cleanup - unused code
bzr revid: odo@openerp.com-20121217151626-1pbzf7mxh9inx1y9
2012-12-17 16:16:26 +01:00
Antony Lesuisse 14ad37779c cleanups
bzr revid: al@openerp.com-20121216015214-kfo6zlarh4gdccrx
2012-12-16 02:52:14 +01:00
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
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
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
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
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
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
Fabien Pinckaers a48c57df40 [IMP] no certificate
bzr revid: fp@tinyerp.com-20120926121536-9836j42ulu8wcir8
2012-09-26 14:15: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 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
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
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 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
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 389257c009 [MERGE] merged trunk.
bzr revid: vmt@openerp.com-20120104131010-kbw2ej2rrdvyif96
2012-01-04 14:10:10 +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