Commit Graph

325 Commits

Author SHA1 Message Date
Olivier Dony 088cb0255d [FIX] registry: restore `elif` changed to `if` in previous commit, for better readability (no effect)
This should have no effect because when the first `if`
is entered a new registry is instantiated with
the default value for base_cache_signaling_sequence
set to 1, preventing entering the next `if` even
without `elif`.

bzr revid: odo@openerp.com-20131011123914-7zuvd9mch21yxgj8
2013-10-11 14:39:14 +02:00
Olivier Dony 78579d289b [FIX] registry: avoid discarding registry or cache when the registry is fresh
When the sequence value is 1 it means that either:
 - the registry was just instantiated, so there is no
   reason to reload it immediately, the real checks will
   start at next request
 - the db was just created with new sequences set to 1,
   so there has been no change to reload

In both cases there is no good reason to reload the
registry, and it is actually a performance killer,
especially for cron workers that keep iterating on
the list of databases.

bzr revid: odo@openerp.com-20131011100313-4bud8e9xq2afp9z7
2013-10-11 12:03:13 +02:00
Guewen Baconnier 9c769c9a99 [FIX] missing a threading.RLock in RegistryManager.get():
if no registry exists and several calls to RegistryManager.get() are called at the same time
by several threads, several registries will be created one after the other and only the last
one will be kept in cls.registries

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

bzr revid: guewen.baconnier@camptocamp.com-20131011092632-b267vhdadh7q9som
2013-10-11 11:26:32 +02:00
Christophe Simonis fd9a9577df [MERGE] forward port of branch saas-1 up to revid 4908 dle@openerp.com-20130918160049-fo88fl7uyhfoofkv
bzr revid: chs@openerp.com-20130918171816-cxxt3c9ktcq4a8oz
2013-09-18 19:18:16 +02:00
Christophe Simonis 7081038378 [IMP] validate custom views at the end of update of database
bzr revid: chs@openerp.com-20130912182926-3lectt8mvd9smwfb
2013-09-12 20:29:26 +02:00
Christophe Simonis 4ec71c74d1 [FIX] do not run migration scripts on empty databases
bzr revid: chs@openerp.com-20130912182827-iknosbmr7kni7ulo
2013-09-12 20:28:27 +02:00
Christophe Simonis e13ffe7e11 [MERGE] forward port of branch 7.0 up to revid 5075 chs@openerp.com-20130912141018-qmcyase8zqov9d01
bzr revid: chs@openerp.com-20130906165207-1oklc8cqs0rex3kg
bzr revid: dle@openerp.com-20130909170248-a4t5y6qd5ikkhhac
bzr revid: dle@openerp.com-20130911083736-6jfkb140jxbbx7j6
bzr revid: chs@openerp.com-20130912150616-v0c383trj7gaa7eu
2013-09-12 17:06:16 +02:00
Christophe Simonis 4327e09a55 [MERGE] forward port of branch saas-1 up to revid 4903 dle@openerp.com-20130909170248-a4t5y6qd5ikkhhac
bzr revid: chs@openerp.com-20130910121230-xcr2yj6rpbo83wy0
2013-09-10 14:12:30 +02:00
Antony Lesuisse dfb9d317f2 [MERGE] data file loading refactoring, ready for code autoreload
bzr revid: al@openerp.com-20130909105523-jkffhy5gr34k25hr
2013-09-09 12:55:23 +02:00
Samus CTO (OpenERP) 4dd565b647 [FIX] modules.loading: extra loop when installing/upgrading modules to help solve missing deps
In some rare cases the dependencies have changed, and modules that depend on an uninstalled module
will not be processed on the first pass.

bzr revid: odo@openerp.com-20130909095004-n1dp2w5wnlb36742
2013-09-09 11:50:04 +02:00
Antony Lesuisse aa2a854af7 [MERGE] icon moved to description
bzr revid: al@openerp.com-20130628150755-2z42ct0p819ajtyq
2013-06-28 17:07:55 +02:00
niv-openerp ac1d0742a0 [IMP] minor improvement in RegistryManager, useful for web client
bzr revid: nicolas.vanhoren@openerp.com-20130619105335-w3xftm6g0llh1ade
2013-06-19 12:53:35 +02:00
Christophe Simonis 23f326328a [IMP] openerp.modules.migration: lint file; remove unused imports, reorder imports, reformat literal dict creation
bzr revid: chs@openerp.com-20130508105056-v4arz8d2kem5sngi
2013-05-08 12:50:56 +02:00
Christophe Simonis 4897f1740e [FIX] openerp.modules.migration: do not shadow AttributeError that may occure when executing the migrate() function
bzr revid: chs@openerp.com-20130508104658-d2553vdx0etiuhpk
2013-05-08 12:46:58 +02:00
Olivier Dony 54ad990e48 [MERGE] Forward-port of 7.0 bugfixes up to rev.4970
revision-id: odo@openerp.com-20130507104025-em6w03pcxeq92az9

bzr revid: odo@openerp.com-20130507112024-p3cukmwp7d8xm2e0
2013-05-07 13:20:24 +02:00
Quentin (OpenERP) 0d21c3eba3 [IMP] modules loading: log as INFO test files because, if they are logged as TEST, the loading statement get lost in the mass of real TEST logs in case there are a lot of test files (more visible that way) + there are no reason to special case these files
bzr revid: qdp-launchpad@openerp.com-20130507092422-co9w0qug8k9zw16n
2013-05-07 11:24:22 +02:00
Raphael Collet 05851d21ba [MERGE] from trunk
bzr revid: rco@openerp.com-20130411073017-x6e4h8xbvmy3ofdw
2013-04-11 09:30:17 +02:00
Vo Minh Thu 307ca374d6 [MERGE] forward merge 7.0 until revision 4919.
bzr revid: vmt@openerp.com-20130404130704-24vsmczw34cssytd
2013-04-04 15:07:04 +02:00
Raphael Collet b99398fa29 [IMP] registry: make class Registry inherit from abstract class collections.Mapping
bzr revid: rco@openerp.com-20130404102524-innz9qu824yfds4b
2013-04-04 12:25:24 +02:00
Vo Minh Thu 27ab383508 [FIX] loading: typo.
lp bug: https://launchpad.net/bugs/1162753 fixed

bzr revid: vmt@openerp.com-20130402092914-cqrjxveg66gbpm3s
2013-04-02 11:29:14 +02:00
Raphael Collet 09be864f1d [IMP] replace all tests like 'registry.get(X)' by 'X in registry' where X is non static
bzr revid: rco@openerp.com-20130329140723-dnrl02saky570xg0
2013-03-29 15:07:23 +01:00
Raphael Collet d3657d858f [IMP] registry: add convenience operators ('in' and 'iter') on registry objects
bzr revid: rco@openerp.com-20130329135853-woi26cl2yiofv7h2
2013-03-29 14:58:53 +01:00
Vo Minh Thu 4ed7ec95b7 [MERGE] removed LocalService("workflow"), Logger class, and TEST log level.
bzr revid: vmt@openerp.com-20130327170639-uamgg7shlmtxgpxv
2013-03-27 18:06:39 +01:00
Vo Minh Thu d6ea526e36 [MERGE] openerp.pooler is deprecated.
bzr revid: vmt@openerp.com-20130327164045-ziw4lj50owdvmfbw
2013-03-27 17:40:45 +01:00
Vo Minh Thu 7b8f4fe5ee [REF] tests: use the openerp.tests namespace for test-related logging.
bzr revid: vmt@openerp.com-20130327153843-u62ftp74qv01u1ww
2013-03-27 16:38:43 +01:00
Vo Minh Thu 1e7e2ca753 [REF] no longer use openerp.pooler.
Either use openerp.modules.registry.RegistryManager when the full
new() signature is needed, or use openerp.registry().

Replaced also some pool.get() with pool[] because KeyErrors
are better than AttributeErrors on None.

bzr revid: vmt@openerp.com-20130327111014-2i0hlvpy5y5ku7hm
2013-03-27 12:10:14 +01:00
Vo Minh Thu 684bd35442 [REF] registry: begin to remove openerp.pooler:
- call openerp.modules.registry.RegistryManager instead
- expose openerp.get_pool()

bzr revid: vmt@openerp.com-20130327093125-iqsyvvjm0ej7do14
2013-03-27 10:31:25 +01:00
Vo Minh Thu a4fbd26541 [REF]: use openerp.workflow instead of LocalService("workflow").
bzr revid: vmt@openerp.com-20130326162040-kkq46wrur3pgn6eh
2013-03-26 17:20:40 +01:00
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 b08d7ef6bd [REF] ir.actions.report.xml: register_all do not make sense any more:
auto=True reports are looked up in the database for each rendering, so they do
no have to be in the report registry any longer.
auto=False reports will register themselves but at this point
they can be updated to use the new `parser` XML attribute.

bzr revid: vmt@openerp.com-20130322153955-s6nyux2pyez6c01w
2013-03-22 16:39:55 +01:00
Vo Minh Thu ef127fddc7 [IMP] netsvc: removed unused import.
bzr revid: vmt@openerp.com-20130222145250-qd9v52tu2xt8jyb2
2013-02-22 15:52:50 +01:00
Vo Minh Thu b985c7302f [FIX] openerp namespace: the import hook was still inserting modules in sys.moduls at their shortname.
bzr revid: vmt@openerp.com-20130218164839-2qludhn3znpdftq5
2013-02-18 17:48:39 +01:00
Vo Minh Thu 9f9c9585a1 [REF] Removed support for __terp__.py files and `terp` root elements in XML files.
bzr revid: vmt@openerp.com-20130212152328-flpn1tbz75lhi2m2
2013-02-12 16:23:28 +01:00
Vo Minh Thu 96f7f49b3e [MERGE] Latest bugfixes from 7.0, up to rev 4834.
bzr revid: vmt@openerp.com-20130212104546-v2w5k59egx1fiony
2013-02-12 11:45:46 +01:00
Vo Minh Thu e746cb1654 [FIX] registry: fix a bug where RegistryManager.new() could return an out-of-date registry.
bzr revid: vmt@openerp.com-20130212085311-o53wv7yful39kktd
2013-02-12 09:53:11 +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 e7ce4a4529 [MERGE] from trunk
bzr revid: rco@openerp.com-20121221134259-scc92nby1dn91pe8
2012-12-21 14:42:59 +01:00
Olivier Dony 4fd1bc7b3c [IMP] cron: remove useless pooljobs and schedule_cron_jobs methods
The pooljobs and scheduled_cron_jobs stuff was only used to
delay the processing of cron jobs until after the registry
was fully loaded. However this is already the case because
RegistryManager.new() only sets the flag at the end of the
init step.
The flag was named `registry.cron` but simply meant that the
registry was fully loaded and ready, so it is simpler to
rename it to `registry.ready`.

In multiprocess mode this flag is enterily irrelevant
so there is no need to selectively set it to True or
False. `registry.ready` is simpler.

bzr revid: odo@openerp.com-20121221133751-h4x670vblfr3d09e
2012-12-21 14:37:51 +01:00
Olivier Dony e373ac5aeb [MERGE] *: fix/rationalize db logging to avoid incorrect values during logging
The setting/clearing of the tracking were not done
consistently, causing log messages that appeared
to come from one database while coming from another
one or none at all.

The tracker is now set at the earliest points
of request handling as possible:
- in web, when creating WebRequests (dbname, uid)
- at RPC dispatching in server (uid)
- at cron job acquisition in CronWorker (dbname)
- at Registry acquisition in RegistryManager (dbname)


The tracker is cleared at the very entrance of
the request in the WSGI `application`, ensuring
that no logging is produced with an obsolete
db name. (It cannot be cleared at the end of
the request handling because the werkzeug
wrapper outputs more logging afterwards)

bzr revid: odo@openerp.com-20130301182510-1fqo9o8di0jw95b5
2013-03-01 19:25:10 +01:00
Olivier Dony 9770caedf3 [FIX] registry: another pass of cleanup for registry signaling
Some important points to consider:
 - signaling should be done after any schema alteration (including module [un]installation),
   service registration (e.g. reports)
 - the changes need to be committed to the database *before* signaling, otherwise an
   obvious race condition occurs during reload by other workers
 - any call to restart_pool() must be considered a possible candidate for
   signaling, and the 2 above conditions must be checked

The number of explicit calls was reduced by forcing the signaling at the end of
Registry.new() in case `update_module` was passed as True. In that situation
we always want to signal the changes - so all the redundant signaling calls
can be centralized. We can also assume that the relevant changes have already
been committed at that point, otherwise the registry update would not
have worked in the first place.
This means that there is no need for explicit signaling anymore everytime
`restart_pool` is called with `update_module=True`.

Some missing cr.commit() and explicit signaling calls were added or
moved to the right place. As a reminder: signaling must be done
*after* committing the changes, and usually *after* reloading the
registry on the current worker.

bzr revid: odo@openerp.com-20130301143203-e2csf5pkllwhmwqs
2013-03-01 15:32:03 +01:00
Olivier Dony db81edc287 [FIX] *: fix/rationalize db logging to avoid incorrect values during logging
The setting/clearing of the tracking were not done
consistently, causing log messages that appeared
to come from one database while coming from another
one or none at all.

The tracker is now set at the earliest points
of request handling where we can:
- in web client, when creating WebRequests (dbname, uid)
- at RPC dispatching in server (uid)
- at cron job acquisition in CronWorker (dbname)
- at Registry acquisition in RegistryManager (dbname)


The tracker is cleared at the very entrance of
the request in the WSGI `application`, ensuring
that no logging is produced with an obsolete
db name. (It cannot be cleared at the end of
the request handling because the werkzeug
wrapper outputs more logging afterwards)

bzr revid: odo@openerp.com-20130301120744-jfitcmze2jldecod
2013-03-01 13:07:44 +01:00
Antony Lesuisse 1a5b4160ef [FIX] logging level of pooler loading, number of modules is info, the actual list of modules is debug
bzr revid: al@openerp.com-20130218121441-i8tidklmhafudp4k
2013-02-18 13:14:41 +01:00
Antony Lesuisse 565853b732 [MERGE] trunk
bzr revid: al@openerp.com-20121219030106-i59u10tml3baqvun
bzr revid: al@openerp.com-20121219150107-8l92w2bi510yem45
2012-12-19 16:01:07 +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 9f77d2e2f4 [FIX] orm,registry: properly check m2o FKs during model update + fix some models `auto_init`ed multiple times
The case where no constraint existed at all was not working,
and after fixing it, the ORM started to re-create the same
constraints multiple times for some modules. This was for
models that are split within a module (such as res.users in
base, which is made of several small classes): all the
partial models were going through _auto_init instead
of only the final one - doing useless extra work.
      
Unfortunately establishing the FK happens before the
XML data files are loaded, so a number of FK and
NOT NULL constraints failed to apply due to missing
tables/records. base.sql had to be extended a bit
to cover these cases in a minimalist fashion

bzr revid: odo@openerp.com-20121217214645-av9n003yzterhujw
2012-12-17 22:46:45 +01:00
Christophe Simonis 0c7f17c0ac merge upstream
bzr revid: chs@openerp.com-20121217172614-3z1pstu5th26wuuc
2012-12-17 18:26:14 +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
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