Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
1 Antworten
1318 Ansichten

In this form, i would like the user to click the "submit " button, or else it will only save as draft or stays in new request stage. After clicking the submit button, it will automatically proceed to next stage "For approval", in which the department head and admin management's approval is needed. Before it proceeds to next stage "On Progress", those two is needed, not only one of them but two of them, and the form filled up by the requestor will be lock and cannot be change the values they've input. Then, after the two approval given, it will automatically proceed to, "on progress" which is my responsibility. Then, done. 

Also, they are not allowed to change the stages. It needs to be in flow. So, i disabled the clickable pipeline.



To summarize the flow: 

  1. Create a request form.
  2. Needs to submit to proceed in "for approval" stage.
  3. Needs the approval of 2, to proceed in "on progress" stage and the form will be locked and forbidden to be edit by anyone else.
  4. Needs my approval, to proceed in "done".
Avatar
Verwerfen
Beste Antwort

You have to write a code in server action. to switch the stage. 

use this python code in server action

record.write({'stage_id': 2})

here I have used the stage_id which field name in CRM.

In your case, I could see that you have place the pipeline stage in your form view. you need to load the pipeline field name in the Stage_id.

Note:

  • if the pipeline stage is many2one field you can pass the id of the field. if it is a selection field you need to give it as a string.
  • In server action you need to select the appropriate module name to create it

 

Avatar
Verwerfen
Autor

The details of the pipeline is like this..

Field: x_studio_stage_id
Type: many2one
Widget: status (statusbar)
Context: {}
Domain: []
Required: true
Relation: x_request_system_acces_stage

Here You have the Field name as x_studio_stage_id. Hence, write the code as record.write({x_studio_stage_id:}) and find the id of the stage by inspecting the page and pass the id which have the label of the next stage.

note:
To inspect the page go to the page where the stage are created and press F12 there will be page open below the web browser.

once it open you have refresh the page to get the inspect information and click on web_search_read in the name list.

on the write side you will get the page with different heads. click on preview and click on results and records arrow. you can see the list of ids and their name there you can find the id's of the stages.

Verknüpfte Beiträge Antworten Ansichten Aktivität
3
Juli 25
2056
1
Juni 25
2431
2
Mai 25
2019
1
Mai 25
1231
1
Feb. 25
38