Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0023596Openbravo ERPA. Platformpublic2013-04-19 16:302013-04-23 17:13
dbaz 
dbaz 
highminoralways
closedfixed 
5
 
3.0MP23 
AugustoMauch
Core
No
0023596: Add a more generic way to create a "Copy record" button in a tab
Add a more generic way to create a "Copy record" button in a tab.

Right now, in core, there is only a button which creates a "Copy record". It is placed in modules/org.openbravo.client.application/web/org.openbravo.client.application/js/toobar/ob-clone-order.js

The idea is define a more generic function to save code each time a new "Copy record" button should be added to a tab.
After the change, ensure that the following test case works as before:

As "Openbravo Admin"
* Go to "Sales Order"
* Create new record (fill all required fields)
* Save
* Press "Copy record" button ( http://wiki.openbravo.com/w/images/e/e6/WIK_button_Clone.png [^] [^] )
No tags attached.
Issue History
2013-04-19 16:30dbazNew Issue
2013-04-19 16:30dbazAssigned To => dbaz
2013-04-19 16:30dbazModules => Core
2013-04-19 16:30dbazTriggers an Emergency Pack => No
2013-04-19 17:55dbazReview Assigned To => AugustoMauch
2013-04-19 17:56dbazIssue Monitored: AugustoMauch
2013-04-19 17:57hgbotCheckin
2013-04-19 17:57hgbotNote Added: 0058060
2013-04-19 17:57hgbotStatusnew => resolved
2013-04-19 17:57hgbotResolutionopen => fixed
2013-04-19 17:57hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/290a173d1040aa41dbcb73952e52a69f6be0c5ff [^]
2013-04-19 18:18dbazNote Added: 0058063
2013-04-19 20:36hgbotCheckin
2013-04-19 20:36hgbotNote Added: 0058068
2013-04-19 22:57hgbotCheckin
2013-04-19 22:57hgbotNote Added: 0058072
2013-04-20 00:59hgbotCheckin
2013-04-20 00:59hgbotNote Added: 0058073
2013-04-22 16:36hudsonbotCheckin
2013-04-22 16:36hudsonbotNote Added: 0058104
2013-04-22 16:36hudsonbotCheckin
2013-04-22 16:36hudsonbotNote Added: 0058109
2013-04-22 16:36hudsonbotCheckin
2013-04-22 16:36hudsonbotNote Added: 0058110
2013-04-22 16:36hudsonbotCheckin
2013-04-22 16:36hudsonbotNote Added: 0058111
2013-04-23 17:13AugustoMauchNote Added: 0058141
2013-04-23 17:13AugustoMauchStatusresolved => closed
2013-04-23 17:13AugustoMauchFixed in Version => 3.0MP23

Notes
(0058060)
hgbot   
2013-04-19 17:57   
Repository: erp/devel/pi
Changeset: 290a173d1040aa41dbcb73952e52a69f6be0c5ff
Author: David Baz Fayos <david.baz <at> openbravo.com>
Date: Fri Apr 19 17:57:21 2013 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/290a173d1040aa41dbcb73952e52a69f6be0c5ff [^]

Fixed issue 23596: Added 'OB.ToolbarUtils.createCloneButton' function

---
M modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MESSAGE.xml
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/toolbar/ob-clone-order.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/toolbar/ob-toolbar.js
---
(0058063)
dbaz   
2013-04-19 18:18   
Added this new function:

// ** {{{ OB.ToolbarUtils.createCloneButton(/*String*/ actionHandler, /*Array[String]*/ tabIds, /*String*/ askMsg, /*Integer*/ sortOrder, /*Boolean*/ editRecordAfterClone, /*String*/ buttonId, /*Boolean*/ overwriteIfExists}}} **
// Automatically set up a clone button for the provided tabs
// Parameters:
// * {{{actionHandler}}}: action handler which processes and returns the cloned record
// * {{{tabIds}}}: array of tabIds where this button will be shown
// * {{{askMsg}}}: (Optional, 'OBUIAPP_WantToCloneRecord' by default) Text that will be displayed when the button be pressed.
// * {{{sortOrder}}}: (Optional, '100' by default) Position in the toolbar of the clone button.
// * {{{editRecordAfterClone}}}: (Optional, true by default) If the form edit view (of the cloned record) should be opened after clone it.
// * {{{buttonId}}}: (Optional, random by default) Don't set it unless you plan to do advanced coding with this button (as, for example, overwrite it later in another place).
// * {{{overwriteIfExists}}}: (Optional, false by default) To be able to overwrite a particular existing clone button. The buttonId should match with the overwritten one.
(0058068)
hgbot   
2013-04-19 20:36   
Repository: erp/devel/pi
Changeset: df60e05286a8abafd6bc832a4aa4d6b5564998ed
Author: David Baz Fayos <david.baz <at> openbravo.com>
Date: Fri Apr 19 20:36:08 2013 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/df60e05286a8abafd6bc832a4aa4d6b5564998ed [^]

Related to issue 23596: proper variable name

---
M modules/org.openbravo.client.application/src/org/openbravo/client/application/businesslogic/CloneOrderActionHandler.java
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/toolbar/ob-toolbar.js
---
(0058072)
hgbot   
2013-04-19 22:57   
Repository: erp/devel/pi
Changeset: 1a725f0ecbe0f0c257b52ef59d46c3342887f183
Author: David Baz Fayos <david.baz <at> openbravo.com>
Date: Fri Apr 19 22:56:51 2013 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/1a725f0ecbe0f0c257b52ef59d46c3342887f183 [^]

Related to issue 23596: added 'requestParams' variable

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/toolbar/ob-clone-order.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/toolbar/ob-toolbar.js
---
(0058073)
hgbot   
2013-04-20 00:59   
Repository: erp/devel/pi
Changeset: 5b4ec31e99fd4cfda41811a6c8ba630573dabf09
Author: David Baz Fayos <david.baz <at> openbravo.com>
Date: Sat Apr 20 00:58:48 2013 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/5b4ec31e99fd4cfda41811a6c8ba630573dabf09 [^]

Related to issue 23596: added 'tabId' and 'windowId' to 'requestParams

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/toolbar/ob-toolbar.js
---
(0058104)
hudsonbot   
2013-04-22 16:36   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/f78aa78542fa [^]

Maturity status: Test
(0058109)
hudsonbot   
2013-04-22 16:36   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/f78aa78542fa [^]

Maturity status: Test
(0058110)
hudsonbot   
2013-04-22 16:36   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/f78aa78542fa [^]

Maturity status: Test
(0058111)
hudsonbot   
2013-04-22 16:36   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/f78aa78542fa [^]

Maturity status: Test
(0058141)
AugustoMauch   
2013-04-23 17:13   
Code reviewed and verified in pi@d4a9088f6a09