View source | Discuss this page | Page history | Printable version   

How to add an expansion process

Bulbgraph.png   This works from Openbravo PR14Q4

In order to create a record component, you have to create a canvas field

This canvas field should be in charge of build the process and open the expansion component. Here it is an example:

isc.defineClass('OBPF_SalesInvoiceAddPayment', isc.OBGridFormButton);
  canExpandRecord: true,
  noTitle: true,
  title: OB.I18N.getLabel('APRM_AddPaymentIn'),
  draw: function () {
    if (this.record && this.record.paymentComplete === false) {
      return this.Super('draw', arguments);
    } else {
      return false;
  click: function () {
    var processId = '9BED7889E1034FE68BD85D5D16857320',
        grid = this.grid,
        record = this.record,
        standardWindow = grid.view.standardWindow;
    var process = standardWindow.buildProcess({
      callerField: this,
      paramWindow: true,
      processId: processId,
      windowId: grid.view.windowId,
      windowTitle: OB.I18N.getLabel('APRM_AddPaymentIn')
    grid.openExpansionProcess(process, record);

As you can see in the code, at the end, the grid.openExpansionProcess is the one in charge of showing the process within the current grid row/record (the one where the button is).

The openExpansionProcess can have the following arguments:

Here it is the source code of this how to

Retrieved from ""

This page has been accessed 1,460 times. This page was last modified on 4 July 2014, at 17:36. Content is available under Creative Commons Attribution-ShareAlike 2.5 Spain License.