Commit Graph
311 Commits
Author SHA1 Message Date
Christophe Matthieu 70a69bf9bc [FIX] website/im_livechat: use new api to get asset
Issue: can't get asset content, self don't have env attribute, wrong attributes send.
2016-07-05 18:44:58 +02:00
Christophe Matthieu f1e3ac88f8 [FIX] ir_qweb/website: must adapt AssetsBundle call to nex new syntax
AssetsBundle receive the files list instead of to load the xml content itself (speed up because the file list is cached).
2016-07-05 11:31:03 +02:00
Jeremy Kersten e11a836c10 [REF] website, website_blog, website_sale: move QueryURL to be common 2016-07-04 15:48:15 +02:00
Jeremy Kersten 15fe3d43b4 [IMP] base: add required state for address
Some address have required state.
We add by default moreover 500 new states.

We try also to merge duplicated states
wich have the same country and code.

Once merge is done, we try to had the unicity constraint
to avoid futur duplicates.

Merge code, should be removed in v11.
2016-07-04 15:48:15 +02:00
Christophe Simonis 79976bd779 [MERGE] forward port of branch saas-10 up to 6e95659 2016-04-01 19:10:34 +02:00
Christophe Simonis 6e95659a08 [MERGE] forward port of branch saas-9 up to f4d1adc 2016-04-01 18:51:55 +02:00
Christophe Simonis 6c8141a1df [MERGE] forward port of branch saas-10 up to 2483327 2016-04-01 16:15:35 +02:00
Denis Ledoux 69fa2d5662 [MERGE] forward port of branch saas-6 up to 8f1782b 2016-03-30 11:23:18 +02:00
Denis Ledoux e9bcaad09e [FIX] website: partial revert of 6207644
Before this revision, it was possible to use the
`/website/image` controller using kwargs only
e.g.
`/website/image?field=datas&model=ir.attachment&id=718207`

After, it's no longer possible.

It was assumed `/website/image` without any argument
in the route itself (`<xmlid>`, `<field>`, ...)
could simply never be called,
but this is not the case.

We therefore restore it by retro-compability purposes.
2016-03-24 18:05:31 +01:00
Christophe Simonis ddb0fb2739 [MERGE] forward port of branch saas-9 up to 59d3f63 2016-03-24 16:53:45 +01:00
Christophe Simonis 42e3ed9ed3 [MERGE] forward port of branch saas-6 up to 0a1de99 2016-03-23 12:11:39 +01:00
Denis Ledoux 6207644c00 [FIX] website*: remove technical routes in sitemap
Multiple technical routes were listed in the sitemap,
and it's pointless to list them in the sitemap.

There is currently no way to exclude routes
from the sitemap using a specifc argument
(e.g. sitemap=False on the route).

Therefore, in order to remove them from the sitemap,
we play with the current conditions to exclude
these routes from the sitemap:
 - routes with `auth` other than `none` and  'public`
   are excluded. Technical routes marked as `auth="public"`
   for no reasons are changed to `auth="user" so they
   are excluded from the sitemap
 - routes with required arguments are excluded as well.
   the route `website/image` cannot work without any argument,
   `website/image` has therefore been removed from the possible
   routes for the method `website_image`, so it's no longer
   listed in the sitemap.

For an exhaustive list of the conditions to exclude
a route from the sitemap, check the method
`rule_is_enumerable` in `website/models/website.py`

opw-670865
2016-03-22 18:01:41 +01:00
Raphael Collet 4ddc323139 [FIX] base: fix and complete migration of base/ir
- add or fix decorators on methods
- fix most compute methods (wrong dependencies)
- revert changes in `eval_context` of `ir.actions`
- various code simplifications and improvements
- migrate methods that were not
- ir_qweb: modify `QWebContext` to take an environment instead of `cr`, `uid`, `context`
- ir_qweb: convert `AssetsBundle` to use new API `env`
- ir_ui_view: use decorator `multi` on method `read_combined`
- ir_ui_view: ensure that method `render` is never called with an xml_id
- ir_ui_view: factor out part of the `ormcache` key of method `_read_template`
2016-03-21 13:46:44 +01:00
Martin Geubelle 42c82d57de [ADD] website, website_sale, website_crm: new dashboard 2016-03-10 13:41:10 +01:00
Christophe Simonis c9751aff03 [MERGE] forward port of branch 8.0 up to c3a05d0 2016-02-26 16:23:12 +01:00
Jeremy Kersten 9ecd80eaeb [FIX] website: sitemap fix length
Iterator was consuming the first 45k records.
So don't need to specify an offset, because that will ignore the next 45k.

Eg: if step of 5, and range(1,13),
it will only use [1, 2, 3, 4, 5, 11, 12, 13]

Cherry-pick/backport of de8296c3a8
2016-02-25 09:26:56 +01:00
qsm-odoo 88c2b6843a [REF] web,web_editor,website(_*),report,pos,mass_mailing: assets
* Remove recursive assets inclusions (i.e. assets_editor was including
assets_common, summernote, ...)
* Better construct the assets (link, then script + type attribute)
* Better include the assets (split js / css, always use t-call-assets)
* Simplifies the number of assets
* Move bootstrap js to assets common
* assets_frontend is now created by web module to allow using it on the
connexion page but also in the web_editor, where colors have to be
bootstrap/theme ones. Note: if a module depends on website, then keep
using the inherit_id="WEBSITE.assets_frontend"
2016-02-24 13:47:06 +01:00
Jeremy Kersten 1f6412a0a4 [FIX] website: sitemap render content at first call
Bug from 0c37a8d
At regeneration of sitemap, content was not set
2016-02-02 12:33:54 +01:00
Jeremy Kersten 0c37a8d523 [FIX] website: rename sitemap-1 to sitemap if only one file.
Old code was duplicating the sitemap if less than LOC_PER_SITEMAP urls
2016-02-01 19:07:18 +01:00
Jeremy Kersten de8296c3a8 [FIX] website: sitemap fix length
Iterator was consuming the first 45k records.
So don't need to specify an offset, because that will ignore the next 45k.

Eg: if step of 5, and range(1,13),
it will only use [1, 2, 3, 4, 5, 11, 12, 13]
2016-02-01 17:12:14 +01:00
Jeremy Kersten ce3f797068 [FIX] website_event: avoid traceback when page doesn't exists
The controller /event/<event_id>/page/<page> raise exception if page is not existing.

Allow to pass the template reference when user are creating a new page.
Without it, it is impossible for the end user to create a website_event page without
change manually the xml id because the xml id is based on the module from the template.

This fix is retro compatible, because from_template will be ignored until next update
of website. And during update from website, website_event will be updated because it's a
dependance and so the default_page template created.
2016-01-08 23:19:29 +01:00
Martin Trigaux a9ec2894de [MERGE] forward port of branch saas-6 up to 19fe77b 2015-12-01 08:41:52 +01:00
Denis Ledoux b27fc372f4 [MERGE] forward port of branch 8.0 up to adf6d0e 2015-11-26 11:24:15 +01:00
Denis Ledoux b459c4dc03 [FIX] website: possibility to set no url for the home menu
Unsetting the URL of the menu `Home`,
in Settings > Configuration > Website Settings > Configure Website,
leaded to the unavailability of the website.

opw-657572
2015-11-26 10:02:41 +01:00
Christophe Simonis 56a442e205 [MERGE] forward port of branch saas-6 up to dade7e3 2015-11-25 13:26:02 +01:00
David Monjoie c016078f7b [FIX] website: no login_success on oauth redirect
It seems like nobody other than me ever had issues with this line
since its introduction in January 2015, so I just swapped the
conditions, since this param is seemingly always present, unless
you are using oauth with redirect.
2015-11-18 10:58:44 +01:00
Christophe Simonis d7b0a56f34 [FIX] website: add /website/image compatibility routes 2015-10-29 12:39:10 +01:00
qsm-odoo 58be02b927 [IMP] website: theme customization assets recomputing
Assets are now split in multiple files and there is not a route which
always leads to the last version of an asset. This commit adapts theme
customization (without reloading) to these new features.
2015-10-27 16:32:35 +01:00
Denis Ledoux a3648fd23a [MERGE] forward port of branch 8.0 up to aabbdc7 2015-09-21 16:01:58 +02:00
Paul Catinean 40c35fb48a [FIX] website: set multilang to Falseon website_image
Add multilang=False to website_image controller to prevent redirects

Because website_image is decorated with website=True
Requests made for the product image at
`/website/image/product.template/xx_xx/..`
triggered redirections to add the language code to the
requests URLs. This redirection was useless, as setting
the language code for images is non-sense.

Adding `websitelang=False` prevents this redirection.

In addition, the redirection could lead to
SSL security concerns, as the redirection
could use the http:// scheme.

Closes #8515
2015-09-16 14:12:44 +02:00
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