Skip to content

[18.0][FIX] l10n_it_riba_oca: fix multi-company RiBa collection fees setting#5212

Open
mmircoli-nexapp wants to merge 1 commit into
OCA:18.0from
mmircoli-nexapp:18.0-fix-riba-multicompany-settings
Open

[18.0][FIX] l10n_it_riba_oca: fix multi-company RiBa collection fees setting#5212
mmircoli-nexapp wants to merge 1 commit into
OCA:18.0from
mmircoli-nexapp:18.0-fix-riba-multicompany-settings

Conversation

@mmircoli-nexapp

Copy link
Copy Markdown

Description

Fixes #5211

The default_get override in ResConfigSettings reads due_cost_service_id from self.env.user.company_id instead of the company_id on the settings form. This causes the RiBa collection fees setting to not persist correctly in multi-company environments.

Changes

  • Removed the default_get override from ResConfigSettings in models/account_config.py
  • Removed unused api import

The related="company_id.due_cost_service_id" field with readonly=False already handles reading from and writing to the correct company. The default_get override was a legacy pattern that is no longer needed and actively breaks multi-company behavior.

Checklist

  • User-visible strings are translated
  • Tests pass (no test changes needed — existing behavior is preserved for single-company setups)
  • Migration script: not needed (no data migration required)

The `default_get` override in `ResConfigSettings` always reads
`due_cost_service_id` from `self.env.user.company_id` instead of
the company selected in the settings form (`company_id`).

This causes the RiBa collection fees setting to not persist correctly
in multi-company environments: the value displayed comes from the
user's main company, not the company being configured.

The `related='company_id.due_cost_service_id'` field already handles
reading and writing to the correct company. The `default_get` override
is a legacy pattern that is no longer needed and actively breaks
multi-company behavior.

Remove the `default_get` override entirely.
@OCA-git-bot OCA-git-bot added series:18.0 mod:l10n_it_riba_oca Module l10n_it_riba_oca labels Jun 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] l10n_it_riba_oca: RiBa collection fees setting not persisted in multi-company

2 participants