Commit Graph
47 Commits
Author SHA1 Message Date
Denis Ledoux c99122cdb9 [FIX] anonymization: xmlid_to_res_id doesn't have a context argument
This is related to the revision 2e66c489e3

`xmlid_to_res_id` doesn't have a `context` argument,
trying to do a call with this `context` failed.

A simple attempt to anonymize the database raised the error.

opw-657858
2015-12-01 17:39:27 +01:00
Martin Trigaux 37938d0edf [IMP] anonymization: better error message
courtesy of Jarmo Kortetjärvi
2015-09-07 15:02:58 +02:00
Xavier Morel 2e66c489e3 [FIX] manual reimplementations of ref/xmlid_to_\* 2015-08-24 10:31:02 +02:00
Thibault Delavallée a4d5cfa747 [IMP][FIX] mail, various: migrate fields_view_get override to the new API
(leftover of migration). However this implies some fixes in the various calls
to models inheriting from mail.thread. Indeed giving positional instead of
keyword argument creates issues in the wrapper between the old and new
API.

In account_analytic_plan, useless override of fields_view_get has been removed.
2015-06-29 13:16:11 +02:00
Olivier Dony 0bd4545348 [LEGAL] Use global LICENSE/COPYRIGHT files, remove boilerplate text
- Preserved explicit 3rd-party copyright notices
- Explicit boilerplate should not be necessary - copyright law applies
  automatically in all countries thanks to Berne Convention + WTO rules,
  and a reference to the applicable license is clear enough.
2015-06-02 03:16:04 +02:00
Christophe Simonis 45a805c76b [MERGE] forward port of branch 8.0 up to 26e7742 2015-05-21 16:45:05 +02:00
Olivier Dony 8d745f9f50 [FIX] account, mail, etc.: uniformize evaluated expressions
opw-626694
2015-05-21 15:26:35 +02:00
Christophe Simonis 109dae2efa [MERGE] forward port of branch 8.0 up to d4f41a1 2015-02-26 18:56:26 +01:00
Vijay Baladaniya 10a1d44389 [FIX] Change the target_version for anonymization.
Fixed #5476
2015-02-26 10:30:01 +01:00
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
Leonardo Donelli 4a0b13ed92 [REF] remove vim modelines and resulting trailing blank lines
Let 2015 be a year without modelines!
cf #4174
2014-12-31 15:52:13 +01:00
Jaydeep Barot 026e38b48f [REM] Unnecessary size parameters on char fields 2014-06-25 17:13:43 +02:00
Amit Bhavsar (Open ERP) 24848a8dcc [MERGE] merge with latest trunk
bzr revid: bde@tinyerp.com-20130522095432-1sl1b6uu6ewod4md
bzr revid: amb@tinyerp.com-20130528091941-wak8fnembuvewwjf
2013-05-28 14:49:41 +05:30
Thibault Delavallée a05b0bebbe [FORWARD] Forward port of 7.0 branch until revision 9143.
bzr revid: tde@openerp.com-20130521122359-b5vii7gv8arluz06
2013-05-21 14:23:59 +02:00
vro 4c3b135349 [FIX] anonymization: Flush queries list used in de-anonymization
bzr revid: vro@tinyerp.com-20130513054026-1wco2hzkm85nz2ik
2013-05-13 11:10:26 +05:30
ggh-openerp 3b73e2b2a4 [IMP]Removed space before Exclamation marks [!]
bzr revid: ggh@tinyerp.com-20130429071557-vnxo5nni03vc886j
2013-04-29 12:45:57 +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
olt@tinyerp.com e355f5bb97 [FIX] fixed a bug preventing the de-anonymization of the database
bzr revid: olt@tinyerp.com-20130123073005-398u252n7082k0qy
2013-01-23 08:30:05 +01:00
olt@tinyerp.com 05debf9519 [FIX] anonymization: don't execute query on non existing tables
bzr revid: olt@tinyerp.com-20121221102534-e5hc07d2qq8qqith
2012-12-21 11:25:34 +01:00
olt@tinyerp.com 36cd0b866e [FIX] anonymization: fix for obsolete models
bzr revid: olt@tinyerp.com-20121220112528-um4m3crn0enhcplj
2012-12-20 12:25:28 +01:00
Cecile Tonglet 15fe515601 [MERGE] From trunk
bzr revid: cto@openerp.com-20121217144306-tkodwpox30cuvb28
2012-12-17 15:43:06 +01:00
Fabien Pinckaers 5bc1a17026 [MERGE] translation of anonymisation strings
bzr revid: fp@tinyerp.com-20121213131643-6mkrbfxqym4wla0l
2012-12-13 14:16:43 +01:00
Vo Minh Thu 6072fd11af [MERGE] merged trunk.
bzr revid: vmt@openerp.com-20121210111654-0pm3pupnqqeip52n
2012-12-10 12:16:54 +01:00
Olivier Dony 5db87bea9c [MERGE] Bugfixes from 6.1 until revision 6800
bzr revid: odo@openerp.com-20121206153856-9y9v8ok6yxo6l5f0
2012-12-06 16:38:56 +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
Mayur Maheshwari (OpenERP) 3e365eb3d7 [FIX]anonymization: Added missing translation
bzr revid: mma@tinyerp.com-20121120102808-uj0p2sdhuipopcj9
2012-11-20 15:58:08 +05:30
Dhruti Shastri 741cf32785 [FIX]anonymization: Added missing translation
bzr revid: mma@tinyerp.com-20121120091718-kkw841nzukzxuudp
2012-11-20 14:47:18 +05:30
olt@tinyerp.com 5d7f760a05 [FIX] anonymization: add an object to handle migration issues
bzr revid: olt@tinyerp.com-20121023072317-zkv1rbf8pt0qnh3g
2012-10-23 09:23:17 +02:00
Antonin Bourguignon 1653332080 [MERGE] trunk
bzr revid: abo@openerp.com-20121002102915-424prxd74izb1szw
2012-10-02 12:29:15 +02:00
olt@tinyerp.com 1d25af499b [FIX] create context if None
bzr revid: olt@tinyerp.com-20120920090813-pxb25r4g1zo03jwu
2012-09-20 11:08:13 +02:00
olt@tinyerp.com a0f23eb60b [FIX] anonymization: raise a good descriptive error when the state is 'unstable'
bzr revid: olt@tinyerp.com-20120917081017-s15mm36ppvs4lfxc
2012-09-17 10:10:17 +02:00
Saurang Suthar(OpenERP) c59e7ab9d0 [IMP] Improved warning messages for account* modules
bzr revid: pso@tinyerp.com-20120725113900-sx79bzkhh9812hib
2012-07-25 17:09:00 +05:30
Pinakin Nayi (OpenERP) 66667652b6 [IMP]analytic-anonymization-warning-msg
bzr revid: pna@tinyerp.com-20120712124553-zg42ssi0hat181e3
2012-07-12 18:15:53 +05:30
Amit Patel (OpenERP) f5ecf231d2 [IMP]:anonymization:checked if context == NONE then pass the dict.
bzr revid: apa@tinyerp.com-20120605061629-ulshs2cevdqm0hlf
2012-06-05 11:46:29 +05:30
Saurang Suthar (OpenERP) a2a05cfc19 [IMP]:improved titles State by Status everywhere
bzr revid: ssu@tinyerp.com-20120504115748-2vd1dns7bxptg384
2012-05-04 17:27:48 +05:30
olt@tinyerp.com 57d71a20a2 [FIX] raise clear except_osv instead of traceback
bzr revid: olt@tinyerp.com-20120425072617-1mw3kep9fa5813ib
2012-04-25 09:26:17 +02:00
Numerigraphe - Lionel Sausin 2d2a44dcf2 [FIX] unmutable default in the remaining modules
[REF] coding style consistency

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

bzr revid: ls@numerigraphe.fr-20120305184003-er00xtj9vtcw7gna
2012-03-05 19:40:03 +01:00
Numerigraphe - Lionel Sausin 779fa653c1 [IMP] Added missing vim mode lines
lp bug: https://launchpad.net/bugs/524279 fixed

bzr revid: ls@numerigraphe.fr-20111122085138-x6u2lcl6vrpyybp9
2011-11-22 09:51:38 +01:00
Olivier Dony d81837fac6 [MERGE] synch with latest trunk
bzr revid: odo@openerp.com-20110922162538-x7xucux66zma5bp8
2011-09-22 18:25:38 +02:00
Fabien Pinckaers 99a72c7792 [Useability] improved error message
bzr revid: fp@tinyerp.com-20110918134116-2vvdelak2268j6pz
2011-09-18 15:41:16 +02:00
Vo Minh Thu fcd415ceee [FIX] anonymization: size (in a field kwargs) is an int, not a string.
bzr revid: vmt@openerp.com-20110817084305-nk5cpfn338r1nsxj
2011-08-17 10:43:05 +02:00
Olivier Dony 06fb14130a [IMP] removed method=True params from all fields.function
Server revision 3495 odo@openerp.com-20110701232328-flgxulxva70vnyxr
removed the need for passing method=True to function fields,
so this is the equivalent addons fix, removing it everywhere.
Please be careful from now on, and do not pass it anymore!

bzr revid: odo@openerp.com-20110701234124-a61zl0idvdfz3hyb
2011-07-02 01:41:24 +02:00
P. Christeas 5aa7042688 anonymization: try to fix the deprecation warnings
Unfortunately, we cannot use bool(foobar) on xpath() results.

bzr revid: p_christ@hol.gr-20110306154856-ajg11p9ysee1t4e4
2011-03-06 17:48:56 +02:00
olt@tinyerp.com da471302b6 [FIX] anonymization: set float and integer values to 0
bzr revid: olt@tinyerp.com-20110218131150-87jc6cs04od5aeeq
2011-02-18 14:11:50 +01:00
Sbh (OpenERP) de11917266 [Fix] fix the buildbot warning
bzr revid: sbh@tinyerp.com-20110111052710-yhvwofgbz4j110lb
2011-01-11 10:57:10 +05:30
nel@tinyerp.com f98b948992 [IMP]
bzr revid: nel@tinyerp.com-20110110121227-c0mjes6vnzqhqrda
2011-01-10 13:12:27 +01:00
nel@tinyerp.com 4c3daf0915 [ADD] Anonymization module
bzr revid: nel@tinyerp.com-20110107153106-6visyxwb8i21q262
2011-01-07 16:31:06 +01:00