Adding Item Manufacturer details into Request for Quotation

Hello,

I’m exploring the Request for Quotation functionality in the Buying module. I’ve customised the Request for Quotation Print Format so that it includes the Item Code in the PDF. How can I get it to include the manufacturer’s part number of an item. Note, this is not the Supplier Code, but the Manufacturer Part Number referenced in Item Manufacturer.

Thanks,

Hi fishter,

This should be fairly easy and straightforward. Please search for how to pull a field from item master into a transaction and you will get enough details about how to do it.

Hope this helps.

Thanks

Jay

I found a few posts, but the links they had to documentation were broken. So, I tried the following in the Print Format.

<table><tr><th>Item Code</th><th>Manufacturer</th><th>Part Number</th></tr>
{%- for row in doc.items -%}
 <tr><td> {{ row.item_code }} </td><td colspan=2>&nbsp;</td></tr> 
 {#
 {%- for item_manuf in frappe.get_doc("Item",row.item_code) -%}
 <tr><td>&nbsp;</td>
 <td> {{ item_manuf.manufacturer }} </td>
 <td> {{ item_manuf.manufacturer_part_no }} </td></tr>
 {%- endfor -%} 
 #}
{%- endfor -%}
</table>

This works - but note the commented section. When I make this active I get an error:
TypeError: ‘Item’ object is not iterable

How do access the (possibly multiple) Item Manufacturer entries associated with this Item?

I’ve come back to this after a while away.

@JayRam’s suggestion is a good one - to read the documentation, - but unfortunately I just cannot find anywhere that tells me how to do this type of lookup between Document Types.

I need to get the manufacturer and manufacturers part number for each Item listed in the Request for Quote (RFQ). This means finding each Item Manufacturer entry for a particular Item. These are in different document types, and I don’t see any examples on how to do the following:

  1. In an RFQ (for example), using the item_code for each requested item, fetch all associated manufacturer and manufacturer_part_no from the Item Manufacturer DocType where the item_code matches the Item.

  2. Print only those with the supplier matching that in the RFQ header.

pseudo-SQL:
SELECT manufacturer, manufacturer_part_no, supplier FROM Item_Manfacturer WHERE (rfqdoc.row.item_code = Item_Manufacturer.item_code AND rfqdoc.vendor= Item_Manufacturer.supplier?)

Is this possible? Is it documented?