Odoo Help

0

Odoo9 community - how to add a sequence to a form using the frontend

By
oregional
on 11/28/15, 8:00 AM 682 views

Hello

I am trying to add a sequence to tasks in a specific project using the webbrowser using odoo9 community release.

Our workflow: when an email is sent to our helpdesk it should be processed automatically, a new task should be created in a specific project, the task should get a unique identifier and it should be emailed back to the customer.

I managed to set up the email, the tasks are created, email is sent back, this is fine.

However I can not get the sequence to be created.

This is what I did:

1) created a new sequence at Settings->Technical->Sequences&Identifier->Sequences. Sequence code: x_itc_helpdesk_task_id

Question 1: where/how do I set that the sequence should be genereated when the new task is created? It should only be generated for tasks with project_id = 2

2) created a new field called for model "Task" with name x_itc_helpdesk_task_id_sequence

Question 2: do I really need a field or the view can pick up automagically sequences?

Question 3: if I need to have a field, what should be the field type and how to link it with the sequence?

3) created a new view for this field, it is a form that is extending the project.task object, field is only shown for project_id 2

<xpath expr="//field[@name='tag_ids']" position="after">
<field name="x_itc_helpdesk_task_id_sequence" attrs="{'invisible': [('project_id', '!=', 2)]}"/>
</xpath>


I've been browsing for hours the forums and other places, I have found references that for example I need to set _defaults (http://stackoverflow.com/questions/22477712/how-to-add-autoincremental-field-in-openerp-7), but I dont know how to do that from the frontend

Many thanks for any hints,

cheers,

gezza

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)

Stats

Asked: 11/28/15, 8:00 AM
Seen: 682 times
Last updated: 11/28/15, 8:00 AM