-
-
Notifications
You must be signed in to change notification settings - Fork 750
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
[16.0] [ADD] Project Portal Custom Field Access #1229
base: 16.0
Are you sure you want to change the base?
Conversation
f882504
to
486072b
Compare
@property | ||
def SELF_WRITABLE_FIELDS(self): | ||
return super().SELF_WRITABLE_FIELDS | self._get_portal_custom_field_access() |
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.
How do you think if we add an option to choose READABLE
or WRITEABLE
? It may be useful in case of user wants to show only information for the collaborators like Milestone
field.
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 milestone_id
is a core field, and it's already exposed: https://github.com/odoo/odoo/blob/492169bf562768f661727d6387c5e47bee700d9e/addons/project/models/project.py#L49
The purpose of this module is to be able to expose custom fields (those created through the UI, those that start with x_
). All other code-defined fields can be exposed through custom modules :) this module is not useful there
I do take your point to be able to choose between read-only and read-and-write. It would be a nice improvement, though it's not required by our project at the moment
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 you misunderstood me about milestone_id
. I wanted to mention was in case of user wants to create custom fields through UI and he wants to make only readable for collaborators(I mentioned milestone_id
as an example of readonly for collaborator). Whatever you got my point.
There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. |
Odoo has a feature called "Project Sharing" that allows portal users to view a project's kanban, which has functionalities similar to the backend system.
There's a preset list of fields that portal users can access, which is harcoded in the module's source code.
That's nice but inconvinient if a user introduces new fields to the form and wants to share these with the portal users. They can't currently do this without using a Python override.
To resolve this, the module lets users whitelist these custom fields directly through the
ir.model.field
model.Re-created an old closed PR:
ping @AungKoKoLin1997