Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
I've created an act_window. I've also created a button which calls this act_window. However, the act_window always appears at the top menu in the option More of the tree view of the source model. I want it to disappear, but I don't want to delete the act_window because it's called by my customized button.
<act_window name="Invite partner to an event"
Can anyone help me, please?
1. Delete the action , you dont need it
2. change button type from "action" to "object"
3. write a method that opens desired view like:
def open_my_view(self,cr, uid, ids, context=None):
view_ref = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'your_module_name', 'view_thate_should_be_opened')
view_id = view_ref and view_ref or False
'name': 'Some apropriate name',
'res_id': record_id, # if it is transient model first create record, othervise , provide some id
Hope it helps...
May the source be with you !
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
|Asked: 11/26/14, 6:56 AM|
|Seen: 544 times|
|Last updated: 3/16/15, 8:10 AM|