This commit is contained in:
gsinghpal
2026-05-10 10:25:12 -04:00
parent 6c6a59ceef
commit 6b7b44264a
59 changed files with 2461 additions and 324 deletions

View File

@@ -0,0 +1,21 @@
# -*- coding: utf-8 -*-
# Copyright 2026 Nexa Systems Inc.
"""Drop the redundant ``revision_number`` Integer column on fp.part.catalog.
The model historically carried two revision fields:
* ``revision`` (Char, required) — the customer's actual revision label
* ``revision_number`` (Integer) — an internal counter
The Integer counter duplicated information already in ``revision`` and
got out of sync whenever the customer used a non-numeric scheme
(A/B/C, A1/A2, "ECO-2024-014" etc.). This migration drops the column.
``action_create_revision`` and the auto-rev path on 3D-model upload now
use ``_bump_revision_label`` which best-effort bumps the alphanumeric
label and lets the user adjust to the customer's actual scheme.
"""
def migrate(cr, version):
cr.execute("""
ALTER TABLE fp_part_catalog DROP COLUMN IF EXISTS revision_number;
""")