Commit Graph
35 Commits
Author SHA1 Message Date
Christophe Simonis df45a3128d [MERGE] forward port of branch 8.0 up to 1d0b9da 2016-04-01 18:25:48 +02:00
Denis Ledoux 6e07ae5a5c [FIX] google_drive: Generate Google Authorization Code URL
When checking `Attach Google documents to any record`
in the general settings, if you are not redirected
to a module, but, instead, the current page is refreshed
(the wizard is reloaded instead of creating a new
configuration wizard),
the default value for `google_drive_uri` was not correctly
loaded, the `client_id` in the URL
remained `False` because the wizard was not being
re-created, but reloaded,
and therefore `default_get` hasn't been re-called,
and the `client_id` changed
(it was added to the system parameters after
the installation of the module)

Therefore, the link did not include the correct
`client_id`, and it leaded to the inabibility
to use the URL:
401. That’s an error.
The OAuth client was not found.

Replacing the simple char fields by a function
field, with the correct store trigger,
force the URL value to be reloaded
when the system parameter is inserted.

opw-673274
2016-03-30 16:15:36 +02:00
Christophe Simonis 6d85a9a4b9 [MERGE] forward port of branch 8.0 up to d744923 2015-08-27 18:30:46 +02:00
Nicolas Lempereur 19e9163367 [FIX] google_drive: code want uncompressed data
This commit removes the request of having gzip or deflate data for two
requests to google drive API.

Previously the code worked since google api would send ungzipped data
(maybe base on urllib2 user agent or other input parameters) but after
a recent change on google part, it is not anymore the case.

closes #8243
opw-648007

note: if we did not do this, we would either need to use requests or add
custom uncompressing code for urllib2 response content.
2015-08-26 14:23:44 +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 313acf87a2 [MERGE] forward port of branch 8.0 up to d780014 2015-03-26 18:44:22 +01:00
Christophe Simonis 12416eb35f [FIX] google_*: set a timeout when contacting google servers 2015-03-26 17:48:25 +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
rlu-odoo 8b67a7202d [REF] OpenERP --> Odoo in various UI texts
Rebranding has been done in:
- data/demo files
- html templates
- help notices
- comments
- logger messages
- and other various messages

(Commit taken from odoo-dev:8.0-improve-openerp-odoo-rlu at rev 7deaa08)

Closes #1260
2014-07-18 13:45:41 +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
ssh-odoo 6cc4bd4312 [Imp]:Improve configuration warning msg
[imp]:remove space

[rem]:remove code

[imp]:remove changes

[imp]:remove changes

[rem]:remove unused changes
2014-07-03 16:11:15 +05:30
Jeremy Kersten f337bcaa1d [IMP] ir.config.parameters: support group-based access control 2014-06-26 16:27:24 +02:00
Jaydeep Barot 026e38b48f [REM] Unnecessary size parameters on char fields 2014-06-25 17:13:43 +02:00
Denis Ledoux 0306adbfe3 [FIX] *: using werkzeug.url_encode instead of urllib.urlencode because urliblib.encode does not accept unicode
bzr revid: dle@openerp.com-20140129121316-b5f5e4r6fz9l80kq
2014-01-29 13:13:16 +01:00
Denis Ledoux 1cfd7ec102 [FIX] google_drive: anyone with the link can now write
We used to give write access to the email address of the current user, but if the email is not a google account, there is no way for the current user to write on the data (except if the current email address is also the email which has done the oauth activation in the settings).

bzr revid: dle@openerp.com-20140115093528-ir39ppqrinjqyeta
2014-01-15 10:35:28 +01:00
Denis Ledoux 274b9c9503 [FIX]google_drive: using res.users has_group method to know if the user is admin, instead of reading groups_id of the user (and, also, fixed the read call with a string instead of an array for the fields to read)
bzr revid: dle@openerp.com-20131127142049-v9sr5ldc9g4cct98
2013-11-27 15:20:49 +01:00
Denis Ledoux 8bc3ffd234 [FIX]google_drive: permission granted for anyone with the link has been set to readonly, and add write permission to current user (email) only
bzr revid: dle@openerp.com-20131017142545-81ab6xbqi5nb6c06
2013-10-17 16:25:45 +02:00
Denis Ledoux af9b8590b5 [FIX]google_drive: when create a document in drive, add the permission 'writer' to 'anyone with the link'. Hence, anyone that can see the attachement, can edit the document
bzr revid: dle@openerp.com-20131017134744-nr9g21rhebtpkq4s
2013-10-17 15:47:44 +02:00
Olivier Dony d72ccec81a [FIX] google_drive: base.config.settings must be a TransientModel
Making it a real Model causes access right errors,
as it has no ACLs. 
+ cleanup other model declarations

bzr revid: odo@openerp.com-20131016164135-uf3gxe0p1i6h3xyq
2013-10-16 18:41:35 +02:00
Olivier Dony 23b209047b [FIX] google_drive, google_base_account: safer management of auth code, better usability
Persist the auth code in the settings to show
that it has already been set, even if it is not
technically used by the system.
Also fixed a variable referenced before assignment.

bzr revid: odo@openerp.com-20131016163908-9d05x85me3n30ala
2013-10-16 18:39:08 +02:00
Denis Ledoux f3e189698d [FIX]google_drive, google_spreadsheet: move of get_google_scope in google objects instead of config
bzr revid: dle@openerp.com-20130724153754-thj2l0b1t4lw136j
2013-07-24 17:37:54 +02:00
Denis Ledoux 54de4095ae [FIX]google_drive, google_spreadsheet: go to configuration panel only for group settings, spreadsheet attached to model without res_id
bzr revid: dle@openerp.com-20130724130534-axyvc0u0g1um07fg
2013-07-24 15:05:34 +02:00
Denis Ledoux 9ae6b18ded [FIX]google_spreadsheet: add active field on google drive template and handle when auth_crypt is installed
bzr revid: dle@openerp.com-20130723130453-0vns37b89v622kh0
2013-07-23 15:04:53 +02:00
Denis Ledoux 8fe619095b [ADD]google_spreadsheet: view (ir.attachement) in reporting, formula used in description of attachement
bzr revid: dle@openerp.com-20130722164508-1849vgrr6j0j6yhk
2013-07-22 18:45:08 +02:00
Denis Ledoux 5a1b08bfbd [FIX]google_spreadsheet: write formula once spreadsheet opened
bzr revid: dle@openerp.com-20130722143034-4tf8mr71ocf049ma
2013-07-22 16:30:34 +02:00
Denis Ledoux bf1163c99a [FIX]google_drive: resource_get func fields, ressource_id can have '_' in id, remove of refresh_token in data(useless), try except for various urllib calls
bzr revid: dle@openerp.com-20130627150145-4fruh3ysqoce7bcj
2013-06-27 17:01:45 +02:00
Denis Ledoux fa228290af [FIX]google_drive: refresh token from authorization code not anymore in on change method, google base account not inheriting from base setting
bzr revid: dle@openerp.com-20130627143713-lgqgi0px7qb18rup
2013-06-27 16:37:13 +02:00
Denis Ledoux 1d85a0648c [FIX]google_drive,google_base_account: back to httpllib
bzr revid: dle@openerp.com-20130626170035-rd4rzil801vbzxro
2013-06-26 19:00:35 +02:00
Denis Ledoux fab8c0682f [IMP]google_drive: ressource_id with regex
bzr revid: dle@openerp.com-20130626150719-ry3wdngld3wfmdrt
2013-06-26 17:07:19 +02:00
Denis Ledoux afa6ea8e4f [IMP]google_drive: cleanup
bzr revid: dle@openerp.com-20130626145213-37to2q3q9jh4lnsg
2013-06-26 16:52:13 +02:00
Denis Ledoux f694c37b83 tmp
bzr revid: dle@openerp.com-20130626133552-gtfhzvxsi1oj3pdm
2013-06-26 15:35:52 +02:00
Denis Ledoux 66520d9e8e [FLAKE8]
bzr revid: dle@openerp.com-20130626095736-0ni7i86wckc6coo5
2013-06-26 11:57:36 +02:00
Denis Ledoux 2da193d242 [FIX]base_setup,google_drive: res_config view correction for module google drive
bzr revid: dle@openerp.com-20130626095005-wx9x79pmqg8o2de7
2013-06-26 11:50:05 +02:00
Denis Ledoux c74517990f [RENAME]google_docs => google_drive
bzr revid: dle@openerp.com-20130626093019-krwt5eamagmd5amu
2013-06-26 11:30:19 +02:00