Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
2 Odpowiedzi
368 Widoki

I am creating a survey (over 100 questions). When I'm at the end of the survey and "Add New Question", the question gets placed somewhere in the middle of the survey seemingly at random. Also, when making any change, the refreshed page will show questions 1 - 39, which then means I have to page through to get to the end of the survey each and every time. 

Does anyone have any ideas how to get around this behaviour?

Awatar
Odrzuć

Try to work in smaller batches. This can help you manage the process more efficiently and reduce the number of page refreshes and reordering needed.

Autor Najlepsza odpowiedź

Thanks for your reply, I was hoping for a work-around rather than having to code something.



Awatar
Odrzuć
Autor

Do you mean smaller surveys or saving and exiting the edit process frequently?

Najlepsza odpowiedź

Add a sequence field to the survey.question model to explicitly control the order of questions.
class SurveyQuestion(models.Model):

    _inherit = 'survey.question'

    sequence = fields.Integer(string='Sequence', default=10)

    _order = 'sequence'



Awatar
Odrzuć