Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0021468Openbravo ERPA. Platformpublic2012-08-28 14:252012-10-25 12:39
azabaleta 
shankarb 
highminoralways
closedfixed 
5
pi 
3.0MP17 
dbaz
Core
No
0021468: Ability to disable buttons like "delete" and "attach" in the toolbar
Recently, a nice feature has been developed to allow the admin to configure a preference so you can disable the "Export to CSV" button in the toolbar for a specific role, window or user.

As the code seemed quite trivial, IMO it would add so much power also to let the ability to delete and attach buttons to be configured via preferences.

Thanks in advance.
.
Add preference properties to allow to disable DELETE and ATTACH toolbar buttons in the windows.
No tags attached.
Issue History
2012-08-28 14:25azabaletaNew Issue
2012-08-28 14:25azabaletaAssigned To => alostale
2012-08-28 14:25azabaletaModules => Core
2012-09-24 16:38shankarbIssue Monitored: shankarb
2012-10-01 09:57azabaletaNote Added: 0052944
2012-10-01 13:11RafaelCruzIssue Monitored: RafaelCruz
2012-10-08 18:29shankarbAssigned Toalostale => shankarb
2012-10-17 11:12shankarbStatusnew => scheduled
2012-10-17 11:12shankarbfix_in_branch => pi
2012-10-17 11:12hgbotCheckin
2012-10-17 11:12hgbotNote Added: 0053417
2012-10-17 11:12hgbotStatusscheduled => resolved
2012-10-17 11:12hgbotResolutionopen => fixed
2012-10-17 11:12hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/6df94ef450f7cdc4f47a566a8f142e865a397a08 [^]
2012-10-17 11:12shankarbStatusresolved => new
2012-10-17 11:12shankarbResolutionfixed => open
2012-10-17 11:12shankarbStatusnew => scheduled
2012-10-17 11:12shankarbNote Added: 0053418
2012-10-17 11:13shankarbReview Assigned To => dbaz
2012-10-17 11:13shankarbfix_in_branchpi =>
2012-10-17 11:13shankarbIssue Monitored: dbaz
2012-10-17 11:13shankarbStatusscheduled => resolved
2012-10-17 11:13shankarbResolutionopen => fixed
2012-10-17 11:23shankarbNote Added: 0053419
2012-10-17 13:49shankarbIssue End Monitor: shankarb
2012-10-22 13:27hudsonbotCheckin
2012-10-22 13:27hudsonbotNote Added: 0053511
2012-10-23 13:59dbazNote Added: 0053575
2012-10-23 13:59dbazStatusresolved => new
2012-10-23 13:59dbazResolutionfixed => open
2012-10-23 15:14hgbotCheckin
2012-10-23 15:14hgbotNote Added: 0053581
2012-10-24 14:07hgbotCheckin
2012-10-24 14:07hgbotNote Added: 0053628
2012-10-24 14:07hgbotStatusnew => resolved
2012-10-24 14:07hgbotResolutionopen => fixed
2012-10-24 14:07hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/6df94ef450f7cdc4f47a566a8f142e865a397a08 [^] => http://code.openbravo.com/erp/devel/pi/rev/ab39dd401cd5f88e6d83e3543d3b306f87ecf5ac [^]
2012-10-25 10:41dbazNote Added: 0053678
2012-10-25 10:41dbazStatusresolved => closed
2012-10-25 10:41dbazFixed in Version => 3.0MP17
2012-10-25 12:38hudsonbotCheckin
2012-10-25 12:38hudsonbotNote Added: 0053703
2012-10-25 12:39hudsonbotCheckin
2012-10-25 12:39hudsonbotNote Added: 0053710

Notes
(0052944)
azabaleta   
2012-10-01 09:57   
Hi,

to elaborate a bit more on this issue, I have to say that they are 2 separate set of preferences:

- A preference allowing an user to be able to delete records: This preference would show or hide the toolbar button for deleting records. The "trash" button.

- A preference allowing an user to be able use attachments: This preference would enable/disable the toolbar button of attachments. If the preference is disables for an user, he wont be able to see or add attachments on a window.

Hope it helps.

Asier
(0053417)
hgbot   
2012-10-17 11:12   
Repository: erp/devel/pi
Changeset: 6df94ef450f7cdc4f47a566a8f142e865a397a08
Author: Shankar Balachandran <shankar.balachandran <at> openbravo.com>
Date: Wed Oct 17 11:08:27 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/6df94ef450f7cdc4f47a566a8f142e865a397a08 [^]

Fixes Issue 0021468: disable buttons "delete" and "attach" using preferences.

2 properties have been added. 'Allow Delete Records' and 'Allow Attachment' that will decide whether the actions should be enabled or disabled.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/toolbar/ob-toolbar.js
M src-db/database/sourcedata/AD_REF_LIST.xml
---
(0053418)
shankarb   
2012-10-17 11:12   
Reopened to add Review Assigned to
(0053419)
shankarb   
2012-10-17 11:23   
Test Plan:

Attachments:
1. Login as client admin
2. Create a new preference with the property 'Allow Attachment' with value 'N'.
3. Logout and login as client admin.
4. In all windows, the attachment option will not be available.
5. Login as system admin. Attachments can be added.

Allow Delete:
1. Login as client admin
2. Create a new preference with the property 'Allow Delete Records' with value 'N'.
3. Logout and login as client admin.
4. In all windows, the delete option will not be available (even through shortcuts).
5. Login as system admin. Delete option will be available.

Note that by default these options are enabled.
(0053511)
hudsonbot   
2012-10-22 13:27   
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/483f2e6dc1af [^]

Maturity status: Test
(0053575)
dbaz   
2012-10-23 13:59   
It seems that the fix has been also reverted

https://code.openbravo.com/erp/devel/pi/diff/ba911ec8d8ac/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/toolbar/ob-toolbar.js#l1.40 [^]
(0053581)
hgbot   
2012-10-23 15:14   
Repository: erp/devel/pi
Changeset: ec10f528e45f4d29484ddfb0f6f679d43bf8fe4b
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Tue Oct 23 15:14:04 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/ec10f528e45f4d29484ddfb0f6f679d43bf8fe4b [^]

Related to issue 21468: Ability to disable buttons like "delete" and "attach" in the toolbar
Put back lines which were removed by accident, replaced standardWindow.id with
standardWindow.windowId

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/toolbar/ob-toolbar.js
---
(0053628)
hgbot   
2012-10-24 14:07   
Repository: erp/devel/pi
Changeset: ab39dd401cd5f88e6d83e3543d3b306f87ecf5ac
Author: Shankar Balachandran <shankar.balachandran <at> openbravo.com>
Date: Wed Oct 24 14:02:55 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/ab39dd401cd5f88e6d83e3543d3b306f87ecf5ac [^]

Fixes Issue 0021468 : Ability to disable buttons like "delete" and "attach" in the toolbar

Refactored code to include two properties 'allowDelete' and 'allowAttachment' in OBStandardWindow and set them using preference value.
Added logic to prevent delete using contextual menu (right click in grid).

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-window.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/toolbar/ob-toolbar.js
---
(0053678)
dbaz   
2012-10-25 10:41   
Reviewed @ changeset: 18282 - 804841e22642
(0053703)
hudsonbot   
2012-10-25 12:38   
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/4a27e27689bc [^]

Maturity status: Test
(0053710)
hudsonbot   
2012-10-25 12: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/4a27e27689bc [^]

Maturity status: Test