we have several products that may be purchased from various suppliers. Is there a way to add the supplier’s own order number to the request for quotation (RFQ) based on the selected product and supplier the RFQ is addressed to?
Currently I only manage to get a list of all suppliers from quotation_line.product.product_suppliers of tuples of a class and the id of the purchase_product_supplier table.
From that table I would need the value of the code cell of the row corresponding to the supplier the RFQ is to be sent to.
On purchase line model there is a product_supplier field which gets filled when selecting the product using the supplier of the purchase. You can access such field on the purchase line to print the supplier code and name.
The default purchase report already uses such information to show the product supplier codes when set. You only need to use the following statements: