Skip to Content
Menu
This question has been flagged
3645 Views

I have a controller in odoo 10 like this

@http.route('/open_res_partner_form_view', auth= "public", csrf= False, type= "http") 
def open_res_partner_form_view(self, **kwargs):
     user_id= 1 #in odoo user_id 1 is for administrator
     return {
              'name': _('res_partner_form'),
              'type': 'ir.actions.act_window',
              'res_model': 'res.partner',
              'views': [(self.env.ref('base.view_partner_form').id, 'form')],
              'res_id': 18,  #assume 18 is some partner_id in odoo
            }
i want to achive this action, whenever this controller is called, it should populate res.partner form of partner id 18(some existing partner_id) to user_id 1 (to administrator)
Is there any way to achieve this?
Avatar
Discard

Hi, maybe do you found any solution for that?