Skip to Content
Menu
This question has been flagged
2 Replies
1058 Views

Hi.

I have a situation where i want to update the serial number with a prefix when i move it to scrap.

i have created the automated action but im stuck at the python expression.

My prefix should be SCRAP- and im not sure if this is correct:

record.add_suffix('SCRAP')lot_id.name


Avatar
Discard
Author Best Answer

my automated action looks at the stock move line and its set to update the secord

this is the expression i have: record.'SCRAP'+lot_id.name

after your recommendation. Still get an error


Avatar
Discard
Best Answer

add_suffix ?

where did you got this from?

i think that your solution would be to concatenate your prefix with the current name 

rec.name = 'SCRAP'+lot_id.name


Avatar
Discard
Author

I was looking at some python forums and i have been trying random solutions

I will try yours