Commit Graph
4204 Commits
Author SHA1 Message Date
Odoo Translation Bot 348ba041d7 [I18N] Update translation terms from Transifex 2018-02-04 04:27:20 +01:00
Jeremy Kersten 70d638b690 [FIX] website: let the 404 exception catch by _handleException
Don't rewrite the wheel with serve_404.
It is the job of HandleException to do it.

In the same time, that will fix the status code that was
previously 200 instead of 404 in serve_404

This commit closes #22438
2018-02-01 14:13:32 +01:00
Odoo Translation Bot 53c9858656 [I18N] Update translation terms from Transifex 2018-01-28 04:29:24 +01:00
Odoo Translation Bot c5749ef2e3 [I18N] Update translation terms from Transifex 2018-01-21 04:24:31 +01:00
qsm-odoo 59e1bdff22 [FIX] web_editor, website: properly clean snippets before saving
/!\ Partial backport of https://github.com/odoo/odoo/commit/0a31cb9b4ae461119ecafdd05c5b979621ffb039
/!\ Should not be forward-ported

Before the websitepocalypse introduced in 11.0 (saas-17), when saving a
page in the editor, every `cleanForSave` method of snippet options were
called, even for snippet options which were not initialized (so if a
snippet was left unchanged before saving, the related `cleanForSave`
methods were called anyway). This behavior was bad code and did not make
much sense and was so removed with the websitepocalypse
(see https://github.com/odoo/odoo/commit/2972976962617d4b8a0113bae58c640ab41cdff8#diff-4c580abda3220e45c6b3f6bdcf77c733L415)

Unfortunatly, the behavior was necessary given the states of our snippet
options. Indeed, for the "latest posts" snippet, the `cleanForSave`
method removes the entire snippet content (as it is dynamically loaded).
The dynamic loading is performed by the snippet *animation*... and
removing the dynamic content should logically be done by the animation
too... which is the case. The problem is that animations are not stopped
before the editor is saved. This behavior was only implemented in
saas-11.1 (for future version 12.0) with commit https://github.com/odoo/odoo/commit/0a31cb9b4ae461119ecafdd05c5b979621ffb039

As a stable fix for 11.0, part of the mentioned commit is backported
here and some specific `cleanForSave` will be reviewed as animations if
necessary. Note: `cleanForSave` made useless by this commit are left
anyway as this is a stable fix.

See https://github.com/odoo/odoo/issues/22089
2018-01-17 15:55:36 +01:00
Christophe Simonis b42b9c936b [MERGE] forward port branch saas-16 up to 3b7bf3a4b8 2018-01-12 18:15:23 +01:00
Odoo Translation Bot d6e3463dcd [I18N] Update translation terms from Transifex 2018-01-12 17:48:53 +01:00
Christophe Simonis 3b7bf3a4b8 [MERGE] forward port branch saas-15 up to 8962b8ecc2 2018-01-12 17:23:10 +01:00
Christophe Simonis 8962b8ecc2 [MERGE] forward port branch saas-14 up to d35a76ee17 2018-01-12 16:47:12 +01:00
Christophe Simonis d35a76ee17 [MERGE] forward port branch 10.0 up to d76237e038 2018-01-12 16:16:51 +01:00
Christophe Simonis 4eaef03df3 [MERGE] forward port branch 9.0 up to 330f84f211 2018-01-12 11:25:58 +01:00
Romain Derie 0474de44c0 [FIX] website: unpublished homepage read error + first menu fallback
Before this commit:
1. If the website's homepage is unpublished and a public user naviguate on it,
it will log an access read error in the server. The user won't see the error
though.

2. If the user can't access '/', we serve the first menu's page instead.
This first menu's page can be an unpublished page, resulting in a 403, which is
not convenient.

3. Menus are sorted by sequence, then the ORM sort them by write_date.
Menu with same sequence will be sorted differently every time you edit one of
them. (This issue get hidden/solved if user edit and save the menus with
"Edit Menu" since it will recompute every sequence.)
  - Create 3 pages 'A', 'B', 'C', with 'Add page in menu' enabled
  - Menu is now 'A B C'
  - Edit website.page B (in property dialog), it will write on the page's menu
    aswell
  - Menu is now 'A C B'

Now:
1. We prevent this error by ensuring the page is published and so can be read
by anyone before accessing its properties.

2. We serve the first menu's page that is published

3. We sort menu by id after sequence to keep original order

This closes #21259
2018-01-11 13:33:30 +01:00
Romain Derie bf8519853f [FIX] website: hide menu if related to an unpublished page
Before this commit, if there was a menu entry linked to an unpublished
website.page, the menu would be shown. For restricted users, they would land on
a 403 forbidden.

Now, we dont show website.page's menu if user can't access it.

This closes #21328
2018-01-11 13:30:12 +01:00
Romain Derie 32701aa512 [FIX] website: menus with null URL would throw an error on display
Before this commit, if a website.menu had a URL set to null, it would throw an
error when displaying that menu.
It is normally not possible to do so in v11 but after a migration, menus can be
empty. (eg: Using an empty menu to display a divider in a dropdown menu)

Now we return an empty url instead of an error
2018-01-11 12:49:18 +01:00
Paul Catinean eded3cfda8 [FIX] website: check that website.user_id is not falsy
This field should be required.

This commits closes #21997

@kangol: diff in addons/website/models/ir_http.py is for existing db
It can be ignored in master because required will be apply
2018-01-10 13:09:32 +01:00
Nicolas Martinelli 81d1296323 [FIX] account, stock, website: access rights
1. Create a new user with all the permissions as manager (or at least
   Accounting) except Inventory
2. Login and then go to Invoicing --> Settings
3. Do a minor change, save

An access error occurs.

Since the settings of all modules are smartly loaded in v11, it now
implies that a user must have extra manager access rights to be allowed
to save them. We could have kept separate actions for each setting page,
but we would have missed the fun of access errors.

Anyway, security-wise this is not an issue to force the manager groups
since a user with 'Settings' access rights can change his own rights.
It's just very annoying. Or fun.

Complement of aa65a46fc5

Fixes #21766
opw-801210
2018-01-09 13:19:33 +01:00
Adrian Torres 9f583717e5 [FIX] website: unlink website_id (#21972)
In the module website, the relational field website_id is defined twice,
once for ir_ui_view and a second time for res_config_settings, for the
former we perform an ondelete='cascade', which means that when the
website model is unlinked, the field is unlinked as well.

This is not done for the website_id field in res_config_settings, which
instead defaults to setting the field to NULL, which violates a not-null
constraint and therefore causes issues when trying to modify/save
settings.

To solve this, a hard delete of the ir_model_field website_id is
performed during the uninstall process of the website module.

Fixes #21905
OPW 803018
2018-01-03 13:53:44 +00:00
Odoo Translation Bot 62aa3be24c [I18N] Update translation terms from Transifex 2018-01-01 02:40:01 +01:00
Odoo Translation Bot f60948d55c [I18N] Update translation terms from Transifex 2017-12-31 04:14:26 +01:00
Odoo Translation Bot 9d9ca960ae [I18N] Update translation terms from Transifex 2017-12-24 04:16:18 +01:00
Romain Derie 174cd2aeee [FIX] website: website had incomplete context
Before this commit, website had incomplete context.
It was causing website.menu to not be translated correctly because lang was
not set on website.

Now, since the website has the context correctly binded, menus are translated

opw-787012
2017-12-22 15:44:39 +01:00
Martin Trigaux d8f1935068 [I18N] fetch missing languages
Some new languages were skipped and had no files.
Import all files for all languages
2017-12-20 13:02:37 +01:00
Martin Trigaux 4af12acc80 [I18N] es_ cleaning translations
The regional variations are not published on Transifex and hsould be translated
manually.

The translations are mainly from previous versions or contains buggy fuzzy
translations (not matching the real source string).

Clean based on the .pot and delete the empty files

Fixes #21733
2017-12-19 16:22:17 +01:00
Romain Derie 9d2d9a3528 [FIX] website: edit website.page's menu URL not saving
Before this commit, editing a website.menu (linked to a website.page (m2o))
would not save the URL on the website.page record but only on the
website.menu.
But since the URL retrieved to display the website navbar is:
  1. The website.page url if the menu has a page_id
  2. The website.menu url otherwise
It would never get the edited URL stored on website.menu
2017-12-12 17:50:41 +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
Adrian Torres b7ce07ad2a [FIX] website, mass_mailing: same field defined twice (#21503)
The ORM does not currently, an probably won't support two fields with
the same name in different modules that do not depend on each other.

This is obviously a nasty hack, but it's the best one can do for a
stable branch.

THIS IS WHY WE HAVE DEPENDENCY MODULES, PEOPLE.
2017-12-11 10:43:48 +00:00
Christophe Simonis f96a797fe6 [MERGE] forward port branch saas-16 up to b8540eefe3 2017-12-06 11:59:38 +01:00
Alexandre Kühn 6cc5a9963b [FIX] web,*: time format from user's language
Before this fix, the chatter always showed dates of messages in military time format.

This was not the expected behavior, as the user could have had customize
the date and time format in the settings of the current language.

Steps to reproduce the issue:

1. Set Odoo in English
2. Settings > Translations > Languages > English
   2.1. Set Date Format to %m/%d/%Y
   2.2. Set Time Format to %I:%M:%S %p
3. CRM > (Select any opportunity with at least one message) > Mouse hover on elapsed time (e.g. "an hour ago")

Expected:

- It shows the customized time format (e.g. 11/07/2017 5:33:36 PM)

Results:

- It shows the military time format (e.g. Tue Nov 07 2017 17:33:36 GMT+0100)

opw-781647
2017-12-05 09:13:31 +01:00
Christophe Simonis a8d01cbf4e [MERGE] forward port branch saas-15 up to a447da75fd 2017-12-04 20:12:19 +01:00
Christophe Simonis a447da75fd [MERGE] forward port branch saas-14 up to e7d174a142 2017-12-04 19:25:51 +01:00
Christophe Simonis 426e269c22 [MERGE] forward port branch 10.0 up to 067a241ea8 2017-12-04 16:24:24 +01:00
Christophe Simonis 7b808982a0 [MERGE] forward port branch 9.0 up to 5e38bef5a5 2017-12-04 12:55:38 +01:00
qsm-odoo 5e38bef5a5 [FIX] website: review iframe video building
/!\ This commit *must* be "forced" forward-ported /!\

Recent commit(s) broke existing databases making website videos
disappear / not be saved / ...

Original code was broken then fixed by a succession of commits which
solved some errors to create new ones. Hopefully, this one is the right
stable one. Existing databases should be restored while allowing new
videos to be added correctly no matter the version. In master, a solution
must be found to smoothly migrate old videos to a new better system.

See:
https://github.com/odoo/odoo/commit/8749410b1033ddec1207ce1db42d1889a0d2ea33
https://github.com/odoo/odoo/commit/45e0cd564afdae71e9525193250744e88076da71
https://github.com/odoo/odoo/commit/6d2bf44fee76a8b73ebad206cd7a283c88b6c4ef (opw-783233)

opw-786165
2017-12-04 11:45:06 +01:00
Odoo Translation Bot 19fda52a53 [I18N] Update translation terms from Transifex 2017-12-01 02:53:01 +01:00
Christophe Simonis 42264d8dcb [MERGE] forward port branch saas-16 up to 5d7ad2b16c 2017-11-30 18:43:08 +01:00
Martin Trigaux e4a281b5a5 [I18N] export source terms 2017-11-30 16:03:58 +01:00
Christophe Simonis ab084d580f [MERGE] forward port branch saas-15 up to 98539336a5 2017-11-30 15:27:59 +01:00
Christophe Simonis 98539336a5 [MERGE] forward port branch saas-14 up to b780e4a0e4 2017-11-30 14:44:49 +01:00
Christophe Simonis b780e4a0e4 [MERGE] forward port branch 10.0 up to ba73fd534d 2017-11-30 14:13:39 +01:00
qsm-odoo 1f39b6021e [FIX] website: properly start all dropped snippets' animations
When a snippet is dropped into a page, all its animations are started.
The problem was that all its children's animations have to be started
and that was not the case anymore since recent big website refactoring.

Fortunately, this allows to improve and optimize animations start
function: now all animations are (re)started for a portion of a
given DOM (default to #wrapwrap) while it was only possible to
restart animation of a given DOM *element* before.
2017-11-29 17:27:27 +01:00
Jairo Llopis 05938ceb3e [FIX] website: Use current website's menu to determine home page
This commit closes #20722
2017-11-29 16:59:31 +01:00
Martin Trigaux 159bcf3cc2 [I18N] update Danish terms
Courtesy of Visti Kristensen, IT-konsulent
2017-11-29 14:33:19 +01:00
Christophe Simonis 299a5e058b [MERGE] forward port branch 10.0 up to 7754538750 2017-11-28 12:25:16 +01:00
Christophe Simonis ad6f307976 [MERGE] forward port branch 9.0 up to 6d2bf44fee 2017-11-28 11:10:59 +01:00
qsm-odoo 6d2bf44fee [FIX] website: do not duplicate iframes at each edition
Before this commit, when an user added a video in his page (an <iframe>)
it was then duplicated each time the snippet in which the video is was
edited and saved again, slowing the page loading.

As the code responsible for that is quite outdated, it should be
reviewed and refactored in master. This commit only fixes the problem
with more code. This commit will also fix existing databases, if the
user edit the video snippet once again.

(Note: even if this commit's code will be even more strange in master,
it *should* be forward-ported anyway).
2017-11-28 10:03:27 +01:00
qsm-odoo 948c429e8b [FIX] website: declare correct mimetype for data images
Some website default images were declared with the wrong filename
extension, inducing the wrong mimetype. As a result, some browsers
(IE...) were unable to render these images.
2017-11-27 16:48:10 +01:00
Odoo Translation Bot 31e574b153 [I18N] Update translation terms from Transifex 2017-11-26 04:25:05 +01:00
David Vidal 5e038eedeb [FIX] website: gmaps size parameter flipped
- width and height were passed in the wrong order according to
https://developers.google.com/maps/documentation/static-maps/intro?hl=en#location
2017-11-21 10:08:41 +01:00
Odoo Translation Bot 08bdd06542 [I18N] Update translation terms from Transifex 2017-11-19 04:26:17 +01:00
Martin Trigaux 58375c99f2 [I18N] export source terms
Follow uup of 6e4d2e36aa
2017-11-16 09:24:37 +01:00