How to access a custom module from the website (for portal users) [odoo13] - odoo

I have a custom module for user to upload some information and files
I can use forms and make the module accessible from the website but I need them to be able to edit there recored also, exactly like if they are internal user but only for y custom module
anyone knows how to do that thank u very much in advance.
edit
after reading the comment of #KevalMehta
I think my question should be how to update a record from a form
this is my code to create a new record in my module
request.env['manager.create_company_link'].sudo().create(kw)
so first I think I need the id of the record I need to update before how to update it
I thing #KevalMehta is referring to me using .sudo() how to give the right access

Related

Not Allowed Access for all modeul (Document model: ir.filters)

I got an error on my Odoo like on the picture, I've checked the user already has access to the user group. It's very thankful if you can help me.
I need more information but whenever you parform the action you are doing a security record rule is trggered, you can try the hard mode, go to security record rules and disable one rule and try and re enable after.
I add this setting (see on the picture) on the user's group I want to give access and it's solved. Apparently it's because the user does not have access to Object ir.filters which most of my modules use this.

Saving Sitefinity Forms Module Data to separate Database

I'm working with Sitefinity CMS and trying to figure out how to save the data from a "Forms Module" form to a separate database in the backend. Currently all the responses are saved into a table that is created when the form is built. What I want to do is re-route the save request to go through my code behind instead and save the data to Azure table storage. Is there a way to do this or by using the Forms Module am I stuck to saving the data to the table that is auto-created when the form is built? I've tried creating my own FormsSubmitRouteHandler as explained here (http://docs.sitefinity.com/for-developers-submit-forms-using-ajax-call#register-a-form-submit-route-handler) but I must be doing something wrong cause my code doesn't ever get hit.
Any help would be greatly appreciated. If I didn't explain myself well please let me know.
You should create a new provider that implements the FormsDataProvider class.
Currently Sitefinity uses OpenAccessFormsProvider - so you can use JustDecompile to see how that was implemented and probably do something similar.
Then you need to register your custom provider in the Administration > Settings > Advanced > Forms
If you don't mind having the form responses in the Sitefinity database and in your custom storage, then you can subscribe to the IFormEntryCreatedEvent and in your event handler you can write the logic of saving the form respose somewhere else.
See this article for more details: http://docs.sitefinity.com/for-developers-forms-events#iformentrycreatedevent
Have in mind that this will result in form responses being saved in both, the SF datbase and your custom storage. Also, you won't be able to manage the entries stored in the custyom storage through Sitefinity backend. If that's your goal, then Vesselin's answer is the correct way to go, but more complicated.

How to update _User object after another object has been saved in Parse

I'm trying to keep track of the number of comments made about a user in my application. These comments can be made by other user and of course these other users can't update the User they're commenting about. So i was wondering if there was any way to do this with Cloud code on Parse.
Edit :I'm also looking to update a value called "latestPostTime" that will get the current time of the latest post. any help would be amazing thank you
You can, have a look at beforeSave and afterSave triggers. For example you can create an afterSave trigger for your comments class and then update the user object the comment has been made on/about.
Have a look at the Cloud Code documentation for the triggers, that should help to get you started.
If you run into ACL issues, you can enable usage of the master key in a Cloud Code function as well to update the count field of the user object.

What's the favoured way of allowing anonymous users access to a private Plone folder?

I want to allow anonymous users view access to a private folder & it's contents, only after they have submitted a valid email address through a form. I thought of emailing them a link to the folder, perhaps with a token that gives them access or logs them in, but I'm not quite sure how to do that.
I'm currently looking at collective.powertoken.core & collective.powertoken.view, but it seems that these products cover access to a single content item, rather than a whole folder.
I'm wondering if it's better just to add low priviledged users to the system & log them in without passwords.
Thanks
as suggested by #keul, you can use redomino.tokenrole.
If you want to integrate the tokenrole feature with a PloneFormGen you might consider to have a look at redomino.tokenroleform (https://pypi.python.org/pypi/redomino.tokenroleform): It is a custom plone form gen adapter that let you share a private object via token.
I don't know if redomino.tokenroleform fits your use case.
But you can browse the code in order to understand how to add a tokenrole programmatically.
Both products are for very low level usage.
Try redomino.tokenrole: https://pypi.python.org/pypi/redomino.tokenrole

Sharepoint 2010 Break permission inheritance

I need to create a workflow that would break permission inheritance in a sharepoint subsite.
I am building a sharepoint 2010 site that is highly modular and can expand based on clients needs. The project requirement is that the client must be able to expand the website and add subsites from templates with as little interaction as possible. To this end I have created a list and attached a workflow to this list that creates a new website based on the information supplied in the list fields. The workflow I am using is a solution I found online http://www.ilovesharepoint.com/2011/02/create-site-action-sharepoint-designer.html
After the website is created I need to create security groups (another workflow I found online helps with this).
The problem is that the subsite must inherit security groups from the parent site and then I need to add new ones. In order to do this I need to break inheritance from the parent site and than I can create new groups. Currently my client has to do this manually - very bad thing. So I need create a workflow that would do just that.
The problem is that I am completely clueless as to how to go about doing this.
Ideally, I would like to create some sort of workflow action that would take a site url as input and then break permission. From what I've been able to find I need to use BreakRoleInheritance function to do that. but how do I create a workflow that takes input and how do i convert the string input into an actual site?
Like I said, I don't know anything about coding for sharepoint so please be as specific as possible.
Thank you very much.
P.S. maybe I am mistaken and i don't need to break inheritance to create additional security groups that would work only for a given subsite. If so, please tell me how to do this without breaking inheritance.