Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
4151 Zobrazení

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
Zrušit
Nejlepší odpověď

    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
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
5
říj 23
16059
0
čvn 20
2501
5
kvě 20
4493
0
říj 22
659
0
říj 22
379