Skip to content

Commit

Permalink
[IMP] new table and migration script
Browse files Browse the repository at this point in the history
  • Loading branch information
augusto-weiss committed Nov 21, 2024
1 parent 088ddad commit a01cfad
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
2 changes: 1 addition & 1 deletion web_ir_actions_act_multi/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"name": "Web Actions Multi",
"summary": "Enables triggering of more than one action on ActionManager",
"category": "Web",
"version": "17.0.1.0.0",
"version": "17.0.2.0.0",
"license": "LGPL-3",
"author": "Modoolar, " "CorporateHub, " "Odoo Community Association (OCA)",
"website": "https://github.com/OCA/web",
Expand Down
18 changes: 18 additions & 0 deletions web_ir_actions_act_multi/migrations/17.0.2.0.0/post-migration.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import logging
_logger = logging.getLogger(__name__)


def migrate(cr, version):
_logger.info('Running migrate script for web_ir_actions_act_multi')

cr.execute("""
INSERT INTO ir_actions_act_multi
SELECT *
FROM ir_actions
WHERE type = 'ir.actions.act_multi'
""")

cr.execute("""
DELETE FROM ir_actions
WHERE type = 'ir.actions.act_multi'
""")
2 changes: 1 addition & 1 deletion web_ir_actions_act_multi/models/ir_actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class IrActionsActMulti(models.Model):
_name = "ir.actions.act_multi"
_description = "Action Multi"
_inherit = "ir.actions.actions"
_table = "ir_actions"
_table = "ir_actions_act_multi"

type = fields.Char(default="ir.actions.act_multi")

Expand Down

0 comments on commit a01cfad

Please sign in to comment.