-
-
Notifications
You must be signed in to change notification settings - Fork 854
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[17.0][ADD] partner_title_active #1869
base: 17.0
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you for this contribution to the OCA 🙏
TestPartnerTitle should be adapted as it doesn't assert if the title is active or not
def test_01_partner_title(self): | ||
partner = self.Partner.create({"name": "A Partner"}) | ||
self.assertTrue(partner.active, "Partner should be active by default") | ||
partner.action_archive() | ||
self.assertFalse(partner.active, "Partner should be inactive after archiving") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't test whether the title
is active or not 😕
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why? Can you describe pls a test scenario you think is more suitable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The partner that is created doesn't have a title set.
The scenario might be:
- create a partner with a title (res.partner.title)
- test the title is active
- archive the title, assert it is not active
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, I'll adapt, thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ahaha @vvrossem , I've just get that I was archiving the partner and not the title 🥲
good catch, shame on me!
d057e9f
to
afeaeea
Compare
afeaeea
to
60266ec
Compare
LGTM |
This PR has the |
Adds an
Active
field to the partner title model to be able to deactivate titles without deleting them