Tryton - Issues

 

Issue6425

Title Crash when creating a new analytic line for move line
Priority bug Status testing
Superseder Nosy List pokoli, reviewbot
Type crash Components analytic_account
Assigned To pokoli Keywords review
Reviews 38301002, 40271002, 36341002
View: 38301002, 40271002, 36341002

Created on 2017-04-07.11:16:33 by pokoli, last changed by reviewbot.

Messages
New review36341002 at https://codereview.tryton.org/36341002/#ps1
New review40271002 at https://codereview.tryton.org/40271002/#ps1
review38301002 updated at https://codereview.tryton.org/38301002/#ps40001
review38301002 updated at https://codereview.tryton.org/38301002/#ps20001
msg33279 (view) Author: [hidden] (pokoli) (Tryton committer) Date: 2017-04-19.11:14:00
The error is only raised when the move is not really saved. Indeed, similar errors are also shown when the account field is not filed.
New review38301002 at https://codereview.tryton.org/38301002/#ps1
msg33157 (view) Author: [hidden] (pokoli) (Tryton committer) Date: 2017-04-07.11:16:32
When creating a new analytic line from the move line screen I get the following exception:

Traceback (most recent call last):
  File "/trytond/wsgi.py", line 47, 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 39, in auth_required
    return wrapped(*args, **kwargs)
  File "/trytond/protocols/wrappers.py", line 105, in wrapper
    return func(request, pool, *args, **kwargs)
  File "/trytond/protocols/dispatcher.py", line 167, in _dispatch
    result = rpc.result(meth(inst, *c_args, **c_kwargs))
  File "/trytond/model/modelview.py", line 656, in on_change
    method()
  File "/trytond/model/modelview.py", line 84, in wrapper
    result = func(self, *args, **kwargs)
  File "/trytond/model/fields/field.py", line 95, in wrapper
    return func(self, *args, **kwargs)
  File "/trytond/modules/analytic_account/line.py", line 106, in on_change_move_line
    self.date = self.move_line.date
  File "/trytond/model/modelstorage.py", line 1215, in __getattr__
    return super(ModelStorage, self).__getattr__(name)
  File "/trytond/model/model.py", line 380, in __getattr__
    % (self.__name__, name, self._values))
AttributeError: 'account.move.line' Model has no attribute 'date': {'reconciliation': None, 'account': Pool().get('account.account')(2), 'move_state': u'draft', 'description': u'', 'tax_lines': (Pool().get('account.tax.line')(**{'amount': None, 'code': None, 'tax': None, 'company': 1, 'currency_digits': 2}),), 'maturity_date': None, 'journal': None, 'move': Pool().get('account.move')(**{'origin': None, 'post_number': u'', 'description': u'', 'journal': None, 'period': None, 'number': u'', 'post_date': None, 'state': u'draft', 'date': datetime.date(2017, 4, 7), 'company': 1}), 'currency_digits': 2, 'credit': Decimal('0.0'), 'state': u'draft', 'second_currency_digits': None, 'party': None, 'debit': Decimal('0.0'), 'second_currency': None, 'party_required': True, 'second_currency_required': None, 'amount_second_currency': None}
History
Date User Action Args
2017-04-19 18:02:53reviewbotsetmessages: + msg33292
2017-04-19 18:02:52reviewbotsetreviews: 38301002, 40271002 -> 38301002, 40271002, 36341002
2017-04-19 14:32:36reviewbotsetmessages: + msg33284
2017-04-19 14:32:35reviewbotsetreviews: 38301002 -> 38301002, 40271002
2017-04-19 14:32:32reviewbotsetmessages: + msg33283
2017-04-19 11:35:34reviewbotsetmessages: + msg33280
2017-04-19 11:14:00pokolisetstatus: in-progress -> testing
messages: + msg33279
2017-04-07 11:28:14reviewbotsetnosy: + reviewbot
messages: + msg33158
2017-04-07 11:28:13reviewbotsetreviews: 38301002
keyword: + review
2017-04-07 11:16:33pokolicreate

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