I have created an Odoo module to record projects. Now each project is linked to a customer, and I would like them to be able to modify their information from the website. How can I do this? Please note that they can already see their project information on the website.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Comptabilité
- Inventaire
- PoS
- Projet
- MRP
Cette question a été signalée
Steps (Studio + Website app):
Enable Website & Portal if not already (Apps → install Website and Portal).
Decide which model (the model created by Studio) customers should edit. Note its technical model name (e.g. x_custom_module or x_my_model). You can see it in Studio > Properties of the form / model.
Add access rights for the Portal group (minimal):
Settings → Users & Companies → Groups → Portal → Add Access Rights for the model so portal users can read/write limited fields. If the UI doesn’t allow it, you’ll need to add an ir.model.access entry (see section 3 below).
Create a Website page with a form:
Go to Website → Pages → Edit. Use the Form block (Website Form Builder). Configure the form to create/update records on submission and map each form input to the model’s fields.
Note: the standard form builder easily creates records. To edit an existing record you either:
Require the user to log in and then pre-fill the form with the record data (you’ll need a small controller or Odoo Studio can sometimes prefill using URL parameters), or
Use a signed link / token (see advanced) so the form can identify which record to update.
Require login for editing: In Website → Configuration → Pages you can force login for the page (or from the form settings require users to be logged in). That way the form can be tied to the current partner/user and only allow them to edit their own record.
Record rules: Ensure there is a record rule so portal users can only access their own records (important for security).
Pavan - Redian Software
Vous appréciez la discussion ? Ne vous contentez pas de lire, rejoignez-nous !
Créez un compte dès aujourd'hui pour profiter de fonctionnalités exclusives et échanger avec notre formidable communauté !
S'inscrire| Publications associées | Réponses | Vues | Activité | |
|---|---|---|---|---|
|
|
1
nov. 25
|
2190 | ||
|
|
1
oct. 25
|
763 | ||
|
|
0
sept. 25
|
935 | ||
|
|
2
juil. 25
|
1593 | ||
|
|
2
juil. 25
|
4191 |
Thank you for your reply. If you could give me the procedure for this last option, it would really help me a lot. I have already completed the previous steps on how to use Odoo Studio to pre-fill the fields and also the links/tokens method.