-
Notifications
You must be signed in to change notification settings - Fork 0
Draft:[18.0][RFR] #12975 Review automated action #6
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
base: 18.0-add-pyproject-toml
Are you sure you want to change the base?
Conversation
oca_custom/models/res_partner.py
Outdated
| if chan_id: | ||
| desired_channel_ids.add(chan_id) | ||
|
|
||
| for chan in channels: |
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.
Better to use complete name:
channel
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.
I had made this feature but checking on Tom's requirement he mentioned he will come up with a better way.
| elif (not should_be_member) and is_member: | ||
| self._safe_channel_write(chan, {field: [(3, partner.id)]}) | ||
|
|
||
| def action_membership_sync(self): |
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.
Is this called anywhere apart from the tests?
or it can be added as a server action by hand?
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.
oca_custom/models/res_partner.py
Outdated
| _logger = logging.getLogger(__name__) | ||
|
|
||
| PARAM_PREFIX = "oca_membership_channel_sync." | ||
| MEMBER_STATES = {"paid", "invoiced", "free"} |
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.
I think it should only be paid & Free.
but let's confirm from Tom.
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.
I removed free and invoiced and just settled for paid based on the scope Tom mentioned.
| return res | ||
|
|
||
| if "membership_state" in vals: | ||
| self._sync_member_tag_from_membership_state() |
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.
Even after paying for a membership, I couldn't get the tag configured to be added.
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.
@Kiplangatdan can you try again and make sure the member is none if you're creating a new test member

d5a8d74 to
666b6ed
Compare

Refactor automated action Update Tag and Mailing list -> Update Mailing List