Commit Graph
576 Commits
Author SHA1 Message Date
Odoo Translation Bot 3275156773 [I18N] Update translation terms from Transifex 2024-04-14 00:09:33 +02:00
Odoo Translation Bot 684745f5de [I18N] Update translation terms from Transifex 2024-03-31 00:09:16 +01:00
Arjun Panchal 5df277fbc5 [FIX] base_import_module: activate from form view and upgrade
Before this commit
==================
Unable to activate the industry from the form view in the industry section.
Additionally, the button in the form for upgrading would be called the
button_immediate_upgrade method, resulting in errors.

After this commit
=================
Activation of the industry from the form view in the industry section is now
possible. Furthermore, the issue with upgrading the industry from the form view
has been resolved.

task-3775729

closes odoo/odoo#157008

Signed-off-by: Pierre Masereel (pim) <pim@odoo.com>
2024-03-27 16:10:58 +00:00
Odoo Translation Bot 395140671f [I18N] Update translation terms from Transifex 2024-03-24 00:12:07 +01:00
Odoo Translation Bot c4bc200b47 [I18N] Update translation terms from Transifex 2024-03-17 00:11:43 +01:00
vava-odoo 48e1b9d0c5 [IMP] base_import_module: log info message if import succeeds
Before this commit, there was no message in the logs when the import of
a data module is finished. This commit adds a log info to state that the
module is now in the db.

closes odoo/odoo#157687

Signed-off-by: Pierre Masereel (pim) <pim@odoo.com>
2024-03-14 20:42:42 +00:00
vava-odoo 9da06bc19b [FIX] base_import_module: raise UserError if import fails
Before this commit, when an error occurred during the installation of a
data module, there was no displayed error nor a rollback to remove data
already installed from the module.

This commit makes sure that, if an error occurs, it is displayed through
a UserError that will do a rollback to remove every record from the
module.

closes odoo/odoo#148823

Signed-off-by: Rémy Voet (ryv) <ryv@odoo.com>
2024-03-13 10:54:02 +00:00
Odoo Translation Bot 1b9fd01d46 [I18N] Update translation terms from Transifex 2024-03-10 00:13:03 +01:00
Odoo Translation Bot cb45934163 [I18N] Update translation terms from Transifex 2024-03-03 00:09:56 +01:00
Odoo Translation Bot 4f4ca50e8d [I18N] Update translation terms from Transifex 2024-02-25 00:13:04 +01:00
Odoo Translation Bot 1cf48deef9 [I18N] Update translation terms from Transifex 2024-02-18 00:12:23 +01:00
vava-odoo 054d05067b [IMP] base_import_module: add warning for demo data
task-3725221

closes odoo/odoo#154006

Signed-off-by: Pierre Masereel (pim) <pim@odoo.com>
2024-02-15 17:11:12 +00:00
vava-odoo df2a5d841a [FIX] base_import_module: fix form view layout
The commit odoo/odoo@a72007508a fixed the dialog for the import of
a module, but broke the (shared) view for the dialog of the installation
of an industry. This commit fixes both dialog views.

closes odoo/odoo#153013

Signed-off-by: Pierre Masereel (pim) <pim@odoo.com>
2024-02-12 20:24:06 +00:00
Odoo Translation Bot dd40867949 [I18N] Update translation terms from Transifex 2024-02-11 00:14:17 +01:00
Tiffany Chang (tic) 94c58407f6 [I18N] *: add in Russian translations
For a first iteration, Russian translations were done using DeepL using
1 large .pot file of all the standard modules to translate (e.g. no
localizations, no test modules, etc). Unfortunately for some reason
doing a msgmerge with the existing ru.po files didn't seem to work, so
old "Translators" metadata at top of files were lost (maybe they will be
re-added during next Transifex sync?)

Part-of: odoo/odoo#152285
2024-02-06 18:49:02 +00:00
vava-odoo 873a13ef62 [FIX] base_import_module: fix missing field name in non-debug mode
Before this commit, the website of the industry module ends with
`/False`. This is because the website of the module requires the name
of the module. It is therefore added in the _get_modules_from_apps
method.

closes odoo/odoo#152078

Signed-off-by: Pierre Masereel (pim) <pim@odoo.com>
2024-02-01 07:06:57 +00:00
Odoo Translation Bot 625dac5a10 [I18N] Update translation terms from Transifex 2024-01-28 00:16:34 +01:00
nda e796f13d2a [FIX] base_import_module: set module dependencies
Dependencies and other manifest attributes are not set for data modules.

Note: it's easier to reproduce issue in 17 since we have data module available
on runbot.

steps to reproduce (in 17.0):
- install an industry (ex: bar_and_lounge)
- uninstall a dependency of that module (ex: mrp)

before this commit:
- bar_and_lounge is not uninstalled if you uninstall mrp

after this commit:
- data model dependencies are handled the same way as 'regular' modules

opw-3660052

closes odoo/odoo#151256

X-original-commit: 12256bbc5981b06d7b77c133cc8f282ac03afba9
Signed-off-by: Nicolas Danhier (nda) <nda@odoo.com>
Signed-off-by: Pierre Masereel (pim) <pim@odoo.com>
2024-01-26 21:07:58 +00:00
Pierre Masereel 6f887582cc [FIX] base_import_module: adapt ormcache for industries
Instead of changing the type of lists to make an ormcache that works,
we'v extracted the function that call the server apps.odoo.com to pass
it the payload in json (as it will be sent to the server), and use the
payload value as ormcache

closes odoo/odoo#149015

Signed-off-by: Pierre Masereel (pim) <pim@odoo.com>
2024-01-25 13:42:43 +00:00
Odoo Translation Bot 95a4b6dfdc [I18N] Update translation terms from Transifex 2024-01-21 00:17:03 +01:00
vava-odoo aa2fa69065 [FIX] base_import_module: import module in sudo to bypass ACLs
closes odoo/odoo#149243

Signed-off-by: Pierre Masereel (pim) <pim@odoo.com>
2024-01-15 11:11:27 +00:00
Odoo Translation Bot b81790505b [I18N] Update translation terms from Transifex 2024-01-14 00:16:26 +01:00
vava-odoo 64aea1a402 [FIX] base_import_module: raise error if dependencies not in addons path
If the addons path does not contain enterprise, the industry module
cannot be installed since all of them rely on knowledge. The same
applies if there is a theme in the industry and that the design-themes
repository is not in the addons-path.

This commit raises a UserError in case the installation would fail due
to a missing repository in the addons-path.

closes odoo/odoo#147138

Signed-off-by: Pierre Masereel (pim) <pim@odoo.com>
2024-01-11 17:00:42 +00:00
nda c32628641b [FIX] base_import_module: use full version for uploadable module
uploadable modules latest_version are not fully defined (ex: 1.0 instead of
15.0.1.0), which lead to issues in the MigrationManager.

Steps (in 17.0):
- make sure you have the industry repository in the addons-path and the upgrade
one in the upgrade-path
- create an empty database
- On 'Hair Salon', click 'Activate'
- On the 'Install an App' popup window, click 'Install'
- Wait for the Hair Salon Industry to install > Once finished, go to the Website
- Click 'Edit' to open the website editor
- Click 'Theme'
- Next to the 'Theme' field under the 'Website' section, click 'Switch Theme'
- Click 'Ok' on the Confirmation popup window
- Click 'Use this theme' for the BEAUTY them
- The 'Building your website...' animation begins
An error is thrown
File "/home/odoo/src/odoo/17.0/odoo/addons/base/maintenance/migrations/theme_common/9.saas~13.1.1/pre-views.py", line 4, in <module>
from openerp.addons.base.maintenance.migrations import util
ModuleNotFoundError: No module named 'openerp'

opw-3589376

closes odoo/odoo#148955

X-original-commit: b96b34dc69458b165e8660520832bd8d02adec70
Signed-off-by: Raphael Collet <rco@odoo.com>
2024-01-11 10:06:44 +00:00
sesn-odoo 69f6fcccd9 [FIX] base_import_module: set actual ID for installed industries
Currently, when you attempt to uninstall an industry module, you are met
with a 'record not found' error.

Cause
-----
The list of industry modules is fetched from `odoo.com`. Since they do not
exist in the database, they are all assigned an ID of `-1`.
This ends up causing an issue in case of uninstall because no record
with and ID of `-1` can be found.

Fix
---
When a module is installed, it gets a record in the database (and ID).
The fix simply uses that ID if it exists, instead of `-1`.

opw-3662239

closes odoo/odoo#148456

Signed-off-by: Séna Serge Nshimiyimana (sesn) <sesn@odoo.com>
2024-01-10 10:28:11 +00:00
Mohamed Lamine Lalmi 366837636a [FIX] base_import_module: Install custom module instead of attempting to download
Versions:
---------
- 17.0

Steps to reproduce:
-------------------
1. Install any custom module.

Issue:
------
Odoo raises the error "Connection to %s failed; the module %s cannot be
downloaded."

Cause:
------
The "activate" button on custom modules triggers the "button_immediate_install_app"
method instead of "button_immediate_install" because the "module_type" field is
empty for custom modules.

Solution:
---------
Display the "button_immediate_install" button on the modules kanban view when
the "module_type" is empty.

closes odoo/odoo#141744

Signed-off-by: Pierre Masereel (pim) <pim@odoo.com>
2024-01-08 19:12:43 +00:00
Odoo Translation Bot 0e23020b84 [I18N] Update translation terms from Transifex 2024-01-07 00:23:19 +01:00
Odoo Translation Bot ad35458e8b [I18N] Update translation terms from Transifex 2023-12-31 00:18:24 +01:00
nda 5054148633 [FIX] base_import_module: avoid warning when browsing industry modules
An ormcache has been added to a method that takes lists as parameters but
lists are not hashable.

steps to reproduce:
- go to apps and click on on 'Industries'

before this commit:
- a warning is raised in the logs:

WARNING industry odoo.tools.cache: cache lookup error on ('ir.module.module', <function IrModule._get_modules_from_apps at 0x7f99e842fc70>, ['icon', 'icon_flag', 'to_buy', 'name', 'state', 'summary', 'website', 'application', 'module_type', 'shortdesc'], 'industries', False, ['&', '!', ['name', '=like', 'theme_%'], '&', ['application', '=', True], ['module_type', '=', 'industries']], 80, 0)
Traceback (most recent call last):
  File "/home/nda/dev/odoo/17.0/odoo/odoo/tools/cache.py", line 99, in lookup
    r = d[key]
  File "<decorator-gen-5>", line 2, in __getitem__
  File "/home/nda/dev/odoo/17.0/odoo/odoo/tools/func.py", line 87, in locked
    return func(inst, *args, **kwargs)
  File "/home/nda/dev/odoo/17.0/odoo/odoo/tools/lru.py", line 34, in __getitem__
    a = self.d[obj]
TypeError: unhashable type: 'list'

after this commit:
- ormcache is properly used

opw-3660052

closes odoo/odoo#147730

Signed-off-by: Rémy Voet (ryv) <ryv@odoo.com>
2023-12-29 14:59:44 +00:00
Odoo Translation Bot 50e8e08183 [I18N] Update translation terms from Transifex 2023-12-24 00:18:24 +01:00
Aaron Bohy a72007508a [FIX] base_import_module: fix form view layout
Before this commit, the layout of the import module form view (in
the dialog) was broken. This was due to unnecessary and wrong use
of col/colspan attributes.

closes odoo/odoo#147271

Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-12-22 13:31:43 +00:00
Odoo Translation Bot 304a6caa14 [I18N] Update translation terms from Transifex 2023-12-17 00:08:26 +01:00
Gauthier Wala (gawa) 480dfc1538 [FIX] base_import_module: fix test sql import
The test tries to import data from an sql file.
The problem is that it is trying to import partners, but when
the test is ran with the l10n_co localization, one of the required
field is not filled.

We just change the model to import to avoid the issue with the
missing required field.

Linked to runbot error 32740, 32742, 32745, 32738

closes odoo/odoo#145708

Signed-off-by: Rémy Voet (ryv) <ryv@odoo.com>
2023-12-12 17:03:40 +00:00
Odoo Translation Bot 8ab45d4a85 [I18N] Update translation terms from Transifex 2023-12-10 00:12:46 +01:00
Odoo Translation Bot 2ac98dc2e5 [I18N] Update translation terms from Transifex 2023-12-03 00:18:54 +01:00
Pierre Masereel 227671290d [FIX] base_import_module: add function returning dependencies
A function that returns the list of missing modules is needed to know if
the the customer needs to changi his plan when importing an industry
module.

closes odoo/odoo#144241

Signed-off-by: Pierre Masereel (pim) <pim@odoo.com>
2023-12-01 17:08:00 +00:00
Odoo Translation Bot 3ffba892de [I18N] Update translation terms from Transifex 2023-11-26 00:20:02 +01:00
Odoo Translation Bot f6fe982853 [I18N] Update translation terms from Transifex 2023-11-19 00:28:08 +01:00
Pierre Masereel 307a2e0363 [FIX] base_import_module: no spaces in ir_model_data name
When we are importing a module and we need to create an attachment from
a file in static. We get an error if the file path of the file contains
a space.

We get this error becuase it takes the path to generate an xml id and
the name of an xml_id cannot contains spaces.

closes odoo/odoo#142113

Signed-off-by: Pierre Masereel (pim) <pim@odoo.com>
2023-11-15 12:34:24 +00:00
Louis (wil) 68b4dfc2bb [I18N] *: import translations
closes odoo/odoo#141655

Related: odoo/enterprise#50484
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
2023-11-08 20:48:14 +00:00
Pierre Masereel 54afc1366f [FIX] base_import_module: get industries categories
Since we have multiple categories for the Industries apps. We are now
getting them from apps.odoo.com. And we are using the ids from apps in
the domain that is sent back to apps.

closes odoo/odoo#141173

Signed-off-by: Pierre Masereel (pim) <pim@odoo.com>
2023-11-07 19:32:27 +00:00
Louis (wil) af5a5f4986 [I18N] *: export source terms
closes odoo/odoo#141127

Related: odoo/enterprise#50247
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
2023-11-06 16:55:41 +00:00
Xavier ALT 9976d707f0 [FIX] base_import_module: fix crash for imported module icon
With normal module, the icon is always loaded from the filesystem but
when importing a module that contains a module icon (by default in
static/description/icon.png) it crash with a `FileNotFound` exceptions
because the image is not available on the filesystem but as an
ir.attachment.

This ensure that for imported module we load the icon from the
corresponding imported attachment

closes odoo/odoo#141133

Signed-off-by: Pierre Masereel (pim) <pim@odoo.com>
2023-11-06 12:32:03 +00:00
Pierre Masereel 407f1b1d7e [FIX] base_import_module: split get_dependencies function
Since we need to get the list of dependencies for the saas (and not noly
a Text of the module names, we split the function to be able to easily
get the list of dependencies.

closes odoo/odoo#140994

Signed-off-by: Pierre Masereel (pim) <pim@odoo.com>
2023-11-06 11:16:44 +00:00
Odoo Translation Bot 5d2bc9e9b3 [I18N] Update translation terms from Transifex 2023-11-05 00:21:55 +01:00
Pierre Masereel 234590f3db [IMP] base_import_module: add industry modules availability
We now have the possbility to publish modules that only contains XML on
apps.odoo.com and we want to display in the apps of the database to ease
the installation.

TASK-3186716

closes odoo/odoo#140245

Signed-off-by: Pierre Masereel (pim) <pim@odoo.com>
2023-11-02 16:57:50 +00:00
Odoo Translation Bot 6739c317d1 [I18N] Update translation terms from Transifex 2023-10-29 00:07:17 +02:00
Louis (wil) 3f6f949fa5 [I18N] export sources
closes odoo/odoo#140002

Related: odoo/enterprise#49687
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
2023-10-27 08:36:16 +00:00
Pierre Masereel 92565aae27 [IMP] base_import_module: add fields for industry modules
closes odoo/odoo#139726

Signed-off-by: Pierre Masereel (pim) <pim@odoo.com>
2023-10-25 20:56:09 +00:00
Xavier Morel 9ebbfdac73 [FIX] *: incorrect translations markings
Fixes a large number of cases where strings are translated then
formatted, instead of letting `_()` do the formatting internally,
which allows it to recover from incorrect translations (missing,
broken, or extra placeholders).

Also

- removes translation markers entirely when there's nothing to
  translate e.g. `_("%s - %s")` is not useful
- fixes a few messes which lead to only partial translatability
  (DRY is generally a bad idea when translations are involved, even
  more so when you don't make the variable part translatable)
- fixes a few nearby issues noticed at the same time
- replaces a few `"%s"` by `%r`, which should automatically quote
  strings relatively appropriately
- fixes translated strings which use `\` to escape a newline (in order
  to fill-paragraph): `\` escapes only the newline, if the
  continuation string is indented this results in a bunch of spaces
  ending in the string to translate, which is pretty garbage for the
  translator, using implicit concatenation works much better

Note: some of the updates revert f-string parameters to %, because
babel (2.9) apparently has trouble with f-strings and blows up trying
to extract them.

Not in scope:

Helping translators fix translatable strings e.g. any translation
string with more than one placeholder probably should use keyword
placeholders

- Provides more context / data to the translator to make sense of the
  sentence.
- Allows reordering the translated terms, which can be necessary
  depending on the sentence and language.

closes odoo/odoo#139314

Related: odoo/enterprise#49311
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2023-10-23 16:45:09 +00:00