Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
1 Vastaa
4156 Näkymät

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
Hylkää
Paras vastaus

    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
Hylkää
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
5
lokak. 23
16067
0
kesäk. 20
2507
5
toukok. 20
4494
0
lokak. 22
659
0
lokak. 22
379