Try ERPNext Buy Support Partners Foundation

Customs tariff number in print format

I am trying to add Customs Tariff Number for every item of my Delivery Note document.
I am not able to see the Customs Tariff Number in the list of Items table, so I tried to insert custom HTML.
When I try to enumerate items with the tariff number, I get this error message in the print format:
{{ no such element: erpnext.stock.doctype.delivery_note_item.delivery_note_item.DeliveryNoteItem object[‘customs_tariff_number’] }}
I searched in doctype “Item” and the name of the variable looks to be correct. Any idea?

You are not clear if you are using a customise doctype,

You should do this.

  • Search for Customize Form on the Setup or Awesome bar
  • Enter Delivery Note for the Doctype
  • Click the arrow on the right column on a field you choose
  • Select the "Insert Below or “Insert Above” button
  • Create the field as a Data type

This will create a new field. Then,

  • Print an existing delivery note
  • Click the “Customise” button
  • Drag the field from the left into the space you want
  • Save

Thanks. But how can I add the customs tariff number for all the items in Delivery Note? I mean, how do I create a new field which is actually linked to the table containing all the items? I don’t even manage to specify the variable name if I add a new field

You added the field in the Item doctype whereas in order to add it for each item in the Delivery Note you will need to customize Delivery Note Item doctype.

Please make sure to remove the field from Item and make the same in Delivery Note Item. Then you should be able to use it.

1 Like

I managed to successfully insert the fields “Country Of Origin” and “Customs Tariff Number” in the doctype Delivery Note Item. Now I can see the fields in the print format of Delivery Note. The problem is that, even if these fields are properly selected, they won’t show in the print format preview of the specific delivery note that I want to print. The print format for delivery note won’t even show the empty column. Why is this happening?

I finally managed now to show these values in the print format.
Now, we are running VS 10, any idea how I could automatically fetch these fields? I manually need to select these everytime.
A “fetch from” option was only added in VS 11