Commit Graph
249 Commits
Author SHA1 Message Date
Goffin Simon 0fd773a486 [IMP] Cleanup and refactoring of exception handling
Unify and refactor exception handling in framework and addons.

The generic `except_osv` is now deprecated, and replaced by more specialized exception subtypes:
 - `UserError` (renamed from Warning, as it conflicts with the built-in `Warning`) raised when a non-technical error occurs during a business operation. It could be a missing information in the data provided by the user, or a misconfiguration.
 - `AccessError`: raised when any operation is denied because the user conducting it does not have the required access rights.
 - `AccessDenied`: raised when an operation that requires authenticated access is attempted via an unauthenticated request.
 - `MissingError`: raised when an operation is attempted on a record that does not exist.
 - `ValidationError`: raised when an operation violates a SQL or Python constraint.
 - All other exceptions are internal errors due to a system problem or bug, and raised untouched to the client-side, which should display a traceback.

All exceptions take a single message argument.

The `test_exceptions` module has been updated to showcase both new and old (deprecated) exceptions.

A great many old `except_osv` had a useless title with "Error!" or "Warning", those have been removed, as this is handled by the client-side widget that displays the messages.

This commit introduces a more consistent policy for logging errors and warnings:
 - All messages that do not require administrator attention should be logged at INFO level or lower. This includes all errors that are notified to the user in a friendly manner, even for access right problems or validation errors during business operations.
 - All messages that indicate a likely misconfiguration or malicious use by the users should be logged at WARNING level, as they typically require administrator attention.
 - All other unhandled internal errors cannot typically be handled by the user and should be logged at ERROR or higher level, as they require immediate administrator attention.
2015-01-16 17:15:18 +01:00
Julien De Coster d88c34d11e [IMP] Mass mailings send in cron
1. The merge of the "email_template" module into the "mail" module.
2. The send action of the mass mailing has been moved from the frontend to a cron, because it was too slow to send over 10,000 mails (the user's browser was blocked for 15 - 20 minutes). Mass mailings have now their own process in the kanban view.
3. Mails sent from the mail form are sent immediatly instead of from the mail queue (for instance, when you go to sales > customers > list view > select 2 -3 customers > More > Partner Mass Mailing).
4. Users have now the choice from which mailing list they want to unsubscribe when they click on the unsubscribe link at the bottom of the mail.
5. Mass mailings inherit from their campaign UTMs and mass mailing campaigns are linked to an UTM campaign.
6. Many little improvements
2015-01-07 18:01:58 +01:00
Jeremy Kersten ade51a9ea1 [FIX] survey: Was browsing a browse record, useless and traceback... https://github.com/odoo/odoo/issues/2383 2014-11-25 15:06:59 +01:00
Xavier Morel e6b56412a0 [ADD] views documentation 2014-08-28 15:02:33 +02:00
Fabien Meghazi faa09da325 Removed version="7.0" from form views 2014-06-12 09:09:59 +02:00
Richard Mathot (OpenERP) ea69de5114 [FIX] Dirty fix for links sent by email
bzr revid: rim@openerp.com-20140410141352-tb9rwbvawuy2kwc4
2014-04-10 16:13:52 +02:00
Richard Mathot (OpenERP) 33fb17ab9f [IMP] Survey: Lots of usability improvements (wip)
bzr revid: rim@openerp.com-20140407133140-mu2dl1zkq6wazuob
2014-04-07 15:31:40 +02:00
Richard Mathot (OpenERP) ecb636c67c [FIX] URL slugs mess...
bzr revid: rim@openerp.com-20140319142952-2wzi0fvzvopx9lmy
2014-03-19 15:29:52 +01:00
Richard Mathot (OpenERP) 7227b0b0c9 [REF] Bye bye vim
bzr revid: rim@openerp.com-20140303133814-rpjv0gl7618bt1i1
2014-03-03 14:38:14 +01:00
Richard Mathot (OpenERP) 6f82d49562 [FIX] Small UI glitches
bzr revid: rim@openerp.com-20140128150336-orf1kes9ats1tp07
2014-01-28 16:03:36 +01:00
Richard Mathot (OpenERP) c42b345a90 [REF] Code cleaning
bzr revid: rim@openerp.com-20140106084708-7yot3pjkfbezd6f8
2014-01-06 09:47:08 +01:00
Richard Mathot (OpenERP) 194bf80e25 [REM] Code not in use anymore
bzr revid: rim@openerp.com-20140106082749-nykxi9jjxxycz6h2
2014-01-06 09:27:49 +01:00
Richard Mathot (OpenERP) 19579b04d6 [REF] Code cleaning
bzr revid: rim@openerp.com-20140102075652-d1sih1x42jt9dgv1
2014-01-02 08:56:52 +01:00
Richard Mathot (OpenERP) f3dc9d579e [FIX] Incorrect behaviour and display for invitation form
bzr revid: rim@openerp.com-20131230153532-3r9oscsgsb750z7m
2013-12-30 16:35:32 +01:00
Richard Mathot (OpenERP) 65c9704954 [IMP] Survey Kanban view
[REM] Unused code in survey.py

[REF] Code cleaning

bzr revid: rim@openerp.com-20131129084914-z76feeg813q38l25
2013-11-29 09:49:14 +01:00
Richard Mathot (OpenERP) 51bb7204cd [FIX] English
bzr revid: rim@openerp.com-20131125104912-tw8aw20nowkep31h
2013-11-25 11:49:12 +01:00
Richard Mathot (OpenERP) 72e33b8cfe - mailing bugs
- radio buttons/checkbox bugs
- cronjob to remove empty user inputs

bzr revid: rim@openerp.com-20131121110457-rbpbltdk1n9es37l
2013-11-21 12:04:57 +01:00
Richard Mathot (OpenERP) dbb0a2b8fe [FIX] Emails create 'link' user input (not 'manually')
bzr revid: rim@openerp.com-20131121075612-qhyo0cykcheo36iq
2013-11-21 08:56:12 +01:00
Richard Mathot (OpenERP) 0e45d81546 [IMP] Fixing first view of survey + logic bugs
bzr revid: rim@openerp.com-20131028144314-cjy5rexani70ikhc
2013-10-28 15:43:14 +01:00
Richard Mathot (OpenERP) 15d7695189 [IMP] Models refactoring (again)
bzr revid: rim@openerp.com-20131028075121-odgv1f4en47vvtr3
2013-10-28 08:51:21 +01:00
Richard Mathot (OpenERP) 31c582874d [REF] Importing previous work by chm
bzr revid: rim@openerp.com-20131021090319-zbi93frwqpcvxkk9
2013-10-21 11:03:19 +02:00
Denis Ledoux db84e912bd [MERGE] Forward-port of latest saas-1 bugfixes, up to rev. 8781 rev-id: dle@openerp.com-20130923165651-0jt823r5wy37enw6
bzr revid: dle@openerp.com-20130923171310-mav1riq3d2rebmv2
2013-09-23 19:13:10 +02:00
Denis Ledoux 274cf1e293 [MERGE] Forward-port of latest 7.0 bugfixes, up to rev. 9475 rev-id: dle@openerp.com-20130923162428-g0s3o9tid09ogfv3
bzr revid: dle@openerp.com-20130923165651-0jt823r5wy37enw6
2013-09-23 18:56:51 +02:00
Martin Trigaux 5397de6122 [FIX] survey: add missing translations
bzr revid: mat@openerp.com-20130920123938-ioifrlv200rkalhe
2013-09-20 14:39:38 +02:00
Christophe Simonis aa133b4d29 [MERGE] forward port of branch saas-1 up to revid 8745 chs@openerp.com-20130613181503-82234mo34wxb0oap
bzr revid: chs@openerp.com-20130614091924-z5ta02kwhmwcrgox
2013-06-14 11:19:24 +02:00
Christophe Simonis 6a9adbca62 [MERGE] forward port of branch 7.0 up to revid 9236 mat@openerp.com-20130613160953-itt79mu5xrl7suv4
bzr revid: chs@openerp.com-20130613181503-82234mo34wxb0oap
2013-06-13 20:15:03 +02:00
Martin Trigaux 0fc8333985 [FIX] survey: add page_id when using wizard
bzr revid: mat@openerp.com-20130611100243-r5u6eyoj2ppiifc2
2013-06-11 12:02:43 +02:00
Nimesh Contractor (OpenERP) d307d7bd9b [MERGE] with trunk.
bzr revid: nco@tinyerp.com-20130605065435-pwoa0dbany8pecu7
2013-06-05 12:24:35 +05:30
Chandni Machchhar (OpenERP Trainee) d3044130c8 [FIX] Optimize the Code.
bzr revid: chandni.machchhar3@gmail.com-20130604062132-n8x9iofinoz9cx43
2013-06-04 11:51:32 +05:30
Chandni Machchhar (OpenERP Trainee) 08040221b2 [FIX] Set the print or cancel buttons in the footer in all the wizards of Survey in reporting.
bzr revid: chandni.machchhar3@gmail.com-20130603095843-q5eq7mqpiwepcly1
2013-06-03 15:28:43 +05:30
Thibault Delavallée 16ea25646e [MERGE] Sync with trunk
bzr revid: tde@openerp.com-20130515083000-3b033tyihxmubykh
2013-05-15 10:30:00 +02:00
Thibault Delavallée a027590d6e [CLEAN] Some code cleaning about context management
bzr revid: tde@openerp.com-20130515082939-oediun6cb9wd87lh
2013-05-15 10:29:39 +02:00
Vo Minh Thu 3fe1f53514 [REF] get_module_resource() must imported from openerp.modules (instead of openerp.addons).
bzr revid: vmt@openerp.com-20130416151844-gatbo4s2l2e6reme
2013-04-16 17:18:44 +02:00
Christophe Matthieu ca03b6de1c [MERGE] from trunk
bzr revid: chm@openerp.com-20130415133727-btc4a6qolfnxs3du
2013-04-15 15:37:27 +02:00
Christophe Matthieu ed4b70dfe3 [MERGE] from trunk
bzr revid: chm@openerp.com-20130415103431-y96fhba0502b6aqc
2013-04-15 12:34:31 +02:00
Vo Minh Thu e69326ee3b [REF] removed explicit model instanciations.
bzr revid: vmt@openerp.com-20130415102349-vgcrfok2k5y10cwz
2013-04-15 12:23:49 +02:00
Christophe Matthieu 177f51cb54 [IMP] auth_signup: change reset_password to no_reset_password context value
bzr revid: chm@openerp.com-20130410130244-3ef6mpw6s09xjn75
2013-04-10 15:02:44 +02:00
Pinakin Nayi (OpenERP) d3729c8526 [IMP]survey:add missing translation
bzr revid: pna@tinyerp.com-20130409052712-bxnwhj4ro2tuksk6
2013-04-09 10:57:12 +05:30
Raphael Collet 96ad608854 [IMP] general: use registry[X] instead registry.get(X) when X is dynamic
bzr revid: rco@openerp.com-20130329143720-80pkd4csemlk1aqz
2013-03-29 15:37:20 +01:00
Vo Minh Thu 76ec85fca1 [IMP] report: use openerp.report.render_report() instead of LocalService().create().
bzr revid: vmt@openerp.com-20130222124823-6u7cqzj3d60buud5
2013-02-22 13:48:23 +01:00
Vo Minh Thu 97355a3b18 [FIX] survey: fixed utf-8 encoding marker (coverage.py chokes on it otherwise).
bzr revid: vmt@openerp.com-20130125153907-msyx5drfdre1fmdp
2013-01-25 16:39:07 +01:00
Cecile Tonglet 15fe515601 [MERGE] From trunk
bzr revid: cto@openerp.com-20121217144306-tkodwpox30cuvb28
2012-12-17 15:43:06 +01:00
Arnaud Pineux 9fcac4fa62 [FIX] Survey
lp bug: https://launchpad.net/bugs/1052079 fixed

bzr revid: api@openerp.com-20121210152833-6waodc9cj1ffq8ye
2012-12-10 16:28:33 +01:00
Vo Minh Thu 6072fd11af [MERGE] merged trunk.
bzr revid: vmt@openerp.com-20121210111654-0pm3pupnqqeip52n
2012-12-10 12:16:54 +01:00
Vo Minh Thu e7f4891d46 [IMP] use the openerp namespace.
bzr revid: vmt@openerp.com-20121206145632-0h1coh5aaem65wsy
2012-12-06 15:56:32 +01:00
Pinakin Nayi (OpenERP) 5dd31a68c6 [IMP] click on answer survey MCQ
bzr revid: pna@tinyerp.com-20121109121251-4lz2afcb2w60zdj7
2012-11-09 17:42:51 +05:30
Mayur Maheshwari (OpenERP) 7d3f19a00b [IMP]survey : fix the trace-back of delete page in wizard
bzr revid: mma@tinyerp.com-20121029091415-njls45fa2v624rve
2012-10-29 14:44:15 +05:30
Mayur Maheshwari (OpenERP) 82bad094ec [MERGE]: Merge with lp:openobject-addons
bzr revid: mma@tinyerp.com-20121029054818-dxqh51ul3dxfxo4m
2012-10-29 11:18:18 +05:30
Quentin (OpenERP) 9c712d5336 [IMP] survey: code review
bzr revid: qdp-launchpad@openerp.com-20121023223358-vqey57o52eyi6fhf
2012-10-24 00:33:58 +02:00
Quentin (OpenERP) b8756e6606 [FIX] survey: 'format requires mapping' error fixed
bzr revid: qdp-launchpad@openerp.com-20121023183257-hzl1ed9nhkci7348
2012-10-23 20:32:57 +02:00