Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
1 Відповісти
4147 Переглядів

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? 

Аватар
Відмінити
Найкраща відповідь

    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)


Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
5
жовт. 23
16056
0
черв. 20
2497
5
трав. 20
4491
0
жовт. 22
659
0
жовт. 22
379