Skip to Content
Menu
This question has been flagged
1 Reply
3225 Views

When a costumer pay using Bank Transactions,  they get a confirmation page with some info "Order SO41" by example, and shows a message of "waiting for payment confirmation", in this view also you can set your bank account information so the costumer will pick one and will make the transaction...


So i need to add a attachment field in this view, so the costumer can upload a payment confirmation, or i would say a "a proof of payment" could be an img, or a document. this document would apper in the attachment files of the SO


i've been trying a lot of things, following old guides but i don't reach it is there any idea how can i get this? what do i need?... 


what i have in my mind is, i need a binary field, in this case the attachment field that already exist just need to inherit, i need a controller that will allow sending the files, and the view, i can deal with the field and the view but i can't build the right controller, can some one give me a hand? 

Avatar
Discard
Best Answer

    Default core module refer below method  line no:149

https://github.com/odoo/odoo/blob/12.0/addons/web_editor/controllers/main.py

#------------------------------------------------------
# add attachment (images or link)
#------------------------------------------------------
@http.route('/web_editor/attachment/add', type='http', auth='user', methods=['POST'], website=True)
def attach(self, upload=None, url=None, disable_optimization=None, filters=None, **kwargs)


Avatar
Discard
Related Posts Replies Views Activity
5
Oct 23
14531
0
Jun 20
1736
5
May 20
3611
0
Oct 22
659
0
Oct 22
379