Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0019558Openbravo ERPA. Platformpublic2012-01-25 09:162013-08-16 20:31
jecharri 
alostale 
highminoralways
closedfixed 
5
pi 
3.0MP10 
Google Chrome
Core
No
0019558: The automatic sequence does not work in projects
The automatic sequence does not work in projects.
Exist the sequence "DocumentNo_C_Project" but it doesn't work when you create projects.
As Group Admin go to window "Multiphase Project":
-create one header and save it.
-create other header and save it.

The application must be fill the field "Search Key" with the sequence values.
No tags attached.
related to defect 0019741 closed alostale Wrong behavior when trying to edit part of the contents in a text field 
Issue History
2012-01-25 09:16jecharriNew Issue
2012-01-25 09:16jecharriAssigned To => alostale
2012-01-25 09:16jecharriWeb browser => Google Chrome
2012-01-25 09:16jecharriModules => Core
2012-01-25 09:16jecharriResolution time => 1334527200
2012-01-25 09:16jecharriWeb browserGoogle Chrome => Google Chrome
2012-01-25 09:16jecharriSummaryThe automatic sequence does not work in project => The automatic sequence does not work in projects
2012-01-25 09:16jecharriDescription Updatedbug_revision_view_page.php?rev_id=3094#r3094
2012-02-07 18:04alostaleNote Added: 0044921
2012-02-07 18:04alostaleNote Edited: 0044921bug_revision_view_page.php?bugnote_id=0044921#r3142
2012-02-10 09:55alostaleNote Added: 0044993
2012-02-10 10:04alostaleNote Added: 0044994
2012-02-10 10:04hgbotCheckin
2012-02-10 10:04hgbotNote Added: 0044995
2012-02-10 10:04hgbotStatusnew => resolved
2012-02-10 10:04hgbotResolutionopen => fixed
2012-02-10 10:04hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/510b3564269c3923619c2f2f68d3d2f194e90b4e [^]
2012-02-10 10:05hgbotCheckin
2012-02-10 10:05hgbotNote Added: 0044996
2012-02-14 10:55alostaleRelationship addedrelated to 0019741
2012-02-17 14:36iatienzaIssue Monitored: iatienza
2012-02-21 17:22marvintmStatusresolved => closed
2012-02-22 18:10hgbotCheckin
2012-02-22 18:10hgbotNote Added: 0045380
2012-03-02 15:35hudsonbotCheckin
2012-03-02 15:35hudsonbotNote Added: 0045794
2012-03-02 15:35hudsonbotCheckin
2012-03-02 15:35hudsonbotNote Added: 0045795
2012-03-02 15:38hudsonbotCheckin
2012-03-02 15:38hudsonbotNote Added: 0045927
2013-08-02 21:43hgbotCheckin
2013-08-02 21:43hgbotNote Added: 0060485
2013-08-16 20:31hudsonbotCheckin
2013-08-16 20:31hudsonbotNote Added: 0060617

Notes
(0044921)
alostale   
2012-02-07 18:04   
As discussed with DME.

2.50 implementation is:
-If the column is named DocumentNo, UI proposes document number and it is re-checked on backend at save. Backend checks value is null or starts and ends with < > symbols, in this case takes a new number, if not leaves the value.
-If column is named value (search key), backend validation is done, but not UI proposal is shown. If the column is mandatory (as almost all value columns are), UI prevents setting empty value, but as it is trimmed it can be workarounded by using a blank space.

Second case is very poorly implemented in 2.50, that's why it was not moved to 3.0.

After the discussion, we agreed on the fix for this issue will be:
-Create a new flag (UseAutomaticSequenceForValue) in column which will be seteable in case the column is named value.
-Only in case this flag is checked, automatic sequence will be used for value columns including UI proposal.
-Not to change current behavior, this flag will be defaulted to N.

(0044993)
alostale   
2012-02-10 09:55   
Note the fix adds the flag at column level, not field. This is because SetDocumentNoHandler class works with properties rather than fields to be able to work directly with DAL.

This has 2 implications:
1. This property is part of the in-memory model, so after changing it, tomcat needs to be restarted to reload it.
2. It affects to any tab for the table.
(0044994)
alostale   
2012-02-10 10:04   
This fix, modifies the way document numbers are proposed in UI and checked in backend. Though the changes are reduced, it affects an important OB component so it deserves to be carefully tested to avoid any unforeseen regression risk.

Test plan:

-Document numbers still work:
  *Create a new sales order, check document number is correctly proposed. Save it check it is properly set.
  *Create a new sales order, change document type check document number changes according with doc type. Save and check it is kept correctly.
  *Create a new sales invoice, check document number is correctly proposed. Save it check it is properly set.
  *Within 2 sessions open 2 new purchase order. Check in both proposed doc number is the same. Save the 2 new records. Check 1st one gets proposed number and 2nd one gets a new one.
  *Create a new purchase invoice. Close without save and create a new one again, check document number proposed for the 2nd one is the same as the one proposed for the 1st one as it has not finally used.

-New implementation works:
  *Set C_Project.Value column as uses automatic sequence and restart tomcat.
  *Create a new poject and check a sequence number based on sequence for c_project is proposed
  *Save it and create a new one, check following number is proposed.
  *Create a new project and edit search key to something else, save and check no sequence is used but the edited value is preserved.
(0044995)
hgbot   
2012-02-10 10:04   
Repository: erp/devel/pi
Changeset: 510b3564269c3923619c2f2f68d3d2f194e90b4e
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Fri Feb 10 09:39:21 2012 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/510b3564269c3923619c2f2f68d3d2f194e90b4e [^]

fixed bug 19558: automatic sequence does not work for value columns

  Added a new flag to column to determine wether value column should use
  automatic sequence.

---
M modules/org.openbravo.client.application/src/org/openbravo/client/application/event/SetDocumentNoHandler.java
M modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/UIDefinition.java
M src-db/database/model/tables/AD_COLUMN.xml
M src-db/database/sourcedata/AD_COLUMN.xml
M src-db/database/sourcedata/AD_ELEMENT.xml
M src-db/database/sourcedata/AD_FIELD.xml
M src/org/openbravo/base/model/Column.hbm.xml
M src/org/openbravo/base/model/Column.java
M src/org/openbravo/base/model/Property.java
---
(0044996)
hgbot   
2012-02-10 10:05   
Repository: erp/devel/pi
Changeset: 6aac6df296151f4a6b7e8050ac488c6b6b89e098
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Fri Feb 10 09:53:42 2012 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/6aac6df296151f4a6b7e8050ac488c6b6b89e098 [^]

related to bug 19558: updated ad_column with new property default

---
M modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_COLUMN.xml
M modules/org.openbravo.client.application/src-db/database/sourcedata/AD_COLUMN.xml
M modules/org.openbravo.client.kernel/src-db/database/sourcedata/AD_COLUMN.xml
M modules/org.openbravo.client.myob/src-db/database/sourcedata/AD_COLUMN.xml
M modules/org.openbravo.client.querylist/src-db/database/sourcedata/AD_COLUMN.xml
M modules/org.openbravo.service.datasource/src-db/database/sourcedata/AD_COLUMN.xml
M modules/org.openbravo.service.integration.google/src-db/database/sourcedata/AD_COLUMN.xml
M modules/org.openbravo.service.integration.openid/src-db/database/sourcedata/AD_COLUMN.xml
M modules/org.openbravo.userinterface.selector/src-db/database/sourcedata/AD_COLUMN.xml
M src-db/database/sourcedata/AD_COLUMN.xml
---
(0045380)
hgbot   
2012-02-22 18:10   
Repository: erp/devel/pi
Changeset: c7f713708ab9dfd40da31aa5842ec1857984357e
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Wed Feb 22 18:09:54 2012 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/c7f713708ab9dfd40da31aa5842ec1857984357e [^]

fixed bug 19741, related to issue 19558, related to issue 19844

  Reverting display logic in automatic sequence field added by 0019558
  because it was causing 0019741. This display logic should be set back
  once 0019844 is fixed.

---
M src-db/database/sourcedata/AD_FIELD.xml
---
(0045794)
hudsonbot   
2012-03-02 15:35   
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/544d64e0c159 [^]

Maturity status: Test
(0045795)
hudsonbot   
2012-03-02 15:35   
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/544d64e0c159 [^]

Maturity status: Test
(0045927)
hudsonbot   
2012-03-02 15: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/544d64e0c159 [^]

Maturity status: Test
(0060485)
hgbot   
2013-08-02 21:43   
Repository: erp/devel/pi
Changeset: aae683fdb69eaf0a28b472f5b34ec58225ad2461
Author: David Baz Fayos <david.baz <at> openbravo.com>
Date: Fri Aug 02 21:43:09 2013 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/aae683fdb69eaf0a28b472f5b34ec58225ad2461 [^]

Related to issue 19741, related to issue 19558, related to issue 19844

Added again display logic due that with Smartclient 2012-05-26
issue 19844 is fixed

---
M src-db/database/sourcedata/AD_FIELD.xml
---
(0060617)
hudsonbot   
2013-08-16 20:31   
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/59a1180e7f4f [^]

Maturity status: Test