Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[17.0] account_payment_sale: issue when creating multiple invoices in SO #1387

Open
dtec-landoo opened this issue Dec 17, 2024 · 0 comments
Open
Labels

Comments

@dtec-landoo
Copy link

Hi!

When you try to invoice multiple sale orders with the same customer, if there is one payment mode in those sale orders that is empty and the others are filled, odoo will raise a traceback.

RPC_ERROR
Odoo Server Error
Traceback (most recent call last):
File "/opt/odoo17e/odoo/odoo/http.py", line 1764, in _serve_db
return service_model.retrying(self._serve_ir_http, self.env)
File "/opt/odoo17e/odoo/odoo/service/model.py", line 133, in retrying
result = func()
File "/opt/odoo17e/odoo/odoo/http.py", line 1791, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "/opt/odoo17e/odoo/odoo/http.py", line 1995, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "/opt/odoo17e/odoo/addons/website/models/ir_http.py", line 235, in _dispatch
response = super()._dispatch(endpoint)
File "/opt/odoo17e/odoo/odoo/addons/base/models/ir_http.py", line 222, in _dispatch
result = endpoint(**request.params)
File "/opt/odoo17e/odoo/odoo/http.py", line 741, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "/opt/odoo17e/odoo/addons/web/controllers/dataset.py", line 28, in call_button
action = self._call_kw(model, method, args, kwargs)
File "/opt/odoo17e/odoo/addons/web/controllers/dataset.py", line 20, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/opt/odoo17e/odoo/odoo/api.py", line 468, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "/opt/odoo17e/odoo/odoo/api.py", line 453, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "/opt/odoo17e/odoo/addons/sale/wizard/sale_make_invoice_advance.py", line 180, in create_invoices
invoices = self._create_invoices(self.sale_order_ids)
File "/opt/odoo17e/enterprise/sale_timesheet_enterprise/wizard/sale_make_invoice_advance.py", line 42, in _create_invoices
return super()._create_invoices(sale_orders)
File "/opt/odoo17e/odoo/addons/sale_timesheet/wizard/sale_make_invoice_advance.py", line 51, in _create_invoices
return super()._create_invoices(sale_orders)
File "/opt/odoo17e/enterprise/sale_subscription/wizard/sale_make_invoice_advance.py", line 28, in _create_invoices
invoices = super(SaleAdvancePaymentInv, self)._create_invoices(sale_orders)
File "/opt/odoo17e/odoo/addons/sale/wizard/sale_make_invoice_advance.py", line 198, in _create_invoices
return sale_orders._create_invoices(final=self.deduct_down_payments, grouped=not self.consolidated_billing)
File "/opt/odoo17e/odoo/addons/sale_timesheet/models/sale_order.py", line 149, in _create_invoices
moves = super()._create_invoices(grouped=grouped, final=final, date=date)
File "/opt/odoo17e/enterprise/sale_subscription/models/sale_order.py", line 1623, in _create_invoices
invoices = super()._create_invoices(grouped=grouped, final=final, date=date)
File "/opt/odoo17e/odoo/addons/sale/models/sale_order.py", line 1317, in _create_invoices
invoice_vals_list = sorted(
TypeError: '<' not supported between instances of 'NoneType' and 'int'

The above server error caused the following client error:
RPC_ERROR: Odoo Server Error
RPC_ERROR

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant