Tryton - Issues

 

Issue9166

Title grouping moves between invoice and move failed
Priority bug Status in-progress
Superseder Nosy List albertcuni, pokoli, reviewbot, semarie
Type crash Components account
Assigned To albertcuni Keywords easy, review
Reviews 259051002
View: 259051002

Created on 2020-03-18.15:43:54 by semarie, last changed by reviewbot.

Messages
New review259051002 at https://codereview.tryton.org/259051002/#ps286961002
msg56382 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2020-03-18.15:53:22
The error is because one of the moves have a maturity date of None. 

This should be fixed by testing that the line maturity date is not None before comparing it. 

It will be great if you can provide a patch for it.
msg56381 (view) Author: [hidden] (semarie) Date: 2020-03-18.15:47:24
adding a maturity date on the directly created move is enough to be able to group without error
msg56380 (view) Author: [hidden] (semarie) Date: 2020-03-18.15:43:53
When trying to group two moves (one from purchase invoice, and one directly created), and I have the following error:

Traceback (most recent call last):
  File "/trytond/wsgi.py", line 109, in dispatch_request
    return endpoint(request, **request.view_args)
  File "/trytond/protocols/dispatcher.py", line 48, in rpc
    request, database_name, *request.rpc_params)
  File "/trytond/wsgi.py", line 77, in auth_required
    return wrapped(*args, **kwargs)
  File "/trytond/protocols/wrappers.py", line 131, in wrapper
    return func(request, pool, *args, **kwargs)
  File "/trytond/protocols/dispatcher.py", line 181, in _dispatch
    result = rpc.result(meth(*c_args, **c_kwargs))
  File "/trytond/wizard/wizard.py", line 291, in execute
    return wizard._execute(state_name)
  File "/trytond/wizard/wizard.py", line 322, in _execute
    result = self._execute(transition())
  File "/trytond/modules/account/move.py", line 1874, in transition_group
    move, balance_line = self._group_lines(lines)
  File "/trytond/modules/account/move.py", line 1879, in _group_lines
    move, balance_line = self.group_lines(lines, self.start.journal, date)
  File "/trytond/modules/account/move.py", line 1887, in group_lines
    move, balance_line = cls.get_move(lines, grouping, journal, date)
  File "/trytond/modules/account/move.py", line 1973, in get_move
    maturity_dates[line.account], line.maturity_date)
TypeError: '<' not supported between instances of 'NoneType' and 'datetime.date'

Fault: '<' not supported between instances of 'NoneType' and 'datetime.date'


In am running with tryton-env e9cd7848cd40 (account module at d6e063a8c00b)
History
Date User Action Args
2020-03-26 13:31:43reviewbotsetnosy: + reviewbot
messages: + msg56669
2020-03-26 13:31:42reviewbotsetreviews: 259051002
keyword: + review
2020-03-25 09:13:39albertcunisetstatus: chatting -> in-progress
assignedto: albertcuni
nosy: + albertcuni
2020-03-18 15:53:23pokolisetnosy: + pokoli
messages: + msg56382
keyword: + easy
2020-03-18 15:47:25semariesetstatus: unread -> chatting
messages: + msg56381
2020-03-18 15:43:54semariecreate

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