mirror of
https://github.com/bringout/oca-technical.git
synced 2026-04-20 21:52:05 +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,20 @@
|
|||
# Copyright 2021 ForgeFlow <http://www.forgeflow.com>
|
||||
# License LGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
import logging
|
||||
|
||||
_logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def migrate(cr, version):
|
||||
_logger.info("Set buffer profile data as no-update.")
|
||||
cr.execute(
|
||||
"""
|
||||
UPDATE ir_model_data imd
|
||||
SET noupdate = true
|
||||
WHERE "module" = 'ddmrp' AND (
|
||||
name ILIKE 'stock_buffer_profile_replenish_%'
|
||||
OR name ILIKE 'stock_buffer_profile_min_max%'
|
||||
);
|
||||
"""
|
||||
)
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
from odoo import SUPERUSER_ID, api
|
||||
|
||||
|
||||
def migrate(cr, version):
|
||||
env = api.Environment(cr, SUPERUSER_ID, {})
|
||||
buffers = env["stock.buffer"].search(
|
||||
[("buffer_profile_id.item_type", "=", "distributed")]
|
||||
)
|
||||
if buffers:
|
||||
buffers._calc_distributed_source_location()
|
||||
Loading…
Add table
Add a link
Reference in a new issue