Commit Graph
446 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
FalcoBolger 95b921d0f7 [FIX] website: move support for ir.attachment resources to web module
Commit 540b753bf8 introduced
support for resources stored as ir.attachment records in
asset bundles too.
This is specifically useful for customizations.

However the HTTP route for reaching those resources
when they are *not* in a bundle was originally created
in the `website` module (as a special handling for
404 requests)

This means that these dynamic resources would only
be partially supported when `website` is not installed,
causing various problems:
 - missing resources in debug mode where bundles are skipped
 - errors when trying to define new client-side Qweb templates
   via XML resources - which are loaded with a direct request
 - ...

This commit moves back the supporting code to the web module.

The `mimetype` column is not present in ir.attachment without
the `website` module, but sniffing it based on the attachment
name works fine at serving time too.

Closes #6002
2015-03-26 17:33:19 +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
Thibault Delavallée 4b649af00d [FIX] website: settings: avoid crashing when no website_id
given in the onchange.
2015-03-02 16:35:31 +01:00
Olivier Dony 0c483d3f43 [FIX] typos in last forward-port 2015-02-24 15:50:13 +01:00
Olivier Dony 95a2f8b121 [MERGE] Forward-port latest bugfixes from 8.0 up to cbb51610ee 2015-02-24 14:47:19 +01:00
Goffin Simon cbb51610ee [FIX] ir.ui.view: qweb translations: allow looking up translation in parent template
- Translations lookup normally uses the namespace of the current
QWeb template, after merging all inherited views.
But when a QWeb template is "cloned" by a child view using
inheritance with `primary` mode, the translations are more
likely to exist for the original (parent) template, and would not
be found when using only the "child" namespace.
This patch adds support for looking up each translation
also in the parent namespace in this case, if none was found
for the child template in the first place.

- ir.translation's _get_source() now supports a list of res_id
to search for, in addition to a single res_id

- Also moved the logic of routes /website/customize_template_get
and /website/get_view_translations to the ir.ui.view model where
it belongs.

opw: 615241

Closes #5325
2015-02-24 14:01:34 +01:00
Christophe Simonis 5446d4ef6c [IMP] website: better error when view not found 2015-02-20 12:07:33 +01:00
Jeremy Kersten 0c7c50b938 [FIX] website: allow to edit a page created by cms.
Without this fix, you cannot use html_editor to edit page create
with the front end.

Since we don't store the new page in field `xml_id´ but in field `key´,
we need to search also into this field.
2015-02-16 10:01:01 +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
Jérome Maes ba827fc6ee [FIX] website_qweb : extract the preparation of qcontext for website. Create a prepare_qcontext method to add variables required to render template extending website.layout (like im_livechat channel, or salorder of ecommerce) 2015-02-12 14:29:07 +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
Christophe Matthieu e42995b614 [FIX] website_sale: Unable to customize image from grid of products. Add an option for the image qweb widget to resize and the views can add python data in widget options 2015-01-16 16:38:09 +01:00
Christophe Matthieu 7c10c9ac27 [FIX] website qweb: wrong encoding when a snippet is called by t-snippet 2015-01-16 16:38:09 +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
Jérome Maes ea82efe9a8 [FIX] ir_http : move the handeling of virtual path to ir_attachment from website to base. This will allow css generated from less to be called in the backend. 2015-01-07 18:32:00 +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
Jos De Graeve 544eefdd32 [FIX] website: add missing decorator for better guess type
The definition of the render method was guessed as cr_uid_context instead of
cr_uid_ids_context, making calls in the new api breaks
Fixes #4401
2014-12-23 14:29:59 +01:00
Christophe Matthieu 4734cbab4d [IMP] website.snippet: snippets can be splitted into separate template and be called into the lits of the snippet 2014-12-18 22:50:12 +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
Thibault Delavallée 2583258f93 [IMP] website_forum: better implementation of automatic nofollow attribute
on links in forum posts.

This is now done when creating / updating posts instead of updating the display
of the post. This means that old posts may contain nofollow attribute altough
the user has sufficient karma; however it is acceptable compared to the computation
we save by avoiding processing every post to display.
2014-12-11 15:41:56 +01:00
Jeremy Kersten 70ab2a6ed1 [IMP] ir_http: don't handle exception in dev mode but use the werkzeug debugger except if cause has been already identified (website Qweb) 2014-12-08 16:25:30 +01:00
Jeremy Kersten 44880fac3c [IMP] ir_ui_view: pep8 + log catched exception when view_id cannot be found. 2014-12-08 16:25:18 +01:00
Christophe Simonis 1d3f8eba87 [MERGE] forward port of branch 8.0 up to 591e329 2014-12-02 16:18:08 +01:00
Martin Trigaux b3060f2771 [FIX] website: can not change website name
The website name is by default "localhost" (used in the page title in the format
"Current Page | Website Name") but there were no way to change it.
Fixes #3493
2014-12-01 16:50:51 +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
tpa-odoo 6d9e04db87 [IMP] website_forum: add a new karma to control the
way links displayed in posts and answers. A nofollow attribute is
added is the author has not enough karma, adding a protection for
spammer tryign to improve their SEO.
2014-11-19 15:06:08 +01:00
Christophe Simonis 5068cffbb0 [MERGE] forward port of branch 8.0 up to 491372e 2014-11-05 20:30:40 +01:00
Jeremy Kersten 738a895dba [FIX] ir_qweb, website_blog: Allow to pass inline style as an option for the widget image. And change some img from blog to use this widget 2014-11-05 11:11:26 +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