Commit Graph

175 Commits

Author SHA1 Message Date
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