Commit Graph

403 Commits

Author SHA1 Message Date
Christophe Matthieu c36bfe173e [MERGE] from trunk
bzr revid: chm@openerp.com-20130828161130-641xsmbr8xm53xjx
2013-08-28 18:11:30 +02:00
Christophe Simonis 208b697239 [MERGE] forward port of branch saas-1 up to revid 4899 chs@openerp.com-20130821094758-1ae0d1ml5obufzxv
bzr revid: odo@openerp.com-20130820160346-qcdy4kavgm5cb9t6
bzr revid: chs@openerp.com-20130821103139-zqqbrt8dq6iixrny
2013-08-21 12:31:39 +02:00
Olivier Dony fbd0758cb5 [MERGE] Forward-port of latest 7.0 bugfixes, up to rev. 5054 rev-id: odo@openerp.com-20130820091157-e5brwlxuhujf8rrd
bzr revid: chs@openerp.com-20130724085026-525l9apggc9yzx0h
bzr revid: odo@openerp.com-20130730140644-1xih0as5jsks4pub
bzr revid: dle@openerp.com-20130801130723-khgwjkglgsdn34fj
bzr revid: odo@openerp.com-20130820091638-jpbcmh653bpa29em
2013-08-20 11:16:38 +02:00
Christophe Simonis e78a83ac03 [FIX] browse records do not prefetch fields with groups
bzr revid: chs@openerp.com-20130819174930-xjzmrhuuuuwnbdg0
2013-08-19 19:49:30 +02:00
Christophe Simonis 815fc8f84a [FIX] browse records do not try to prefetch fields user can't read
bzr revid: chs@openerp.com-20130819164622-7cre7yqpvlyzsslj
2013-08-19 18:46:22 +02:00
Thibault Delavallée e3175e482f [TESTS] tools: mail: added some tests + some cleaning in tests
bzr revid: tde@openerp.com-20130808132258-01sv0w1hrgtdyogq
2013-08-08 15:22:58 +02:00
Thibault Delavallée 577f56497b [MERGE] Sync with trunk
bzr revid: tde@openerp.com-20130808083426-46cvo5e1g3x8nvgs
2013-08-08 10:34:26 +02:00
Christophe Matthieu f6172723d0 [MERGE] from trunk
bzr revid: chm@openerp.com-20130801124635-yj8xny76sl5ea0r2
2013-08-01 14:46:35 +02:00
Vo Minh Thu 07f5e9a4d6 [REM] workflows: removed temporary run.py script from the tests.
bzr revid: vmt@openerp.com-20130731151104-mxo8qu5x12krto0h
2013-07-31 17:11:04 +02:00
Martin Trigaux 3393aa645c [FIX] res_currency: update linked tests
bzr revid: mat@openerp.com-20130731111054-g5p094izprzok3eo
2013-07-31 13:10:54 +02:00
Vo Minh Thu fc435af428 [FIX] workflows: fixed the non-deterministic workflow K, added workflow L in tests.
bzr revid: vmt@openerp.com-20130726103600-t58rshix01q7vpot
2013-07-26 12:36:00 +02:00
Vo Minh Thu 68ff38763a [ADD] workflows: some split_mode tests.
I am not sure if the Workflow K is determinist though
so it could maybe end up in activity c instead of b
(and thus fail the tests).

bzr revid: vmt@openerp.com-20130725143056-p6oic1m9jjke9j8r
2013-07-25 16:30:56 +02:00
Vo Minh Thu 64ddf5f264 [ADD] workflows: more tests.
bzr revid: vmt@openerp.com-20130725104327-l7onjhipi6fdnrj6
2013-07-25 12:43:27 +02:00
Vo Minh Thu ae01b6ab21 [ADD] workflows: added some tests.
bzr revid: vmt@openerp.com-20130725094246-4v2p0sgzocnt5vwf
2013-07-25 11:42:46 +02:00
Vo Minh Thu 0568f5c653 [ADD] test_workflow: added some tests for the workflows.
bzr revid: vmt@openerp.com-20130722151740-mucw6i5vn38blh66
2013-07-22 17:17:40 +02:00
Thibault Delavallée 4f7afae100 [MERGE] Sync with trunk
bzr revid: tde@openerp.com-20130717074450-puhtirdoqswf55pl
2013-07-17 09:44:50 +02:00
Christophe Simonis c5bd4b6d8d [FIX] view validation tests
bzr revid: chs@openerp.com-20130625191259-wplffcvrgmlk6hmz
2013-06-25 21:12:59 +02:00
Christophe Simonis f169169377 [FIX] view validation tests
bzr revid: chs@openerp.com-20130625170118-dab54jupbexmqoq5
2013-06-25 19:01:18 +02:00
Antony Lesuisse f4332b9b60 [MERGE] trunk
bzr revid: al@openerp.com-20130625162755-d6552p98m5jiw941
2013-06-25 18:27:55 +02:00
Antony Lesuisse 4f76c69b76 [MERGE] trunk
bzr revid: al@openerp.com-20130620151512-p5ysov21an6ogbtv
2013-06-20 17:15:12 +02:00
niv-openerp 2bc965ba9e Added tests for search_read
bzr revid: nicolas.vanhoren@openerp.com-20130621095504-cwwbr716apnh7680
2013-06-21 11:55:04 +02:00
Thibault Delavallée 1d5068b63e [FORWARD] Forward port of server 7.0 until revision 4988
bzr revid: tde@openerp.com-20130528102733-bsszxp6nvy8yws3t
2013-05-28 12:27:33 +02:00
Olivier Dony e608027256 [FIX] openerp/tests/test_mail.py marked executable as it should
lp bug: https://launchpad.net/bugs/993414 fixed

bzr revid: odo@openerp.com-20130517102933-u1u4n2ad5jxnndw5
2013-05-17 12:29:33 +02:00
Xavier Morel 2e8c9a48e1 [IMP] move testing of xml conversion alongside test data to ensure tests only run if module on addons_path/loaded
bzr revid: xmo@openerp.com-20130429122317-yzv4prie9hc7f7l6
2013-04-29 14:23:17 +02:00
Xavier Morel 45bb6ec7f1 [ADD] file field type in xml_convert, tests
bzr revid: xmo@openerp.com-20130429112459-ol1ayn2z34j32r54
2013-04-29 13:24:59 +02:00
Thibault Delavallée ccbb8e09a6 [REF] html_email_clean: refactored the algorithm to clean it, specifically about truncature. Now add classes to node when not removing them, to be managed by the web client.
bzr revid: tde@openerp.com-20130425104301-e7mv9o4pcjx6k2cn
2013-04-25 12:43:01 +02:00
Xavier Morel 4923d1b82d [MOVE] ir.ui.view tests inside base tests
bzr revid: xmo@openerp.com-20130424154310-vdygcckrz6jm578p
2013-04-24 17:43:10 +02:00
Xavier Morel fb492d98ba [ADD] behavior and tests for default & ancestors, fallback handling in read_combined
bzr revid: xmo@openerp.com-20130424130907-6d6lkrkrgqv0hsfq
2013-04-24 15:09:07 +02:00
Xavier Morel 8715746672 [IMP] move stuff around, try building flatter top-down API with read_combined as utility 'do all the things' hook
bzr revid: xmo@openerp.com-20130424095114-4nw0nfuxzx4n1ltv
2013-04-24 11:51:14 +02:00
Xavier Morel 3ac47a587e [IMP] remove deprecated explicit setting of type on views
bzr revid: xmo@openerp.com-20130423154456-wt4aeb6yr963jbye
2013-04-23 17:44:56 +02:00
Xavier Morel d40ec67c2d [IMP] move application of view inheritance outside of fields_view_get and into View.
change get_root_ancestor to return just the id of the ancestor view

bzr revid: xmo@openerp.com-20130423150844-eubxue9vbtc6jhof
2013-04-23 17:08:44 +02:00
Thibault Delavallée f97bd8bd63 [REF] html_email_clean: refactoring of the algorithm, now better taking into account hotmail / msoffice emails. Added tests.
bzr revid: tde@openerp.com-20130423144903-he22jz9zs6nc6dsd
2013-04-23 16:49:03 +02:00
Xavier Morel 1dac8a7a34 [ADD] tests for *not* finding root views
bzr revid: xmo@openerp.com-20130423133617-c4eszsf09b32hzl1
2013-04-23 15:36:17 +02:00
Xavier Morel dd43214fe1 [ADD] tests to get_root_ancestor
use a default view_type of form in the tests, because whatever

bzr revid: xmo@openerp.com-20130423132523-upbgbt2a3r7cgs08
2013-04-23 15:25:23 +02:00
Xavier Morel 480bf6a99b [FIX] temporarily remove _init flag of pooler during view inheritance test
Breaks between in-loading (openerp) and unit test (oe), behavior is
crap and can't be arsed to create a dummy ir.model.data for that.

bzr revid: xmo@openerp.com-20130422140116-g8mqzvahbv2ag956
2013-04-22 16:01:16 +02:00
Xavier Morel edf1f23a6e [ADD] depth-first iterator on views, refactor apply_view_inheritance to use it
bzr revid: xmo@openerp.com-20130422125000-pg60ovrxejegenka
2013-04-22 14:50:00 +02:00
Xavier Morel bad87b4245 [ADD] some tests for get_inheriting_view_arch
Tests are way incomplete: no test for partial loading or groups filtering

bzr revid: xmo@openerp.com-20130422122812-c1d385zwau9wlmci
2013-04-22 14:28:12 +02:00
Xavier Morel c9a6e74bf4 [IMP] add tests for locate_node
bzr revid: xmo@openerp.com-20130422091014-qbd4jun4n9u4402x
2013-04-22 11:10: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
Vo Minh Thu a51b6912bd [FIX] safe_eval: better exception handling:
- the re-raising of exceptions ignored the "legal" exceptions
(the one used to early abort RPC calls and generate pop-ups)
- re-raising the exception was attempting to re-use the original
exception type but it does not always take only one argument
so it was breaking.

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

bzr revid: vmt@openerp.com-20130320132238-qzo3jptww59ndlch
2013-03-20 14:22:38 +01:00
Vo Minh Thu 62579b2094 [FIX] Previous `[iMP]` was broken.
bzr revid: vmt@openerp.com-20130225105523-12pnud4oa41tx3cx
2013-02-25 11:55:23 +01:00
Fabien Pinckaers b831c5aa15 [iMP] error message simplified for required values
bzr revid: fp@openerp.com-20130224135248-wdxg8d3fi79lp88z
2013-02-24 14:52:48 +01:00
Antonin Bourguignon 13afc3b9e2 [IMP] use another xml_menu_id that leads directly to the tests wizard
bzr revid: abo@openerp.com-20130220145613-2tnid02oatds2gmy
2013-02-20 15:56:13 +01:00
Antonin Bourguignon f929ebc73b [MERGE] trunk
bzr revid: abo@openerp.com-20130213105620-xyez3q7ddgc0x5x8
2013-02-13 11:56:20 +01:00
Antonin Bourguignon ff80a156c2 [IMP] use a better xml id for the example
bzr revid: abo@openerp.com-20130212160302-6nty4c18wsiw62d4
2013-02-12 17:03:02 +01:00
Raphael Collet e76befd6c6 [MERGE] trunk-service-thu (remove the class openerp.netsvc.ExportService)
bzr revid: rco@openerp.com-20130212154230-y54s2rbetllwnh4q
2013-02-12 16:42:30 +01:00
Antonin Bourguignon fbb51ee106 [MERGE] trunk
bzr revid: abo@openerp.com-20130212125650-3r8lsai6p5c8ls2h
2013-02-12 13:56:50 +01:00
Xavier Morel 4a9d82621e [IMP] don't log from import when converting psycopg exceptions to output messages
add conversion for unique constraints, test behavior on unique constraint failure

bzr revid: xmo@openerp.com-20130211143647-l16ssw9z73stbgyc
2013-02-11 15:36:47 +01:00
Anand Patel (OpenERP) 8f91937bab [IMP]: Improve test case
bzr revid: pan@tinyerp.com-20130204125642-fyf2r3uubk16md4t
2013-02-04 18:26:42 +05:30
Antonin Bourguignon 195be49479 [IMP] add a new test for the new exception type
bzr revid: abo@openerp.com-20130201171742-axfcg7y99uxpersw
2013-02-01 18:17:42 +01:00
Antonin Bourguignon 8d5340a27d [IMP] fix a typo, even if it doesn't matter
(odo would probably say something like 'stop acting nitpicky !' ;))

bzr revid: abo@openerp.com-20130201165015-l3dtvil3u59kqzf7
2013-02-01 17:50:15 +01:00
Vo Minh Thu ff31ff5ca9 [REF] tests: removed the temporary import for test_xmlrpc.
bzr revid: vmt@openerp.com-20130201161553-0cqsnv9l7962wwls
2013-02-01 17:15:53 +01:00
Vo Minh Thu b303bfe5a4 [REF] service: A new openerp.service.rpc decorator is provided to replace the ExportService class.
bzr revid: vmt@openerp.com-20130131131051-5189susswxlshp29
2013-01-31 14:10:51 +01:00
Vo Minh Thu 19b0315f68 [REF] model service: removed the unneeded object_service class.
bzr revid: vmt@openerp.com-20130130113646-pviw5d6gnohk7wrb
2013-01-30 12:36:46 +01:00
Christophe Matthieu 21c5425d89 [IMP] mail_sanitize: simplification of the regular expression
bzr revid: chm@openerp.com-20130102162544-jfwdfqx2ruf0x1q2
2013-01-02 17:25:44 +01:00
Christophe Matthieu 6a07b69889 [IMP] html_sanitize: test with assertIn
bzr revid: chm@openerp.com-20130102161458-4pvpvfb1shmt0sjy
2013-01-02 17:14:58 +01:00
Christophe Matthieu a4e7fa97f4 [IMP] mail sanitize: add special email address for escape in the sanitizer
bzr revid: chm@openerp.com-20130102090040-yh0vdv8b3mtwoebh
2013-01-02 10:00:40 +01:00
Christophe Matthieu 71a92f46e4 [FIX] tools: html_sanitize
bzr revid: chm@openerp.com-20121231154451-0guqjid92rfndghp
2012-12-31 16:44:51 +01:00
Thibault Delavallée be5118c704 [DOC] Added some comments. Updated failure message. Added a logging message when not capable of parsing.
bzr revid: tde@openerp.com-20121226164354-tjquf1zdyr90tl5e
2012-12-26 17:43:54 +01:00
Thibault Delavallée d7185be38c [IMP] html_sanitize: now uses the builtin cleaner of lxml.html. We also allows style attribute; the cleaner ensures no javascript or malicious code goes through those attributes. Updated and added tests for the sanitizer, especially about malicious code, and EDI-like html code.
bzr revid: tde@openerp.com-20121226162505-8rq060p375z1k9il
2012-12-26 17:25:05 +01:00
Christophe Matthieu db028dc09a [MERGE] tools mail: Return the initial variable if is false or if is not an instance of basestring. Remove encoding attribute in html tags.
bzr revid: chm@openerp.com-20121221083527-py3wr2syz5d8igv8
2012-12-21 09:35:27 +01:00
Antony Lesuisse 549c011893 [MERGE] turnk
bzr revid: al@openerp.com-20121220020708-ioiaoz58ncgw5wg7
2012-12-20 03:07:08 +01:00
Christophe Matthieu bf11573436 [IMP] tools mail: encoding : add test for removing encoding attribute
bzr revid: chm@openerp.com-20121219143912-os160iv0q0jeyhld
2012-12-19 15:39:12 +01:00
Christophe Matthieu a31af13a3e [IMP] tools mail: add test message with xml and doctype tags don't crash
bzr revid: chm@openerp.com-20121219111853-zj16hdg7ujakksqt
2012-12-19 12:18:53 +01:00
Cecile Tonglet 5f0070dcb6 [FIX] Remove unused imports and fix some imports that doesn't use the new namespace
bzr revid: cto@openerp.com-20121217143029-e9ki4ftwihq7pdme
2012-12-17 15:30:29 +01:00
Raphael Collet eecc7de437 [MERGE] trunk-acl-thu (check read/write access restrictions on fields with a groups attribute)
bzr revid: rco@openerp.com-20121217101528-nt5hsjvvodaap57m
2012-12-17 11:15:28 +01:00
Antony Lesuisse 9568552636 revert test change will be moved to an other branch
bzr revid: al@openerp.com-20121216193932-foluon7b5bqqvrib
2012-12-16 20:39:32 +01:00
Antony Lesuisse 70aa2c995a filestore testcase and fix bugs
bzr revid: al@openerp.com-20121216190317-xoz0jij2cfk0c2zk
2012-12-16 20:03:17 +01:00
Antony Lesuisse 2569587c90 Simplify openerp testing, deprecated redondant test declaration, we feed all
tests.* modules to unittest2.TestLoader.loadTestsFromModule(module)

bzr revid: al@openerp.com-20121216173856-euntlfi80uzutkp0
2012-12-16 18:38:56 +01:00
Vo Minh Thu eb0fcc35d2 [FIX] check_field_access_rights: ignore nonexisting fields
It seems name_alias is requested but does not exist.

bzr revid: vmt@openerp.com-20121212151509-22494edob4e3fqaf
2012-12-12 16:15:09 +01:00
Vo Minh Thu 1a4fd71880 [FIX] test_fields: _all_columns must be modified similarly to _columns.
(Because of the newly added method check_field_access_rights().)

bzr revid: vmt@openerp.com-20121212134755-ykfdykqepwzti5uf
2012-12-12 14:47:55 +01:00
Vo Minh Thu 9d2afcae3f [IMP] orm: check groups-based access rights on model fields in read() and write().
The commented-out tests present in test_acl.py now pass.
Other tests now fail :-(.

bzr revid: vmt@openerp.com-20121212113647-11y3buulifg6tyhj
2012-12-12 12:36:47 +01:00
Christophe Simonis ea542472c9 [FIX] res.partner: column "address" does not exists anymore.
bzr revid: chs@openerp.com-20121211184624-b7v3ffn0jsoa1jbq
2012-12-11 19:46:24 +01:00
Vo Minh Thu 055f46f290 [IMP] tests: add test_acl to the openerp.tests suite.
bzr revid: vmt@openerp.com-20121211122844-6y060gex2lbq76hp
2012-12-11 13:28:44 +01:00
Thibault Delavallée 50cf6d4008 [CLEAN] Query: cleaned a bit the code. All joins now goes through the same method, either implicit or explicit. Will have to be upgraded in future versions, but at least this is a bit centralized. Updated ORM accordingly. Updated tests. Added a get_alias_from_query method in expression that find the table and the alias from a 'full alias' statement.
bzr revid: tde@openerp.com-20121207154204-mx036lpj3vdclu77
2012-12-07 16:42:04 +01:00
Thibault Delavallée efc6e78d25 [IMP] [MOV] Moved test_osv and test_translate from unchecked test directory to tests, to be now effectively run. Updated test_osv to matche the new alias coding style.
bzr revid: tde@openerp.com-20121207142931-6ll5yduitdk3ijes
2012-12-07 15:29:31 +01:00
Thibault Delavallée 9e6c2805ab [REF] [IMP] expression.parse: refactored the main parsing loop, now using source and result stacks. Leaf elements are encapsulated into a specific object, allowing to delegate the join condition formation and aliases generation, as well as working_table management to them. The main parsing loop is now a loop taking a leaf, doing one action on it, and putting the result back to be analyzed or in the results. This allows to avoid having while loops inside a main while loop with some weird corner effects.
bzr revid: tde@openerp.com-20121204142650-gkhmjdeu5upi25kp
2012-12-04 15:26:50 +01:00
Fabien Meghazi 69a09cc2fb [FIX] Ensure timzone is unset before testing
bzr revid: fme@openerp.com-20121128174318-wg0oygtj3eipozp2
2012-11-28 18:43:18 +01:00
Christophe Matthieu 50f09660fb [FIX] tools mail: html_email_clean return False (standard OpenERP) if the param is False
bzr revid: chm@openerp.com-20121120134001-ivw9dqxha2du70o6
2012-11-20 14:40:01 +01:00
Christophe Matthieu ceefb58670 [IMP] tools mail: remove one line test (double)
bzr revid: chm@openerp.com-20121120100225-it12j6qgxjn3ilbg
2012-11-20 11:02:25 +01:00
Christophe Matthieu f8a44b2bac [FIX] tools.mail: html_email_clean test type and value of empty value
bzr revid: chm@openerp.com-20121119152615-sazfnlc5uwiw0ut9
2012-11-19 16:26:15 +01:00
Christophe Matthieu a4b831e3ed [FIX] tools.mail: html_email_clean test type of empty value
bzr revid: chm@openerp.com-20121119152446-w1z1vuhfk631h0ko
2012-11-19 16:24:46 +01:00
Christophe Matthieu b4dc178588 [IMP] tools.mail: add a test for html_email_clean function, if empty string
bzr revid: chm@openerp.com-20121119151739-vcofz0abk7i71b3l
2012-11-19 16:17:39 +01:00
Vo Minh Thu 35ec3e6d5b [IMP] test_limits/test_uninstall: added access rules.
bzr revid: vmt@openerp.com-20121116131439-y14dekyogidxymof
2012-11-16 14:14:39 +01:00
Vo Minh Thu 8846c8e67b [IMP] test_exceptions/test_impex: added access rules.
bzr revid: vmt@openerp.com-20121116100505-9uakbl4klbkaz95k
2012-11-16 11:05:05 +01:00
Vo Minh Thu 147fae832a [FIX] test_db_cursor: explicitely close the cursor (without relying on __del__).
bzr revid: vmt@openerp.com-20121115123937-keq4eb2a3n85x0rv
2012-11-15 13:39:37 +01:00
Vo Minh Thu 08a2115754 [IMP] removing some warnings (those one are generated by tests).
bzr revid: vmt@openerp.com-20121115115759-toz6g9jcephwxmin
2012-11-15 12:57:59 +01:00
Thibault Delavallée f0569f7133 [MERGE] Tools: mail.py: (E)Mail management
Refactored a bit openerp/tools about (e)mails and html.
- moved some (e)mail related functions from misc to mail
- moved html_sanitizer into mail
- added html_email_clean, to clean incoming emails (remove quotes, signature)
- added a plaintext2html function, to convert plaintext into html (\n and \r are replaced by <br/>, more than two <br/> are replaced by end and beginning of paragraphs)
- append_content_to_html now uses plaintext2html, according to some new flags
- added tests for html_email_clean, plaintext2html, updated test for append_content_to_html, html_sanitize

bzr revid: tde@openerp.com-20121114150442-4rpfdy9spm1ig0qw
2012-11-14 16:04:42 +01:00
Thibault Delavallée 8e15ab0dff [FIX] Typo in tests.
bzr revid: tde@openerp.com-20121114135159-nouaj72drtot5hiv
2012-11-14 14:51:59 +01:00
Thibault Delavallée cbf3c82e88 [IMP] tools: added a true test for html_sanitize, some function renaming.
bzr revid: tde@openerp.com-20121114103849-hbxni04dpog1fxju
2012-11-14 11:38:49 +01:00
Thibault Delavallée d52fdd0ab3 [MERGE] Sync with trunk.
bzr revid: tde@openerp.com-20121112160536-63tx1u3c6yr2u8x9
2012-11-12 17:05:36 +01:00
Xavier Morel be03940d64 [FIX] temperate error message in case of missing required field
The message worked (ish) for a missing field directly on the model,
but completely broke if the missing field was on an o2m and had the
same name as a field on the model, then it was complete
misinformation.

bzr revid: xmo@openerp.com-20121112084804-zcgtpml3a19uv909
2012-11-12 09:48:04 +01:00
Olivier Dony fd6946f24a [IMP] orm: make error handling more consistent when accessing deleted/filtered records
Previous behavior was unspecified and untested - leading to random results
when performing operations on a mix of deleted and ir.rule-filtered records.

The behavior is now clarified and explicitly tested.
One suprising case remains: read() on a deleted record
returns an empty result instead of raising an error,
in order to avoid spurious errors when a client
performs a sequence of search(), read() while
another user is deleting records.

bzr revid: odo@openerp.com-20121109171451-z2m6oqs910103lcz
2012-11-09 18:14:51 +01:00
Olivier Dony b298dc4570 [FIX] tests.common: make ref() and browse_ref() work for TransactionCase as well + update tests
bzr revid: odo@openerp.com-20121109170826-jaer3j0p47uq37np
2012-11-09 18:08:26 +01:00
Thibault Delavallée 62c419e66f [IMP] tools: mail: improved append_content_to_html, including plaintext2html. Updated tests.
bzr revid: tde@openerp.com-20121109123521-e04g4zrhtv947l1r
2012-11-09 13:35:21 +01:00
Olivier Dony 76b031cfd4 [IMP] ir_filters: add test for updating global default filter - to complete the over-coverage
bzr revid: odo@openerp.com-20121108092907-e7cmjz4w4wn5u085
2012-11-08 10:29:07 +01:00
Thibault Delavallée e6a9084677 [IMP] tools: added text2html function, basically turning plaintext into html. Added a test for this function. Updated signature for demo data.
bzr revid: tde@openerp.com-20121107164117-2caoqna2aclzowpk
2012-11-07 17:41:17 +01:00
Xavier Morel 59301c655f [MERGE] from server
bzr revid: xmo@openerp.com-20121107111011-9q0c8kbuype5a8l6
2012-11-07 12:10:11 +01:00
Thibault Delavallée 4d89845de6 [IMP] tools: tests: cleaner: cleaned a bit test data. Will have to be improved.
bzr revid: tde@openerp.com-20121107093201-s0pco15msilt4erz
2012-11-07 10:32:01 +01:00
Thibault Delavallée 56b0b518a2 [IMP] tests: moved append_to_html into right test file. Added basic struct and templates for testing html_email_clean.
bzr revid: tde@openerp.com-20121106121824-wb8qf9snma7qffqe
2012-11-06 13:18:24 +01:00
Thibault Delavallée 207675a174 [REN] html_sanitize -> mail, to have a central file for methods about mail (html sanitizing, html management, emails related functions, ...).
bzr revid: tde@openerp.com-20121106115420-1h8mvzohol9zjysa
2012-11-06 12:54:20 +01:00
Xavier Morel 9037ca4480 [FIX] test data: duplicating existing demo data crimps my style
bzr revid: xmo@openerp.com-20121106093237-vsbo2l5pjup42frp
2012-11-06 10:32:37 +01:00
Xavier Morel 18f885b10f [FIX] recursive conversion of o2ms in import
added new test cases from gkr

bzr revid: xmo@openerp.com-20121106084206-1cckepflh9h4g1yv
2012-11-06 09:42:06 +01:00
Raphael Collet 401dd57f30 [MERGE] from trunk
bzr revid: rco@openerp.com-20121105083756-jdr9fxp32djpifqk
2012-11-05 09:37:56 +01:00
Olivier Dony ec7b097036 [MERGE] Sync with trunk
bzr revid: odo@openerp.com-20121031154418-lfx7sywca2v2mcei
2012-10-31 16:44:18 +01:00
Olivier Dony 51f2422b41 [IMP] tests.common: improved docstring for ref() and browse_ref()
bzr revid: odo@openerp.com-20121031152149-73pxpymjf1yz5xqi
2012-10-31 16:21:49 +01:00
Olivier Dony 43513d7ccc [ADD] tests.common: added testcase for ref() and browse_ref(), renaming existing test file to make it more generic
bzr revid: odo@openerp.com-20121031152011-gyih3j9itbgfauwv
2012-10-31 16:20:11 +01:00
Stéphane Bidoul 2aee5380eb [IMP] ref and browse_ref helpers on openerp.tests.common.BaseCase
bzr revid: stephane.bidoul@acsone.eu-20121031103027-2sozmbi3z7bkr22q
2012-10-31 11:30:27 +01:00
Vo Minh Thu c902eb4539 [DOC] openerp.tests.common: now included in the test-framework page.
bzr revid: vmt@openerp.com-20121030113737-10h045k368pbrldq
2012-10-30 12:37:37 +01:00
Raphael Collet ba9a47a771 [MERGE] from trunk
bzr revid: rco@openerp.com-20121029155310-14mmqsq7sjrwi4bt
2012-10-29 16:53:10 +01:00
Raphael Collet 7e7d877e17 fields.related: simplify read and write methods
bzr revid: rco@openerp.com-20121029153504-157ss9948o86uv6z
2012-10-29 16:35:04 +01:00
Raphael Collet 42f0962f99 [MERGE] from trunk
bzr revid: rco@openerp.com-20121029153047-sd8i97sfkdy1wcb1
2012-10-29 16:30:47 +01:00
Vo Minh Thu 3ffc363cd2 [IMP] tests: added a whole-class setup/teardown base class to tests/common.
bzr revid: vmt@openerp.com-20121029142302-ug3phcx3c26cxd91
2012-10-29 15:23:02 +01:00
Jigar Amin 4e35350f3c [MERGE] Sync with trunk
bzr revid: jam@tinyerp.com-20121017043806-3z0d69nqzy9v3ojr
2012-10-17 10:08:06 +05:30
Vo Minh Thu a3cef23827 [MERGE] Make sure we pass only lists, tuples or dicts to Cursor.execute().
This fixes a call in the login code where a single untupled string was passed.
Psycopg does not see the problem: it iterates over the string, and as long as
the string length matches the number of needed parameters, everything seems
fine. Yeah for dynamic typing and SQL queries.

bzr revid: vmt@openerp.com-20121016125408-q537r71k5cisyxs0
2012-10-16 14:54:08 +02:00
Raphael Collet ae0a437aa6 [FIX] tests: add missing test
bzr revid: rco@openerp.com-20121015101849-hf7pyxjzkbxd4tgf
2012-10-15 12:18:49 +02:00
Raphael Collet 11051f32e0 [FIX] res_users.login: fix query parameters in cr.execute
bzr revid: rco@openerp.com-20121015100148-pkanx35vr6fqojuj
2012-10-15 12:01:48 +02:00
Twinkle Christian (OpenERP) 7bef5e5162 [FIX]fix test case warning
bzr revid: tch@tinyerp.com-20121012061035-xfuez2o9x9k1m5r4
2012-10-12 11:40:35 +05:30
Xavier Morel 7a7876d4a8 [MERGE] from trunk
bzr revid: xmo@openerp.com-20121010154605-u16f57fnck148ued
2012-10-10 17:46:05 +02:00
Xavier Morel 510eea5305 [CHG] make empty cells clear out the corresponding field on import, rather than skip them
bzr revid: xmo@openerp.com-20121009092519-ge86yp3nnkqe9gic
2012-10-09 11:25:19 +02:00
Xavier Morel 10345423b1 [FIX] treat imported datetime as local to the context-provided or user's datetime
bzr revid: xmo@openerp.com-20121009085446-obfpn4c5r250zonc
2012-10-09 10:54:46 +02:00
Xavier Morel 00c7d9f4c0 [FIX] incorrect views spec in relational fields 'more info' action, spotted by odo
bzr revid: xmo@openerp.com-20121008132054-y57mg2rhxg6hkx2s
2012-10-08 15:20:54 +02:00
Raphael Collet 6c8756a5a2 [IMP] test_orm: add test for create with given inherited ancestor
bzr revid: rco@openerp.com-20121005115619-l9qsoofumwrs5kle
2012-10-05 13:56:19 +02:00
Raphael Collet 40265731a0 [IMP] tests: add tests on model inheritance (_inherits)
bzr revid: rco@openerp.com-20121005101138-ifaon35nmytviu24
2012-10-05 12:11:38 +02:00
Xavier Morel 1a54bd9e4b [FIX] import tests pertaining to failing to link a relational subfield by id, xid or name
bzr revid: xmo@openerp.com-20121004152936-wsbwa4wbw9rii1an
2012-10-04 17:29:36 +02:00
Xavier Morel 67a9cf851c [IMP] use moreinfo key to provide more info as to what the boolean and date value should look like
bzr revid: xmo@openerp.com-20121004123237-p5ht1uozaobxn8b7
2012-10-04 14:32:37 +02:00
Xavier Morel e77fad774b [IMP] error messages for datetime error
bzr revid: xmo@openerp.com-20121004115822-54mzaeqi05h0p4ve
2012-10-04 13:58:22 +02:00
Xavier Morel 601568f5f9 [FIX] don't import empty cells at all rather than set them to False, to allow defaults handling to do its job before actually creating the record
bzr revid: xmo@openerp.com-20121004064215-fqgir3ovmte2v438
2012-10-04 08:42:15 +02:00
Xavier Morel b9b19f61ea [FIX] if a selection label is empty, return the value in a selection import message
bzr revid: xmo@openerp.com-20121003115949-sgsouhcmboascjbl
2012-10-03 13:59:49 +02:00
Xavier Morel 1e4a677f05 [MERGE] from trunk
bzr revid: xmo@openerp.com-20121010154436-wz29sdkbs9vvhjba
2012-10-10 17:44:36 +02:00
Xavier Morel aed20ca5d7 [FIX] conversion and validation of date and datetime field imports
bzr revid: xmo@openerp.com-20121001134330-za8hqctrghmw08i4
2012-10-01 15:43:30 +02:00
Xavier Morel 84332d8aad [FIX] type error when providing a non-integer for a default database id
bzr revid: xmo@openerp.com-20121001130530-yf6pzuxdi3s09tji
2012-10-01 15:05:30 +02:00
Xavier Morel def7e61901 [IMP] reimplement BaseModel.import_data on top of BaseModel.load
adapt tests to assert the corrected behavior of load instead of import_data's broken behavior

bzr revid: xmo@openerp.com-20120927154244-e56ygz2yytullg2l
2012-09-27 17:42:44 +02:00
Xavier Morel 87af7a6365 [FIX] replace warnings capture by explicitly returning a list of warnings from converters
makes converter code noisier, but ultimately simpler without having access to dynamically scoped variables

bzr revid: xmo@openerp.com-20120927144341-j1dx3e0epf3i5ja6
2012-09-27 16:43:41 +02:00
Xavier Morel f39730e918 [FIX] make conversion errors for floats and integers more predictable
Python turns out to have changed the wording of the messages between 2.6 and 2.7

also, these messages need to be translatable *and* use the human-readable field name

bzr revid: xmo@openerp.com-20120927103452-cvgv3e8dsvcvnics
2012-09-27 12:34:52 +02:00
Xavier Morel 9a721eba32 [ADD] forgotten test file
bzr revid: xmo@openerp.com-20121010153849-h91mv2dzjk6i0n55
2012-10-10 17:38:49 +02:00
Xavier Morel d5c69fa87e [FIX] use lists instead of iterators in BaseModel._extract_records
* although it does use an explicit external index, it turns out the
  code is less complex

* the rewrapping of (many) iterators on top of one another ended up
  blowing Python's stack during ``next`` calls, which Python does
  *not* like

* added a 900-ish import test file to check for these things

bzr revid: xmo@openerp.com-20120925135955-oielhopegnefyctm
2012-09-25 15:59:55 +02:00
Xavier Morel 359b4a44aa [ADD] ability to convert postgres error messages to human-readable ones
also convert 'violates not-null constraint' to something about fields being required

bzr revid: xmo@openerp.com-20120925100232-bfmxcxda65cki5kv
2012-09-25 12:02:32 +02:00
Xavier Morel e6c8f1739a [ADD] 'more info' action to m2o, o2m and m2m linking failures
bzr revid: xmo@openerp.com-20120925074256-18puerjbfo3om265
2012-09-25 09:42:56 +02:00
Xavier Morel 9f2e7ba7ef [IMP] return a dict from Model.load for easier future extensibility (if needed) rather than a tuple.
also easier/cleaner to unpack on the JS side

bzr revid: xmo@openerp.com-20120924151502-4robe639ctpuvb94
2012-09-24 17:15:02 +02:00
Xavier Morel f143902d1a [IMP] allow converters to add data to import messages, formalize message keys
bzr revid: xmo@openerp.com-20120924150417-c2y7g7vdsfz66363
2012-09-24 17:04:17 +02:00
Xavier Morel 877e21ffde [IMP] return fields_get-style translated field strings (if available) in user-readable warning and error messages from import, rather than logical field names
bzr revid: xmo@openerp.com-20120924105230-1b7157xbruy2e5zr
2012-09-24 12:52:30 +02:00
Xavier Morel a9bc82c46d [IMP] translation tests, translated acceptable values for boolean fields
bzr revid: xmo@openerp.com-20120920150443-l9lna4bnkta7n2o8
2012-09-20 17:04:43 +02:00
Xavier Morel fdba99aaeb [ADD] inline o2m LINK_TO (m2m-style)
bzr revid: xmo@openerp.com-20120920110914-hy2rtivhn9cs5wuc
2012-09-20 13:09:14 +02:00
Xavier Morel 8e841cd8f7 [FIX] non-linking o2m tests, corresponding code
bzr revid: xmo@openerp.com-20120920105612-03ifizt2iv08tdhz
2012-09-20 12:56:12 +02:00
Xavier Morel c9e0cfd64a [ADD] force linking to existing o2m being updated
bzr revid: xmo@openerp.com-20120920102545-30tkodb4s1dng5hp
2012-09-20 12:25:45 +02:00
Xavier Morel 9805c665c8 [ADD] big bit on new import: pretty much everything but o2m
bzr revid: xmo@openerp.com-20120919114047-w4paoim95oxr91zb
2012-09-19 13:40:47 +02:00
Jigar Amin - OpenERP 8bc99d3e73 [merge] lp:openobject-server
bzr revid: jam@tinyerp.com-20120912043551-p3i8s7vllmal237j
2012-09-12 10:05:51 +05:30
Stephane Wirtel c735a2c0ec [MERGE] report & netrpc protocol: Use the cPickle 2.0 protocol and clean the code of report
bzr revid: stw@openerp.com-20120911091836-ac0wdxqslcwwbku6
2012-09-11 11:18:36 +02:00
Stephane Wirtel f55028de4d [MERGE] server: remove unused imports (Thanks to Florent Xicluna)
bzr revid: stw@openerp.com-20120910144609-ad3gupkf3oseb8yy
2012-09-10 16:46:09 +02:00
Raphael Collet e70aac8daf [MERGE] from trunk
bzr revid: rco@openerp.com-20120910125616-9j8nj0spxr2wt83l
2012-09-10 14:56:16 +02:00
Raphael Collet 67003bd76f [FIX] method resolve_2many_commands and its tests
bzr revid: rco@openerp.com-20120907122857-4dro8up51ypx0cr5
2012-09-07 14:28:57 +02:00
Twinkle Christian (OpenERP) 6acf8ed15d [IMP]Remove serverwarning
bzr revid: tch@tinyerp.com-20120907060555-554i3iemfwfh6lwt
bzr revid: tch@tinyerp.com-20120907120804-e4z6k6iuzukaipz2
2012-09-07 17:38:04 +05:30
Raphael Collet 3b3279c77e [FIX] orm: adapt tests of method resolve_2many_commands
bzr revid: rco@openerp.com-20120907104448-9b9aeenmqz5m5du2
2012-09-07 12:44:48 +02:00
Raphael Collet f4945c2fc7 [IMP] orm: fix and generalize method resolve_o2m_commands_to_record_dicts (now named resolve_2many_commands)
bzr revid: rco@openerp.com-20120906144836-v2ye3o8n12iir84b
2012-09-06 16:48:36 +02:00
Xavier Morel 1e834fb029 [ADD] test for retarded behavior when importing o2m _rec_name
bzr revid: xmo@openerp.com-20120906153941-qynzx3minrxpz82t
2012-09-06 17:39:41 +02:00
Olivier Dony efa0f9b263 [IMP] html_sanitize: attempt to make slightly more pythonic/readable + re-enable test. Proper review + test still needed.
bzr revid: odo@openerp.com-20120905225746-npjjzy1w00k05vtc
2012-09-06 00:57:46 +02:00
Olivier Dony 8e96d71bf3 [MERGE] sync with trunk
bzr revid: odo@openerp.com-20120905072646-m4269m97ej1oicoq
bzr revid: odo@openerp.com-20120905220158-ulg8jy5alny97ff3
2012-09-06 00:01:58 +02:00
niv-openerp 8d1e3d06ab [IMP] removed dependency to pyquery
bzr revid: nicolas.vanhoren@openerp.com-20120905153212-0gi1wjhf9m4xtnml
2012-09-05 17:32:12 +02:00
niv-openerp 29a9316566 [REVERT] 4394, because Thu is stupid
bzr revid: nicolas.vanhoren@openerp.com-20120905145703-7t8uiyqur0l16n2b
2012-09-05 16:57:03 +02:00
Thibault Delavallée 1f84036086 [MERGE] Merged with server/trunk.
bzr revid: tde@openerp.com-20120904075105-ljg3lgn6tf958kvd
2012-09-04 09:51:05 +02:00
Vo Minh Thu f3742f0558 [FIX] test_ir_sequence: reduce the number of call to next() (to reduce test time).
bzr revid: vmt@openerp.com-20120903145929-p4kp6eotkcflletk
2012-09-03 16:59:29 +02:00
Olivier Dony d37745559e [ADD] tools.misc: new function append_to_html, can be used to inject blocks (html or plaintext) to existing HTML snippets
bzr revid: odo@openerp.com-20120831132337-of2p1wlh5l4lpvez
2012-08-31 15:23:37 +02:00
Vo Minh Thu 079b425d11 [FIX] tests: allow running the tests when installing a database created by XML-RPC.
bzr revid: vmt@openerp.com-20120822134820-pevo06jwrhm8unui
2012-08-22 15:48:20 +02:00
Christophe Simonis d9a869c925 [FIX] remove loggging for test "test_out_of_range" of "test_impex" module
bzr revid: chs@openerp.com-20120822122123-h3zmh55aw7zwtep4
2012-08-22 14:21:23 +02:00
Christophe Simonis d3fcdb2ac7 [FIX] sequence testing
bzr revid: chs@openerp.com-20120822105552-ieex9esjg5wwke8q
2012-08-22 12:55:52 +02:00
Vo Minh Thu ae4852f597 [IMP] html_sanitize: remove dependency on pyquery.
Relying on pyquery is unnecessary (using etree alone is enough). This patch
reimplements the html_sanitize() function without pyquery. The new
implementation still goes through the provided test suite with success.

bzr revid: vmt@openerp.com-20120816104540-9374llhzde54h2vz
2012-08-16 12:45:40 +02:00
niv-openerp 1885387ace [IMP] added html field
bzr revid: nicolas.vanhoren@openerp.com-20120814130656-4pa91mud8u30mqr5
2012-08-14 15:06:56 +02:00
niv-openerp 63ae87fb4c Fixed encoding problems
bzr revid: nicolas.vanhoren@openerp.com-20120814121425-jq3ieebbsa7rcds5
2012-08-14 14:14:25 +02:00
niv-openerp cfaeed1581 Removed print in test
bzr revid: nicolas.vanhoren@openerp.com-20120814071457-hw8d5yp6xzporiuo
2012-08-14 09:14:57 +02:00
niv-openerp dc170d1a9a Added protection against javascript in <a>
bzr revid: nicolas.vanhoren@openerp.com-20120813155205-uohwb39ejn66bgmv
2012-08-13 17:52:05 +02:00
Vo Minh Thu 7a0abed231 [MERGE] merged trunk.
bzr revid: vmt@openerp.com-20120813142443-73d6zm10bqhm17mp
2012-08-13 16:24:43 +02:00
niv-openerp e5fb45a329 First working version of the html sanitizer
bzr revid: nicolas.vanhoren@openerp.com-20120813142232-xn7h0ov7mb3pls4o
2012-08-13 16:22:32 +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
Twinkle Christian (OpenERP) ea594186db [IMP]Remove type field from the remaining views.
bzr revid: tch@tinyerp.com-20120808110619-81svoatrfn8oyv2o
2012-08-08 16:36:19 +05:30
Vo Minh Thu 9086cc05f5 [IMP] test addons: pushed the Tests menu to the far right (probably into the MOAR button).
bzr revid: vmt@openerp.com-20120808124209-409j517o4adtuj84
2012-08-08 14:42:09 +02:00
Vo Minh Thu b77da916e5 [FIX] impex tests: removed unnecessary code.
bzr revid: vmt@openerp.com-20120807144519-r7tz3fh6ieslra1c
2012-08-07 16:45:19 +02:00
Vo Minh Thu 00d2d2fe05 [IMP] impex tests: moved test cases and models in their own test module.
bzr revid: vmt@openerp.com-20120807143744-zsbwktjmy5d79jki
2012-08-07 16:37:44 +02:00
Jigar Amin - OpenERP 1cb816c8a8 [FIX] Removed the unused test case to avoid the runtime mutiple execuation
bzr revid: jam@tinyerp.com-20120807114830-gu6j6hbb6zf30i97
2012-08-07 17:18:30 +05:30
ajay javiya (OpenERP) 3d3d51df0d [IMP]: Improve validation
bzr revid: aja@tinyerp.com-20120806133728-sa372lbgoc8rdebu
2012-08-06 19:07:28 +05:30
Xavier Morel 6d6e66cfc1 [IMP] fixme comment
bzr revid: xmo@openerp.com-20120806130220-6s525hr0jolzenv9
2012-08-06 15:02:20 +02:00
Jigar Amin - OpenERP 0632619b27 merge lp:~openerp-dev/openobject-server/trunk-sloppy-rng-vmt
bzr revid: jam@tinyerp.com-20120806103914-2wz2xsxeu2vhrfy6
2012-08-06 16:09:14 +05:30
Vo Minh Thu 66d054471c [MERGE] merged trunk.
bzr revid: vmt@openerp.com-20120806102630-psx2mywo3w5da81i
2012-08-06 12:26:30 +02:00
Vo Minh Thu 4a8668589a [IMP] xml validation: white spaces.
bzr revid: vmt@openerp.com-20120806091144-t5jjnbnyqu6sk8wf
2012-08-06 11:11:44 +02:00
Vo Minh Thu b00e6af86c [FIX] xml validation: removed duplicated tests.
bzr revid: vmt@openerp.com-20120806091008-b4ve91aholkm67l4
2012-08-06 11:10:08 +02:00
Xavier Morel 471ef96edf [FIX] some notes and comments in import/export tests
bzr revid: xmo@openerp.com-20120801094434-t23wa2343utnevh6
2012-08-01 11:44:34 +02:00
Xavier Morel e3dc738802 [TEST] failure of o2m relinking via inline id (as exported)
bzr revid: xmo@openerp.com-20120801082108-vkind3ocwsqgd0bv
2012-08-01 10:21:08 +02:00
Xavier Morel 3f1ab77e28 [TEST] o2m importing of multiple fields
bzr revid: xmo@openerp.com-20120801070803-4sgvemuiifrhe61s
2012-08-01 09:08:03 +02:00
Xavier Morel c4a60df691 [TEST] o2m db-id export and import
bzr revid: xmo@openerp.com-20120731163631-n97nxph9gm2f6kdp
2012-07-31 18:36:31 +02:00
Xavier Morel e1c94f3221 [TEST] importing m2m fields to an existing object with m2m values
bzr revid: xmo@openerp.com-20120731152747-beg72fx2150upvay
2012-07-31 17:27:47 +02:00
Xavier Morel 29e6a77fef [TEST] localized import/export of selection fields
bzr revid: xmo@openerp.com-20120731144606-ceax7lk3rfi7zumk
2012-07-31 16:46:06 +02:00
Xavier Morel ac647909bf [TEST] m2m import
bzr revid: xmo@openerp.com-20120731135449-i07ex1zswepen3wt
2012-07-31 15:54:49 +02:00
Xavier Morel 6bad3e84fb [TEST] m2o import link by xid
bzr revid: xmo@openerp.com-20120731103908-p1apmrx3ifnodz0f
2012-07-31 12:39:08 +02:00
Xavier Morel a3542213bc [TEST] ids handling on main record
bzr revid: xmo@openerp.com-20120730165330-lm4l1yzfjduajb1p
2012-07-30 18:53:30 +02:00
Xavier Morel f8822ae313 [TEST] m2o import
bzr revid: xmo@openerp.com-20120730162318-qwxncgvizrifgxyh
2012-07-30 18:23:18 +02:00
Xavier Morel 496177a9b1 [TEST] incorrect value for selection field import
bzr revid: xmo@openerp.com-20120730153017-iywveudrq5h0ykef
2012-07-30 17:30:17 +02:00
Xavier Morel 5b5148b925 [TEST] selection fields import
bzr revid: xmo@openerp.com-20120730152844-xob3ezlw0qpb1kxc
2012-07-30 17:28:44 +02:00
Xavier Morel 1cf264cfd4 [TEST] char and text fields
bzr revid: xmo@openerp.com-20120730142851-6854x99l4sxmoc0s
2012-07-30 16:28:51 +02:00
Xavier Morel 6af9bb4159 [TEST] integers import
bzr revid: xmo@openerp.com-20120730122243-wjpalm6ovwuk6k5c
2012-07-30 14:22:43 +02:00
Xavier Morel 59193b0c0f [ADD] empty record/field case to booleans
bzr revid: xmo@openerp.com-20120730113633-tauioxm941k0iaqn
2012-07-30 13:36:33 +02:00