Issue 9639

Title
Error in Modify Cost Price wizard
Priority
bug
Status
resolved
Nosy list
abernardi, ced, pokoli, reviewbot, roundup-bot
Assigned to
abernardi
Keywords
easy, review

Created on 2020-09-25.23:42:47 by abernardi, last changed 2 days ago by roundup-bot.

Messages

New changeset f2e72b8ca92a by Adrián Bernardi in branch '5.6':
Test template type in Modify Cost Price wizard
https://hg.tryton.org/modules/stock/rev/f2e72b8ca92a
Author: [hidden] (abernardi)
Date: 2020-10-19.02:58:44

I think the bugfix should be backported to 5.6

New changeset 88db580cb483 by Cédric Krier in branch 'default':
Test template type in Modify Cost Price wizard
https://hg.tryton.org/tryton-env/rev/88db580cb483
New changeset 86cac34d1084 by Adrián Bernardi in branch 'default':
Test template type in Modify Cost Price wizard
https://hg.tryton.org/modules/stock/rev/86cac34d1084
Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2020-09-26.22:28:38
I think we need a scenario that runs this part of the code.
Author: [hidden] (pokoli) Tryton committer Tryton translator
Date: 2020-09-26.19:32:35
Thanks for your bug report. I can confirm trunk version is also afected. 

Could you please submit a patch following: 

https://www.tryton.org/develop

Thanks!
Author: [hidden] (abernardi)
Date: 2020-09-25.23:42:47
There is an error when executing the "Modify cost price" wizard on the Template model when the cost method is different from "Fixed".

  File "/site-packages/trytond/modules/stock/product.py", line 743, in transition_modify
    or product.type == 'service'):
UnboundLocalError: local variable 'product' referenced before assignment


At this moment is line http://hg.tryton.org/modules/stock/file/tip/product.py#l872

"product.type" should be replaced by "template.type"

Tested in v 5.6
History
Date User Action Args
2020-10-24 00:07:48roundup-botsetkeyword: - backport
messages: + msg61187
2020-10-19 09:20:53pokolisetkeyword: + backport
status: chatting -> resolved
2020-10-19 02:58:44abernardisetmessages: + msg61043
status: resolved -> chatting
2020-10-19 00:25:00roundup-botsetmessages: + msg61040
2020-10-19 00:24:58roundup-botsetmessages: + msg61039
nosy: + roundup-bot
status: in-progress -> resolved
2020-10-17 15:02:44reviewbotsetmessages: + msg61026
2020-09-27 21:58:49reviewbotsetmessages: + msg60433
2020-09-27 01:46:33reviewbotsetmessages: + msg60410
2020-09-26 22:44:34reviewbotsetnosy: + reviewbot
messages: + msg60408
2020-09-26 22:31:24abernardisetreviews: 292321002
keyword: + review

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