mirror of
https://github.com/bringout/oca-workflow-process.git
synced 2026-04-21 12:52:02 +02:00
Initial commit: OCA Workflow Process packages (456 packages)
This commit is contained in:
commit
d366e42934
18799 changed files with 1284507 additions and 0 deletions
|
|
@ -0,0 +1,22 @@
|
|||
# Copyright 2023 Tecnativa - Víctor Martínez
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
from openupgradelib import openupgrade
|
||||
|
||||
|
||||
@openupgrade.migrate()
|
||||
def migrate(env, version):
|
||||
"""If table exists and there are any records, we set the module
|
||||
project_stock_analytic_tag to be installed."""
|
||||
if openupgrade.table_exists(env.cr, "account_analytic_tag_project_task_stock_rel"):
|
||||
env.cr.execute(
|
||||
"""SELECT COUNT(*)
|
||||
FROM account_analytic_tag_project_task_stock_rel""",
|
||||
)
|
||||
if env.cr.fetchone()[0]:
|
||||
openupgrade.logged_query(
|
||||
env.cr,
|
||||
"""UPDATE ir_module_module
|
||||
SET state = 'to install'
|
||||
WHERE name = 'project_stock_analytic_tag'""",
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue