Tryton - Issues

 

Issue6366

Title Move.assing_try should succeed when no moves
Priority bug Status resolved
Superseder Nosy List pokoli, reviewbot, roundup-bot
Type crash Components stock
Assigned To pokoli Keywords review
Reviews 31201002
View: 31201002

Created on 2017-03-16.12:01:47 by pokoli, last changed by roundup-bot.

Messages
New changeset 32e23113b5bb by Sergi Almacellas Abellana in branch 'default':
Avoid computation for assign_try with no moves
http://hg.tryton.org/modules/stock/rev/32e23113b5bb
review31201002 updated at https://codereview.tryton.org/31201002/#ps40001
review31201002 updated at https://codereview.tryton.org/31201002/#ps20001
review31201002 updated at https://codereview.tryton.org/31201002/#ps1
msg32532 (view) Author: [hidden] (pokoli) (Tryton committer) Date: 2017-03-16.12:01:46
When assigning a production with no inputs I get the following exception:

ProgrammingError: syntax error at or near ")"
LINE 1: ...stock_move" AS "a" WHERE ((("a"."to_location" IN ()) OR ("a"...
                                                             ^

  File "trytond/protocols/dispatcher.py", line 162, in _dispatch
    result = rpc.result(meth(*c_args, **c_kwargs))
  File "trytond/wizard/wizard.py", line 287, in execute
    return wizard._execute(state_name)
  File "trytond/wizard/wizard.py", line 318, in _execute
    result = self._execute(transition())
  File "trytond/modules/production/production.py", line 666, in transition_start
    [Production(Transaction().context['active_id'])]):
  File "trytond/model/modelview.py", line 621, in wrapper
    return func(cls, records, *args, **kwargs)
  File "trytond/modules/production/production.py", line 612, in assign_try
    for m in p.inputs]):
  File "trytond/modules/stock/move.py", line 819, in assign_try
    cursor.execute(*query)
  File "trytond/backend/postgresql/database.py", line 60, in execute
    cursor.execute(self, sql, args)

This only happens on postgresql backend and since changeset 8c04ea1b8b10
History
Date User Action Args
2017-03-22 11:15:25roundup-botsetstatus: testing -> resolved
nosy: + roundup-bot
messages: + msg32663
2017-03-17 10:39:59reviewbotsetmessages: + msg32569
2017-03-16 12:39:47reviewbotsetmessages: + msg32536
2017-03-16 12:07:12reviewbotsetnosy: + reviewbot
messages: + msg32534
2017-03-16 12:04:16pokolisetstatus: in-progress -> testing
reviews: 31201002
keyword: + review
2017-03-16 12:01:47pokolicreate

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