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
closesodoo/odoo#157008
Signed-off-by: Pierre Masereel (pim) <pim@odoo.com>
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.
closesodoo/odoo#157687
Signed-off-by: Pierre Masereel (pim) <pim@odoo.com>
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.
closesodoo/odoo#148823
Signed-off-by: Rémy Voet (ryv) <ryv@odoo.com>
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.
closesodoo/odoo#153013
Signed-off-by: Pierre Masereel (pim) <pim@odoo.com>
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
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.
closesodoo/odoo#152078
Signed-off-by: Pierre Masereel (pim) <pim@odoo.com>
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
closesodoo/odoo#151256
X-original-commit: 12256bbc5981b06d7b77c133cc8f282ac03afba9
Signed-off-by: Nicolas Danhier (nda) <nda@odoo.com>
Signed-off-by: Pierre Masereel (pim) <pim@odoo.com>
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
closesodoo/odoo#149015
Signed-off-by: Pierre Masereel (pim) <pim@odoo.com>
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.
closesodoo/odoo#147138
Signed-off-by: Pierre Masereel (pim) <pim@odoo.com>
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
closesodoo/odoo#148955
X-original-commit: b96b34dc69458b165e8660520832bd8d02adec70
Signed-off-by: Raphael Collet <rco@odoo.com>
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
closesodoo/odoo#148456
Signed-off-by: Séna Serge Nshimiyimana (sesn) <sesn@odoo.com>
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.
closesodoo/odoo#141744
Signed-off-by: Pierre Masereel (pim) <pim@odoo.com>
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
closesodoo/odoo#147730
Signed-off-by: Rémy Voet (ryv) <ryv@odoo.com>
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.
closesodoo/odoo#147271
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
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
closesodoo/odoo#145708
Signed-off-by: Rémy Voet (ryv) <ryv@odoo.com>
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.
closesodoo/odoo#144241
Signed-off-by: Pierre Masereel (pim) <pim@odoo.com>
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.
closesodoo/odoo#142113
Signed-off-by: Pierre Masereel (pim) <pim@odoo.com>
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.
closesodoo/odoo#141173
Signed-off-by: Pierre Masereel (pim) <pim@odoo.com>
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
closesodoo/odoo#141133
Signed-off-by: Pierre Masereel (pim) <pim@odoo.com>
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.
closesodoo/odoo#140994
Signed-off-by: Pierre Masereel (pim) <pim@odoo.com>
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
closesodoo/odoo#140245
Signed-off-by: Pierre Masereel (pim) <pim@odoo.com>
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.
closesodoo/odoo#139314
Related: odoo/enterprise#49311
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>