Odoo Help


Popup in OpenErp??

Vale Trood
on 12/1/15, 8:47 AM 1,115 views

hello everybody!!!

I work with Popups in OpenERP.

So, when i click on a button i open a new window which is of an other created model.

The problem here is that i want:

-When i click on save or not close the window,

-Put default values in the popup

-Create a report for the open window.

Here is my code:

def edit_solde(self, cr, uid, ids, employee_id, context=None):
result = []
mod_obj = self.pool.get('ir.model.data')
res = mod_obj.get_object_reference(cr, uid, 'hr_payroll', 'view_hr_payslip_form')
momo_id = self.read(cr, uid, ids,['id','employee_id','date_from','date_to'])
obj = self.pool.get('hr.payslip')
obj_ids = obj.search(cr, uid, [('employee_id', '=', momo_id[0]['employee_id'][0])])
result = obj.read(cr, uid, obj_ids, ['id'], context)
ref_id = False
for r in result :
ref_id = r['id']
return {
'name': 'Solde De Tout Compte',
'view_type': 'form',
'view_mode': 'form',
'view_id': [res and res[1] or False],
'res_model': 'hr.payslip',
'context': {'default_employee_id':momo_id[0]['employee_id'][0],'default_date_from':momo_id[0]['date_from'],'default_date_to_id':momo_id[0]['date_to']},
'type': 'ir.actions.act_window',
'nodestroy': True,
'target': 'new',
'flags' : { 'action_buttons' : True,},
'res_id': ref_id,

Who can help please.

Thanks a lot in advance.

Best Regards.

Mirco Strizzi
On 12/5/15, 2:04 PM

Hi @DressFar, you can create a wizard:



Serpent Consulting Services Pvt. Ltd.

--Serpent Consulting Services Pvt. Ltd.--
| 6 6 8
Gandhinagar, India
--Serpent Consulting Services Pvt. Ltd.--

Serpent Consulting Services Pvt. Ltd. Your Odoo/OpenERP Solution, just an email away!

Serpent Consulting Services Pvt. Ltd.
On 12/7/15, 9:26 AM

You may see



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.


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)


Asked: 12/1/15, 8:47 AM
Seen: 1115 times
Last updated: 12/7/15, 9:26 AM