mirror of
https://github.com/bringout/oca-report.git
synced 2026-04-20 06:41:59 +02:00
Initial commit: OCA Report packages (45 packages)
This commit is contained in:
commit
2f4db400df
2543 changed files with 469120 additions and 0 deletions
|
|
@ -0,0 +1,25 @@
|
|||
# Copyright 2024 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):
|
||||
"""Set the value of the analytic_domain field."""
|
||||
openupgrade.logged_query(
|
||||
env.cr,
|
||||
"""
|
||||
UPDATE mis_report_instance_period
|
||||
SET analytic_domain = CONCAT('[("analytic_distribution_search", "in", [', analytic_account_id::VARCHAR, '])]')
|
||||
WHERE analytic_account_id IS NOT NULL
|
||||
""", # noqa: E501
|
||||
)
|
||||
openupgrade.logged_query(
|
||||
env.cr,
|
||||
"""
|
||||
UPDATE mis_report_instance
|
||||
SET analytic_domain = CONCAT('[("analytic_distribution_search", "in", [', analytic_account_id::VARCHAR, '])]')
|
||||
WHERE analytic_account_id IS NOT NULL
|
||||
""", # noqa: E501
|
||||
)
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
# Copyright 2023 ACSONE SA/NV (<http://acsone.eu>)
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
import odoo
|
||||
from odoo import api
|
||||
|
||||
|
||||
def migrate(cr, installed_version):
|
||||
env = api.Environment(cr, odoo.SUPERUSER_ID, {})
|
||||
env["mis.report.instance.period"].search([])._compute_source_aml_model_id()
|
||||
Loading…
Add table
Add a link
Reference in a new issue