Tryton - Issues

 

Issue9166

Title grouping moves between invoice and move failed
Priority bug Status resolved
Superseder Nosy List albertcuni, pokoli, reviewbot, roundup-bot, 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 roundup-bot.

Messages
New changeset e35973bde807 by Albert Cunillera Benet in branch '5.4':
Prevent error on Grouping Moves when comparing empty dates
https://hg.tryton.org/modules/account/rev/e35973bde807

New changeset d7d503ee51b3 by Albert Cunillera Benet in branch '5.2':
Prevent error on Grouping Moves when comparing empty dates
https://hg.tryton.org/modules/account/rev/d7d503ee51b3
New changeset 8455430d64aa by C├ędric Krier in branch 'default':
Prevent error on Grouping Moves when comparing empty dates
https://hg.tryton.org/tryton-env/rev/8455430d64aa
New changeset c8eb5ee0da2d by Albert Cunillera Benet in branch 'default':
Prevent error on Grouping Moves when comparing empty dates
https://hg.tryton.org/modules/account/rev/c8eb5ee0da2d
review259051002 updated at https://codereview.tryton.org/259051002/#ps291441002
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-04-25 12:55:16roundup-botsetmessages: + msg57466
keyword: - backport
2020-04-20 18:22:33roundup-botsetmessages: + msg57346
2020-04-20 18:22:27roundup-botsetstatus: testing -> resolved
nosy: + roundup-bot
messages: + msg57345
2020-04-18 01:24:06cedsetkeyword: + backport
2020-04-15 16:04:59pokolisetstatus: in-progress -> testing
2020-04-14 10:10:57reviewbotsetmessages: + msg57144
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

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