Commit Graph
583 Commits
Author SHA1 Message Date
Fabien Pinckaers 3ff7f12bb7 [IMP] website: improving rename dialog 2016-07-04 17:24:00 +02:00
Christophe Matthieu 83ba577c30 [IMP] qweb: improve code documentation 2016-06-14 13:12:19 +02:00
Raphael Collet a32053d308 [IMP] qweb: rename methods + small code improvements
_switch_directives() -> _compile_directives()
_serialize_static_attributes() -> _compile_static_attributes
2016-06-14 13:12:19 +02:00
Christophe Matthieu 1e48122800 [IMP] qweb: don't use directive for static content 2016-06-14 13:12:18 +02:00
Christophe Matthieu f015746549 [REM] ir_http: remove cache for public user (no longer necessary) 2016-06-14 13:12:17 +02:00
Christophe Matthieu 1583194845 [IMP] qweb: typo: remove qwebcontext and use values 2016-06-14 13:12:15 +02:00
Christophe Matthieu b3302398bc [IMP] ir.qweb: extract and create independent qweb class from ir.qweb
The goal is to make the code more readable, more easily be optimized, allowing to share the library "QWEB" (python and js) separately Odoo.
2016-06-14 13:12:14 +02:00
Christophe Matthieu d9efca0908 [IMP] qweb: t-field-options is a python dict, safe_eval for compile template, not need to eval in field methods 2016-06-14 13:12:14 +02:00
Christophe Matthieu 7ede9bcb2d [IMP] base ir.qweb: compile template (and use ast) to improve rendering speed
* The compiled templates are cached per user, lang, inherit context values
* ir.ui.fields: attributes method return an dict, and record_to_html return only the content value of the field
* all rendered text use build_text and all attributes use build_attribute
* t-esc-options is removed and replace by format_value method
* AssetsBundle receive the list files and remains
2016-06-14 09:46:25 +02:00
Christophe Simonis e4500d06fc [MERGE] forward port of branch saas-10 up to 57944db 2016-05-26 16:55:37 +02:00
Christophe Simonis 57944db19a [MERGE] forward port of branch saas-9 up to b7fce22 2016-05-26 16:48:33 +02:00
Christophe Simonis b7fce227cc [MERGE] forward port of branch 9.0 up to 9bd223f 2016-05-26 16:47:37 +02:00
Julien Legros 9bd223f50d [FIX] website: robust attribute checking
When installing website or one of its dependencies directly, the website
attribute is not defined on request. If the installation triggers qweb
rendering [1], we need to correctly check the presence of the website
attribute, which this commit does.

[1]: This is the case in website_blog since
4a132e2afb
2016-05-26 16:44:01 +02:00
Jeremy Kersten 93e0980035 [IMP] openerp: tools - merge --debug mode in --dev mode
- Merge debug mode in dev mode.
- Allow to select dev feature ony by one

--dev=all will active all dev tool
--dev=
      xml        will read template in xml file and not in db
                 if not updated meanwhile
      reload     Add a watcher to reload the server if python code is modified
      qweb       Allow to add t-debug in template qweb
      werkzeug   Active the werkeug debugger console when an exception is raised
      (i)p(u)db  Allow to break before that the error is raised (old --debug mode)

To NEVER uses in production, since it give a console access in frontend.
2016-04-27 10:28:49 +02:00
Christophe Simonis 9b5ba8b238 [MERGE] forward port of branch saas-10 up to 21c7ef8 2016-04-12 12:38:02 +02:00
Christophe Simonis 21c7ef8bf5 [MERGE] forward port of branch saas-9 up to eb44341 2016-04-12 11:56:44 +02:00
Christophe Simonis eb443410ff [MERGE] forward port of branch 9.0 up to afba8ce 2016-04-12 11:12:57 +02:00
Olivier Dony a445fc996b [MERGE] Forward-port saas-6 up to edf81b54b5 2016-04-11 14:38:53 +02:00
Olivier Dony edf81b54b5 [MERGE] Forward-port 8.0 up to bf163700e4 2016-04-11 14:35:49 +02:00
Nicolas Lempereur 0c9355a8fb [FIX] website: prefer to get exact language
request.website.get_languages returns a list of tuple in the form:

        (`language code`, `language name`)

With this commit the code first check if there is a language exactly
matching, and only if failed check if there is a match on the short
form.

closes #11613
opw-672412
2016-04-06 15:31:58 +02:00
Christophe Simonis 6c8141a1df [MERGE] forward port of branch saas-10 up to 2483327 2016-04-01 16:15:35 +02:00
Christophe Simonis ddb0fb2739 [MERGE] forward port of branch saas-9 up to 59d3f63 2016-03-24 16:53:45 +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
Deep Bundela eb04aa1e39 [MIG] base: migrate base/ir to the new API 2016-03-21 13:46:44 +01:00
Christophe Simonis 5238b77430 [MERGE] forward port of branch 9.0 up to e8b965f 2016-03-16 16:09:13 +01:00
Christophe Simonis a34d496069 [MERGE] forward port of branch saas-6 up to 1431ba2
Also include 2939800ed4 which seems to
have been forgotten during previous forward-ports
2016-03-16 15:30:03 +01:00
Darshan Kalola 54393e9aa2 [ADD] website: Easy website Favicon configuration from website admin panel
Easy solution: a binary field in website.config.settings
2016-03-11 14:02:21 +01:00
Denis Ledoux 6e09293b7d [MERGE] forward port of branch 9.0 up to 8e69043 2016-03-11 11:42:43 +01:00
Nicolas Lempereur b0b6b9afb5 [FIX] website{,_version}: get current version view
customize_template_get which gets template inheritence informations was
not taken into account by website version, so at one time we could get
an erroneous view version instead of the wanted one.

This commit refactor some of the code adding a function to sort view and
find the most suitable one (based on website and version in request).

This function is then used in ir.ui.view `_view_obj`'s function to
select the correct view.

related to opw-667225
2016-03-08 17:13:58 +01:00
Christophe Simonis e46f65ab26 [MERGE] forward port of branch saas-6 up to 62fc257 2016-03-04 15:03:39 +01:00
Denis Ledoux 3c642e283d [MERGE] forward port of branch 8.0 up to 2ba7fa3 2016-03-01 10:55:13 +01:00
Denis Ledoux 2ba7fa3c9d [FIX] website: alternate languages translated URL
The alternate languages links set in the page `<head>`
were not translated in each language, but within the language
the user is browsing the website.

This leaded to SEO referencing issues, as these links leaded
to (30x) redirections if followed, to translate the URL slug
within the new current language.
e.g.
`/fr_FR/shop/product/bose-mini-bluetooth-speaker-7`
automatically redirected to
`/fr_FR/shop/product/mini-haut-parleur-bluetooth-bose-7`

And it was the first link which was displayed as alternate link
when being in another language than French, while it should
be the second (to avoid the useless redirection).

opw-669979
2016-03-01 10:53:44 +01:00
Christophe Simonis d0164570c1 [MERGE] forward port of branch 9.0 up to f03eee7 2016-02-29 11:46:58 +01:00
Christophe Simonis f03eee7480 [MERGE] forward port of branch saas-6 up to d5dcfcb 2016-02-29 11:43:00 +01:00
Olivier Dony 574eb71dfe [MERGE] Forward-port 9.0 up to 4c1c1ec4d4 2016-02-26 19:04:09 +01:00
Christophe Simonis c9751aff03 [MERGE] forward port of branch 8.0 up to c3a05d0 2016-02-26 16:23:12 +01:00
Thibault Delavallée 920ada7054 [FIX] website: wrong computation of view
get_template should accept ids or xml ids. However the id or xml_id is given
to IrUiView.get_view_id that waits for an xml_id. get_template crashed if it
received an id.

This commit solves this by setting view_id to the given id, or resolve the xml_id
through get_view_id.
2016-02-26 15:45:49 +01:00
Anton Chepurov 1d269d20f2 [FIX] website: sitemap scalability
Checking url_list for duplicates is O(n).
Use url_set instead of url_list to improve to O(1).

Otherwise sitemap generation even for a million products will never finish.

Close #11106
2016-02-26 09:48:12 +01:00
Christophe Simonis 60c9cac46b [MERGE] forward port of branch saas-9 up to 87a01c7 2016-02-17 18:07:21 +01:00
Denis Ledoux 493705bb77 [MERGE] forward port of branch 9.0 up to c40070f 2016-02-15 17:00:11 +01:00
Jeremy Kersten 682342667e [FIX] website: confusing name and domain_name
To match the current website, we should compare the request http_host to the domain and not
to the website name. That was working luckily because name and domain in demo was the same.

close #10870
2016-02-15 15:48:43 +01:00
Christophe Simonis a6cf37e930 [MERGE] forward port of branch saas-6 up to 0a1362a 2016-02-15 14:46:27 +01:00
Jeremy Kersten e48439d89c [FIX] website: encode lang (come from database) into utf-8 before join
Join can fail if url contains non-ascii char

Fix urls like:
   /page/波
   /page/русский
   /page/%D1%80%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9
2016-02-11 09:30:04 +01:00
Christophe Simonis 9a805c90ed [MERGE] forward port of branch saas-9 up to d70fde0 2016-02-10 18:40:56 +01:00
Denis Ledoux c2d230ad68 [MERGE] forward port of branch 9.0 up to 47bb1bd 2016-02-10 15:55:48 +01:00
Olivier Dony e901ef2938 [FIX] website: confusion/dangerous config options for CDN
Users are tempted to enable all features they
see under the former "Speed" section of the
website settings, even if they have no idea
what they do.
One of them was `CDN Base URL` and had a default
value that was wrong and very likely to break
your website if enabled by mistake.

This commit replaces the default value with
a placeholder that looks more like a `sample`
URL, and makes the fields required when the
CDN option is enabled.

It also moves the whole "Speed" options to
technical features / debug mode.
2016-02-10 13:40:57 +01:00
Olivier Dony 13833d5257 [MERGE] Forward-port saas-6 up to rev. 3ea3348 2016-02-09 14:37:52 +01:00
Nicolas Lempereur dd52faaec0 [FIX] website: reset request attribute
When rerouting from a lang path token to the given route (eg:
/en_US/route_path to /route_path) it is better to keep request variable
clean.

opw-668563
2016-02-08 17:26:32 +01:00
Raphael Collet 8eeed3dbaf [FIX] pad, website: models pad.common and website.seo.metadata should be abstract 2016-02-04 15:52:05 +01:00
Christophe Simonis 04416a5a6f [MERGE] forward port of branch saas-9 up to 469e04e 2016-02-02 14:55:52 +01:00