Inventory Module Record needs work...
I've noticed a few things which do not fit with the new architecture of vtiger 6 when working with related Products to an Invoice/Sales Order or Quote.
-
In the
Inventory_Record_Model
class the functiongetProducts()
will return Products and Services. It gets its data from thegetAssociatedProducts()
function ininclude/utils/EditViewutils.php
. IMHO there should be different functions which return just Products, just Services or both. When you want to create a "Packing Slip" or Delivery Note from an Invoice, it requires lots of duplicate processing of arrays due to the issue above; you don't want to include Services in a Delivery Note ;-) -
More seriously, the above functions hardcode which fields are returned from the Products and Services records. We have added some additional fields to the Products module, such as weight and dimension attributes. These fields are not returned by the
getProducts()
function at all! Meaning we have to write a custom "getProducts()" function :-(