Skip to Content
Menu
This question has been flagged

After the payment is done correctly with the payment acquirer, invoice automatique generation throws an error : 

2018-12-14 14:12:09,076 11 INFO kiwi odoo.addons.sale_payment.models.payment: <orangemoney> transaction completed, auto-generated invoice  (ID 275) for SO396 (ID 396)

2018-12-14 14:12:09,089 11 ERROR kiwi odoo.http: Exception during JSON request handling.

Traceback (most recent call last):

  File "/usr/lib/python3/dist-packages/odoo/http.py", line 650, in _handle_exception

    return super(JsonRequest, self)._handle_exception(exception)

  File "/usr/lib/python3/dist-packages/odoo/http.py", line 310, in _handle_exception

    raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])

  File "/usr/lib/python3/dist-packages/odoo/tools/pycompat.py", line 87, in reraise

    raise value

  File "/usr/lib/python3/dist-packages/odoo/http.py", line 692, in dispatch

    result = self._call_function(**self.params)

  File "/usr/lib/python3/dist-packages/odoo/http.py", line 342, in _call_function

    return checked_call(self.db, *args, **kwargs)

  File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 97, in wrapper

    return f(dbname, *args, **kwargs)

  File "/usr/lib/python3/dist-packages/odoo/http.py", line 335, in checked_call

    result = self.endpoint(*a, **kw)

  File "/usr/lib/python3/dist-packages/odoo/http.py", line 936, in __call__

    return self.method(*args, **kw)

  File "/usr/lib/python3/dist-packages/odoo/http.py", line 515, in response_wrap

    response = f(*args, **kw)

  File "/mnt/bwi/payment_orangemoney/controllers/main.py", line 87, in orangemoney_notify

    self.orangemoney_validate_data(jsonr)

  File "/mnt/bwi/payment_orangemoney/controllers/main.py", line 71, in orangemoney_validate_data

    res = request.env['payment.transaction'].sudo().form_feedback(response, 'orangemoney')

  File "/usr/lib/python3/dist-packages/odoo/addons/sale_payment/models/payment.py", line 34, in form_feedback

    tx._confirm_so()

  File "/usr/lib/python3/dist-packages/odoo/addons/website_sale/models/payment.py", line 24, in _confirm_so

    self._generate_and_pay_invoice()

  File "/usr/lib/python3/dist-packages/odoo/addons/sale_payment/models/payment.py", line 103, in _generate_and_pay_invoice

    created_invoice.action_invoice_open()

  File "/usr/lib/python3/dist-packages/odoo/addons/account/models/account_invoice.py", line 778, in action_invoice_open

    to_open_invoices.action_date_assign()

  File "/usr/lib/python3/dist-packages/odoo/addons/account/models/account_invoice.py", line 925, in action_date_assign

    inv._onchange_payment_term_date_invoice()

  File "/usr/lib/python3/dist-packages/odoo/addons/account/models/account_invoice.py", line 704, in _onchange_payment_term_date_invoice

    self.date_due = max(line[0] for line in pterm_list)

ValueError: max() arg is an empty sequence


Has anyone face this before ? Have solution proposals ?

Avatar
Discard
Related Posts Replies Views Activity
0
Aug 24
91
0
Dec 24
11
0
Dec 24
36
0
Nov 24
133
2
Sep 24
342