[Vtigercrm-developers] Inventory Record copying

Alan Lord alanslists at gmail.com
Mon Nov 6 10:33:10 GMT 2017


This really shouldn't be as complicated as it is.

Due to the way Inventory line item functions are handled almost 
exclusively in the client (web browser) means that it is pretty bloody 
awkward to go from a Quote to a Sales order without having the target 
record open in Edit View.

See function "saveInventoryProductDetails()" in 
include/utils/InventoryUtils.php

Basically, I have to recode pretty much the entire process, unless I 
have missed something somewhere.

What would be *really* helpful would be a function a bit like the 
setRecordFieldValues() in the Inventory Record Model, but for line item 
data...

TIA

Al


On 02/11/17 15:22, Alan Lord wrote:
> This gets a bit "weirder"...
> 
> If I trigger my custom workflow on the Quote from a save when it is open 
> for Edit, the Sales Order is created and the line items in the Quote get 
> copied into the new Sales Order.
> 
> If I trigger the workflow on the Quote from a save when in it is in 
> Detail View (I just change the Quote Stage for example), the Sales Order 
> is created, but this does not copy the line items.
> 
> Any ideas?
> 
> Al





More information about the vtigercrm-developers mailing list