How to add Supplier Order Numbers to RFQs?


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.

Is there an easy way to get this done?

Thank you very much!

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:

<when test="line.product_supplier">
<when test="line.product">

This will show the supplier values when set and fallback to the product values when empty.

Unfortunately we are missing the product supplier on quotation line: Add product supplier on purchase request quotation line (#12346) · Issues · Tryton / Tryton · GitLab