Commit Graph
148 Commits
Author SHA1 Message Date
Christophe Simonis 71faa19af0 [MERGE] forward port branch saas-12.1 up to 2b3296bbf8 2019-03-11 14:42:34 +01:00
Christophe Simonis 2c5c9b8342 [MERGE] forward port branch 12.0 up to c023d0784f 2019-03-08 17:56:14 +01:00
Romain Derie 3f5a6f423d [FIX] website: fix install theme error
Commit 5a81d8883 fixed the COW view deletion on module update but introduced an
error when installing a theme.

Indeed, when installing a theme, the first step is to remove the currently
installed theme from the website (by unlinking its ir.ui.view).

Commit 5a81d8883 introduced the fact that deleting an ir.ui.view during a
module uninstall also search and delete the COW views, calling
`_get_specific_views` (that expects a singleton).

When installing a theme, it calls `_theme_cleanup` which search COW views and
unlink them. If not cow view, unlink is called with an empty record set raising
the singleton error.

closes odoo/odoo#31662

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-03-07 13:36:10 +00:00
qsm-odoo 9d5fa81ba3 [REF] website_theme_install: update theme install screen design
task-1907934

closes odoo/odoo#31114
2019-02-18 09:50:03 +00:00
Christophe Simonis 93d736e905 [MERGE] forward port branch 12.0 up to 6e8dff1952 2019-02-11 16:17:02 +01:00
Odoo Translation Bot 1bec017c15 [I18N] Update translation terms from Transifex 2019-02-10 01:32:20 +01:00
Martin Trigaux 288b5e3a41 [FIX] website_theme: translate website themes
Inspired by l10n_multilang
When a theme is installed, the theme.* records are used to generate actual records.
The same was as we use account.account.template to create account.account, the
translations of  the theme records should be propagated to the new records.

opw-1918120

closes odoo/odoo#29748
2019-02-08 12:27:15 +00:00
Odoo Translation Bot 69dbbea09a [I18N] Update translation terms from Transifex 2019-02-03 01:38:30 +01:00
Odoo Translation Bot 127fdea764 [I18N] Update translation terms from Transifex 2019-01-21 17:38:09 +01:00
Sébastien Theys c4ee25fb7f [FIX] base,*: add MODULE_UNINSTALL_FLAG to cleanup views
* website_theme_install

This commit will add MODULE_UNINSTALL_FLAG to the cleanup methods of themes and
modules.

This is necessary to also unlink inherited views of those we try to unlink.

Before this commit, an error would be raised when trying to delete a view that
still had other inherited views (either created manually by the user, or with
just bad luck in the order of which the views are deleted).

PR: #29753
2019-01-09 12:54:47 +00:00
Sébastien Theys 9918e75b2c [FIX] website_theme_install: remove obsolete comment
This comment is not true, we originally wanted to code it this way but we changed
our mind and forgot to remove the comment.

PR: #29753
2019-01-09 12:51:56 +00:00
Odoo Translation Bot 652cecffde [I18N] Update translation terms from Transifex 2019-01-06 01:32:05 +01:00
Christophe Simonis 3cbc9dd6c0 [MERGE] forward port branch 12.0 up to 6a0675d36d 2019-01-14 10:34:50 +01:00
Christophe Simonis 8aa8548d8a [MERGE] forward port branch 12.0 up to 3e4138deaa
closes odoo/odoo#30045
2019-01-09 15:56:53 +00:00
Odoo Translation Bot 91382f691d [I18N] Update translation terms from Transifex 2018-12-30 01:30:16 +01:00
Odoo Translation Bot 47aae6faba [I18N] Update translation terms from Transifex 2018-12-23 01:29:13 +01:00
Romain Derie f7df35540b [FIX] web_editor, website(_theme_install): avoid theme.ir.ui.view crash
In a particular case, `_views_get` was mixing apples and oranges, ir.ui.view
and theme.ir.ui.view.

This was the case if a theme has a theme.ir.ui.view t-calling another
theme.ir.ui.view.
(Only theme's sale bridge cause this issue, eg theme_kea_sale.products)
Then, having that theme installed on a website would make all other website
without that theme to crash when opening the /shop customize menu.

Indeed, the theme.ir.ui.view would have the xml_id theme_kea_sale.search.
The generic view `website_sale.products` would have `theme_kea_sale.products`
as inherit child which is website specific and t-call `theme_kea_sale.search`.

Then, on a website witout theme_kea installed, opening the customize menu would
call `get_related_views` that would call `_views_get` that would loop through
inherit children calling `_view_obj` that would not find a view with that key
and would fallback on self.env.ref, finding the theme.ir.ui.view.

Note: `_views_get` might return specific view for another website but that will
      be filtered on `get_related_views` override in website.

Step to reproduce:
  - Have at least 2 websites and website_sale installed
  - Install theme_kea on a website, it will also install theme_kea_sale
  - Go on the website that has not theme_kea installed
  - Go to /shop
  - Open Customize menu, it won't load because of python crash

opw-1914576
Closes #29347
2018-12-19 18:23:36 +00:00
Odoo Translation Bot ec4ee14c89 [I18N] Update translation terms from Transifex 2018-12-09 01:16:26 +01:00
Martin Trigaux fa98749154 [I18N] export 12.0 source terms
Update to reflect the recent code changes

closes odoo/odoo#29636
2018-12-19 08:50:10 +00:00
Odoo Translation Bot 3ce5c8bebd [I18N] Update translation terms from Transifex 2018-12-16 01:18:51 +01:00
Odoo Translation Bot 1208ac6ce3 [I18N] Update translation terms from Transifex 2018-12-02 01:25:05 +01:00
Odoo Translation Bot 77692a84be [I18N] Update translation terms from Transifex 2019-03-03 01:36:23 +01:00
Odoo Translation Bot 917ad03026 [I18N] Update translation terms from Transifex 2019-02-24 01:37:50 +01:00
Odoo Translation Bot a463a87189 [I18N] Update translation terms from Transifex 2019-02-17 01:33:04 +01:00
Odoo Translation Bot 07f6b8ef57 [I18N] Update translation terms from Transifex 2018-11-25 01:26:32 +01:00
qsm-odoo 30e937cf74 [FIX] website_theme_install: review post copy view toggling
If a theme post copy wants to enable/disable a view, this is to
enable/disable a given functionality which is disabled/enabled
by default. So if a post copy asks to enable/disable a view which
is already enabled/disabled, we would not consider it otherwise it
would COW the view for nothing.

closes odoo/odoo#28772
2018-11-19 10:25:26 +00:00
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
Sébastien Theys 96ef4885a7 [FIX] website_theme_install: fix theme install/upgrade/remove
The goal of this commit is to handle 3 cases:
===============================================================================

- Correct loading of downstream themes for existing themes at (auto)install

  eg. If we have `theme_A` loaded on a website and we install `website_sale`,
    then `theme_A_sale` must also be loaded automatically on that website.

- Allow migration of every theme/website from the command line -u

    When there is such an explicit upgrade, the Odoo framework was already
    handling the upgrade of the modules, but it did not take care of reloading
    the appropriate themes on the websites using them.

- Allow upgrade of only one theme from the interface

    When using the UI to upgrade a theme, we want the user to be able to upgrade
    only the current website and not any other. This will upgrade the modules
    of all themes in the stream, but reload them only for the current website.

===============================================================================

- Move install/upgrade logic into the `write` method to automatically take
    advantage of base features such as correct order of dependencies.

- Create methods to correctly compute the dependency stream of a theme:
    upstream, downstream, and both ways.

    Upstream: limited to modules with name starting with `theme_`.
    Downstream: limited to modules with name starting with current theme name.

- Change `_update_records` method to better look for dependencies

- Change `button_choose_theme`:
    - Always upgrade the stream before installing a new theme.

- Move `_convert_to_base_model` logic into `theme_models.py`

================================================================================

There are a lot of flows to take into account, some of which may be combined
with others.

- Dependencies such as website_sale or website_blog can be:
    - already installed when loading a theme
    - (auto)installed later when the theme is already in use

  theme_A_sale and/or theme_A_blog has to be loaded on every website using
  theme_A as soon as it is needed.

  Not all themes have such dependencies.

- A theme can have other themes as dependency.
    - The proper dependency chain must be taken into account when installing
      or upgrading.

- Some themes do not have any dependency at all (theme_default, theme_bootswatch).

- Different websites can use the same theme.
    - All of them have to be upgraded when using -u
    - Only the current website must be upgraded when doing it from the UI

- Different websites can use different themes, including intermediary themes.
    eg. - website1 may use theme_A
        - website2 may use theme_B (depending on theme_A)

  Moreover, theme_A and theme_B might have downstream themes such as
  theme_A_sale and theme_B_sale (which depends on theme_A_sale).

In that case it is important when manipulating theme_B to also take into account
the relation it has with theme_A_sale even though theme_A_sale doesn't start
with the same name as theme_B and it is not in the direct stream of theme_B.

Authored by @seb-odoo with contributions from @dbh-odoo and @JKE-be
and precious help from @rde-odoo

PR: #27511

closes odoo/odoo#27838
2018-10-15 10:45:36 +00:00
Odoo Translation Bot e774b2cb1c [I18N] Update translation terms from Transifex 2018-10-14 01:23:43 +02:00
Martin Trigaux 57884ccdc8 [I18N] all: convert remaining model: translation entries
It should be model_terms:

Fixes odoo/docker#219

closes odoo/odoo#27664
2018-10-11 09:49:01 +00: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
Thibault Delavallée 01e92a0fa8 [FIX] website_theme_install: do not crash when canceling update
How to reproduce

 * install website_theme_install;
 * go on Apps -> Apply scheduled upgrades;
 * Hit Cancel;
 * there is a crash because somehow when writing on module self is a void
   recordset and self.name is therefore False and cannot starts with 'theme';

This commit fixes that by ensuring self is not void before checking its
name.
2018-09-25 15:58:24 +02:00
Odoo Translation Bot 5a439a85ef [I18N] Update translation terms from Transifex 2018-09-25 15:32:59 +02:00
Jeremy Kersten 9c5ee042a5 [FIX] website_theme_install: fix install theme
Active field was ignored in all case instead of just update
Button 'update theme' call wrong function
2018-09-25 11:50:19 +02:00
Odoo Translation Bot 1d79bf0273 [I18N] Update translation terms from Transifex 2018-09-23 02:29:29 +02:00
Jeremy Kersten 663da0684a [FIX] website: improve update theme
Before this commit, it remove and reload the theme.
Now we try to make a real update of view except for active field

We cannot know if it is True into the template or if it is the default value.
2018-09-21 18:20:00 +02:00
Martin Trigaux ae1fed50d5 [I18N] export saas-11.5 source terms 2018-09-21 16:32:59 +02:00
Nimesh Jethva 53e8aba1ab [IMP]website_*: Improvement in model description
Purpose of this commit is to give description more "business oriented"
because those descriptions appears in Odoo Studio which is supposed to be used by end users, not only by developers.

Related Task ID : 37311
2018-09-21 11:45:15 +02:00
qsm-odoo fa12ae4009 [FIX] website_theme_install: fix the enable_view method
The method failed to enable views which were created by copying a
theme.ir.ui.view. This is because standard views were found with the
'ref' method while those particular ones were found thanks to the
copy_ids field... which only found the already active ones by default.
2018-09-19 10:24:35 +02:00
qsm-odoo 3ecf2fbc7e [FIX] website_theme_install: review customization dialog message
The priority was set to a low value while it was meant to be a high
value. Indeed, we want that if that template is active, the customize
modal is emptied no matter what, so it has to be called last.

This is to have an understandable behavior if our code fails to mark the
template as inactive on a theme installation. With this commit, the
customization dialog will be empty. Without this commit, it gives an
error which can lead to think we made a mistake writing the theme's own
customization dialog while it was in fact inheriting from an emptied
dialog.
2018-09-19 10:24:00 +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
Jeremy Kersten 4a57d2619b [FIX] website[_theme_install]: fix website form view
Before this commit, you had 'choose a theme' into the form view.
It should be only visible in modal

task-1878245
2018-09-13 13:58:23 +02:00