[18.0][IMP] operating_unit: Add linked users stat button and bulk unit synchronization#834
[18.0][IMP] operating_unit: Add linked users stat button and bulk unit synchronization#834BhaveshHeliconia wants to merge 1 commit intoOCA:18.0from
Conversation
|
the stat button could be something useful, the server action I think it is not a generic enough feature to be included in the core module. |
342e60e to
2b43e2a
Compare
|
@AaronHForgeFlow, thanks for the feedback. I've removed the bulk synchronization feature and kept only the Stat Button. Documentation and tests have been updated accordingly. |
| self.env.registry.clear_cache() | ||
| return super().write(vals) | ||
|
|
||
| def button_open_linked_users(self) -> dict: |
There was a problem hiding this comment.
Can you explain why you need all this code for an action? why don't simply create the action in xml and do smth like this (haven't tested the code, just an idea):
def button_open_linked_users(self):
action = self.env.ref("operating_unit.action_res_users_operating_unit").read()[0]
if len(self.user_ids) == 1:
action.update({
"view_mode": "form",
"res_id": self.user_ids.id,
})
else:
action["domain"] = [("id", "in", self.user_ids.ids)]
return action
There was a problem hiding this comment.
Thanks for the suggestion. I've improved the method accordingly.
2b43e2a to
399106c
Compare
This pull request introduces two key improvements to the operating_unit module to enhance user management and visibility.
Key Improvements: