Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0022902Openbravo ERPA. Platformpublic2013-01-26 17:402013-03-02 05:48
dbaz 
dbaz 
highmajoralways
closedfixed 
5
 
3.0MP20 
mtaal
Core
No
0022902: Create a "Print" link button to be used within QueryList widget
Create a "Print" link button to be used within QueryList widget.

This canvas component will be set inside the "Clientclass" field of the "Widget -> Query -> Column"
See the comments.
No tags attached.
related to feature request 0022901 closed dbaz Add "clientClass" field to QueryList widget and standarize its definition way 
png TestCase.png (82,397) 2013-01-26 21:08
https://issues.openbravo.com/file_download.php?file_id=5914&type=bug
png
Issue History
2013-01-26 17:40dbazNew Issue
2013-01-26 17:40dbazAssigned To => dbaz
2013-01-26 17:40dbazModules => Core
2013-01-26 17:40dbazTriggers an Emergency Pack => No
2013-01-26 17:40dbazRelationship addedrelated to 0022901
2013-01-26 21:08dbazFile Added: TestCase.png
2013-01-26 21:16dbazNote Added: 0055880
2013-01-26 21:52dbazReview Assigned To => mtaal
2013-01-26 21:53hgbotCheckin
2013-01-26 21:53hgbotNote Added: 0055882
2013-01-26 21:53hgbotStatusnew => resolved
2013-01-26 21:53hgbotResolutionopen => fixed
2013-01-26 21:53hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/603290cb6a8ae0459ac4a2c34d7bea0a161eed51 [^]
2013-01-27 11:34hudsonbotCheckin
2013-01-27 11:34hudsonbotNote Added: 0055887
2013-01-27 18:52mtaalNote Added: 0055890
2013-01-30 00:24dbazNote Added: 0055959
2013-01-30 00:40dbazStatusresolved => new
2013-01-30 00:40dbazResolutionfixed => open
2013-01-30 00:44dbazNote Edited: 0055959bug_revision_view_page.php?bugnote_id=0055959#r4314
2013-01-30 00:44dbazStatusnew => scheduled
2013-01-30 00:44dbazfix_in_branch => pi
2013-01-30 00:45dbazStatusscheduled => resolved
2013-01-30 00:45dbazResolutionopen => fixed
2013-01-30 08:53mtaalNote Added: 0055961
2013-01-30 08:53mtaalStatusresolved => closed
2013-01-30 08:53mtaalFixed in Version => 3.0MP20
2013-02-19 02:36hgbotCheckin
2013-02-19 02:36hgbotNote Added: 0056533
2013-02-20 04:51hudsonbotCheckin
2013-02-20 04:51hudsonbotNote Added: 0056623
2013-02-25 16:55hgbotCheckin
2013-02-25 16:55hgbotNote Added: 0056749
2013-02-27 16:51hgbotCheckin
2013-02-27 16:51hgbotNote Added: 0056820
2013-02-28 16:39hudsonbotCheckin
2013-02-28 16:39hudsonbotNote Added: 0056853
2013-03-02 05:48hudsonbotCheckin
2013-03-02 05:48hudsonbotNote Added: 0056925

Notes
(0055880)
dbaz   
2013-01-26 21:16   
Risk: low/medium


0) Test that previous print buttons are still working ok

As "Openbravo Admin"
* Go to "Sales Order"
* Select any record
* Click "Print" toolbar button. Ensure that you can do "just printing" and "print + attack"

As "Openbravo Admin"
* Go to "Business Partner"
* Select any record
* Click "Print" toolbar button. Ensure that the popup is shown


1) Add simple "Print" button

As "System Administrator"
* Go to "Widget" window
* Select record with "Widget Title": "Invoices to collect"
* Go to "Query" subtab
* Go to "Column" subtab
* Create new record with the values of the attached png (Test Case - 1)
* Save


2) Add complex "Print" button

As "System Administrator"
* Go to "Widget" window
* Select record with "Widget Title": "Invoices to collect"
* Go to "Query" subtab
* Go to "Column" subtab
* Create new record with the values of the attached png (Test Case - 2)
* Save


3) Test the result

As "Openbravo Admin"
* Add "Invoices to collect" widget
* Ensure that "Print A" and "Print B" columns are added, and that the Print buttons work ok. Note that for "Print A" case the button should just print the record, without any kind of notification/popup
(0055882)
hgbot   
2013-01-26 21:53   
Repository: erp/devel/pi
Changeset: 603290cb6a8ae0459ac4a2c34d7bea0a161eed51
Author: David Baz Fayos <david.baz <at> openbravo.com>
Date: Sat Jan 26 21:51:40 2013 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/603290cb6a8ae0459ac4a2c34d7bea0a161eed51 [^]

Fixed issue 22902: Added 'Print' link button to be used in QueryList widgets

---
M modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MESSAGE.xml
M modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewTab.java
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/classic/ob-classic-compatibility.js
M modules/org.openbravo.client.querylist/src/org/openbravo/client/querylist/QueryListUtils.java
M modules/org.openbravo.client.querylist/web/org.openbravo.client.querylist/js/ob-querylist-canvas-item.js
M src/org/openbravo/erpCommon/businessUtility/PrinterReports.html
M src/org/openbravo/erpCommon/businessUtility/PrinterReports.java
M src/org/openbravo/erpCommon/businessUtility/PrinterReports.xml
M src/org/openbravo/erpCommon/utility/reporting/printing/PrintController.java
M src/org/openbravo/erpCommon/utility/reporting/printing/PrintOptions.html
M src/org/openbravo/erpCommon/utility/reporting/printing/PrintOptions.xml
---
(0055887)
hudsonbot   
2013-01-27 11:34   
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/7b271be20db9 [^]

Maturity status: Test
(0055890)
mtaal   
2013-01-27 18:52   
The tests work fine, I am not sure about the format of test case 2 format, will check/review in the other issue.

Other code comments:

Code review:
https://code.openbravo.com/erp/devel/pi/rev/603290cb6a8ae0459ac4a2c34d7bea0a161eed51#l2.24 [^]
would it make sense to log a warning that no url can be determined?

https://code.openbravo.com/erp/devel/pi/rev/603290cb6a8ae0459ac4a2c34d7bea0a161eed51#l3.38 [^]
why call cPopup.hide(), why not prevent the cPopup.show() one line higher?

https://code.openbravo.com/erp/devel/pi/rev/603290cb6a8ae0459ac4a2c34d7bea0a161eed51#l4.15 [^]
the if clause is quite generic (hasLink), while it only sets a printUrl, the if should be:
if (column.isPrintLink())
Or isHasLink has multiple usages?

https://code.openbravo.com/erp/devel/pi/rev/603290cb6a8ae0459ac4a2c34d7bea0a161eed51#l6.34 [^]
typo (probably from previous versions): Commnad instead of Command
(0055959)
dbaz   
2013-01-30 00:24   
(edited on: 2013-01-30 00:44)
The test case 2 is an advanced one just for demonstration purposes (I don't think nobody is going to use it) if you set the things as are in the screenshot, it should work. It doesn't work for you, or you mean another different thing?

About the other comments:


1) There could be the case of isHasLink, but no "printUrl" for a particular tab, and I don't think have log writting each time it doesn't have "printUrl" be a good idea... It could sound like a warning, when it isn't.
In fact, my idea of getPrintUrl was: give me the url if exists or "" (or null) if it doesn't exist, but without any special emphasis if there is no printUrl for this particular tab. Anyway, no strong opinion on this point

2) I tried, but if I avoid directly cPopup.show(), some logic (the iframe code addition hack) doesn't work (several JS erros appear), so the show() needs to be called.

3) isHasLink is the field "Has Link". It is used before for example to determine that a field is going to be a link to its window (determined by the "Tab" combo box). For the particular case of the print button, it needs all the parameters sent by the isHasLink check
https://code.openbravo.com/erp/devel/pi/file/603290cb6a8a/modules/org.openbravo.client.querylist/src/org/openbravo/client/querylist/QueryListUtils.java#l67 [^]
but also I need the "printURL". Since a user can create any other kind of print link clientClass (for example, one with a icon button with a printer instead of the link), I have forced to retreive always this parameter too (when clientClass + hasLink are both present).
I understand your point of add another check "is Print" to have this "printUrl" only in these cases, but I think is make the model more complex for a feature (the new Clientcanvas field) that will be used in the 90% of the cases by adding a Print button, so I would remain it as it is

4) Is not a typo. If you look at this line, it was "Command" also before my changes:
https://code.openbravo.com/erp/devel/pi/rev/603290cb6a8ae0459ac4a2c34d7bea0a161eed51#l6.33 [^]
In fact, I tried to change it to "Command", but then a security error raises. (You can try yourself) Since it is an old implementation and it will be refactored, I prefer leave it as it is (as it was) and don't complicate searching the root problem (it should be another different issue)

(0055961)
mtaal   
2013-01-30 08:53   
Reviewed
(0056533)
hgbot   
2013-02-19 02:36   
Repository: erp/devel/pi
Changeset: 62f8bcb0a259ee149b395e52882d4739546c8eea
Author: David Baz Fayos <david.baz <at> openbravo.com>
Date: Tue Feb 19 02:35:46 2013 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/62f8bcb0a259ee149b395e52882d4739546c8eea [^]

Related to issue 22902: Now 'OBGridLinkLinkItem' is more customizable

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-canvas.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-grid.js
M modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/Default/org.openbravo.client.application/ob-grid-styles.js
---
(0056623)
hudsonbot   
2013-02-20 04:51   
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/d828167a9e83 [^]

Maturity status: Test
(0056749)
hgbot   
2013-02-25 16:55   
Repository: erp/devel/pi
Changeset: 7a7aac0d8227ee17bdc82eda3b79262cf45307d0
Author: David Baz Fayos <david.baz <at> openbravo.com>
Date: Mon Feb 25 16:54:50 2013 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/7a7aac0d8227ee17bdc82eda3b79262cf45307d0 [^]

Related to issue 22902: Created standalone OBUIAPP_PrintGridLink label

---
M modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MESSAGE.xml
M modules/org.openbravo.client.querylist/web/org.openbravo.client.querylist/js/ob-querylist-canvas-item.js
---
(0056820)
hgbot   
2013-02-27 16:51   
Repository: erp/devel/pi
Changeset: 1b1bae8573e83de0329470505e4dc4cd303d2f30
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Wed Feb 27 16:51:01 2013 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/1b1bae8573e83de0329470505e4dc4cd303d2f30 [^]

Issue 22902: Print label doesn't displayed for summary columns

---
M modules/org.openbravo.client.querylist/web/org.openbravo.client.querylist/js/ob-querylist-canvas-item.js
---
(0056853)
hudsonbot   
2013-02-28 16:39   
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/8c5cb16254f4 [^]

Maturity status: Test
(0056925)
hudsonbot   
2013-03-02 05:48   
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/f5db629e7058 [^]

Maturity status: Test