Commit Graph
96 Commits
Author SHA1 Message Date
Christophe Simonis d750206c49 [MERGE] forward port of branch saas-6 up to e9f1ee4 2015-10-01 15:16:59 +02:00
Olivier Dony af4a60b941 [MERGE] Forward-port 8.0 up to rev. 26d0fe6d9f 2015-09-30 02:53:59 +02:00
Christophe Simonis 7d68fa0ee6 [MERGE] forward port of branch saas-3 up to 504a04c 2015-09-25 15:03:12 +02:00
Christophe Simonis 504a04c823 [MERGE] forward port of branch 7.0 up to 117b636 2015-09-25 14:56:58 +02:00
Pierre Verkest be33912a25 [FIX] report_webkit: get webkit path as SUPERUSER_ID
`ir.config_parameter` is readable by employees only.
It could happen to print a webkit report
as a portal / public user.

Closes #4181
2015-09-24 18:11:42 +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
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
Olivier Dony 914b697ee9 [FIX] report_webkit: re-enable test, disabled during new API developement
Requires an extra use_global_header to be added on
the report record, to mimic the super.create()
behavior, as super.create() is not called.
2014-09-11 13:54:16 +02:00
Raphael Collet cbe2dbb672 [MERGE] new v8 api by rco
A squashed merge is required as the conversion of the apiculture branch from
bzr to git was not correctly done. The git history contains irrelevant blobs
and commits. This branch brings a lot of changes and fixes, too many to list
exhaustively.

- New orm api, objects are now used instead of ids
- Environements to encapsulates cr uid context while maintaining backward compatibility
- Field compute attribute is a new object oriented way to define function fields
- Shared browse record cache
- New onchange protocol
- Optional copy flag on fields
- Documentation update
- Dead code cleanup
- Lots of fixes
2014-07-06 17:05:41 +02:00
Christophe Simonis 4601d85944 [MERGE] forward port of branch 7.0 up to 6fdb783 2014-06-10 11:49:14 +02:00
Martin Trigaux 6fdb783a37 Merge pull request #56 from yvaucher/7.0-fix-1319109
[FIX] report_webkit: avoid sharing parser instance globally and make it thread safe
2014-06-10 09:38:48 +02:00
Olivier Dony 2af03e1b6e [MERGE] Forward-port latest 7.0 bugfixes, up to f8671cb 2014-05-22 16:44:33 +02:00
Yannick Vaucher 4ed343455c Fix incompatibility with Windows using tempfile. 2014-05-14 13:22:42 +02:00
Yannick Vaucher e367a54640 fix indentation 2014-05-14 11:50:27 +02:00
Yannick Vaucher 72ab3e81a5 Make report_webkit thread safe by removing parser_instance attribute, as a WebkitParser instance can be shared by multiple thread and thus we don't want a thread to erase parser_instance of anorther thread. 2014-05-13 18:23:48 +02:00
Yannick Vaucher 494f1686c3 Use NamedTemporaryFile instead of file and of deprecated mktemp. That way we ensure 2 files created at the exact same time will have a unique name 2014-05-13 17:56:10 +02:00
Denis Ledoux 02459f8d4a [MERGE] Forward-port of latest 7.0 bugfixes, up to rev. 9929 revid:dle@openerp.com-20140325104921-x8zjx5p71l1o3uif
bzr revid: dle@openerp.com-20140310133913-465x5t3n1bo7fu98
bzr revid: dle@openerp.com-20140311164146-2s599kogbqj8e94l
bzr revid: dle@openerp.com-20140312111149-u6y036aej3ywq7et
bzr revid: dle@openerp.com-20140312121145-06s1jvct9v4m7l6s
bzr revid: mat@openerp.com-20140313084409-c0kckxemy3in0mlo
bzr revid: chs@openerp.com-20140313163420-ifa4hyixj722d6jo
bzr revid: chs@openerp.com-20140314102034-g0nzryvwhrpzdas9
bzr revid: chs@openerp.com-20140314104803-19c5snl2fcuih91o
bzr revid: odo@openerp.com-20140314143519-x6rzcfkkqxwc0e1g
bzr revid: chs@openerp.com-20140318110229-y8098w3shdpmoig2
bzr revid: dle@openerp.com-20140318151824-sscl4m8p87emjl8s
bzr revid: dle@openerp.com-20140320112618-yfyihlwz66ryeqf5
bzr revid: dle@openerp.com-20140320161003-j01cc6sqves2wnp2
bzr revid: dle@openerp.com-20140320181252-4gqcog22p1ex0pz7
bzr revid: dle@openerp.com-20140321140450-8ulnhr76qybiadks
bzr revid: dle@openerp.com-20140324104743-ubvu8st7emq9pg1q
bzr revid: dle@openerp.com-20140325112413-xs5z7y81rhyjt0rd
2014-03-25 12:24:13 +01:00
Simon Lejeune 245e83d43b [FIX] last version of wkhtmltopdf expects all file to have a doctype, inject one if not present
bzr revid: sle@openerp.com-20140324101731-eqzqins3s8uak1yd
2014-03-24 11:17:31 +01:00
Olivier Dony 5cba82e2c9 [MERGE] Forward-port of latest saas-1 bugfixes, up to rev. 8788 dle@openerp.com-20131003094541-ro29hhkas03rdvw8
bzr revid: odo@openerp.com-20131003111222-upt1ytb92db50zay
2013-10-03 13:12:22 +02:00
Martin Trigaux 861c9b9e70 [FIX] report_webkit: correctly catch error in rendering
bzr revid: mat@openerp.com-20130926122437-nx7idmpjmm8k1r9d
2013-09-26 14:24:37 +02:00
Martin Trigaux d2d72d8416 [MERGE] forward port of saas-1 up to revision 8749 (mat@openerp.com-20130702135856-kmg7d8anw17nkbd8)
bzr revid: mat@openerp.com-20130702144646-y1wqs5mz4rzoh50g
2013-07-02 16:46:46 +02:00
Olivier Dony 9ad04d4e9b [FIX] report_webkit: writing to disk implies having bytes to write, convert the unicode Jinja2 output to UTF-8
Jinja2 always returns unicode strings

http://jinja.pocoo.org/docs/api/#jinja2.Template.render

bzr revid: odo@openerp.com-20130624122842-8gs8by3k8jn7bffx
2013-06-24 14:28:42 +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 66eb2e7f3f [MERGE] [IMP] report_webkit: avoid using same src value for two different values with fallback
bzr revid: mat@openerp.com-20130611141016-nbi737zejyc003fd
2013-06-11 16:10:16 +02:00
Martin Trigaux d6383b2a51 [IMP] report_webkit: remove backward compatibility for report path names
bzr revid: mat@openerp.com-20130605100237-dva80nwzlsl8iotg
2013-06-05 12:02:37 +02:00
Martin Trigaux 45c3fd063b [MERGE] Forward porting of latest 7.0 bugfixes, up to rev. 9193
bzr revid: mat@openerp.com-20130604110041-yemgrfsi02uboe8m
2013-06-04 13:00:41 +02:00
Martin Trigaux b7fb321f5b [MERGE] [FIX] correct path for printing webkit reports on windows server, courtesy of Olivier Laurent (Acsone)
lp bug: https://launchpad.net/bugs/1159702 fixed

bzr revid: mat@openerp.com-20130604084631-pv3echfj33qatqug
2013-06-04 10:46:31 +02:00
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
Martin Trigaux 8fd6cb92e7 [IMP] use exact writing for fsf address
bzr revid: mat@openerp.com-20130514142837-jt65d8xjd1eozqst
2013-05-14 16:28:37 +02:00
Martin Trigaux 3c11652fac [IMP] trmove double space in fsf address
bzr revid: mat@openerp.com-20130514141132-610k885sxtcr8vpb
2013-05-14 16:11:32 +02:00
Martin Trigaux 7b8f704f90 [FIX] fix FSF address
bzr revid: mat@openerp.com-20130514120424-xwjzdf3mufifl90d
2013-05-14 14:04:24 +02:00
Vo Minh Thu d248aa30ba [REF] get_module_resource() must imported from openerp.modules (instead of openerp.addons).
bzr revid: vmt@openerp.com-20130417064051-dvtgaya0kzyryvac
2013-04-17 08:40:51 +02:00
Vo Minh Thu 5639a52431 [MERGE] use new report API.
bzr revid: vmt@openerp.com-20130328121009-r3n63gmhfkv0dnby
2013-03-28 13:10:09 +01:00
Vo Minh Thu 6e1cb22110 [REF] report_webkit: removed openerp.pooler imports.
bzr revid: vmt@openerp.com-20130327122144-gqg0ez63g7ksoqaw
2013-03-27 13:21:44 +01:00
Olivier LAURENT 396eec00aa [FIX] path declaration must be OS independant => use '/' as neutral path separator
lp bug: https://launchpad.net/bugs/1159702 fixed

bzr revid: olivier.laurent@acsone.eu-20130325164907-4j1ki08mxp0a6y4o
2013-03-25 17:49:07 +01:00
Olivier LAURENT 8f6e543d70 [FIX] report_webkit: Wrong Report template file path throws 'Coercing to Unicode' error : (Maintenance Case : 583490)
cf.  http://bazaar.launchpad.net/~openerp-dev/openobject-addons/7.0-opw-583490-rgo/revision/8519

bzr revid: olivier.laurent@acsone.eu-20130325164313-ccnkn06x16ar32qz
2013-03-25 17:43:13 +01:00
Vo Minh Thu 3bee1cc4cd [FIX] report_webkit: the registering function was passing the correct parser to the Report class, but in fact, its default was wrong (None would never work).
bzr revid: vmt@openerp.com-20130325123644-v3a9p6oj8qh2a6tb
2013-03-25 13:36:44 +01:00
Vo Minh Thu 9b0ced610f [MERGE] merged trunk.
bzr revid: vmt@openerp.com-20130322134958-jhe6m0222jq7wo41
2013-03-22 14:49:58 +01:00
niv-openerp 048ec2774a Added report extender + demo and doc
bzr revid: nicolas.vanhoren@openerp.com-20130226153047-0qzs21v7xiybrjmj
2013-02-26 16:30:47 +01:00
niv-openerp 49b1fa4b52 Switched to jinja
bzr revid: nicolas.vanhoren@openerp.com-20130226135917-vkxa2gaxyxy1v7b0
2013-02-26 14:59:17 +01:00
Vo Minh Thu 9bb5ee90e4 [IMP] removed unused netsvc imports.
bzr revid: vmt@openerp.com-20130222161029-zecwro75yra2vz0d
2013-02-22 17:10:29 +01:00
Ravi Gohil (OpenERP) 0b637725be [FIX] report_webkit: If a certain translateable term happens to be the same src value as on another report (both webkit and non-webkit reports) the resulting translation on a webkit report uses the first translation found (which is highly likely to be from the other report). (Maintenance Case: 586086)
lp bug: https://launchpad.net/bugs/1098602 fixed

bzr revid: rgo@tinyerp.com-20130215084213-h38jfi447y4qpf94
2013-02-15 14:12:13 +05:30
Ravi Gohil (OpenERP) 6d69fe6639 [FIX] report_webkit: Wrong Report template file path throws 'Coercing to Unicode' error : (Maintenance Case : 583490)
bzr revid: rgo@tinyerp.com-20130101095810-7cbw337ul443q66g
2013-01-01 15:28:10 +05:30
Vo Minh Thu 6072fd11af [MERGE] merged trunk.
bzr revid: vmt@openerp.com-20121210111654-0pm3pupnqqeip52n
2012-12-10 12:16:54 +01:00
Olivier Dony f5fd0fc081 [FIX] report_webkit: fix incorrect usage of get_module_resource()
As of 7.0 get_module_resource() enforces that its first argument
should be a module name, followed by extra path components.

+ minimal lint cleanup

bzr revid: odo@openerp.com-20121207175047-ghv0ic3auq8owt0t
2012-12-07 18:50:47 +01:00
Vo Minh Thu ca89ae8f71 [IMP] use the openerp namespace.
bzr revid: vmt@openerp.com-20121206151316-u1eqx41ltjpz2lrd
2012-12-06 16:13:16 +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
Fabien Pinckaers 745a8ca4c2 [IMP] C2C iprovement of webkit in failed reports
bzr revid: fp@tinyerp.com-20120930125637-m1ydhij1aq7ludsv
2012-09-30 14:56:37 +02:00