Adding custom field inside view pages

I was able to add a custom field in the quote list partial_quote_table.php
like this

<?php $CI = &get_instance(); $CI->load->model('custom_fields/mdl_custom_fields'); $custom_fields = array( 'quote' => $this->mdl_custom_fields->get_values_for_fields('mdl_quote_custom', $quote->quote_id),); echo nl2br($custom_fields['quote']['Projet']); ?>

which works fine until you consult this page from inside the client tab ??
gives Severity: Error
Message: Call to undefined method Custom_Fields::get_values_for_fields()

So maybe the code inside partial_quote_table.php needs to be in another file for all outside scopes ??

A post was merged into an existing topic: Add quote_number in invoices list partial_invoice_table.php