Try ERPNext Buy Support Partners Foundation

Notification: New receipt of material

I have tried to create a notification that when validating a purchase receipt I sent an email with the following information:
Reception date:
No. I submit:
Warehouse received:
Bill of Materials: Quantity => Material

This is the code I use:

Nuevo registro de ingreso de materiales.

  • Proveedor: {{ doc.supplier }}
  • Fecha recepción: {{ doc.posting_date }}
  • Nro. Remito: {{ doc.supplier_delivery_note }}
  • Almacen recepcionado: {{ doc.set_warehouse }}

Listado de materiales: {{doc.total_qty }} => {{ doc.supplied_items }} => {{ doc.raw_material_details }} => {{ doc.get_current_stock }}


Y este es el resultado que obtuve:

Nuevo registro de ingreso de materiales.

• Fecha recepción: 2021-02-22
• Nro. Remito: A-35-48461
• Almacen recepcionado: None
44.185 => [] => {{ no such element: erpnext.stock.doctype.purchase_receipt.purchase_receipt.PurchaseReceipt object[‘raw_material_details’] }} => >

What am I doing wrong to get the lines that make up the income (the bill of materials itself)
I appreciate any help!

Hola, estás queriendo imprimir un campo de una tabla hija de forma erronea. Para eso debes recorrer la misma primero.