Commit Graph
967 Commits
Author SHA1 Message Date
Christophe Monniez 83e460b8da [IMP] web: add a phone input to the database manager
Task: 1879675
2018-09-18 13:54:19 +02:00
Christophe Simonis 68d36512ef [MERGE] forward port branch saas-11.4 up to d78f23df84 2018-09-07 20:20:45 +02:00
ThanhDodeurOdooandPierre Paridans 16aeecc73d [REF] base, mail: Documents (enterprise) related changes
-removed force_ext from ir.http.
    -added signature arg to web/image to differentiate cache entries by URL.
    -added an embed youtube viewer for youtube URL's
    -added a PDF splitter to the PDF viewer UI
    -added tests for mail's Document Viewer
    -added a "signature" param to web/image to go around the browser cache

    -thumbnail field of ir.attachment is now stored in the filestore
    as a distinct attachment.

task 1853490

Co-authored-by: Pierre Paridans <app@odoo.com>
2018-09-07 16:06:47 +02:00
Christophe Simonis 49c3264ce0 [MERGE] forward port branch saas-11.3 up to 4850fb0838 2018-09-07 14:43:48 +02:00
Christophe Simonis f19e6ce561 [MERGE] forward port branch 11.0 up to 213759b03e 2018-09-05 18:52:27 +02:00
ThanhDodeurOdoo 5e855453ae [FIX] web: web/image route image type fix
- the http route, when given width and height arguments is no
longer forcing the type PNG (which resulted in heavier images than the
original).
2018-09-05 16:33:25 +02:00
Olivier Dony fec74a6da5 [FIX] web: make server-wide modules ordered again
Rev. 279d928693 forced
`server_wide_modules` to include 'base' and 'web', because both contain
controllers that need to be always loaded.

However the patch used a set() that randomized the order of the list,
when combined with Python 3.5's randomized hash function.

This is turn could cause the checksum of asset bundles (web.assets_backend)
to randomly vary, which could cause rapid assets recycling and errors.
2018-09-05 14:47:55 +02:00
Nicolas Martinelli eaff0a71bd [FIX] web: export field with '/'
- Activate lots and SN
- Go to Inventory > Inventory Adjustments
- Export a record
- Select the field 'Inventories > Lot/Serial Number'

The `name_get` of the field is exported, not its XMLID.

This is because the parsing made in order to limit the depth of export
is made on the label, not on the field name.

Actually, it is not clear WHY this limitation exists, but we keep it for
compatibility purpose.

opw-1877092
2018-09-04 11:40:19 +02:00
Jeremy KerstenandDerie Romain 853e13800f [IMP] base,web,website: asset bundle make url overridable
Allow to override the asset url generation to add in the path the website ID
and avoid continue invalidation cache and bad cache by browser.

Asset url is:
    "/web/content/{id}-{unique}/{extra}{name}{page}{type}"
with:
    id = attachment id
    unique = hash
    extra = allow to add custom params eg: website_id/ or rtl/
    name = filename
    page = used in css to split rules 4095 / file
    type = css|js

Co-authored-by: Derie Romain <rde@odoo.com>
Co-authored-by: Kersten Jérémy <jke@odoo.com>
2018-08-13 20:16:34 +02:00
60aa9ffd01 [IMP] base,mail,web: attachments adaptation for documents
This commit is the counter-part of an enteprise commit introducing
the Documents app.

Here is a summary of what has been done:
  - tweak unlink of ir_attachment to prevent unlink recursivity
    (when attachments are attached to ir_attachments)
  - improve ir_attachment kanban view
  - add several arguments to binary_content controller:
    - 'force_ext': to force the extension in the filename, base on
      mimetype
    - 'share_token' and 'share_id': to autorize download from a
      share link
  - add 'thumbnail' field on ir_attachment to optimize Kanban view
  - add 'upper_limit' argument to image to allow to bypass the
    500*500 size limit
  - DocumentViewer now handles text files

More information available on task 1853490

Co-authored-by: Pierre Paridans <app@odoo.com>
Co-authored-by: sri-odoo <sri@odoo.com>
Co-authored-by: ThanhDodeurOdoo <tso@odoo.com>
2018-08-13 09:11:53 +02:00
Christophe Simonis 7499b47ffa [MERGE] forward port branch saas-11.4 up to edd586002e 2018-08-10 13:37:21 +02:00
Christophe Simonis 7717f082c0 [MERGE] forward port branch saas-11.3 up to af35aea6b0 2018-08-09 19:33:32 +02:00
Christophe Simonis 9cb97a8c2d [MERGE] forward port branch saas-11.2 up to 499af66727 2018-08-09 15:06:31 +02:00
William Henrotin 480184115d [ADD] base: report: qweb-text type
This commit adds a new ir.action.report type: qweb-text. It produces text files,
serves them with a text mimetype and these reports use the same rendering context
as the current other types (PDF and HTML).

This will be used in a following commit to produce ZPL scripts. Those scripts
are used for printing thermal label on Zebra printers.

task ID : 1837175
2018-08-09 14:33:03 +02:00
Christophe Simonis efe2dcd7ae [MERGE] forward port branch 11.0 up to ced9156a97 2018-08-07 19:08:07 +02:00
Xavier Morel aac21e4125 [CHG] Change login/auth internal protocol
* Make Users._login and session.authenticate always raise AccessDenied
  on authentication failure instead of only sometimes (cf
  Session.authenticate calling security.check() which raises and not
  catching the exception)
* Alter AccessDenied such that it's possible to add a custom access
  message, for use with login rate limiting instead of smuggling the
  information via the session
* Alter the RPC endpoints to catch and convert AccessDenied back to
  a boolean sentinel
2018-07-26 15:53:26 +02:00
Xavier Morel a8d868e287 [ADD] Rate limiting to (failed) login attempts
Task 31122 section 4.

Implement per-IP rate limiting of login attempts after some number
of failures.

* check_credentials has no reason to be public, make it private
* add hooks to check for login cooldown on a source IP (remote_addr:
  http://werkzeug.pocoo.org/docs/0.14/wrappers/#werkzeug.wrappers.BaseRequest.remote_addr)
  basis
* add baseline/default configuration of 60s cooldown
* add baseline threshold of 10 login failures, after checking odoo.com
  logs it looks like we have short runs of up to 7 failures (assumed
  to be legitimate) before the user either gets it right or goes and
  looks it up

Depends on #24187
2018-07-26 15:53:26 +02:00
Jigar Patel b60de0db41 [IMP] import/export UIs
Task 40692

Various changes to import/export (mainly) UIs:

* default to excel & "full" (non-import-compatible) export
* auto-detect encoding of CSV using chardet
* remember column -> field mapping after having imported a file (useful
   for repeated imports where auto-matching failed)
* better handle localised booleans & column names
* automatically select source list view's fields when exporting
* better integrate import templates feature and add a number of templates
2018-07-17 15:19:05 +02:00
Christophe Simonis 8285630ad2 [MERGE] forward port branch saas-11.3 up to 609491ad0e 2018-07-13 17:12:07 +02:00
Christophe Simonis f3929aa0f7 [MERGE] forward port branch saas-11.2 up to 87dadc5bc8 2018-07-13 14:32:05 +02:00
Christophe Simonis c952a11770 [MERGE] forward port branch 11.0 up to 6e6e3d4c96 2018-07-13 10:47:18 +02:00
gmarcon baf6b29d45 [FIX] web: build xls file with maximum size
An MS Excel file can have maximum 32767 characters

Fixes #25653 
Closes #25700 

https://support.office.com/en-us/article/excel-specifications-and-limits-1672b34d-7043-467e-8e27-269d656771c3
2018-07-10 16:25:04 +02:00
Christophe Simonis 5decf4ab3d [FIX] web: clean data_file after restore
The file used for the restoration was not properly removed
2018-06-18 19:35:42 +02:00
Christophe Simonis 279d928693 [FIX] core: always load base and web as server wide modules
Since 285ead28e3, `base` should be loaded
as a server wide module to enable rpc routes.
2018-06-05 14:46:24 +02:00
Christophe Simonis 37eed7c509 [MERGE] forward port branch saas-11.2 up to 58e3552246 2018-05-25 14:34:18 +02:00
Christophe Simonis 2bc6ea1b37 [MERGE] forward port branch 11.0 up to 02ee3fd88e 2018-05-23 19:33:40 +02:00
len-odoo 8194e2cb80 [FIX] web: correctly handle admin svg images in channel
When posting an svg image, Odoo tries to resize it for thumbnailing
(like any image).
However this is of no interest since this is a vectorial file format, and
furthermore it distastefully makes the image library Pillow crash, since it only
supports raster formats.
The result would be a broken thumbnail instead of the image itself.

By not setting the thumbnail size if the mimetype contains svg,
we ignore the thumbnailing altogether.

Note that this only applies to the admin user, as otherwise the file is
treated as binary and thus no thumbnailing occurs anyway.

opw 1841153
2018-05-18 13:33:30 +02:00
Christophe Simonis 644f0959d0 [MERGE] forward port branch saas-11.2 up to 1655202924 2018-05-17 14:23:37 +02:00
Christophe Simonis fa8a67ee5f [MERGE] forward port branch 11.0 up to 5a943390f2 2018-05-15 20:18:14 +02:00
Goffin Simon 871387ca9e [FIX] web: Impossible to add an attachment on Safari
Fine tuning of cd6150fe9e

opw:1840373
2018-05-15 09:20:02 +02:00
Christophe Simonis 1f22b81203 [MERGE] forward port branch saas-11.2 up to 7113b70762 2018-04-23 19:36:25 +02:00
Christophe Simonis e8bf128318 [MERGE] forward port branch 11.0 up to 3ab25b60bc 2018-04-23 18:15:25 +02:00
Christophe Simonis 3ab25b60bc [MERGE] forward port branch saas-15 up to cae950e826 2018-04-23 17:59:59 +02:00
Christophe Simonis 0bf642cb27 [MERGE] forward port branch saas-14 up to 2bc3fd89f2 2018-04-23 14:47:23 +02:00
Christophe Simonis 2bc3fd89f2 [MERGE] forward port branch 10.0 up to 2d12ae3202 2018-04-23 14:39:41 +02:00
Christophe Simonis 2d12ae3202 [MERGE] forward port branch 9.0 up to c9e7433c23 2018-04-23 14:07:12 +02:00
Lucas Perais (lpe) cd6150fe9e [FIX] web: NFD UTF-8 for safari in upload file
Before this commit, when uploading a file as attachment in Safari,
The file icon kept on showing 'downloading' whereas the request was successful

This was because the return from the server had a different UTF-8 norm than Safari

After this commit, it works well

OPW 1836545
closes #24307
2018-04-23 09:00:11 +02:00
Christophe Simonis c309ccd7b3 [MERGE] forward port branch saas-11.2 up to fed775bc0c 2018-04-18 18:30:35 +02:00
Christophe Simonis fed775bc0c [MERGE] forward port branch 11.0 up to 8c64159b88 2018-04-18 18:20:40 +02:00
Christophe Simonis 16ec176620 [MERGE] forward port branch saas-14 up to 67054b6dcb 2018-04-18 13:49:24 +02:00
Christophe Simonis 67054b6dcb [MERGE] forward port branch 10.0 up to 2f037a13ca 2018-04-18 12:14:53 +02:00
Christophe Simonis 2f037a13ca [MERGE] forward port branch 9.0 up to cf163d19ee 2018-04-18 11:32:27 +02:00
Alexandre Kühn cf163d19ee [FIX] board,web: edit custom views in place
Before this commit, whenever we do an operation on any of these custom views,
such as folding it, the custom view was saved by creating a new one.

This behaviour comes from a lost feature to undo operations on custom views.
Since we do not have this feature anymore, it makes no sense to create new
custom views on save, instead of applying the changes in place.

With this commit, custom views are edited in place.

Fixes #23712
2018-04-17 17:32:27 +02:00
Alexandre Kühn b15e805b5a [FIX] board,web: edit custom views in place
Before this commit, whenever we do an operation on any of these custom views,
such as folding it, the custom view was saved by creating a new one.

This behaviour comes from a lost feature to undo operations on custom views.
Since we do not have this feature anymore, it makes no sense to create new
custom views on save, instead of applying the changes in place.

With this commit, custom views are edited in place.

Fixes #23712
2018-04-17 17:28:49 +02:00
Christophe Simonis 845f4ef7d3 [MERGE] forward port branch saas-11.2 up to 8a7b845353 2018-03-23 10:31:00 +01:00
Christophe Simonis cdbee48888 [MERGE] forward port branch 11.0 up to 39d9c362c5 2018-03-22 20:05:14 +01:00
Toufik Benjaa 4787bc7553 [FIX] reports: Remove dead code for non qweb reports 2018-03-22 15:33:18 +01:00
Christophe Simonis 2a9d3812a6 [MERGE] forward port branch saas-15 up to 3fce2b769e 2018-03-22 15:02:58 +01:00
Christophe Simonis 3fce2b769e [MERGE] forward port branch saas-14 up to d8c6e56975 2018-03-22 14:13:59 +01:00
Christophe Simonis f16a6c90d3 [MERGE] forward port branch 10.0 up to 9aa1b7ba12 2018-03-22 11:41:27 +01:00