Commit Graph

371 Commits

Author SHA1 Message Date
Florent Xicluna d8b25ca182 [MRG] merge trunk.
bzr revid: florent.xicluna@gmail.com-20120208141358-emgwspa0s58gtsez
2012-02-08 15:13:58 +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 8289a2869e [FIX] remove useless decodes that break on pg9.0
lp bug: https://launchpad.net/bugs/917030 fixed

bzr revid: al@openerp.com-20120208003800-whnxjgw2n2v0ea2i
2012-02-08 01:38:00 +01:00
Vo Minh Thu f54cf18d22 [IMP] logging: re-add the HttpLogHandler class needed in addons (when left unchanged for 6.1).
bzr revid: vmt@openerp.com-20120207214604-lbdrvh66tj71iz7u
2012-02-07 22:46:04 +01:00
Vo Minh Thu 81ee705498 [IMP] logging: use logging.exception() instead of manually formatting the traceback.
bzr revid: vmt@openerp.com-20120202125442-h73uaga3vu2s8upv
2012-02-02 13:54:42 +01:00
Antony Lesuisse 91ef8c1c51 [FIX] review according to xmo :)
bzr revid: al@openerp.com-20120201235604-tr5iq676pzk8bi1m
2012-02-02 00:56:04 +01:00
Antony Lesuisse 1a62602c86 [MERGE] trunk
bzr revid: al@openerp.com-20120131211744-whzzo0dh6w1kptng
2012-01-31 22:17:44 +01:00
Olivier Dony b281791ff5 [IMP] db dump: correct reference URL in comments
bzr revid: odo@openerp.com-20120131113642-z6z4vs11fcwkyaqq
2012-01-31 12:36:42 +01:00
Olivier Dony f11e1de5eb [FIX] db dump: report errors due to missing password + pass PGPASSWORD even on Unix
Even on Unix systems the PGPASSWORD env var
is necessary when Postgres is configured to
deny unix socket connections or to require
a password anyway. This avoids asking admins
to manually create a ~/.pgpass file in order
to use the dump/restore tools.
Also did some cleanup to ensure the PGPASSWORD
var is removed from the environment as soon
as the operation is done.

lp bug: https://launchpad.net/bugs/790164 fixed
lp bug: https://launchpad.net/bugs/919100 fixed

bzr revid: odo@openerp.com-20120131110849-tji6ipjovxc9oi4v
2012-01-31 12:08:49 +01:00
Vo Minh Thu 97b75ce3f5 [IMP] openerp.service.http_server: unneeded indirection for logging.
bzr revid: vmt@openerp.com-20120125125151-cxrsosvx9hefikeq
2012-01-25 13:51:51 +01:00
Vo Minh Thu f057f2afa5 [IMP] openerp.loglevels: removed calls to openerp.loglevels.Logger().
bzr revid: vmt@openerp.com-20120124173017-c66z3kq11wmbrrke
2012-01-24 18:30:17 +01:00
Vo Minh Thu cc081b5482 [IMP] openerp.service: remove the so called `uniform log handling` of the HttpLogHandler class.
bzr revid: vmt@openerp.com-20120124160231-1ig7utu5brojnw0f
2012-01-24 17:02:31 +01:00
Vo Minh Thu ada52a1beb [IMP] openerp.service: _logger with fully qualified module name.
bzr revid: vmt@openerp.com-20120124150750-0bn7nagjx9k3bi6j
2012-01-24 16:07:50 +01:00
Florent Xicluna e7838dfbc4 [REF] fix weird indentation, not multiple of four.
bzr revid: florent.xicluna@gmail.com-20120119191756-niny262vp1nvmpp8
2012-01-19 20:17:56 +01:00
Vo Minh Thu 418739cf3e [MERGE] cleaned some imports, removed some code for older python versions.
bzr revid: vmt@openerp.com-20120118160305-ucennaoqehjuut1z
2012-01-18 17:03:05 +01:00
nicolas.bessi@camptocamp.com 8d826cc07d [IMP] database template in commande line, you can now use --db_template=my_template, default is template0
bzr revid: nicolas.bessi@camptocamp.com-20120117164940-i3g1zcu49x0g60t5
2012-01-17 17:49:40 +01:00
Florent Xicluna 40c1de87d8 [REF] remove unused import, always import literal_eval from tools.safe_eval.
bzr revid: florent.xicluna@gmail.com-20120115214214-0rjwn80choc9g0fs
2012-01-15 22:42:14 +01:00
niv-openerp 4d3387c54c [imp] added service in object_service to be able to call a method specifying kwargs
bzr revid: nicolas.vanhoren@openerp.com-20120105160351-0xy697sjeihplx6v
2012-01-05 17:03:51 +01:00
Naresh (OpenERP) 2fb2cd708d [FIX]:exception handling in netrpc
lp bug: https://launchpad.net/bugs/869936 fixed

bzr revid: nch@tinyerp.com-20111215064602-m1x9fflb20l5kw5a
2011-12-15 12:16:02 +05:30
Numerigraphe - Lionel Sausin a2f4f2669b [IMP] Added missing vim mode lines
lp bug: https://launchpad.net/bugs/524279 fixed

bzr revid: ls@numerigraphe.fr-20111122085848-1atcrcw8e64altcp
2011-11-22 09:58:48 +01:00
Olivier Dony 97ba7be42d [IMP] res.users,web_services: new authenticate() API method for testing credentials
Provides a way to login for a given environment, passing
      user agent environment parameters.
      Currently used to initialize the web.base.url config
      parameter based on the web host whenever the admin user
      logs in.

bzr revid: odo@openerp.com-20111013104750-y0natm9v3wapn10l
2011-10-13 12:47:50 +02:00
Vo Minh Thu b88209b499 [IMP] xmlrpc: version() moved to common, still available on /openerp/xmlrpc.
bzr revid: vmt@openerp.com-20110930135942-ytlxz7vlwl84myg0
2011-09-30 15:59:42 +02:00
Vo Minh Thu 22291970ba [FIX] netrpc: forgot the removal of auth in the netrpc case in
the rafactoring that occured on revno 3669
(revision-id: al@openerp.com-20110928220539-5q8eujk1l0q43d4x).

bzr revid: vmt@openerp.com-20110929071713-e29kf3ipc6lzctll
2011-09-29 09:17:13 +02:00
Olivier Dony b971680a53 [MERGE] multi-process/multi-threaded ir.cron implementation
bzr revid: odo@openerp.com-20110929002157-31pgkmqc96by15ak
2011-09-29 02:21:57 +02:00
Antony Lesuisse c71979e6ae [MERGE] /openerp/6.1 xmlrpc compliant
bzr revid: al@openerp.com-20110928220539-5q8eujk1l0q43d4x
2011-09-29 00:05:39 +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
Vo Minh Thu 08cfadaff0 [IMP] xmlrpc: somewhat streamlined the exception types/
exception handling code.
OpenERPDispatcherException which was simply wrapping an exception together with
an exc_info is removed.

bzr revid: vmt@openerp.com-20110927102246-87ibftawukc2d8lc
2011-09-27 12:22:46 +02:00
Vo Minh Thu e8dc0edbaa [IMP] xmlrpc: use some commented constant symobls instead of raw numbers.
bzr revid: vmt@openerp.com-20110927081902-4zu2mri9zx8j27tb
2011-09-27 10:19:02 +02:00
Vo Minh Thu 157580b8e8 [IMP] xmlrpc: use proper exception type to map to xmlrpc error codes.
bzr revid: vmt@openerp.com-20110926151403-fhx4ph22tua2s3st
2011-09-26 17:14:03 +02:00
Vo Minh Thu bbd10d96c0 [IMP] exceptions: replace ExceptionNoTb with AccessDenied.
bzr revid: vmt@openerp.com-20110926125358-8yy4tvnemfna72u7
2011-09-26 14:53:58 +02:00
Vo Minh Thu f16e2ef10a [IMP] websrv_lib: removed top-level http handlers.
We have to keep for now the sub-handler code because webdav uses it.

bzr revid: vmt@openerp.com-20110925170827-x2xvdz5pzupnu28k
2011-09-25 19:08:27 +02:00
Vo Minh Thu a7a826b2df [IMP] netsvc: removed unused auth param.
The auth param is an auth proxy/provider. The idea is that an auth proxy
is associated to some HTTP request handler. The handler can then use it
when necessary, depending on the accessed resource.
As of now, it is only used by the webdav module. But really, the caldav
module accesses the proxy directly on the handler.
Currently in web_services, authentication is simply done via
security.check().

bzr revid: vmt@openerp.com-20110925152318-i3jvimumm51e2lu4
2011-09-25 17:23:18 +02:00
Vo Minh Thu 007da7d0c7 [FIX] openerp.service: call wsgi.stop_server upon server shutdown.
bzr revid: vmt@openerp.com-20110925150232-qidzjypddp22el1f
2011-09-25 17:02:32 +02:00
Olivier Dony da705a6b55 [FIX] rpc: honor *_interface options + log it
bzr revid: odo@openerp.com-20110925014243-0q1o67twburpga0z
2011-09-25 03:42:43 +02:00
Antony Lesuisse 404e545365 [FIX] revert 3651 al@openerp.com-20110925003322-yioqd1cdlffvr6uc http static is used by webdav
bzr revid: al@openerp.com-20110925012039-4hmqj2v5aaxxtxwy
2011-09-25 03:20:39 +02:00
Antony Lesuisse eda28246ee [REM] http static crap (you may use web controllers or /static dir)
bzr revid: al@openerp.com-20110925003322-yioqd1cdlffvr6uc
2011-09-25 02:33:22 +02:00
Antony Lesuisse b91d70a42d [MERGE] trunk
bzr revid: al@openerp.com-20110925000038-qwfvcrmndstygt2d
2011-09-25 02:00:38 +02:00
Vo Minh Thu 58ebd45efe [IMP] openerp.service: import at the top.
bzr revid: vmt@openerp.com-20110924163358-svx1yjuwdybxxr6k
2011-09-24 18:33:58 +02:00
Vo Minh Thu cc26f2b5d2 [IMP] tests: added a simple test case to create a database via XML-RPC.
The test setup starts an OpenERP server similarly to the
openerp-server script. For this to be possible, some of
its code is moved to openerp.services.

bzr revid: vmt@openerp.com-20110923133408-qqf4i5l86pkk7xn5
2011-09-23 15:34:08 +02:00
Vo Minh Thu 77fbcb3c79 [FIX] websrv_lib: the auth provider was instanciated once and
the auth proxy was instanciated multiple times (once per handler instcance).
The previous refactoring merged the proxy and the provider in one class which
once instanciated once. Now it is instanciated once per handler, which is
better.

bzr revid: vmt@openerp.com-20110909122856-29uhsjfe193fqdi8
2011-09-09 14:28:56 +02:00
Vo Minh Thu e643ffcc32 [REF] websrv_lib:
- grouped together the concept of auth proxy and auth provider
- removed the sec_realms dictionary: it was redundant as the
auth proxy was set (in one of the implementation, not all) on
the handler by setupAuth. Now the auth proxy is always set on
the handler.
- reg_http_service accepts the argument of the HTTPDir
constructor.

bzr revid: vmt@openerp.com-20110908123818-suc53zebgv9kcy3c
2011-09-08 14:38:18 +02:00
Vo Minh Thu 1cd7804374 [REF] websrv_lib: moved vdirs mangement code to websrv_lib
(from service.http_server). The vdirs list is now a global variable, containing
both secure-only and non-necessarily-secure handlers. This makes it possible
to register handlers without being too tied to the multi http request handler.
The goal is obviously to make it possible to serve those handlers by other
means than the multi handler.

bzr revid: vmt@openerp.com-20110907154217-f30nrzgvw45ga2q8
2011-09-07 17:42:17 +02:00
Vo Minh Thu 9aeba4fece [REF] netsvc.OpenERPDispatcher: that class is gone, replaced by a simple function.
bzr revid: vmt@openerp.com-20110902141232-umpscnz2cot468hy
2011-09-02 16:12:32 +02:00
Vo Minh Thu 3c8571ead0 [IMP] wsgi: added new (still to be refined) routes for XMLRPC dispatching.
bzr revid: vmt@openerp.com-20110901130450-ub41ey4s0060vucg
2011-09-01 15:04:50 +02:00
Vo Minh Thu efd281a21f [MERGE] merged trunk.
bzr revid: vmt@openerp.com-20110901130339-0epw03nlkwo29125
2011-09-01 15:03:39 +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
Vo Minh Thu 848838526e [MERGE] merged trunk.
bzr revid: vmt@openerp.com-20110823142644-3a8pjbi7geo9udx7
2011-08-23 16:26:44 +02:00
Vo Minh Thu 7226046707 [MERGE] some cleaning in module loading code, especially logging.
bzr revid: vmt@openerp.com-20110809120057-h5x68x1gd1ykeu36
2011-08-09 14:00:57 +02:00
Xavier Morel 1e904fe6ad [IMP] db creation: cleanup logging and exception traceback reification
traceback.format_exc was introduced in Python 2.5, no need to muck around with StringIO and print_exc to get a traceback as a string

bzr revid: xmo@openerp.com-20110801085446-8t4oiiccinf9frvs
2011-08-01 10:54:46 +02:00
Xavier Morel 92a9836bbb [IMP] use dict.update instead of __setitem__ sequences
bzr revid: xmo@openerp.com-20110801073050-xr37h37sc8w8xhi5
2011-08-01 09:30:50 +02:00
Xavier Morel 923e4da38c [IMP] db-creation thread code: no need for a class with just a __call__ method, just provide a function
bzr revid: xmo@openerp.com-20110801072529-92okkttbl5h041q9
2011-08-01 09:25:29 +02:00
Vo Minh Thu ee12a9c9c5 [REF] netsvc: comments (kind of notes to self).
bzr revid: vmt@openerp.com-20110729145609-cbzlre0rsfxld3xq
2011-07-29 16:56:09 +02:00
Vo Minh Thu c4d7dde645 [REF] netsvc: object_proxy is no longer in netsvc.
bzr revid: vmt@openerp.com-20110729083824-onx5kklbgzb9pok2
2011-07-29 10:38:24 +02:00
Vo Minh Thu 5f3f9e820e [REF] netsvc: Service._groups and joinGroup are unused.
bzr revid: vmt@openerp.com-20110728131034-q5wpiwqh7f860l5s
2011-07-28 15:10:34 +02:00
Vo Minh Thu d8db9e6b1d [REF] web_services: removed unused new_dispatch method.
bzr revid: vmt@openerp.com-20110728120754-deq2a4jiyhne1ynv
2011-07-28 14:07:54 +02:00
Vo Minh Thu 5c24a193f7 [REF] web_services: removed unused class.
bzr revid: vmt@openerp.com-20110728120204-ezzhvkbvlw134n2b
2011-07-28 14:02:04 +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
P. Christeas 7c8665bb69 [MERGE] docstrings improvements and preparation for api-doc structure
bzr revid: odo@openerp.com-20110701231956-93zu7xtibpo06eqm
2011-07-02 01:19:56 +02:00
P. Christeas 8cfb7dae73 API docs: docstrings, module titles
bzr revid: xrg@linux.gr-20110623090457-y5o7pd5y1ltpo9t9
2011-06-23 12:04:57 +03:00
Xavier Morel 012c93ae40 [IMP] OSX handling of socket shutdown in TinySocketClientThread
When the client closes its socket, on OSX it closes the server one as well, leading to an errno.ENOTCONN when trying to shut it down.

Also use the unified socket-closing function to handle tinysocket

bzr revid: xmo@openerp.com-20110616102624-vixxow6twsx7j84s
2011-06-16 12:26:24 +02:00
Vo Minh Thu f2770c9ac4 [FIX] netrpc_server: close as soon as possible the socket, and do it after a communication-level exception.
lp bug: https://launchpad.net/bugs/785009 fixed

bzr revid: vmt@openerp.com-20110606074856-e726j4klc5ljiq5w
2011-06-06 09:48:56 +02:00
Vo Minh Thu 4b3aa9c764 [FIX] modules/loading: revert a change where db.initialize was removed:
- it should be removed
- but some code will test if the ir_module_module table exists
- and will force the demo data.

bzr revid: vmt@openerp.com-20110601113353-hdmyl4is9poss8hh
2011-06-01 13:33:53 +02:00
Vo Minh Thu 2f6dff7690 [MERGE] moved around some code (preparing for some refactoring) (large diff).
bzr revid: vmt@openerp.com-20110525160607-45pq13910rduijkk
2011-05-25 18:06:07 +02:00
Vo Minh Thu 261cb1079d [REF] ir_values:
- context=None instead of context={}
- removed common.ir_{set,get,del} from xmlrpc as it is not used anymore.

bzr revid: vmt@openerp.com-20110518154832-42f1k6ii093r12vs
2011-05-18 17:48:32 +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 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 0770057935 [REF] explicit service objects instanciation.
bzr revid: vmt@openerp.com-20110507112129-hfrly9easfby9hns
2011-05-07 13:21:29 +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
Vo Minh Thu 0e1186dd3d [REF] openerp.pooler/openerp.sql_db: cleaner dependencies:
- openerp.pooler no longer provides get_db_only, which is a provided by sql_db
- openerp.sql_db does not rely anymore on netsvc, which is goog as it was
making a circular import. The downside is that db_close callers have to clean
also the Agent themselves.

bzr revid: vmt@openerp.com-20110420141407-au0oanwjc0t15vy5
2011-04-20 16:14:07 +02:00
Vo Minh Thu 342f2047cf [REF] openerp-server: better imports.
bzr revid: vmt@openerp.com-20110418155733-gt8shgr0yilo20mw
2011-04-18 17:57:33 +02:00
Vo Minh Thu f8572e5c60 [IMP] openerp python module.
- Some logging code moved from netsvc.py to loglevels.py
- Changed imports to use the new openerp module
- config and netsvc initialization calls move to openerp-server.py
- Moved openerp-server.py outside the old bin directory
- Some imports in tools moved inside the methods to break mutual-dependencies

bzr revid: vmt@openerp.com-20110207125723-ooee7d7ng5elmkso
2011-02-07 13:57:23 +01:00