Skip to content

[19.0][IMP] contract_payment_mode: hide Payment Mode by default in the contract list - #1518

Open
bosd wants to merge 1 commit into
OCA:19.0from
bosd:19.0-imp-contract_payment_mode-optional-column
Open

[19.0][IMP] contract_payment_mode: hide Payment Mode by default in the contract list#1518
bosd wants to merge 1 commit into
OCA:19.0from
bosd:19.0-imp-contract_payment_mode-optional-column

Conversation

@bosd

@bosd bosd commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Spotted on the 19.0 runboat, alongside #1517 - same problem, different module.

Problem

This module adds Payment Mode to the contract list without an optional attribute:

<field name="partner_id" position="after">
    <field name="payment_mode_id" />
</field>

Without optional, the column sits outside Odoo's column selector. Every database that installs this glue module gets it added to the contract list permanently, with no way to switch it off.

Change

optional="hide" on the list column.

The payment mode is a detail of how a contract is billed rather than something you scan a list for, and a glue module should not spend a list column by default. Users who want it turn it on from the column selector, and the choice is remembered per user.

The form and search views keep the field exactly as they are.

…ract list

The column carried no `optional` attribute, so it sat outside Odoo's column
selector and every database that installs this module got it added to the
contract list permanently, with no way to switch it off.

Put it under the selector with `optional="hide"`. The payment mode is a
detail of how a contract is billed rather than something you scan a list
for, and a glue module should not spend a list column by default. Users who
want it turn it on from the column selector, and the choice is remembered
per user.

The form and search views keep the field as they are.
@OCA-git-bot OCA-git-bot added series:19.0 mod:contract_payment_mode Module contract_payment_mode labels Sep 5, 2026
@pedrobaeza pedrobaeza added this to the 19.0 milestone Sep 5, 2026

@pedrobaeza pedrobaeza left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK to be optional, but I think it should be optional="show" to keep it as it was before.

@bosd

bosd commented Sep 5, 2026

Copy link
Copy Markdown
Contributor Author

@pedrobaeza pedrobaeza left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, you have convinced me.

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.

4 participants