AnsweredAssumed Answered

Sugarcrm 7.9.3: Quote Line Items -CreateView- ReadOnly Not Working

Question asked by Aravind Kumar on Feb 22, 2018
Latest reply on Feb 28, 2018 by Aravind Kumar

I'm working on sugar 7.9.3, When trying to make a field in quote line item to readonly its not working. Following is the scenario.

 

I added product field status to show in quote line items. 

modules/Quotes/clients/base/views/record/record.php ( Worked in core file for testing)

array(
   'name' => 'product_bundle_items',
   'fields' => array(
               'name',
               'quote_id',
               'status',
   ),
),

 

modules/products/clients/base/views/quote-data-group-list/quote-data-group-list.php ( Worked in core file for testing)

array(
   'name' => 'status',
   'label' => 'LBL_STATUS',
   'readonly' => true,
),

As you can see the field is readonly but when u try to create a quote the field is editable.

 

CreateView


 

As the above record.php change not working, So i tried to make the field as readonly in modules/products/vardefs.php

 

'status' => array(
      'name' => 'status',
      'vname' => 'LBL_STATUS',
      'type' => 'enum',
      'options' => 'product_status_dom',
      'default' => '',
      'readonly' => true,
      'len' => 100,
      'audited' => true,
      'comment' => 'Product status (ex: Quoted, Ordered, Shipped)',
      'full_text_search' => array(
            'enabled' => true,
            'searchable' => false,
      ),
),

 

In product module DetailView the field become readonly and also in quote edit screen Quote Line Items its readonly, But when you create the field its not readonly.

 

Product Edit View, Its readonly

 

 

 

Tested with help of http://support.sugarcrm.com/Resources/Environments/Development_Environments/Vagrant_Development_Environment/ core sugar 7.9.3

 

The is not working in Create Quote screen. Seems sugar bug.

Outcomes