24 lines
826 B
Python
24 lines
826 B
Python
from odoo import http
|
|
from odoo.http import request
|
|
|
|
class MyController(http.Controller):
|
|
|
|
@http.route('/my_controller/post', type='http', auth="public", methods=['GET', 'POST'])
|
|
def post_method(self, **post):
|
|
|
|
# Access the posted data using the 'post' dictionary
|
|
name = post.get('name')
|
|
from_person = post.get('from_person')
|
|
to_person = post.get('to_person')
|
|
|
|
print(name,'name')
|
|
print(from_person,'from_person')
|
|
print(to_person,'to_person')
|
|
|
|
|
|
# Perform necessary actions with the posted data
|
|
# Add your code here
|
|
|
|
# Return an HTTP response if needed
|
|
return request.render('ensan_dynamic_dedicationcard.gift_template_id',
|
|
{'records': [name], 'from_persons': [from_person], 'to_persons': [to_person]}) |