mirror of
https://github.com/bringout/oca-technical.git
synced 2026-04-25 16:12:03 +02:00
Initial commit: OCA Technical packages (595 packages)
This commit is contained in:
commit
2cc02aac6e
24950 changed files with 2318079 additions and 0 deletions
|
|
@ -0,0 +1,26 @@
|
|||
# Copyright 2025 ACSONE SA/NV
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
import logging
|
||||
|
||||
from openupgradelib import openupgrade
|
||||
|
||||
_logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@openupgrade.migrate()
|
||||
def migrate(env, version):
|
||||
openupgrade.logged_query(
|
||||
env.cr,
|
||||
"""
|
||||
ALTER TABLE res_brand
|
||||
ADD analytic_distribution jsonb;
|
||||
""",
|
||||
)
|
||||
openupgrade.logged_query(
|
||||
env.cr,
|
||||
"""
|
||||
UPDATE res_brand
|
||||
SET analytic_distribution = jsonb_build_object(analytic_account_id, 100.0)
|
||||
WHERE analytic_account_id IS NOT NULL;
|
||||
""",
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue