This question has been flagged
8 Replies
3957 Views

Hi everyone,


I would like to know how is possible to create a link to another OpenERP Page.

In sale/customers/History, there is the tasks module. 

I can create or delete new tasks. However, I would like to be able to see all tasks fast.

So instead of going to Project/my tasks , I would like to be able to just click on a link in the History part to open Project/My tasks.


Is it possible?


Thank you for your help,


Selverine

Avatar
Discard
Author Best Answer

Hi,

So I decided to try to create a button that will open my view.

I would like to open a view with the Kanban that I can find under Project/My tasks.

I have this error when I press the button:


View error

Can't find field 'stage_id' in the following view parts composing the view of object model 'project.task':

* project.task.kanban

Any idea about what is wrong inside my python code?


Thank you a lot,


This is my code:


    def action_view_tasks(self, cr, uid, ids, context=None):
#pdb.set_trace()
view_ref = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'project', 'view_task_kanban')
view_id = view_ref and view_ref[1] or False,
this = self.browse(cr, uid, ids, context=context)[0]
return {
'type': 'ir.actions.act_window',
'name': 'Form heading',
'view_mode': 'form',
'view_type': 'form',
'view_id': view_id,
'res_model': 'project.project',
'nodestroy': True,
'res_id': this.id, 
'target':'new',
'context': context}

Avatar
Discard
Best Answer

I didn't understand on what history are you referring to, but I think you just need a quick link on menu to go to tasks page, then you can do a simple menu edit from the GUI.

Go to settings --> User Interface --> Menu Items

and have a look on Project/Project menu (where tasks are) and create the same voice wherever you want. 

If you need something different please elaborate more your question, thanks.

Avatar
Discard
Author

Hi Federico, Thank you for your answer. The history it is sale/customers/History. But nevermind, what I would like it is not to duplicate the tasks page to another one place, but I would like when I am inside a page (the history but it can be another one), to just click to a button or a link in order to jump the task page. It is like with Order. When you confirm it you can create and go to the invoice part. Thank you, Selverine

I'm still not understanding if you are referring to journal items with "history". Duplicate a voice on menu doesn't mean your're duplicating a page. It's just a link. There is another solution, you can add a button with an action calling the view and again you can do that via GUI but it's better do it with a custom module.

Author

History is the name of the portal inside the customers page. Inside this portel you can add or remove tasks. A button will be perfect. But how call the tasks page?. Thank you a lot for your help.

Selverine, please tell me exactly where is this History because I can't see it on my CRM module nor on another place on portal (probably because we use to sell just with POS). If I can't see it I can't try to guide you. Did you install a external module?

Ok, I seen on another thread you are using V7 this is a fundamental information do to some differences on web interfaces. Please edit your post and add a V8 tag. I'm sorry but since I'm on V8 and I can't guarantee a mod will work...

Author

Hi. Yes probably it comes from an external module. A module with task/project I will say. So I will try to add a button and I will let you know ;-). Thank you for your help! Selverine