Skip to content

[18.0][MIG] purchase_work_acceptance_late_fine: Migration to version 18.0#3098

Open
ROBBYHOOD9 wants to merge 23 commits into
OCA:18.0from
ecosoft-odoo:18.0-mig-purchase_work_acceptance_late_fines
Open

[18.0][MIG] purchase_work_acceptance_late_fine: Migration to version 18.0#3098
ROBBYHOOD9 wants to merge 23 commits into
OCA:18.0from
ecosoft-odoo:18.0-mig-purchase_work_acceptance_late_fines

Conversation

@ROBBYHOOD9

@ROBBYHOOD9 ROBBYHOOD9 commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Migration purchase_work_acceptance_late_fine from 15.0 to 18.0

1. Module Version

Updated the module version to align with Odoo 18.
"version": "15.0.1.1.0""version": "18.0.1.0.0"

2. Model Updates

Updated Python code to comply with Odoo 18 requirements.

  • Removed states= from 3 fields.
  • Changed action view_mode from tree to list.

3. View Migration

Updated XML views to follow the Odoo 17/18 architecture.

  • views/work_acceptance_views.xml Replaced 3 attrs expressions with inline expressions.
  • views/account_move_views.xml Replaced 1 attrs expression with an inline expression.
  • views/res_config_settings_views.xml Changed xpath from //div[@name=...] to //block[@name=...].
  • Migrated the settings layout to the new <setting> structure.
  • Replaced attrs expressions with inline expressions.

4. Test Updates

Updated tests to follow newer Odoo conventions.

  • Replaced deprecated user_type_id with account_type.
  • Fixed SQL query parameters that were passed in the wrong order.
  • Added tracking_disable=True to prevent chatter tracking during test execution.

@OCA-git-bot OCA-git-bot added series:18.0 mod:purchase_work_acceptance_late_fines Module purchase_work_acceptance_late_fines labels Jun 10, 2026
@ROBBYHOOD9 ROBBYHOOD9 force-pushed the 18.0-mig-purchase_work_acceptance_late_fines branch from 2532323 to d820980 Compare June 10, 2026 11:18

@BhaveshHeliconia BhaveshHeliconia left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Consider using BaseCommon instead of TransactionCase. In this case, there’s no need to redefine cls.env with tracking_disable=True.

Comment thread purchase_work_acceptance_late_fines/tests/test_work_acceptance_late_fine.py Outdated
Comment thread purchase_work_acceptance_late_fines/tests/test_work_acceptance_late_fine.py Outdated
@ROBBYHOOD9 ROBBYHOOD9 force-pushed the 18.0-mig-purchase_work_acceptance_late_fines branch from d820980 to 7cd6e31 Compare June 12, 2026 09:30
@ROBBYHOOD9

Copy link
Copy Markdown
Contributor Author

@BhaveshHeliconia

Thanks for the suggestion. I've updated the test to use BaseCommon, removed the unnecessary tracking_disable=True override, and fixed the setup_main_company currency configuration to ensure the test environment is initialized correctly.

@BhaveshHeliconia BhaveshHeliconia left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code review LGTM!

@Pani-k-folk Pani-k-folk left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code LGTM 👍

@OCA-git-bot

Copy link
Copy Markdown
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

5 similar comments
@OCA-git-bot

Copy link
Copy Markdown
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@OCA-git-bot

Copy link
Copy Markdown
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@OCA-git-bot

Copy link
Copy Markdown
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@OCA-git-bot

Copy link
Copy Markdown
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@OCA-git-bot

Copy link
Copy Markdown
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@ROBBYHOOD9 ROBBYHOOD9 force-pushed the 18.0-mig-purchase_work_acceptance_late_fines branch from 7cd6e31 to 12c7c0e Compare June 24, 2026 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.