Tryton - Issues

 

Issue8651

Title TypeError: '<' not supported between instances of 'account.tax' and 'NoneType'
Priority bug Status closed
Superseder Make tax required on tax line
View: 8364
Nosy List ced, risto3
Type crash Components account_tax_cash
Assigned To ced Keywords
Reviews

Created on 2019-09-10.13:09:24 by risto3, last changed by ced.

Messages
msg52450 (view) Author: [hidden] (risto3) Date: 2019-10-12.19:20:37
I see that the moves missing tax line are credit notes where only the tax move line has a tax line...(looks like it was manually added).
Unfortunately it seems I can't add the missing lines as the move is posted! 

In a test base, I could cancel the two credit notes, then duplicate them to fix the tax lines using the same date on the invoice before validation/post. Then reconciliation seemed to work fine.

Is this is the only way to correct the situation?
msg52445 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2019-10-12.18:08:09
This is because there are tax line without tax. This has been fixed by issue8364 by making the tax required. So the proper way is to fill tax on all tax line or delete the tax line.
msg51781 (view) Author: [hidden] (risto3) Date: 2019-09-10.13:09:23
trying to reconcile for a supplier, on 5.0, a few invoices and credit notes with the associate single payment
(can't use the grouping lines bits yet as they are only in 5.2 as far as I can tell)

Traceback (most recent call last):
  File "/trytond/wsgi.py", line 73, in dispatch_request
    return endpoint(request, **request.view_args)
  File "/trytond/protocols/dispatcher.py", line 46, in rpc
    request, database_name, *request.rpc_params)
  File "/trytond/wsgi.py", line 44, in auth_required
    return wrapped(*args, **kwargs)
  File "/trytond/protocols/wrappers.py", line 122, in wrapper
    return func(request, pool, *args, **kwargs)
  File "/trytond/protocols/dispatcher.py", line 176, in _dispatch
    result = rpc.result(meth(*c_args, **c_kwargs))
  File "/trytond/wizard/wizard.py", line 287, in execute
    return wizard._execute(state_name)
  File "/trytond/wizard/wizard.py", line 318, in _execute
    result = self._execute(transition())
  File "/trytond/wizard/wizard.py", line 318, in _execute
    result = self._execute(transition())
  File "/trytond/modules/account/move.py", line 1490, in transition_reconcile
    writeoff=writeoff, date=date, description=description)
  File "/trytond/modules/account/move.py", line 1220, in reconcile
    return Reconciliation.create(reconciliations)
  File "/trytond/modules/account_invoice/account.py", line 265, in create
    Invoice.process(invoices)
  File "/trytond/modules/account_tax_cash/account.py", line 280, in process
    super(Invoice, cls).process(invoices)
  File "/trytond/modules/account_invoice/invoice.py", line 1401, in process
    cls.paid(paid)
  File "/trytond/modules/sale/invoice.py", line 20, in wrapper
    func(cls, invoices)
  File "/trytond/modules/sale/invoice.py", line 92, in paid
    super(Invoice, cls).paid(invoices)
  File "/trytond/modules/purchase/invoice.py", line 21, in wrapper
    func(cls, invoices)
  File "/trytond/modules/purchase/invoice.py", line 103, in paid
    super(Invoice, cls).paid(invoices)
  File "/trytond/model/workflow.py", line 43, in wrapper
    cls._transition_state: state,
  File "/trytond/modules/account_tax_cash/account.py", line 276, in write
    cls._update_tax_cash_basis(invoices)
  File "/trytond/modules/account_tax_cash/account.py", line 313, in _update_tax_cash_basis
    TaxLine.update_cash_basis(tax_lines, ratio, period)
  File "/trytond/modules/account_tax_cash/account.py", line 161, in update_cash_basis
    lines = cls.browse(sorted(lines, key=cls.group_cash_basis_key))
TypeError: '<' not supported between instances of 'account.tax' and 'NoneType'

This supplier is not on cash basis but on delivery (invoice) basis.
History
Date User Action Args
2019-10-12 19:55:55cedsetstatus: chatting -> closed
2019-10-12 19:20:38risto3setstatus: closed -> chatting
messages: + msg52450
2019-10-12 18:08:09cedsetstatus: unread -> closed
messages: + msg52445
component: + account_tax_cash
assignedto: ced
nosy: + ced
superseder: + Make tax required on tax line
2019-09-10 13:35:45cedsetpriority: urgent -> bug
type: crash
2019-09-10 13:09:24risto3create

Showing 10 items. Show all history (warning: this could be VERY long)