Commit Graph
225 Commits
Author SHA1 Message Date
Jeremy Kersten 4aa2e52b3d [FIX] website: allow to rename a website page.
Code from delete_page has been spliited (functions, templates, ...)
to be re-usable by rename_page

Change default input type from website.prompt.
Old default value 'text' had no sense, there are no tag <text>.
2015-04-08 13:40:11 +02:00
Raphael Collet 58d6bb30ab [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 18:44:51 +01:00
Christophe Simonis 313acf87a2 [MERGE] forward port of branch 8.0 up to d780014 2015-03-26 18:44:22 +01: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 165c67e879 [FIX] website: improve delete page
Clear cache after delete view
    Move menu to keep all 'New page', 'New blog', 'New forum', ... together
    Disable continue button from popup while user don't confirm with checkbox
    English typo
2015-02-12 18:19:19 +01:00
Christophe Matthieu e8526dd013 [IMP] website: menu editor open a modal to select the menu to edit if more of one menu in the page (like event) 2015-02-11 12:31:52 +01:00
Jeremy Kersten 905dd42b87 [IMP] website: allow to delete page - fix 440 - forum Q47292 2015-01-29 11:03:31 +01:00
David Monjoie b84721cb21 [IMP][REF] website: introducing a mixin class to handle website_published
and website_url fields. This will allow to remove custom code in every website
addons that redefine those two fields and the URL getter method.
The published button in backend has also been cleaned. It is now a link button
that redirects to the website_url. It does not change the publish status
anymore. Indeed it makes sense publish and unpublish website documents
directly in the website, while checking that everything is correct, instead
of doing it in the backend.

Next commits will update the Odoo addons to use this mixin and the new button
in the form view.
2015-01-20 17:34:33 +01:00
Christophe Simonis 18e22be138 [MERGE] forward port of branch 8.0 up to 0aab81c 2015-01-19 17:15:56 +01:00
Goffin Simon 9850080eb0 [ADD] Versioning Module.
This module allow to make versioning and A/B testing of the website.
2015-01-16 23:13:58 +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
David Monjoie c79fdfceb4 [IMP] website: website/image controller now handles url type attachments 2015-01-14 09:15:09 +01:00
Christophe Simonis d248ae0669 Revert "[ADD] website_version: website versioning and ab testing"
With more than 100 comments on github[1], this commit is clearly not
production-ready.

This reverts commit c255b5bc34, reversing
changes made to e5ac65de59.

[1] https://github.com/odoo/odoo/commit/c255b5bc3461c803e38057c72c45530235de84dd
2015-01-08 14:49:18 +01:00
Goffin Simon 4e47f917df [FIX] To show all columns in a Kanban view even if they are empty. 2015-01-07 18:17:14 +01:00
Goffin Simon 421a76dabb [ADD] Versioning Module. 2015-01-07 18:17:13 +01:00
Christophe Simonis fab4d6d442 [MERGE] forward port of branch 8.0 up to ea54d4a 2015-01-06 11:49:04 +01:00
Christophe Matthieu 9069d0127c [IMP] website: use the new summernote editor 2015-01-05 10:59:42 +01:00
Christophe Matthieu 196ecf17a1 [FIX] website: auto-increment when new page; fix link (key) search page 2015-01-05 10:17:10 +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
Denis Ledoux 2bebba76d0 [FIX] website: image_url fallback when no write_date 2014-12-12 13:09:07 +01:00
Jérome Maes e06adc7e08 [IMP] ir.attachment : move the fields index_content (from document), mimetype and datas_checksum (from website) to base. In base, the mimetype is computed with the Magic python lib (if installed, else with a custom function using magic number), and the index_content is an implementation of strings unix command. In document, index_content is still computed with the indexer of document module. 2014-12-11 16:11:54 +01:00
Christophe Simonis 1d3f8eba87 [MERGE] forward port of branch 8.0 up to 591e329 2014-12-02 16:18:08 +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
Christophe Simonis 5068cffbb0 [MERGE] forward port of branch 8.0 up to 491372e 2014-11-05 20:30:40 +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
Christophe Simonis cf23a5deda [MERGE] forward port of branch 8.0 up to 92c7874 2014-10-29 19:45:09 +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
Christophe Simonis 4b6c948be5 [MERGE] forward port of branch 8.0 up to ed92589 2014-10-23 17:14:35 +02: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 8e59d086d5 [ADD] CDN support for website 2014-10-22 10:00:36 +02:00
Christophe Simonis 709c9868de [MERGE] forward port of branch 8.0 up to e883193 2014-10-01 19:18:14 +02:00
Fabien Meghazi 5f36a6daa8 [FIX] Use website's domain field for multi-website
This commit is related to d51157154e
2014-09-22 13:00:11 +02:00
Fabien Pinckaers d51157154e [IMP] Website name instead of company name in title and logo 2014-09-22 09:21:14 +02:00
Fabien Meghazi 3f6ad35ed1 [ADD] Add an html compressor option in website settings 2014-09-18 17:37:49 +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 82a9162137 [IMP] avoid 1 query per t-call 2014-09-16 14:12:00 +02:00
Fabien Meghazi 7be131af9a [FIX] get_current_website domain check outside of cache 2014-09-16 14:11:09 +02:00
Fabien Meghazi 7a56040ac8 [ADD] cache for get_current_website() (remove one query per request) 2014-09-16 14:11:09 +02:00
Goffin Simon 1900c912fb [FIX] New page. 2014-09-16 14:11:08 +02:00
Goffin Simon 5f258c831e [WIP] Multi website 2014-09-16 14:11:08 +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