Skip to content

Conversation

@lperez-solvos
Copy link

Standard Migration to 17.0.

Changes:

  • Removed deprecated Python field attributes (states, attrs).
  • Updated XML views with readonly/invisible expressions.
  • Adjusted post-init hook.

@lperez-solvos lperez-solvos force-pushed the 17.0-mig-account_check_date branch from 9e5f2a8 to 9161f36 Compare October 6, 2025 11:31
Copy link

@DantePereyra DantePereyra left a comment

Choose a reason for hiding this comment

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

Minor comments 👍


{
"name": "Account Check Date",
"version": "17.0.0.1.0",

Choose a reason for hiding this comment

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

Suggested change
"version": "17.0.0.1.0",
"version": "17.0.1.0.0",

Small detail

check_date = fields.Date(
default=fields.Date.context_today,
required=True,
readonly=True,

Choose a reason for hiding this comment

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

Could be readonly be on account_payment_views.xml?

  • If a field is marked as readonly=True on the model, it won't be possible to import it through the Odoo import tool, so avoid it as possible and define the readonly attribute on the views instead. See more here

Copy link

Choose a reason for hiding this comment

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

Yes, this is actually unneeded. In original code states and readonly combined at field definition actually meant this:

  • By default, field is readonly.
  • But, for one state (draft), is not.

So removing states at python definition should be done along with readonly deletion. And readonly management 100% moved to view (that is currently done)

@lperez-solvos lperez-solvos force-pushed the 17.0-mig-account_check_date branch from 9161f36 to 833fe5d Compare October 8, 2025 10:37
Copy link

@ChristianSantamaria ChristianSantamaria left a comment

Choose a reason for hiding this comment

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

LGTM

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.

8 participants