Access individual items of Sales Invoice

I want to get the name of all the items that are in the Items table in a Sales Invoice in the on_update() function in sales_invoice.py .

How can I do so?

@pranavgoel25,

You can iterate through the items table to get the item_names.

e.g. item_names = [item.item_name for item in self.items]