Menu

Trợ giúp

0

How to add a button at the top of the sales order detail?

Avatar
Droguett

I'm new to developing Odoo and need to add a button in the header order detail , how do I can do? attached image https://s3-us-west-1.amazonaws.com/cebrasite/Captura+de+pantalla+2016-01-14+a+las+20.53.11.png


1 Bình luận
Ảnh đại diện
Huỷ bỏ
Avatar
Jusab Sida (jsi)
-

You can get some help from here:https://www.odoo.com/forum/help-1/question/add-button-to-form-view-85350

3 Trả lời
0
Avatar
Максим
Best Answer

Yes, it may help in this matter.

Ảnh đại diện
Huỷ bỏ
0
Avatar
Jerin paulose
Best Answer
in xml code :

button name=" button_name" string="name to display" type="object" class="oe_highlight"




in python code :
def button_name(self):
view_id = self.env.ref('external id').id
context = self._context.copy()
return {
'name': 'form_name',
'view_type'
: 'form',
'view_mode'
: 'tree',
'views'
: [(view_id, 'form')],
'res_model'
: 'model id',
'view_id'
: view_id,
'type'
: 'ir.actions.act_window',
'res_id'
: self.id,
'target'
: 'new',
'context'
: context,
}



Ảnh đại diện
Huỷ bỏ
0
Best Answer

Hi,

Please refer to the following video link to add a button:

https://www.youtube.com/watch?v=N1GC4qIXFr4

Regards

Ảnh đại diện
Huỷ bỏ