Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
4313 Lượt xem

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

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 3 24
9342
1
thg 6 16
8053
0
thg 9 23
1897
0
thg 9 23
1594
0
thg 2 23
4953