Quote line item description from producttemplate change

Hi, 

for a customer we have a requirement that based on a dropdown field in the quote we retrieve a specific product template description field. We have a description field per language. So in this case when we have the quote set to 'Fr' and we select product A it should use the value of description_fra from the product template in the quote line iten. If we create a quote with language set to 'EN' it should read description_en etc. 

In the past I copied the modules/Quotes/clients/base/layouts/quote-data-list-groups/QuoteDataListGroupsLayout.js to the custom directory and made a change in there that would do this. Since in sugar 11 a change was made in this file this causes issues. I tried to extend the original file like 

({

 extendsFrom: 'QuoteDataListGroupsLayout',

initialise: function(options){

 this._super('initialise',[options])

 console.log('custom initialise function')

},

})

but this results in a non functional quote line item functionality. Did someone already look in how to extend that functionality in the past?

Parents
  • We implemented exactly that request for a couple of customers.

    Step 1: Create same dropdown field in QLI;

    Step 2: Copy that dropdown field from Quotes to QLI via QuoteDataGroupListView.onAddNewItemToGroup for new QLIs and QuoteDataGroupLayout.bindDataChange for existing QLIs.

    Step 3: Create a sugarLogic formula in the target description field in QLI GRID which fetch appropriate field from Template based on sync dropdown field.

    Regards

    André Lopes
    Lampada Global
    Skype: andre.lampada
  • Thaks for the quick response. The problem with this approach is that the description field is calculated. The customer would like to have it editable but only pre filled. 

Reply Children