Commit Graph
281 Commits
Author SHA1 Message Date
Raphael Collet 12e7039c29 [FIX] website_forum: fix incorrect use of env(...) 2015-08-31 10:56:55 +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
Xavier Morel 2ea5c3aeef [IMP] restrict modules to system_group
* listing of modules in website already bypassed session user
* altered authenticated endpoint so it does the same
* sudoed a few read accesses & name_get in groups
* other accesses are list/form views, menu only accessible to
  system_user
* new-API-ified some calls & unified listing of installed modules
2015-08-21 12:59:06 +02:00
Christophe Simonis 73e652818b [MERGE] forward port of branch saas-6 up to 8d95f6d 2015-08-15 16:57:35 +02:00
Christophe Simonis 8d95f6dcdf [MERGE] forward port of branch 8.0 up to 19b5ba2 2015-08-14 17:26:04 +02:00
Mathias Neef c9d41679fb [FIX] website*: active class in menu
In the top menu bar, the `active` class is set when the
menu url matches the page url (the url in the browser url bar)

A while ago, we made so all urls
`/page/website.***'
were automatically redirected to
`/page/****`

Therefore, if the menu url still contains this `website.` prefix,
the active class wasn't set on it, while it should.

Fixes #3059
Closes #3070
2015-08-14 17:10:46 +02:00
Antony Lesuisse 4feb82dd49 [REM] website: kanban helper
website_project has been removed and this helper is now useless.
2015-08-14 13:33:31 +02:00
Gaurav Panchal d52ec7fc42 [IMP] website: keyword search base on language on website promote 2015-07-31 12:57:24 +02:00
Christophe Simonis 2cf91d16a5 [MERGE] forward port of branch saas-6 up to 63e92cb 2015-07-22 16:17:54 +02:00
Christophe Simonis 4a2aee45be [MERGE] forward port of branch 8.0 up to 9654b54 2015-07-10 17:12:57 +02:00
Christophe Matthieu 8c559044a5 [IMP] web_editor: split website into web_editor (to use editor in backend for html field) and website 2015-07-10 17:00:11 +02:00
Denis Ledoux d08facdcb5 [FIX] website: the sitemap must be build with the public user
Otherwise, when accessing `/sitemap.xml` as SUPERUSER for instance,
pages not published were displayed in the sitemap.

opw-640673
2015-07-08 14:16:30 +02:00
Raphael Collet f2be471558 [IMP] ir_ui_view: adapt translation of views by using callable field.translate
Also add constraint to prevent using translated attributes in view inheritance.
You may no longer select elements based on attributes 'string', 'help', etc:

    <page string="Stuff" position="inside">...</page>

    <xpath expr="//page[@string='Stuff']" position="inside">...</xpath>
2015-07-06 16:58:04 +02:00
Antony Lesuisse ceb53fad6d [IMP] website: ir.http route cache for auth public
- remove useless cache clear_prefix
- add a route cache attribute when used it will save the rendered page into the
  ormcache for the specified time, this is only enabled if the user is public
  and reponse code is 200
- enable it on /page controller for 5min
2015-05-17 17:08:13 +02:00
Christophe Simonis 3206a35aed [MERGE] forward port of branch 8.0 up to 8ac8281 2015-04-13 12:07:58 +02:00
Xavier Morel 298ef06b98 [IMP] website: use env.ref to ensure main_menu is fetched w/ correct environment
By using get_object and not passing in the request's context, creates a
divergent environment from the one used in the rest of the request,
resulting to the cached menu items not being reused when displaying the
menu in the page (during qweb rendering), saves ~4 requests on the index
page (though probably nothing elsewhere)
2015-04-10 18:23:31 +02:00
Christophe Simonis 2a88020c10 [FIX] website: language change selector
Correct lang cookie setting when the main layout has not updated.
2015-04-08 20:14:25 +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
Jeremy Kersten a696913364 [FIX] website: ir_http - no redirect for bot and save lang in cookie
Detect most of bots/crawlers to avoid auto redirect. Most bots fetch
with lang en_US, so even if default website lang was not in en_US,
googlebot was redirected to en_US page.

Now we keep also the language selected by user into a cookie.
If cookie exists but lang not in url, we redirect the user into
his preferred language.

Manage special case to allow to change the lang in url to set the
default lang at fly in url and set the cookie...

Many routes are not specified as multilang=False but should be.
With the auto redirection, we need to update these routes to avoid
useless redirects !
2015-04-08 15:39:57 +02:00
David Monjoie 286308155c [IMP] website: added routes to resize image attachments
You can already resize the image from the field of a model, why not a field from an xmlid object or an xmlid object itself ?
2015-04-01 11:23:02 +02:00
Christophe Matthieu a4885bf454 [FIX] website: fixed multi_render of data-oe-call
Port of commit 37fa0a416bd323c82d624482e3a3c778bdd54d8e from website_less
2015-04-01 11:23:01 +02:00
Christophe Simonis a329aa1949 [MERGE] forward port of branch 8.0 up to e27744d 2015-03-18 14:05:02 +01:00
Antony Lesuisse 7dbd495985 [IMP] website: server actions allow trailing paths 2015-03-18 13:10:58 +01:00
Christophe Simonis bc2fd0515b [MERGE] forward port of branch 8.0 up to 017f346 2015-03-04 15:16:10 +01:00
Goffin Simon 092c64b76f [FIX] website: translations for qweb templates not applied.
-Website.tours must be loaded after the translation data:
"website.ready" before the tour ensure that the translations are loaded.

-Translations for qweb templates not applied:
Translate all text nodes in qweb templates when translation data
are loaded.

-Add some translations in website tours.

opw:619786
2015-03-03 16:05:34 +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
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 28ed28f945 [IMP] website: create a new web editor in the backend to edit html field with the website builder 2015-02-12 11:58:12 +01:00
Jeremy Kersten 905dd42b87 [IMP] website: allow to delete page - fix 440 - forum Q47292 2015-01-29 11:03:31 +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
Damien Bouvy a1fac87d25 [IMP] web,website: portal users should be redirected to the frontend on login (and regulars users to the backend) on login 2015-01-16 17:25:07 +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 421a76dabb [ADD] Versioning Module. 2015-01-07 18:17:13 +01:00
Christophe Matthieu 9069d0127c [IMP] website: use the new summernote editor 2015-01-05 10:59:42 +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
Antony Lesuisse 74d48e2f17 [FIX] website fix image controller for xmlid 2014-12-18 23:44:06 +01:00
Christophe Matthieu 8d94b01388 [IMP] website.snippet: add data-oe-call to call a template from the website and keep all content editable; used for demo page of snippets 2014-12-18 22:50:12 +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 709c9868de [MERGE] forward port of branch 8.0 up to e883193 2014-10-01 19:18:14 +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 0d890ab76e [ADD] Compress uploaded image by default
Added an opt-out option available from the button's dropdown
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 dffa3543f5 [IMP] misc changes 2014-09-16 14:11:09 +02:00
Goffin Simon 5f258c831e [WIP] Multi website 2014-09-16 14:11:08 +02:00
Christophe Matthieu 6d30deef67 [FIX] website.theme: need to convert xmlids into ids for write and reload theme 2014-09-10 12:44:55 +02:00
Christophe Simonis 31bf30d2d0 [MERGE] forward port of branch 8.0 up to ed1c173 2014-09-05 15:28:22 +02:00
Christophe Matthieu c1b1ba6945 [IMP] website: image controller can use xmlid 2014-09-02 15:19:09 +02:00