Commit Graph
41 Commits
Author SHA1 Message Date
Jeremy Kersten e6e07ec1a3 [FIX] website_slide: avoid traceback when channel not readable
If the user has limited_access, download_security field was not read due to the
override of check_field_access_rights and so the field not set.
When you try to access/read it, you got: Selection is not iterable.

Now we check in sudo the download_security.

We also add the **kw that should be present in all routes.
Avoid: "slide_download() got an unexpected keyword argument 'debug'"

We also remove this controller from the sitemap.
2018-04-24 21:18:02 +02:00
Lucas Perais (lpe) cad10e6b78 [FIX] website_slides: typo in route definition pager
Before this commit, the route to the pager couldn't be resolved
because the <model("xxx.xxx") was having a typo

Now it doesn't, no traceback nor 500 error

OPW 801651
2017-12-27 16:34:44 +01:00
Christophe Simonis de93645fe3 [MERGE] forward port branch saas-16 up to 82add438f2 2017-11-09 19:16:05 +01:00
Christophe Simonis 82add438f2 [MERGE] forward port branch saas-15 up to 90ca872071 2017-11-09 18:05:49 +01:00
Christophe Simonis 9c634b5b30 [MERGE] forward port branch 10.0 up to a63ecee47a 2017-11-09 15:16:57 +01:00
Christophe Simonis 9342517fcf [MERGE] forward port branch 9.0 up to 35aa2a977f 2017-11-08 17:30:45 +01:00
Jeremy Kersten 35aa2a977f [FIX] website_slide: fix traceback when slide is a google doc or youtube link
In case we are not uploading a file but add a slide based on google doc url
or youtube link, post['datas'] is not set and the code will crash.

Javascript don't check the onError, so the user never see the error and wait
 that nothing happend.
2017-11-08 13:00:07 +01:00
Christophe Simonis 99bf9e4563 [MERGE] forward port branch saas-16 up to 89df681b45 2017-09-28 13:24:14 +02:00
Christophe Simonis 89df681b45 [MERGE] forward port branch saas-15 up to da15615c45 2017-09-28 11:56:23 +02:00
Jeremy Kersten 95634c967f [FIX] website, website_slide: fix enumerate_page
Use rec_name in domain because some model like survey.survey don't have name field.
Check that query_string is setted to avoid traceback 'lower of None'
2017-09-27 23:32:40 +02:00
Jeremy Kersten 1b52b00d2a [IMP] website*: clean sitemap + add method to declare sitemap function.
Don't add useless routes or route that will return 404.
Improve generate function from ModelConverter to have a better management of
query_string.

Now we have an helper sitemap_qs2dom that will analyse the current route and
check if query string is plausible and if yes, generate a domain, when the
query_string don't seems to match the route, we return a Falsy domain.

Before this commit, if qs was /product/ipad, enumerate_page check for each
modelconverter of the route a name ilike '/product/ipad'.

Now we check all routes that contains product and one converter that match ipad
or routes that contains ipad and one converter that match product.

This commit a new way to declare the sitemap for a route.
    def sitemap_xx(env, rule, query_string):
        yield {'loc': '/my_url'}
    @http.route(..., sitemap=sitemap_xx)

    In this case, only the loc returned by this function will be in the sitemap
    for all rules.

    You can pass sitempa=False, if you don't want that route are into the sitemap
2017-09-27 21:33:49 +02:00
Christophe Simonis af117236de [MERGE] forward port branch 10.0 up to 8165018058 2017-09-27 17:07:23 +02:00
Christophe Simonis 6836828a3e [MERGE] forward port branch 9.0 up to 1970761554 2017-09-27 13:20:29 +02:00
qsm-odoo e520aabc43 [FIX] website_slides: allow upload of >20MB files (as limit is 25MB)
There is a double-check (on client and on server) to prevent the user to
upload a >25 MB document. The client checks the actual file size while
the server guesses it from the total received payload. This server guess
is wrong as the extra payload is quite huge (5-10MB). Now the server
checks the real file size as it should have from the beginning.
2017-09-26 14:04:55 +02:00
Xavier Morel 3824b5dcc1 [FIX] P3: fix base64 and StringIO uses
* StringIO removed from stdlib, replace with io
* try to correctly handle BytesIO/StringIO (one is for bytes the other
  is for text)
* fix base64: Python 3 removed bytes-encoding and bytes-bytes
  codecs (via #encode) so replace all calls to str.encode('base64'),
  also b64encode is a bytes->bytes conversion so attempt to properly
  handle that

issue #8530
2017-08-20 23:25:54 +02:00
Jérome Maes 870b51134d [IMP] website_slide: use classical chatter
Slide provided a chatter where you can post message as
public user. We decided to drop that feature in order
to avoid spamming.
Like for all other document, you must at least, be portal
user to post a comment.
Reusing the standart chatter highly simplify the code.
2017-06-30 11:07:01 +02:00
Xavier Morel 07ab8b6cd2 [FIX] P3: Exception.message removed 2017-05-12 16:15:40 +02:00
xmo-odoo fffaf735f5 [FIX] P3: list -> iterable builtins (#16811)
In Python 3:

* various builtins and dict methods were changed to return
  view/iterable objects rather than lists
* and the separate Python 2 view/iterable builtins and methods were
  removed altogether

This is problematic when using these items as list (which the happens
repeatedly in Odoo), but more viciously when iterating *multiple times*
over them (which also happens, which I've messed up multiple times while
writing this, and which is a pain to debug even when you've just created
the issue).

Convert all code using these to semantics-matching cross-version
helper functions to get the LCD behaviour between P2 and P3, and
forbid the builtins via lint.

issue #8530
2017-05-10 09:39:55 +02:00
xmo-odoo b4429c2a91 [FIX] Various P3-related import changes
* LDAP import: python-ldap is not python3-compatible, pyldap is

  Warning: only supported from debian Stretch (current testing)?
  https://packages.debian.org/search?searchon=names&keywords=pyldap

* implicitly relative imports
* imports of moved or removed stdlib modules

issue #8530
2017-04-28 09:06:53 +02:00
Raphael Collet d0ca2d115e [REF] ir_config_parameter: remove group_ids and simplify
Add `sudo()` to call `get_param` where necessary, and make the web client use a
controller instead of directly accessing parameters.
2017-01-03 16:52:49 +01:00
Raphael Collet 4033ccc129 [REM] openerp.http: discard deprecated methods and properties 2016-08-31 17:21:57 +02:00
Christophe Simonis 235ed4b2c1 [MERGE] forward port branch saas-12 up to 9ad5f26 2016-08-20 18:08:19 +02:00
Christophe Simonis 9ad5f26b3f [MERGE] forward port branch saas-11 up to 3a2147d 2016-08-20 17:18:31 +02:00
Aristobulo Meneses 5e7d23f1be [FIX] website_slides: Set file size limit to 25MB to match web module limits
This commit closes #13223
This commit closes #13225
2016-08-19 15:34:58 +02:00
Thibault Delavallée c8a313d51e [IMP] various: use odoo for imports instead of openerp and update class names 2016-08-10 15:48:07 +02:00
Jérome Maes 8a399930f3 [REF] website_*: remove render method on website
Since saas-3, website controllers use `request.website.render`
to render the template of a web page. This was kept for retro
compatibility. It's time to stop using deprecated stuff.
Same for `_render` method on website.

'json' route don't use `request.render` since
`JsonRequest` has no `render` method.
2016-08-04 12:02:14 +02:00
fwi-odoo d4e813b873 [REF] web, *: change deprecated import openerp.addons.web.http to odoo.http
We also remove the mock in web as there is no need for it anymore.
2016-08-03 13:42:05 +02:00
Foram Shah 052dcd3ee8 [IMP] web: 'Not Archived' becomes 'Active', 'Not published' becomes 'Unpublished'
Another reason why it’s better to change ‘not archived’ into ‘active’ is
because ‘active’ is the functional name of this field in the filter list in list view.

For the rest, it’s just a better en_US way of saying it.
2016-06-14 16:23:50 +02:00
Jeremy Kersten 36602305dd [FIX] website_slide: add domain on model converter
Avoid to index 403 pages
2016-02-15 15:48:43 +01:00
Jeremy Kersten 7f7c31aa89 [FIX] website_slide: promote is for employees only.
Avoid to be in sitemap.
Anyway, it is show only if group user and no permission for public user.
2016-02-15 15:48:43 +01:00
Martin Trigaux bb56e484b7 [FIX] all: construction of translations lookup
When evaluated, the translation function never finds a match if a variable is
integrated into the untranslated text.

SHAME! 🔔 🙋
2016-01-13 14:46:30 +01:00
Jeremy Kersten 91aa450533 [FIX] website_slide: add domain on controller pdf_content for SEO
Add domain on route to avoid sitemap to index this route if
nothing to display.

Return empty data if route called for a slide without datas.
2016-01-08 23:55:44 +01:00
Martin Trigaux 04ae8023f6 [FIX] *: various English errors
Unclear or incorrect sentenses.
Courtesy of Eric Geens
2015-09-14 12:14:06 +02:00
Dharmraj Jhala 36815037b8 [IMP] website_slides : usability improvements 2015-09-07 13:37:50 +02:00
Thibault Delavallée 14dea96a4e [FIX mail: decorator issue
A method was designed to work in multi, but used sometimes as model
and sometimes as one.
2015-08-28 15:15:35 +02:00
Christophe Matthieu 6baf611df1 [IMP] web: create generic controller '/web/content' and '/web/image'
Replace deprecate controllers like /web/binary/image, /web/binary/saveas...
Use ETag for all content with 'unique' option to cache the content if the content is never changed.
2015-08-21 22:06:52 +02:00
Christophe Matthieu 9665882fba [IMP] web_editor: adapt css, js and xml to use web_editor 2015-07-10 17:00:12 +02:00
Jérome Maes ea022f0d4a [FIX] website_blog, website_sale, website_quote, website_slide : fix adding comment after mail migration
The commit 4b122ad41d rename the 'type' field of mail.message into 'message_type'. The change was not applied to the adding comment feature of website module. The comments were posted but not displayed.
2015-05-04 17:17:31 +02:00
Ravi Gadhia 98debe7820 [FIX] website_slides : hide popover to like/dislike, hidden upload button for public user, promote button only for employee, better error messages and ui improvements. 2015-02-06 11:50:38 +01:00
Thibault Delavallée eb58572ac2 [IMP][REF] website_customer, website_event, website_livechat, website_sale_delivery,
website_slides: use the recently introduced website.published.mixin to
replace the website_published and website_url fields defined in various
remaining modules.

In slides, some templates have been updated because share_url was basically
website_url and has been replaced.
2015-01-28 16:21:24 +01:00
Mantavya Gajjar 51be5bbfb3 [ADD] website_slides: new website module to handle presentations, documents,
videos, infographics. Some kind of slideshare clone, to summarize.

Featuring :
- channel management: classify slides (presentations, videos, documents, ...)
and tune their access rights for visibility, uploading and downloading
- full branding new shiny website module !
- automatic fetch of youtube and google docs information based on URL
- statistics: views, likes, interfaced with messaging, ...
- embed mechanism to embed slides in other websites

Courtesy of RD India, notably Mantavya Gajjar, Ravi Gadhia,  Vijay Patel,
Pariket Trivedi
Courtesy of Use Merge Team, notably Jerome Maes and Richard Mathot
Let us not forget our usability testing teams that tested it quite a lot of time.

Special thanks to Martin Trigaux that did nothing.
2015-01-16 16:01:59 +01:00