Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions stock_svl_remaining_repair/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
==========================
Stock SVL Remaining Repair
==========================

This module is intended for one-time installation on the target database.

When the module is installed, it automatically:

* applies the known quantity pre-fix for internal reference ``86406``
* repairs stock valuation layer ``remaining_qty`` and ``remaining_value``
* creates adjustment SVLs and journal entries when required
* updates ``standard_price`` where needed
* creates backup tables for all changes

No menu or manual wizard is provided. The repair runs from ``post_init_hook``.
2 changes: 2 additions & 0 deletions stock_svl_remaining_repair/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import models
from .hooks import post_init_hook
14 changes: 14 additions & 0 deletions stock_svl_remaining_repair/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Copyright 2026 Quartile
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl).
{
"name": "Stock SVL Remaining Repair",
"summary": "One-off SVL remaining repair for Odoo.sh deployment",
"version": "18.0.1.0.0",
"category": "Stock",
"website": "https://www.quartile.co",
"author": "Quartile",
"license": "LGPL-3",
"installable": True,
"depends": ["stock_account"],
"post_init_hook": "post_init_hook",
}
10 changes: 10 additions & 0 deletions stock_svl_remaining_repair/hooks.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import json
import logging


_logger = logging.getLogger(__name__)


def post_init_hook(env):
summary = env["stock.svl.remaining.repair.service"].sudo().run_post_init_repair()
_logger.warning("stock_svl_remaining_repair summary: %s", json.dumps(summary, ensure_ascii=False, default=str))
1 change: 1 addition & 0 deletions stock_svl_remaining_repair/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import stock_svl_remaining_repair
Loading
Loading