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

Hello,

does anybody knows why I'm getting this error message when trying to make a payment with Stripe?


The operation cannot be completed: - Create/update: a mandatory field is not set. - Delete: another model requires the record being deleted. If possible, archive it instead. Model: Payments (account.payment), Field: Payment Method (payment_method_id)


This is the log in the terminal:


2021-03-13 16:33:38,159 415 WARNING  odoo.http: ('The operation cannot be completed:\n- Create/update: a mandatory field is not set.\n- Delete: another model requires the record being deleted. If possible, archive it instead.\n\nModel: Payments (account.payment), Field: Payment Method (payment_method_id)', None) 
2021-03-13 16:33:38,164 415 INFO  werkzeug: 187.224.23.39 - - [13/Mar/2021 16:33:38] "POST /payment/process/poll HTTP/1.0" 200 - 254 1.003 1.633
2021-03-13 16:33:43,792 415 INFO  werkzeug: 35.193.98.41 - - [13/Mar/2021 16:33:43] "GET /web/content/4065-a14f169/web.report_assets_common.css HTTP/1.0" 200 - 5 0.340 0.298
2021-03-13 16:33:43,833 415 INFO  werkzeug: 35.193.98.41 - - [13/Mar/2021 16:33:43] "GET /web/content/1069-968dec0/web.report_assets_pdf.css HTTP/1.0" 200 - 5 0.290 0.388
2021-03-13 16:33:43,843 415 INFO ? werkzeug: 35.193.98.41 - - [13/Mar/2021 16:33:43] "GET /web/static/src/fonts/lato/Lato-Reg-webfont.woff HTTP/1.0" 200 - - - -
2021-03-13 16:33:43,848 415 INFO ? werkzeug: 35.193.98.41 - - [13/Mar/2021 16:33:43] "GET /web/static/src/fonts/lato/Lato-Lig-webfont.woff HTTP/1.0" 200 - - - -
2021-03-13 16:33:43,851 415 INFO ? werkzeug: 35.193.98.41 - - [13/Mar/2021 16:33:43] "GET /web/static/src/fonts/lato/Lato-Hai-webfont.woff HTTP/1.0" 200 - - - -
2021-03-13 16:33:43,855 415 INFO ? werkzeug: 35.193.98.41 - - [13/Mar/2021 16:33:43] "GET /web/static/src/fonts/lato/Lato-Bol-webfont.woff HTTP/1.0" 200 - - - -
2021-03-13 16:33:43,858 415 INFO ? werkzeug: 35.193.98.41 - - [13/Mar/2021 16:33:43] "GET /web/static/src/fonts/lato/Lato-Bla-webfont.woff HTTP/1.0" 200 - - - -
2021-03-13 16:33:44,338 415 INFO  odoo.addons.base.models.ir_actions_report: The PDF report has been generated for model: sale.order, records [51]. 
2021-03-13 16:33:44,805 415 ERROR  odoo.sql_db: bad query: UPDATE "account_payment" SET "write_uid"=4,"state"='posted',"move_name"='STRIPE/2021/0002',"payment_method_id"=NULL,"write_date"=(now() at time zone 'UTC') WHERE id IN (706)
ERROR: null value in column "payment_method_id" violates not-null constraint
DETAIL:  Failing row contains (706, null, CUST.IN/2021/0706, null, STRIPE/2021/0002, null, posted, inbound, null, customer, 36, 936.00, 33, 2021-03-13, S00051-7, 10, open, null, Write-Off, null, 4, 2021-03-13 16:33:42.043962, 4, 2021-03-13 16:33:42.043962, 34, null, null, P, null, null, null, null, null, null, pago_no_enviado, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, [], null, null, null, null).
Avatar
Discard
Best Answer

Hi,

    1.When you try to make a payment, account.payment model is created or some fields are passed to the account.payment model

    2.The error says "payment_method_id" field in account.payment is set a required field.

    3. Please see to that your passing the data for the field "payment_method_id".
Thanks


Avatar
Discard
Related Posts Replies Views Activity
1
Dec 24
156
3
Nov 24
807
0
Nov 24
63
0
Aug 24
110
2
Jul 24
697