Generate a batch ID using Work Order Number

I can use YY…MM…DD-.###. but failed using this code {{ work_order }}-.###. Have anyone achieve this?

You can create the Batch No within a server script of the Stock Entry.

Will it work for both transactions?

  1. Stock Entry - Manufacture
  2. Batch - Split

There is also option in Manufacturing Setting.
Make Serial No / Batch from Work Order
System will automatically create the serial numbers / batch for the Finished Good on submission of work order

None of them seems to work.

Shouldn’t it be {fieldname}-.### (whatever is the fieldname) ?