mirror of
https://github.com/bringout/oca-technical.git
synced 2026-04-23 05:12:09 +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,17 @@
|
|||
# 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):
|
||||
"""Similar behavior to create_rma_routes of post_init_hook."""
|
||||
warehouses = env["stock.warehouse"].search([])
|
||||
warehouses = warehouses.with_context(rma_post_init_hook=True)
|
||||
for wh in warehouses:
|
||||
if not wh.rma_in_type_id or not wh.rma_out_type_id:
|
||||
data = wh._create_or_update_sequences_and_picking_types()
|
||||
wh.write(data)
|
||||
route_vals = wh._create_or_update_route()
|
||||
wh.write(route_vals)
|
||||
Loading…
Add table
Add a link
Reference in a new issue