mirror of https://github.com/OCA/web.git
[FIX] web_ir_actions_act_multi: Uninstallation Issue
During uninstallation, Odoo attempts to delete columns and tables related to the ir.actions.act_multi model. However, this model shares the same table (ir_actions) with other core modules, meaning the table and its columns should not be removed. Before this commit, this issue could render the database unusable. After this commit, the database remains intact, and the module can be uninstalled without problems.pull/3134/head
parent
1f726650bf
commit
6fa74e49eb
|
@ -7,7 +7,7 @@ Web Actions Multi
|
||||||
!! This file is generated by oca-gen-addon-readme !!
|
!! This file is generated by oca-gen-addon-readme !!
|
||||||
!! changes will be overwritten. !!
|
!! changes will be overwritten. !!
|
||||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
!! source digest: sha256:6e9f7ee51281d6578d60492d6f8973b4e90a3802e50aa5c3f1e6e0fe017c9327
|
!! source digest: sha256:2748259f3e8355dce1c410234958cf54f9b9c3041d67d18d2f1bf126649da427
|
||||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
|
|
||||||
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
|
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
"name": "Web Actions Multi",
|
"name": "Web Actions Multi",
|
||||||
"summary": "Enables triggering of more than one action on ActionManager",
|
"summary": "Enables triggering of more than one action on ActionManager",
|
||||||
"category": "Web",
|
"category": "Web",
|
||||||
"version": "16.0.1.0.0",
|
"version": "16.0.1.0.1",
|
||||||
"license": "LGPL-3",
|
"license": "LGPL-3",
|
||||||
"author": "Modoolar, " "CorporateHub, " "Odoo Community Association (OCA)",
|
"author": "Modoolar, " "CorporateHub, " "Odoo Community Association (OCA)",
|
||||||
"website": "https://github.com/OCA/web",
|
"website": "https://github.com/OCA/web",
|
||||||
|
|
|
@ -70,6 +70,11 @@ msgstr "Mostrar Nombre"
|
||||||
msgid "External ID"
|
msgid "External ID"
|
||||||
msgstr "ID Externa"
|
msgstr "ID Externa"
|
||||||
|
|
||||||
|
#. module: web_ir_actions_act_multi
|
||||||
|
#: model:ir.model,name:web_ir_actions_act_multi.model_ir_model_fields
|
||||||
|
msgid "Fields"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#. module: web_ir_actions_act_multi
|
#. module: web_ir_actions_act_multi
|
||||||
#: model:ir.model.fields,field_description:web_ir_actions_act_multi.field_ir_actions_act_multi__id
|
#: model:ir.model.fields,field_description:web_ir_actions_act_multi.field_ir_actions_act_multi__id
|
||||||
msgid "ID"
|
msgid "ID"
|
||||||
|
@ -90,6 +95,16 @@ msgstr "Última actualización por"
|
||||||
msgid "Last Updated on"
|
msgid "Last Updated on"
|
||||||
msgstr "Última Actualización el"
|
msgstr "Última Actualización el"
|
||||||
|
|
||||||
|
#. module: web_ir_actions_act_multi
|
||||||
|
#: model:ir.model,name:web_ir_actions_act_multi.model_ir_model_data
|
||||||
|
msgid "Model Data"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: web_ir_actions_act_multi
|
||||||
|
#: model:ir.model,name:web_ir_actions_act_multi.model_ir_model
|
||||||
|
msgid "Models"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#. module: web_ir_actions_act_multi
|
#. module: web_ir_actions_act_multi
|
||||||
#: model:ir.model.fields,help:web_ir_actions_act_multi.field_ir_actions_act_multi__help
|
#: model:ir.model.fields,help:web_ir_actions_act_multi.field_ir_actions_act_multi__help
|
||||||
msgid ""
|
msgid ""
|
||||||
|
|
|
@ -71,6 +71,11 @@ msgstr "Nome visualizzato"
|
||||||
msgid "External ID"
|
msgid "External ID"
|
||||||
msgstr "ID esterno"
|
msgstr "ID esterno"
|
||||||
|
|
||||||
|
#. module: web_ir_actions_act_multi
|
||||||
|
#: model:ir.model,name:web_ir_actions_act_multi.model_ir_model_fields
|
||||||
|
msgid "Fields"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#. module: web_ir_actions_act_multi
|
#. module: web_ir_actions_act_multi
|
||||||
#: model:ir.model.fields,field_description:web_ir_actions_act_multi.field_ir_actions_act_multi__id
|
#: model:ir.model.fields,field_description:web_ir_actions_act_multi.field_ir_actions_act_multi__id
|
||||||
msgid "ID"
|
msgid "ID"
|
||||||
|
@ -91,11 +96,21 @@ msgstr "Ultimo aggiornamento di"
|
||||||
msgid "Last Updated on"
|
msgid "Last Updated on"
|
||||||
msgstr "Ultimo aggiornamento il"
|
msgstr "Ultimo aggiornamento il"
|
||||||
|
|
||||||
|
#. module: web_ir_actions_act_multi
|
||||||
|
#: model:ir.model,name:web_ir_actions_act_multi.model_ir_model_data
|
||||||
|
msgid "Model Data"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: web_ir_actions_act_multi
|
||||||
|
#: model:ir.model,name:web_ir_actions_act_multi.model_ir_model
|
||||||
|
msgid "Models"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#. module: web_ir_actions_act_multi
|
#. module: web_ir_actions_act_multi
|
||||||
#: model:ir.model.fields,help:web_ir_actions_act_multi.field_ir_actions_act_multi__help
|
#: model:ir.model.fields,help:web_ir_actions_act_multi.field_ir_actions_act_multi__help
|
||||||
msgid ""
|
msgid ""
|
||||||
"Optional help text for the users with a description of the target view, such"
|
"Optional help text for the users with a description of the target view, such "
|
||||||
" as its usage and purpose."
|
"as its usage and purpose."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Testo di aiuto opzionale per l'utente con una descrizione della vista "
|
"Testo di aiuto opzionale per l'utente con una descrizione della vista "
|
||||||
"obiettivo, come il suo utilizzo e obiettivo."
|
"obiettivo, come il suo utilizzo e obiettivo."
|
||||||
|
|
|
@ -68,6 +68,11 @@ msgstr ""
|
||||||
msgid "External ID"
|
msgid "External ID"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: web_ir_actions_act_multi
|
||||||
|
#: model:ir.model,name:web_ir_actions_act_multi.model_ir_model_fields
|
||||||
|
msgid "Fields"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#. module: web_ir_actions_act_multi
|
#. module: web_ir_actions_act_multi
|
||||||
#: model:ir.model.fields,field_description:web_ir_actions_act_multi.field_ir_actions_act_multi__id
|
#: model:ir.model.fields,field_description:web_ir_actions_act_multi.field_ir_actions_act_multi__id
|
||||||
msgid "ID"
|
msgid "ID"
|
||||||
|
@ -88,6 +93,16 @@ msgstr ""
|
||||||
msgid "Last Updated on"
|
msgid "Last Updated on"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: web_ir_actions_act_multi
|
||||||
|
#: model:ir.model,name:web_ir_actions_act_multi.model_ir_model_data
|
||||||
|
msgid "Model Data"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: web_ir_actions_act_multi
|
||||||
|
#: model:ir.model,name:web_ir_actions_act_multi.model_ir_model
|
||||||
|
msgid "Models"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#. module: web_ir_actions_act_multi
|
#. module: web_ir_actions_act_multi
|
||||||
#: model:ir.model.fields,help:web_ir_actions_act_multi.field_ir_actions_act_multi__help
|
#: model:ir.model.fields,help:web_ir_actions_act_multi.field_ir_actions_act_multi__help
|
||||||
msgid ""
|
msgid ""
|
||||||
|
|
|
@ -68,6 +68,11 @@ msgstr ""
|
||||||
msgid "External ID"
|
msgid "External ID"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: web_ir_actions_act_multi
|
||||||
|
#: model:ir.model,name:web_ir_actions_act_multi.model_ir_model_fields
|
||||||
|
msgid "Fields"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#. module: web_ir_actions_act_multi
|
#. module: web_ir_actions_act_multi
|
||||||
#: model:ir.model.fields,field_description:web_ir_actions_act_multi.field_ir_actions_act_multi__id
|
#: model:ir.model.fields,field_description:web_ir_actions_act_multi.field_ir_actions_act_multi__id
|
||||||
msgid "ID"
|
msgid "ID"
|
||||||
|
@ -88,6 +93,16 @@ msgstr ""
|
||||||
msgid "Last Updated on"
|
msgid "Last Updated on"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: web_ir_actions_act_multi
|
||||||
|
#: model:ir.model,name:web_ir_actions_act_multi.model_ir_model_data
|
||||||
|
msgid "Model Data"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. module: web_ir_actions_act_multi
|
||||||
|
#: model:ir.model,name:web_ir_actions_act_multi.model_ir_model
|
||||||
|
msgid "Models"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#. module: web_ir_actions_act_multi
|
#. module: web_ir_actions_act_multi
|
||||||
#: model:ir.model.fields,help:web_ir_actions_act_multi.field_ir_actions_act_multi__help
|
#: model:ir.model.fields,help:web_ir_actions_act_multi.field_ir_actions_act_multi__help
|
||||||
msgid ""
|
msgid ""
|
||||||
|
|
|
@ -1 +1,2 @@
|
||||||
from . import ir_actions
|
from . import ir_actions
|
||||||
|
from . import ir_model
|
||||||
|
|
|
@ -0,0 +1,37 @@
|
||||||
|
from odoo import api, models
|
||||||
|
|
||||||
|
|
||||||
|
class IrModelData(models.Model):
|
||||||
|
_inherit = "ir.model.data"
|
||||||
|
|
||||||
|
@api.model
|
||||||
|
def _module_data_uninstall(self, modules_to_remove):
|
||||||
|
# Set a flag to prevent the deletion of tables and columns
|
||||||
|
# related to ir.actions.act_multi.
|
||||||
|
if "web_ir_actions_act_multi" in modules_to_remove:
|
||||||
|
self = self.with_context(uninstall_web_ir_actions_act_multi=True)
|
||||||
|
return super(IrModelData, self)._module_data_uninstall(modules_to_remove)
|
||||||
|
|
||||||
|
|
||||||
|
class IrModel(models.Model):
|
||||||
|
_inherit = "ir.model"
|
||||||
|
|
||||||
|
def _drop_table(self):
|
||||||
|
# Prevent the deletion of the table.
|
||||||
|
# The model is ir.actions.act_multi, but the actual table is ir_actions.
|
||||||
|
# This table is a core component and should not be removed.
|
||||||
|
if self.env.context.get("uninstall_web_ir_actions_act_multi"):
|
||||||
|
self -= self.filtered(lambda model: model.model == "ir.actions.act_multi")
|
||||||
|
return super()._drop_table()
|
||||||
|
|
||||||
|
|
||||||
|
class IrModelFields(models.Model):
|
||||||
|
_inherit = "ir.model.fields"
|
||||||
|
|
||||||
|
def _drop_column(self):
|
||||||
|
# Prevent the deletion of columns in the ir_actions table.
|
||||||
|
# The model is ir.actions.act_multi, but the actual table is ir_actions.
|
||||||
|
# Since this table is a core component, its columns should not be deleted.
|
||||||
|
if self.env.context.get("uninstall_web_ir_actions_act_multi"):
|
||||||
|
self -= self.filtered(lambda field: field.model == "ir.actions.act_multi")
|
||||||
|
return super()._drop_column()
|
|
@ -1,4 +1,3 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||||
<head>
|
<head>
|
||||||
|
@ -9,10 +8,11 @@
|
||||||
|
|
||||||
/*
|
/*
|
||||||
:Author: David Goodger (goodger@python.org)
|
:Author: David Goodger (goodger@python.org)
|
||||||
:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
|
:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
|
||||||
:Copyright: This stylesheet has been placed in the public domain.
|
:Copyright: This stylesheet has been placed in the public domain.
|
||||||
|
|
||||||
Default cascading style sheet for the HTML output of Docutils.
|
Default cascading style sheet for the HTML output of Docutils.
|
||||||
|
Despite the name, some widely supported CSS2 features are used.
|
||||||
|
|
||||||
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
|
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
|
||||||
customize this style sheet.
|
customize this style sheet.
|
||||||
|
@ -275,7 +275,7 @@ pre.literal-block, pre.doctest-block, pre.math, pre.code {
|
||||||
margin-left: 2em ;
|
margin-left: 2em ;
|
||||||
margin-right: 2em }
|
margin-right: 2em }
|
||||||
|
|
||||||
pre.code .ln { color: grey; } /* line numbers */
|
pre.code .ln { color: gray; } /* line numbers */
|
||||||
pre.code, code { background-color: #eeeeee }
|
pre.code, code { background-color: #eeeeee }
|
||||||
pre.code .comment, code .comment { color: #5C6576 }
|
pre.code .comment, code .comment { color: #5C6576 }
|
||||||
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
|
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
|
||||||
|
@ -301,7 +301,7 @@ span.option {
|
||||||
span.pre {
|
span.pre {
|
||||||
white-space: pre }
|
white-space: pre }
|
||||||
|
|
||||||
span.problematic {
|
span.problematic, pre.problematic {
|
||||||
color: red }
|
color: red }
|
||||||
|
|
||||||
span.section-subtitle {
|
span.section-subtitle {
|
||||||
|
@ -367,7 +367,7 @@ ul.auto-toc {
|
||||||
!! This file is generated by oca-gen-addon-readme !!
|
!! This file is generated by oca-gen-addon-readme !!
|
||||||
!! changes will be overwritten. !!
|
!! changes will be overwritten. !!
|
||||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
!! source digest: sha256:6e9f7ee51281d6578d60492d6f8973b4e90a3802e50aa5c3f1e6e0fe017c9327
|
!! source digest: sha256:2748259f3e8355dce1c410234958cf54f9b9c3041d67d18d2f1bf126649da427
|
||||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||||
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/licence-LGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/web/tree/16.0/web_ir_actions_act_multi"><img alt="OCA/web" src="https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/web-16-0/web-16-0-web_ir_actions_act_multi"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/web&target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
|
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/licence-LGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/web/tree/16.0/web_ir_actions_act_multi"><img alt="OCA/web" src="https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/web-16-0/web-16-0-web_ir_actions_act_multi"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/web&target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
|
||||||
<p>This module provides a way to trigger more than one action on ActionManager</p>
|
<p>This module provides a way to trigger more than one action on ActionManager</p>
|
||||||
|
@ -388,7 +388,7 @@ ul.auto-toc {
|
||||||
<h1><a class="toc-backref" href="#toc-entry-1">Usage</a></h1>
|
<h1><a class="toc-backref" href="#toc-entry-1">Usage</a></h1>
|
||||||
<p>To use this functionality you need to return following action with list of actions to execute:</p>
|
<p>To use this functionality you need to return following action with list of actions to execute:</p>
|
||||||
<pre class="code python literal-block">
|
<pre class="code python literal-block">
|
||||||
<span class="k">def</span> <span class="nf">foo</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span><span class="w">
|
<span class="k">def</span><span class="w"> </span><span class="nf">foo</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span><span class="w">
|
||||||
</span> <span class="bp">self</span><span class="o">.</span><span class="n">ensure_one</span><span class="p">()</span><span class="w">
|
</span> <span class="bp">self</span><span class="o">.</span><span class="n">ensure_one</span><span class="p">()</span><span class="w">
|
||||||
</span> <span class="k">return</span> <span class="p">{</span><span class="w">
|
</span> <span class="k">return</span> <span class="p">{</span><span class="w">
|
||||||
</span> <span class="s1">'type'</span><span class="p">:</span> <span class="s1">'ir.actions.act_multi'</span><span class="p">,</span><span class="w">
|
</span> <span class="s1">'type'</span><span class="p">:</span> <span class="s1">'ir.actions.act_multi'</span><span class="p">,</span><span class="w">
|
||||||
|
@ -432,7 +432,9 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
|
||||||
<div class="section" id="maintainers">
|
<div class="section" id="maintainers">
|
||||||
<h2><a class="toc-backref" href="#toc-entry-6">Maintainers</a></h2>
|
<h2><a class="toc-backref" href="#toc-entry-6">Maintainers</a></h2>
|
||||||
<p>This module is maintained by the OCA.</p>
|
<p>This module is maintained by the OCA.</p>
|
||||||
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
|
<a class="reference external image-reference" href="https://odoo-community.org">
|
||||||
|
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
|
||||||
|
</a>
|
||||||
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
|
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
|
||||||
mission is to support the collaborative development of Odoo features and
|
mission is to support the collaborative development of Odoo features and
|
||||||
promote its widespread use.</p>
|
promote its widespread use.</p>
|
||||||
|
|
Loading…
Reference in New Issue