Notes |
|
(0070366)
|
shankarb
|
2014-09-25 11:53
|
|
Issue reproducible only in case the field does not have any value. |
|
|
(0070399)
|
caristu
|
2014-09-25 19:16
(edited on: 2014-09-25 19:18) |
|
Hi Shankar, I am able to reproduce it with value and setting the column as mandatory (see attached)
|
|
|
(0072005)
|
hgbot
|
2014-11-25 19:25
|
|
Repository: erp/devel/pi
Changeset: 02f377fd13c624219b12b51e05d6f82d4a9a7d53
Author: Inigo Sanchez <inigo.sanchez <at> openbravo.com>
Date: Tue Nov 25 19:04:33 2014 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/02f377fd13c624219b12b51e05d6f82d4a9a7d53 [^]
Fixes issue 27670: Time fields do not have the correct style in read only mode
The problem was the following. Absolute and Standard time fields did not have the
correct style in read only mode.
It has been resolved adding a method that applies correct style in read only mode,
it means, it has been added "Disabled" at the end of style name in read only mode.
---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-time.js
---
|
|
|
|
code review:
-prevent extra if nesting by using
if () {
...
} else if () {
...
}
istead of
if () {
...
} else {
if () {
//unnecessary nesting
}
}
-OB coding convention: use single quotes for JavaScript strings [1]: "Disabled" should be 'Disabled'
not reopening it as they are minor style issues.
[1] http://wiki.openbravo.com/wiki/JavaScript_Coding_Conventions#Single_Quotes [^] |
|
|
(0072135)
|
hgbot
|
2014-11-28 14:05
|
|
Repository: erp/devel/pi
Changeset: ba175225033f84b8cff0804c28c2b6755395dcb4
Author: Inigo Sanchez <inigo.sanchez <at> openbravo.com>
Date: Fri Nov 28 14:04:22 2014 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/ba175225033f84b8cff0804c28c2b6755395dcb4 [^]
Related issue 27670: Added two small refactoring.
It has been prevented an extra if. Besides, it has been used OB coding
convection using single quotes.
---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-time.js
---
|
|
|
|
Reopening:
Though the readonly UI looks fine, it is still possible to edit time and absolute time references when they are read only. |
|
|
|
It has been resolved in attached export file. |
|
|
(0072395)
|
alostale
|
2014-12-10 13:24
(edited on: 2014-12-10 13:25) |
|
Testing attached export.
2 problems found:
| UI | can't edit
----------------------------------------------------------------------
1. Read Only Role access | OK | OK
2. Non editable org | FAIL: text box | OK
3. Read only window (in AD) | OK | OK
4. Read only field (in AD) | OK | OK
5. Read only logic | FAIL: text box | OK
|
|
|
(0072455)
|
hgbot
|
2014-12-12 14:56
|
|
Repository: erp/devel/pi
Changeset: 1339ca00c158f8c91108a2f63a0b031efdc85d0a
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Fri Dec 12 14:44:04 2014 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/1339ca00c158f8c91108a2f63a0b031efdc85d0a [^]
fixed bug 27670: time refrerence has no correct style when it is readonly
The problem is caused by the incorrect management SC client does for styles in
this case. TimeItem contains an inner TextItem. In case the TimeItem defines a
textBoxStyle property, it is always applied to the inner TextItem without considering
if it is active.
Current fix overwrites SC default behavior so that is taken into account.
---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-time.js
---
|
|
|
|
Tested with all time references (time, date-time, absolute time, absolute date-time), with mandatory and non-mandatory fields, disabling the fields in different manners: by readonly field (AD), read only logic, read only access at role level, non editable org. |
|
|
(0072547)
|
dbaz
|
2014-12-16 13:49
|
|
Several problems detected: In priority order
1) If there is an issue identified in the Smartclient side, it should be reported to Smartclient.
In the same way we invest a lot of time ensuring that known regressions doesn't happen again, we should ensure that it doesn't happen the first time.
Doing fixes like this in our side have demonstrated that is a bomb once we decide to upgrade the Smartclient library, so at least in a first action should be report it to them and try to backport the fix. Only if this solution is not feasible should we try to do the fix in our side.
2) https://code.openbravo.com/erp/devel/pi/rev/1339ca00c158f8c91108a2f63a0b031efdc85d0a#l1.19 [^]
A proper solution would be
return me.getClass().getInstanceProperty('textBoxStyle') + (me.isDisabled() ? 'Disabled' : (me.required ? 'Required' : ''));
With this we ensure that if we create a child class of OBTimeItem with its own styles, at this point they will not be overwritten by this code.
3) https://code.openbravo.com/erp/devel/pi/rev/1339ca00c158f8c91108a2f63a0b031efdc85d0a#l1.17 [^]
OB.Styles.OBFormField.OBTimeItem it seems that is 'undefined'
Anyway, here it is the same conflict than in the point before: it makes impossible create a new OBTimeItem child with its own new style.
4) Install "org.openbravo.platform.features" module
Go to "EM_Obpf_Stdtime" and "EM_Obpf_Abs_Time" columns of "C_Order" table and set "true" in "Read Only Logic" field.
Save and do "ant smartbuild"
Go to Sales Order window
Notice that although the "Absolute Time" and "Relative Time" look like read-only, you can write in them
At this point I have not developed more tests. |
|
|
|
|
|
(0072569)
|
hgbot
|
2014-12-16 17:24
|
|
Repository: erp/devel/pi
Changeset: 87a7c215c8263c417f957a4f1672b90a69e475c2
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Tue Dec 16 17:23:54 2014 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/87a7c215c8263c417f957a4f1672b90a69e475c2 [^]
fixed bug 27670: time refrerence has no correct style when it is readonly
-refactored previous solution to be easier to extend:
-no hardcoded class references (OBTimeItem)
-using changeDefaults instead of modifying init method
-fixed editable field with readonly ui for readonly logic
---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-time.js
---
|
|
|
(0072636)
|
dbaz
|
2014-12-17 13:25
|
|
Tested @ changeset 25557 - 87a7c215c826 |
|
|
|
|
|
|
|
|
|
|
|
|
|