This question has been flagged
2 Replies
4130 Views

how to pass a value from email template to controller in odoo 12 community version

<a href="/invoices" class="btn btn-primary" target="_blank">view invoice </a>


 @http.route('/invoices', type='http', auth='public', website=True)


thanks in advance

geo

Avatar
Discard
Best Answer

Hi geo

you can try this method

href="/invoices/${object.partner_id.id}"


@http.route('/invoices/<partner_id>', type='http', auth='public', website=False)
     def invoicespartner(self,partner_id):

Avatar
Discard
Best Answer

Hi,

Take the example available in website_sale module, see below image,



here in the controller, you can see /shop/page/<int:page> , here if you call a URL like /shop/page/3 , inside the controller you will get the value of the variable page as 3.


Thanks

Avatar
Discard