Skip to content

[18.0][MIG] purchase_work_acceptance_evaluation: Migration to 18.0#3100

Open
ROBBYHOOD9 wants to merge 29 commits into
OCA:18.0from
ecosoft-odoo:18.0-mig-purchase_work_acceptance_evaluation
Open

[18.0][MIG] purchase_work_acceptance_evaluation: Migration to 18.0#3100
ROBBYHOOD9 wants to merge 29 commits into
OCA:18.0from
ecosoft-odoo:18.0-mig-purchase_work_acceptance_evaluation

Conversation

@ROBBYHOOD9

Copy link
Copy Markdown
Contributor

Migration purchase_work_acceptance_evaluation from 15.0 to 18.0

1. Module Version

Updated the module version to align with Odoo 18.

"version": "16.0.1.0.0", => "version": "18.0.1.0.0",

2. Python Code Updates

Updated Python code to comply with Odoo 18 requirements and Ruff recommendations.

  • Replaced user_has_groups(...) with self.env.user.has_group(...).
  • Renamed lambda variable l to r to avoid Ruff E741 (ambiguous variable name).
  • Added api to imports in work_acceptance_evaluation.py.
  • Replaced name_get() with _compute_display_name() and added @api.depends("name", "score").
  • Replaced % string formatting with f-strings to comply with Ruff UP031.

3. View Migration

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

  • Replaced <tree> with <list>.
  • Changed view_mode from tree,form to list,form.
  • Replaced attrs with inline expressions.
  • Updated settings views to use the new <setting> structure and //block[@name='...']xpath.

4. Report Updates

Updated report views for Odoo 18 compatibility.

  • Replaced <tree> with <list>.
  • Changed view_mode from pivot,graph,tree,form to pivot,graph,list,form.

5. Test Updates

Updated tests to follow newer Odoo conventions.

  • Replaced setUp() with setUpClass().
  • Added tracking_disable=True.
  • Updated tests to use display_name instead of name_get().

@OCA-git-bot OCA-git-bot added series:18.0 mod:purchase_work_acceptance_evaluation Module purchase_work_acceptance_evaluation labels Jun 10, 2026
@ROBBYHOOD9 ROBBYHOOD9 force-pushed the 18.0-mig-purchase_work_acceptance_evaluation branch from 201f45b to a943246 Compare June 10, 2026 11:28

@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.

@ROBBYHOOD9 ROBBYHOOD9 force-pushed the 18.0-mig-purchase_work_acceptance_evaluation branch from a943246 to 4319e3c Compare June 12, 2026 08:58
@ROBBYHOOD9

Copy link
Copy Markdown
Contributor Author

@BhaveshHeliconia

Thanks for the suggestion. I've updated the test to use BaseCommon and removed the unnecessary tracking_disable=True override accordingly.

@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). 🤖

1 similar comment
@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_evaluation branch from 4319e3c to fa05c18 Compare June 24, 2026 09:42
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.