Commit Graph
53 Commits
Author SHA1 Message Date
Odoo Translation Bot b60f9bb739 [I18N] Update translation terms from Transifex 2018-11-18 01:28:38 +01:00
Odoo Translation Bot dcc077afc5 [I18N] Update translation terms from Transifex 2018-11-11 01:26:46 +01:00
Odoo Translation Bot 790bd62f14 [I18N] Update translation terms from Transifex 2018-11-04 01:27:12 +01:00
Odoo Translation Bot 29dc21ae4b [I18N] Update translation terms from Transifex 2018-10-28 01:25:21 +02:00
Odoo Translation Bot de265ce63e [I18N] Update translation terms from Transifex 2018-10-21 01:25:56 +02:00
Odoo Translation Bot e774b2cb1c [I18N] Update translation terms from Transifex 2018-10-14 01:23:43 +02:00
Odoo Translation Bot b6c8919444 [I18N] Update translation terms from Transifex 2018-10-07 02:27:57 +02:00
Odoo Translation Bot a01c1bf5bf [I18N] Update translation terms from Transifex 2018-09-30 02:25:45 +02:00
Odoo Translation Bot 1d79bf0273 [I18N] Update translation terms from Transifex 2018-09-23 02:29:29 +02:00
Martin Trigaux ae1fed50d5 [I18N] export saas-11.5 source terms 2018-09-21 16:32:59 +02:00
Odoo Translation Bot 53908da50c [I18N] Update translation terms from Transifex 2018-09-18 18:08:33 +02:00
Martin trigaux 710f67ad4b [I18N] export saas-11.5 source terms
To match new model_terms syntax
2018-09-18 14:30:04 +02:00
Odoo Translation Bot e9111f46a6 [I18N] Update translation terms from Transifex 2018-09-16 02:21:25 +02:00
Odoo Translation Bot 0b2349ee41 [I18N] Update translation terms from Transifex 2018-09-14 11:30:58 +02:00
Odoo Translation Bot e8606ce00b [I18N] Update translation terms from Transifex 2018-09-02 02:24:05 +02:00
Odoo Translation Bot f22e61dc74 [I18N] Update translation terms from Transifex 2018-08-29 14:19:27 +02:00
Odoo Translation Bot 0da9da4c44 [I18N] Update translation terms from Transifex 2018-08-26 02:17:37 +02:00
Odoo Translation Bot c1c5785e92 [I18N] Update translation terms from Transifex 2018-08-05 07:15:10 +02:00
Odoo Translation Bot 8aed99b0bd [I18N] Update translation terms from Transifex 2018-08-02 14:39:54 +02:00
Martin Trigaux 6b2dcd064d [I18N] export saas-11.4 source terms
For odoo-master transifex project
2018-08-02 13:32:24 +02:00
Christophe Simonis f36e6917bd [MERGE] forward port branch saas-11.3 up to 37eed7c509 2018-05-29 17:34:43 +02:00
Christophe Simonis 7767d2cba3 [MERGE] forward port branch 11.0 up to 45b4a4a4dd 2018-05-14 20:26:51 +02:00
Christophe Simonis 45b4a4a4dd [MERGE] forward port branch saas-15 up to 62d93dad02 2018-05-14 20:25:16 +02:00
Christophe Simonis e70e5b6cf3 [MERGE] forward port branch 11.0 up to 2787de8c68 2018-05-14 16:46:11 +02:00
Christophe Simonis bd2de7ae78 [MERGE] forward port branch saas-15 up to d818b516c1 2018-05-14 14:37:08 +02:00
qsm-odoo 434d5de9c8 [REF] http_routing: guess scss mimetype 2018-04-18 15:59:03 +02:00
Christophe Simonis 5f2d080cf8 [MERGE] forward port branch 11.0 up to ad825b673b 2018-04-16 18:34:56 +02:00
Christophe Simonis ad825b673b [MERGE] forward port branch saas-15 up to bfa5af45df 2018-04-16 17:10:23 +02:00
Martin Trigaux 8b8815f44c [FIX] http_routing: translate without website
web (tagged with `openerp-web`) translations are loaded in the backend, in
`odoo.addons.web.controllers.main.WebClient.translation(mods=None, lang=None)`
method (through `/web/webclient/translations` controller).

In website, the controller `/website/translations` is called used, fetching
the translations from modules with the (fragile) clause `name ilike 'website'`

This commit fixes two bugs:

1. Install `website_sale`, activate discussion on products
  -> the chatter is not translated as the portal translations not loaded in the
     `/website/translations` controller

2. Install `helpdesk` but not `website`, go to portal view of a ticket
   -> the heldesk chatter is not translated as the `/website/translations`
      controller is not called (only provided by the website module)

This patch implements a modular approach to translate the web resources of the
right modules only.

The controller /website/translation is moved to http_routing and each module
override the new _get_translation_frontend_modules_domain method to adds its
translatable module

Closes #23618
Fixes #23610
2018-04-11 16:55:14 +02:00
Christophe Simonis 7e469eb77a [MERGE] forward port branch 11.0 up to f5e7b86686 2018-02-01 18:15:21 +01:00
Jeremy Kersten 8b8de59122 [FIX] http_routing: raise NotFound when ModelConverter don't match
Before this commit, if you call a route with an missing ID, you
see an internal error 500 "Record not existing" (MissingError)

It has been intriduced by commit 9dc173cc2e

Now we catch the missing Error and return explicitely a 404 exception.
2018-02-01 14:13:32 +01:00
Christophe Simonis 4708812b6c [MERGE] forward port branch 11.0 up to b37cc1f9b7 2017-12-12 18:50:59 +01:00
Jeremy Kersten 294dc70a38 [FIX] http_routing, website: fix and clean routing
Clean method _add_dispatch_parameters
Remove unused code for caching

Call super before to have the correct lang when we browse website.
Without it, menu was not loaded in correct language.
2017-12-12 17:47:08 +01:00
Thibault Delavallée 1fbc29a641 [MOV] base: move ir_* models into models/ 2017-11-27 11:15:03 +01:00
Jeremy Kersten 436ad6efa4 [IMP] http_routing, website: split website code into website
This reverts partially commit ab2283ef83.

This commit clean and clarify some code.
It also secure the call to specific page extension's template to avoid somehow
calling unexisting tempalte
2017-10-03 08:44:34 +02:00
Jeremy Kersten ab2283ef83 [IMP] http_routing, website: move website method into website
Method _guess_mimetype should be in website module.
2017-10-02 10:30:25 +02:00
rde 727d461e1d [IMP] website: create special extension page redirect backend + own template
Before this commit:
1. You could create a page with supported extension in the path (eg: myfile.js)
You would then be redirected to the webeditor (myfile.js?enable_editor..)
But in this case, it would just redirect you to a plain text page without odoo
layout because supported extension are rendered with a specific mimetype.
(is it is a .js page, it will just render the page content as a js file)
2. These kind of page would still call t-layout that you should be removed in
backend in order to make it work

Now:
1. You will be automatically redirected to the back end to edit your file
instead of landing on a text-only page.
2. Supported extension now have their own template (eg: .js file now have
<script text=..> tag added automatically in their content)
2017-09-30 16:11:48 +02:00
Jeremy Kersten 953a693df1 [FIX] website, http_routing: fix translate on website.page
Before this commit:
website.page won't be rendered as translated items since it is not going though
 a controller (route) enabling multilang. Website.page were not considered as
 multilang items and no lang prefix were applied on link.

Now:
website.page will correcly handling translation.

In case of one route doesn't match a controller, it is now by default a route of
type multilang.

Add a new field auto_redirect_lang on website model to allow to deactive the
autoredirect of the lang optionnaly. The code will arrive after more tests.
2017-09-27 21:33:50 +02:00
Yannick Tivisse b2aaba4b3d [FIX] http_routing: Convert Bytes to String before concatenation 2017-09-22 13:34:43 +02:00
rde 4ecbacaf59 [ADD] website: add new page management
website.page = old ir.ui.view with page=True
website.redirect is a new mechanism to replace in the futur the ir.attachment
mechanism of redirect.

From now, we don't have a specific /page controller to serve 'page'.

We use a new model website.page which is rendered if none route matches the url
 and that the field 'url' on website.page matches the request.httprequest.path.

The order to serve a path is:
    - Routes defines in controllers (/shop, /blog, ...)
    - ir.attachment with name matching the path
    - website.page with url matching the path
    - website.redirect with url_from matching the path
    - 404

To improve:
    - allow regexp in website.redirect model
    - allow to edit the view_arch from the page.management via redirect backend
      (needed when traceback in the page, or when modifying a js/css/less/...)
2017-09-15 15:29:37 +02:00
Christophe Simonis 2bb30173ff [FIX] http_routing: python3 compat
In python3, exception variables are cleared at the end of the `except`
clause [1]

[1] https://docs.python.org/3/reference/compound_stmts.html#the-try-statement
2017-09-13 15:16:15 +02:00
Christophe Simonis 1788c3f584 [FIX] P3: url_for text model
Correctly forward-port 30a9e6602c
2017-09-13 11:27:15 +02:00
Christophe Simonis 88ea39de8a [FIX] http_routing: P3 compatibility 2017-08-30 18:36:13 +02:00
Raphael Collet 60d9f6fef9 [ADD] base: model ir.default to store user-defined defaults 2017-08-28 09:53:23 +02:00
Jérome Maes a2a37fe9c4 [MERGE] portal,project,website_*: move portal code
This merge mainly does 2 things:
- move frontend chatter feature from website_mail
into portal, since chatter is required for some
business model in the customer portal. This chatter
is still also responsible of displaying comments
for website object (slides, blog, ...)
- bring project customer portal into project,
and make project module depends on portal, like
it was already done for sale and account.
hr_timesheet now contains the dislaying of timesheet
on task in portal.

website_project is removed, and we do not use
website.published.mixin on project, since this
is only used to display its rating. projects are
not public object.
2017-08-16 16:09:28 +02:00
Jérome Maes 9dc173cc2e [FIX] ir_http: uniformize method signature to avoid error when catching error 2017-08-16 15:30:01 +02:00
Jérome Maes fe5fa6973c [IMP] http_routing: use converter defined in the module
Otherwise, the slug part of route can be used only when website is installed.
2017-08-16 14:56:43 +02:00
Thibault Delavallée 0fad594dc1 [IMP] http_routing, account, sale: remove pager from request
Use the pager through import directly.
2017-08-09 17:46:22 +02:00
Thibault Delavallée b4b6ae44fd [MOV] website, portal: move pager support from website to portal
As customer portal will be moved to portal module support of pager
has to be moved previously to the various portal moves. This commit
moves the pager code and template to portal.

Compatibility using website-based pager is provided to avoid having
to update all website addons currently. Future commits will make
addons use the portal pager instead of website pager.
2017-08-08 14:53:50 +02:00
Thibault Delavallée 77d9179f7b [MOV] website, http_routing: move translation support in http_routing
Code managing language in URLs and redirection is moved from website
to http_routing. Override of _dispatch in website now consists in adding
website to the request.

url_for and is_multilang_url tools methods are also moved from website
to http_routing.ir_http as those are required for the moved code.

Some renaming is performed on request attributes previously added in
website. Indeed as website keyword may be misleading now a renaming
has been performed to better understand them :

 * request.website_enabled -> request.is_frontend
 * request.website_multilang -> request.is_frontend_multilang
 * request.httprequest.cookies.get('website_lang') -> ('frontend_lang')
 * first_pass variable in _dispatch is replaced by a new attribute of
   request, routing_iteration, that is the number of routing iterations
   currently done
2017-08-08 14:40:08 +02:00