콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
2271 화면

I have made controller in my module and have created one table similar to the controller(url link), now if user enters the data in url then in my database it should be automaticallly created i.e. in my table

아바타
취소
베스트 답변

Create record using Odoo Create method inside your URL controller function


from odoo.http import request
@http.route('/your/url',type='json', auth='user')
def invoice_payment(self, **kwargs):
    request.env['your.table'].create({'name': 'ABC','column2': 'XYX'})
아바타
취소