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
- Financeiro
- Inventário
- PoS
- Projeto
- MRP
Esta pergunta foi sinalizada
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
Está gostando da discussão? Não fique apenas lendo, participe!
Crie uma conta hoje mesmo para aproveitar os recursos exclusivos e interagir com nossa incrível comunidade!
Inscreva-se| Publicações relacionadas | Respostas | Visualizações | Atividade | |
|---|---|---|---|---|
|
|
1
nov. 25
|
2194 | ||
|
|
1
out. 25
|
768 | ||
|
|
0
set. 25
|
937 | ||
|
|
2
jul. 25
|
1596 | ||
|
|
2
jul. 25
|
4213 |
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.