Crash when journal has no sequence defined for the company
Although the sequence on journal is required, it may not have a value. Here are the steps to get a journal without sequence:
1. Create a new journal named test and set it's sequences.
2. Create a new company and a chart of accounts for it.
Then the "Test" journal does not have any sequence defined for the current company, so when creating a move on the journal the following exception is raised:
Traceback (most recent call last):
File "/home/sergi/nan/projectes/virtualenv/nclone/trytond/trytond/protocols/dispatcher.py", line 199, in _dispatch
result = rpc.result(meth(*c_args, **c_kwargs))
File "/home/sergi/nan/projectes/virtualenv/nclone/trytond/trytond/modules/account/move.py", line 278, in create
vals['number'] = Sequence.get_id(journal.sequence.id)
AttributeError: 'NoneType' object has no attribute 'id'
The attached review adds a test for the sequences and a explanatory error message.