Commit Graph

197 Commits

Author SHA1 Message Date
Christophe Matthieu 8a0b4ca39f [FIX] website: display website_published image without access to the model
Issue: if the user don't have any access to the model, _image method raise an exception instead of display the website_published images.
2015-12-10 10:02:37 +01:00
Antonio Espinosa 91d54a0d7d [FIX] website: google_map_link zoom was forced to '10'
Use the parameter zoom as in `google_map_img`
Change the default value to 10 to avoid changing the behaviour for existing
links (zoom was not used anyway).

Closes #8318
2015-10-05 10:24:30 +02:00
Antonio Espinosa 74711efa0a [FIX] website: Default company of website model
Default website.company_id to base.main_company instead of base.public_user

base.public_user being a `res.users` and not a `res.company`

Closes #8236
2015-09-09 17:23:54 +02:00
Christophe Simonis db23690db3 [FIX] website: json are not multilang by default.
This avoid useless redirection.
2015-04-08 18:31:43 +02:00
Raphael Collet 0beb14f0d2 [FIX] ormcache: fix calls to `ormcache` with unexpected context parameter
The implementation of `ormcache` does not work on methods that take a `context`
parameter.  Because of the decorator `decorator`, the arguments of the call are
passed positionally to the method `ormcache.lookup`, and positional arguments
are used in the cache key.

The fix consists in removing the `context` parameter from the faulty methods,
either directly, or by caching a private method called by the public method.
2015-03-26 16:42:10 +01:00
Jeremy Kersten 9d89b179c4 [FIX] website: search a matching route with http method POST
When url_for was looking for a route which match, it was only looking for GET route.
So routes which were restricted to be used only with a POST method, were never found.

The result was that urls in website for route post (form in most cases) was never prefixed with the lang.
So the request.lang was always the default lang from website...

If you was creating a sale order (in ecommerce), the lang used in sale order was wrong and the description not in the current lang.
2015-01-15 23:16:33 +01:00
Denis Ledoux 2bebba76d0 [FIX] website: image_url fallback when no write_date 2014-12-12 13:09:07 +01:00
Denis Ledoux b499eac2ed [FIX] website: the attachment creation improvment of a3e578068e must be done on res_model
instead of type
2014-11-25 19:26:13 +01:00
Denis Ledoux a3e578068e [FIX] website: improve performance for attachment creation
website introduces two new stored function fields, which depend on the attachment data
The thing is, these two fields are pertinent for website attachments only
Therefore, we avoid to read the datas field when the attachment is not a website attachment(when not needed), as this is the most costly field to read
2014-11-25 14:39:54 +01:00
Raphael Collet f2e4a10e1a [IMP] use model._fields instead of model._all_columns to cover all fields
The old-api model._all_columns contains information about model._columns and
inherited columns.  This dictionary is missing new-api computed non-stored
fields, and the new field objects provide a more readable api...

This commit contains the following changes:

 - adapt several methods of BaseModel to use fields instead of columns and
   _all_columns

 - copy all semantic-free attributes of related fields from their source

 - add attribute 'group_operator' on integer and float fields

 - base, base_action_rule, crm, edi, hr, mail, mass_mailing, pad,
   payment_acquirer, share, website, website_crm, website_mail: simply use
   _fields instead of _all_columns

 - base, decimal_precision, website: adapt qweb rendering methods to use fields
   instead of columns
2014-11-04 13:47:57 +01:00
Fabien Meghazi 3e07eaa308 [FIX] Regression in image resize helper (Fixes #2529)
Commit 57ad514b makes the function preserve the aspect ration of the
original picture. Error of mine because the expected behavior was to
lose it for kanban view purpose.

For backward compatibility sake, this commit will keep the old behavior
by default.
2014-10-27 17:55:08 +01:00
Martin Trigaux d5235f7326 [IMP] website: google maps url
Use the protocol as the current page to avoid warning with mixed content (loading map in http inside an https page)
2014-10-23 12:38:31 +02:00
Fabien Meghazi 51477fb4f6 [IMP] Brought back /website/image route w/filename hinted in headers
Also added support for this route in widget Image#from_html()
2014-09-17 16:54:08 +02:00
Fabien Meghazi cf3e517b58 [FIX] website.image_url() access rights 2014-09-16 21:32:37 +02:00
Fabien Meghazi 954f20c800 [ADD] image_save_for_web() format argument 2014-09-16 19:55:00 +02:00
Fabien Meghazi 89362bd6cd [ADD] tools.image_save_for_web() helper for image compression 2014-09-16 19:55:00 +02:00
Fabien Meghazi 3f27066019 [IMP] Compress resized /website/image's
Refactored and fixed tools.image_resize_image() that converted to RGBA
after making thumbnails, resulting in bad looking picture in case the
source is in 'P' mode (indexed palette)
2014-09-16 19:55:00 +02:00
Fabien Meghazi bc5e6fa2cb [ADD] Helper for /website/image (allows to use aggressive cache) 2014-09-16 19:54:59 +02:00
Fabien Meghazi 18068a5e79 [FIX] website.layout hreflangs
- First line is not correct due to url_for() refactoring's leftover
- href's should be full urls with domain name
- Use short language for hreflang if possible
2014-08-25 17:43:39 +02:00
Christophe Matthieu c3d2540477 [FIX] website.editor: must display link information in linkdialox box. Remove /page/ and /page/website. from the needle to search page and apply real url as filter after the search 2014-08-20 17:54:10 +02:00
Christophe Simonis b3ddbee543 [FIX] website: correct unslugify of routes 2014-08-19 16:43:23 +02:00
Denis Ledoux ae65be2b2a [MERGE] forward port of branch saas-5 up to 0739bc4 2014-08-11 15:58:02 +02:00
Christophe Simonis f2cb8702b2 [FIX] website: correct image resizing 2014-08-06 16:20:22 +02:00
Olivier Dony 5d72326fac [IMP] website: unused imports 2014-07-30 13:24:39 +02:00
Olivier Dony 7739d9ed84 [FIX] website.menu: url field should not be translated
Pages are made translatable using a dedicated mechanism,
and there is no UI to translate menu URLs anyway.
2014-07-30 13:24:39 +02:00
Xavier Morel 3f8fd0dad6 [IMP] website_hr_recruitment: new API 2014-07-15 13:56:19 +02:00
Christophe Matthieu 0effbe3ca6 [FIX] website: enumarate page raise an exception if query_string is not null; Can't create a page with the modal link editor 2014-07-10 14:30:15 +02:00
Olivier Dony 34bfa1b44f [MERGE] Forward-port saas-5 up to d9cda97 2014-07-05 01:45:45 +02:00
Olivier Dony d9cda97cf4 [MERGE] Forward-port saas-4 up to 5ceded9 2014-07-05 01:28:19 +02:00
Fabien Pinckaers 1ce0b70a02 Speed Improvements 2014-07-02 19:03:10 +02:00
Fabien Pinckaers 470503dc8b Speed Improvement: caching security 2014-07-02 18:35:09 +02:00
Jeremy Kersten e77594c3c3 [IMP] website: backport 5112421a (unslug)
Update the regexp to be not case sensitive
2014-06-30 18:29:20 +02:00
Jeremy Kersten f4733aa895 [FIX] website - force to test isdigit on a string else a tb "'int' object has no attribute 'isdigit'" can exist if the page var was right and so already and int 2014-06-30 12:27:49 +02:00
Jeremy Kersten 7ba41e75e2 [FIX] Website pager - Be sure that page in get param is a digit else use page 1.
Need to find which controller add ?page= instead of &page= because google find some url with '?page=1?page=2' --> page = '1?page=2'. According to google, the referrer is the old website.
2014-06-30 12:10:49 +02:00
Simon Lejeune 95c1769d55 [FIX] typo 2014-06-27 13:46:46 +02:00
Simon Lejeune 195fa93168 [MERGE] backend front end integration
Render the top-menu (backend menu or frontend editbar) server-side.
Use Fontawesome icons (mail, timezone, chat).
Refactor website widgets, split Website.editorBarin editorbar, ace, editorbar- content, editorbarCustomize.
2014-06-27 11:03:34 +02:00
Jaydeep Barot 026e38b48f [REM] Unnecessary `size` parameters on char fields 2014-06-25 17:13:43 +02:00
Christophe Simonis 5112421a93 [FIX] website: correct slug parsing 2014-06-25 11:08:51 +02:00
Franck Bret b4afff3618 Unify website slugify method behavior with or without python-slugify, and add some unit tests 2014-06-20 11:25:44 +02:00
Olivier Dony f15cbd6520 [MERGE] Forward-port saas-4 bugfixes up to ad4c6ca 2014-06-12 18:54:36 +02:00
Olivier Dony 6b85d80f23 [FIX] Wrap werkzeug.utils.escape() to accomodate signature change in 0.9
We always want to escape quotes (") as part of the process of
generating HTML output. This option (quote=True) turned into
an implicit flag with a DeprecationWarning in werkzeug 0.9.0
It is likely to disappear in a future release of werkzeug too.
A wrapper avoids this warning without loss of compatibility
2014-06-10 18:46:40 +02:00
Olivier Dony 04211015fc [MERGE] Forward-port of latest saas-4 fixes, up to 0452851 2014-05-27 20:49:49 +02:00
Xavier Morel 327dda0bde [FIX] correctly handle invalid max_width/max_height passed to website._image 2014-05-23 15:11:13 +02:00
Christophe Simonis a756b82372 [MERGE] forward port of branch saas-4 up to revid bb26dea 2014-05-20 20:19:55 +02:00
Olivier Dony 6130ed3ce0 [IMP] website: refactor website_image controller (and placeholder), move to model to make it reusable
It is "almost" reusable because it still depends on the global `request` variable,
this could be solved by making it an explicit parameter.
2014-05-14 16:32:36 +02:00
Fabien Meghazi c3cfc4bc32 [MERGE] sitemap backport, merge trunk from 9438 til 9440
merge from 9438 revid:fp@tinyerp.com-20140511115231-g8ke14r9iepyypv4 til 9440 revid:fp@tinyerp.com-20140511143314-nzn1239l00arbxjq
2014-05-13 16:38:31 +02:00
Fabien Meghazi 8eed143112 [IMP] Invert multilang logic in route decorator. True by default, can be set to False explicitlty 2014-05-13 11:35:45 +02:00
Fabien Pinckaers 105618443f [IMP] Sitemap
bzr revid: fp@tinyerp.com-20140511134037-84vnn1b4zfzk8som
2014-05-11 15:40:37 +02:00
Fabien Pinckaers 54d30d5194 [IMP] clean sitemap, enumerate pages + fixes
bzr revid: fp@tinyerp.com-20140511115231-g8ke14r9iepyypv4
2014-05-11 13:52:31 +02:00
Fabien Meghazi f652660cb6 [FIX] is_multilang_url by checking against werkzeug's routing map using query string too
bzr revid: fme@openerp.com-20140509122323-2ext0livjgr5njb0
2014-05-09 14:23:23 +02:00