Skip to content

Conversation

@risto42
Copy link

@risto42 risto42 commented Nov 15, 2025

Fixes #1190

When base_cancel_confirm injects fields into view XML, those fields must also be added to the models dictionary returned by get_view().

The bug: Lines 72-77 skipped merging fields when the model already existed:

if model in all_models:
    continue  # Bug: skips merging!

This caused JavaScript errors:

Missing field string information for the field 'cancel_confirm' from the 'account.payment' model

The fix: Merge new fields with existing ones instead of skipping.

Impact: All models using base.cancel.confirm (account.payment, account.move, sale.order, purchase.order, etc.)

Testing: Verified with account.payment forms - no more JS errors.

@OCA-git-bot
Copy link
Contributor

Hi @kittiu,
some modules you are maintaining are being modified, check this out!

When base_cancel_confirm adds fields to XML via get_view(), it must also
add those fields to the models dictionary. The previous code skipped merging
when the model already existed, causing JavaScript errors like:

  "Missing field string information for the field 'cancel_confirm'"

This fix merges the new fields with existing ones instead of skipping them.

Closes OCA#1190
@risto42 risto42 force-pushed the 16.0-fix-base-cancel-confirm-fields branch from 3f40f58 to bad502c Compare November 15, 2025 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants