Skip to content

[18.0][MIG] purchase_work_acceptance_tier_validation: Migration to 18.0#3096

Open
ROBBYHOOD9 wants to merge 10 commits into
OCA:18.0from
ecosoft-odoo:18.0-mig-purchase_work_acceptance_tier_validation
Open

[18.0][MIG] purchase_work_acceptance_tier_validation: Migration to 18.0#3096
ROBBYHOOD9 wants to merge 10 commits into
OCA:18.0from
ecosoft-odoo:18.0-mig-purchase_work_acceptance_tier_validation

Conversation

@ROBBYHOOD9

Copy link
Copy Markdown
Contributor

Migration purchase_work_acceptance_tier_validation from 15.0 to 18.0

1. Module Version

Updated the module version to align with Odoo 18.

"version": "15.0.1.0.0", => "version": "18.0.1.0.0",

2. Update "Needs my Review" Filter

Adjusted the filter domain in views/work_acceptance_view.xml to match the state values available in Odoo 18.
Since Odoo 18 only uses draft, accept, and cancel, the obsolete states done and to approve were removed from the domain.

Before --> domain="[('reviewer_ids','in',uid), ('state', 'not in', ['done', 'cancel', 'to approve'])]"

After --> domain="[('reviewer_ids','in',uid), ('state', 'not in', ['accept', 'cancel'])]"

3. Test Updates

Updated the test setup to follow the testing conventions introduced in newer Odoo versions:

  1. Replaced setUp() with setUpClass().
  2. Added tracking_disable=True to prevent chatter tracking during test execution in Odoo 18.

Before

def setUp(self):
    super().setUp()
    self.tier_definition = self.env["tier.definition"]

After

@classmethod
def setUpClass(cls):
    super().setUpClass()
    cls.env = cls.env(context=dict(cls.env.context, tracking_disable=True))
    cls.tier_definition = cls.env["tier.definition"]

@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_tier_validation branch from 85240e3 to f7b54f7 Compare June 24, 2026 09:38
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.

6 participants