Compare commits
4 Commits
969414e649
...
279962bb1f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
279962bb1f | ||
|
|
163f941c08 | ||
|
|
cc65f7d418 | ||
|
|
30ad1e22f2 |
@@ -121,8 +121,38 @@ EOF
|
|||||||
echo "Fixing company-dependent columns for Odoo 18..."
|
echo "Fixing company-dependent columns for Odoo 18..."
|
||||||
query_postgres_container "$COMPANY_DEPENDENT_FIX_SQL" ou18 || exit 1
|
query_postgres_container "$COMPANY_DEPENDENT_FIX_SQL" ou18 || exit 1
|
||||||
|
|
||||||
|
|
||||||
|
# ============================================================================
|
||||||
|
# CLEAN: Reset l10n_fr_secure_sequence_number field from table pos_order
|
||||||
|
# In Odoo 18, several checks are done concerning the pos order, for instance
|
||||||
|
# that there is no missing number in the order sequence. BUT, if add-on l10n_fr_pos_cert
|
||||||
|
# has been installer AFTER the creation of some pos orders, then the l10n_fr_secure_sequence_number
|
||||||
|
# is not filled correctly for all the pos order, and v18 checks fails.
|
||||||
|
# Solution: reset all the l10n_fr_secure_sequence_number values so that there
|
||||||
|
# is no missing sequence.
|
||||||
|
# ============================================================================
|
||||||
|
RESET_SECURE_SEQUENCE_NUMBER_SQL=$(cat <<'EOF'
|
||||||
|
DO $$
|
||||||
|
BEGIN
|
||||||
|
-- res.partner.barcode (base module)
|
||||||
|
IF EXISTS (SELECT 1 FROM information_schema.columns
|
||||||
|
WHERE table_name = 'pos_order' AND column_name = 'l10n_fr_secure_sequence_number') THEN
|
||||||
|
UPDATE pos_order t
|
||||||
|
SET l10n_fr_secure_sequence_number = r.num
|
||||||
|
FROM (
|
||||||
|
SELECT id,
|
||||||
|
ROW_NUMBER() OVER (ORDER BY date_order ASC) AS num
|
||||||
|
FROM pos_order
|
||||||
|
) r
|
||||||
|
WHERE t.id = r.id;
|
||||||
|
END IF;
|
||||||
|
END $$;
|
||||||
EOF
|
EOF
|
||||||
)
|
)
|
||||||
|
echo "Reset l10n_fr_secure_sequence_number values to avoid missing sequence value for Odoo 18..."
|
||||||
|
query_postgres_container "$RESET_SECURE_SEQUENCE_NUMBER_SQL" ou18 || exit 1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Execute SQL pre-migration commands
|
# Execute SQL pre-migration commands
|
||||||
PRE_MIGRATE_SQL=$(cat <<'EOF'
|
PRE_MIGRATE_SQL=$(cat <<'EOF'
|
||||||
|
|||||||
Reference in New Issue
Block a user