Tryton - Issues

 

Issue7219

Title Crash when creating a tax line for a move line without account
Priority bug Status resolved
Superseder Nosy List pokoli, reviewbot, roundup-bot
Type crash Components account
Assigned To pokoli Keywords review
Reviews 39221002
View: 39221002

Created on 2018-03-13.10:34:07 by pokoli, last changed by roundup-bot.

Messages
New changeset 72dc354ecdad by Sergi Almacellas Abellana in branch '4.6':
Test if parent_line account is set when computing tax line company
http://hg.tryton.org/modules/account/rev/72dc354ecdad

New changeset 4678375da4fa by Sergi Almacellas Abellana in branch '4.4':
Test if parent_line account is set when computing tax line company
http://hg.tryton.org/modules/account/rev/4678375da4fa

New changeset 33daf0f68336 by Sergi Almacellas Abellana in branch '4.2':
Test if parent_line account is set when computing tax line company
http://hg.tryton.org/modules/account/rev/33daf0f68336

New changeset 8cf95441fc12 by Sergi Almacellas Abellana in branch '4.0':
Test if parent_line account is set when computing tax line company
http://hg.tryton.org/modules/account/rev/8cf95441fc12

New changeset ef3ed3ef50a9 by Sergi Almacellas Abellana in branch '3.8':
Test if parent_line account is set when computing tax line company
http://hg.tryton.org/modules/account/rev/ef3ed3ef50a9
New changeset 7a30bd3dc2bf by Sergi Almacellas Abellana in branch 'default':
Test if parent_line account is set when computing tax line company
http://hg.tryton.org/modules/account/rev/7a30bd3dc2bf
review39221002 updated at https://codereview.tryton.org/39221002/#ps1
msg38958 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2018-03-13.10:34:06
When creating a tax line for a move without account I get the followin traceback:

Traceback (most recent call last):
  File "/trytond/wsgi.py", line 71, in dispatch_request
    return endpoint(request, **request.view_args)
  File "/trytond/protocols/dispatcher.py", line 41, in rpc
    request, database_name, *request.rpc_params)
  File "/trytond/wsgi.py", line 42, 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 174, in _dispatch
    result = rpc.result(meth(inst, *c_args, **c_kwargs))
  File "/trytond/model/modelview.py", line 679, in on_change_with
    changes[fieldname] = getattr(self, method_name)()
  File "/trytond/model/fields/field.py", line 106, in wrapper
    return func(self, *args, **kwargs)
  File "/trytond/modules/account/tax.py", line 1185, in on_change_with_company
    return self.move_line.account.company.id
AttributeError: 'NoneType' object has no attribute 'company'
History
Date User Action Args
2018-03-25 01:44:26roundup-botsetmessages: + msg39348
2018-03-14 12:49:46roundup-botsetstatus: testing -> resolved
nosy: + roundup-bot
messages: + msg38984
2018-03-13 10:51:46reviewbotsetnosy: + reviewbot
messages: + msg38959
2018-03-13 10:35:09pokolisetstatus: in-progress -> testing
reviews: 39221002
keyword: + review
2018-03-13 10:34:07pokolicreate

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