Openbravo Issue Tracking System - Retail Modules
View Issue Details
0031584Retail ModulesWeb POSpublic2015-11-25 18:172016-02-11 17:46
ioritzCia 
ranjith_qualiantech_com 
normalmajoralways
closedno change required 
5
 
 
marvintm
No
0031584: [SERQA 438] The obpos_print_template table should be included in the Client Definition dataset
The em_obpos_invoice_template_id column of the ad_org table references the obpos_print_template table.

The problem is that the ad_org table is included in the Client Definition dataset, but the obpos_print_template table is not. This will cause referencial integrity problems when importing a sample data that containes not null values in the em_obpos_invoice_template_id column of the ad_org table.
For any client:
- Add values to some rows in the em_obpos_invoice_template_id column of the ad_org table.
- export the sample data for that client:
ant export.sample.data -Dclient="YourClient" -Dmodule=org.openbravo
  this will generate a XML file for the ad_org that contains values for its em_obpos_invoice_template_id column, but it will not generate a XML file for the obpos_print_template table
- Import the sample data for that client, for instance by executing ant install.source. There will be referencial integrity problemes like these:

[java] 49497 WARN - SQL Command failed with: ERROR: insert or update on table "ad_org" violates foreign key constraint "em_obpos_org_invoicetemp"
     [java] Detail: Key (em_obpos_invoice_template_id)=(9C65D4A30C7E4842B65E071E127060CF) is not present in table "obpos_print_template".
     [java] 49499 WARN - -- END

SER-QA
Issue History
2015-11-25 18:17ioritzCiaNew Issue
2015-11-25 18:17ioritzCiaAssigned To => Retail
2015-11-25 18:17ioritzCiaTriggers an Emergency Pack => No
2015-12-01 11:47ageteTag Attached: SER-QA
2015-12-01 11:47ageteSummaryThe obpos_print_template table should be included in the Client Definition dataset => [SERQA 438]The obpos_print_template table should be included in the Client Definition dataset
2015-12-01 13:03ageteSummary[SERQA 438]The obpos_print_template table should be included in the Client Definition dataset => [SERQA 438] The obpos_print_template table should be included in the Client Definition dataset
2015-12-01 14:31OrekariaStatusnew => acknowledged
2016-01-13 14:28ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2016-01-13 14:28ranjith_qualiantech_comStatusacknowledged => scheduled
2016-01-14 13:59hgbotCheckin
2016-01-14 13:59hgbotNote Added: 0083300
2016-01-14 13:59hgbotStatusscheduled => resolved
2016-01-14 13:59hgbotResolutionopen => fixed
2016-01-14 13:59hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/4af994a4bc5b2929c9dff51ec51b3b7b317b843b [^]
2016-01-14 14:00hgbotCheckin
2016-01-14 14:00hgbotNote Added: 0083301
2016-02-05 13:20marvintmReview Assigned To => marvintm
2016-02-05 13:20marvintmStatusresolved => closed
2016-02-05 13:20marvintmFixed in Version => RR16Q2
2016-02-11 17:41hgbotCheckin
2016-02-11 17:41hgbotNote Added: 0084129
2016-02-11 17:44hgbotCheckin
2016-02-11 17:44hgbotNote Added: 0084130
2016-02-11 17:45marvintmStatusclosed => new
2016-02-11 17:45marvintmResolutionfixed => open
2016-02-11 17:45marvintmFixed in VersionRR16Q2 =>
2016-02-11 17:46marvintmNote Added: 0084131
2016-02-11 17:46marvintmStatusnew => closed
2016-02-11 17:46marvintmResolutionopen => no change required

Notes
(0083300)
hgbot   
2016-01-14 13:59   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 4af994a4bc5b2929c9dff51ec51b3b7b317b843b
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Thu Jan 14 18:29:04 2016 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/4af994a4bc5b2929c9dff51ec51b3b7b317b843b [^]

Fixes issue 31584 : Adding obpos_print_template table in Client definition dataset

---
M src-db/database/sourcedata/AD_DATASET_TABLE.xml
---
(0083301)
hgbot   
2016-01-14 14:00   
Repository: tools/automation/pi-mobile
Changeset: afc83636783659f8c12e3a1c9c423cdbcc354b65
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Thu Jan 14 18:29:01 2016 +0530
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/afc83636783659f8c12e3a1c9c423cdbcc354b65 [^]

Verifies issue 31584: Added automated test 'I31584_POSPrintTableIncludedInDataset'

---
A src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/system/I31584_POSPrintTableIncludedInDataset.java
---
(0084129)
hgbot   
2016-02-11 17:41   
Repository: tools/automation/pi-mobile
Changeset: a5cf84ffd521338ff1be428cba1fa55a9dcf9803
Author: Antonio Moreno Perez <antonio.moreno <at> openbravo.com>
Date: Thu Feb 11 17:41:23 2016 +0100
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/a5cf84ffd521338ff1be428cba1fa55a9dcf9803 [^]

Related to issue 31584. Removed automated test because it's not necessary.

---
R src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/system/I31584_POSPrintTableIncludedInDataset.java
---
(0084130)
hgbot   
2016-02-11 17:44   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: d0134cc6d84bc6ce8c203b12b81aec2258f91c72
Author: Antonio Moreno Perez <antonio.moreno <at> openbravo.com>
Date: Thu Feb 11 17:44:21 2016 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/d0134cc6d84bc6ce8c203b12b81aec2258f91c72 [^]

Related to issue 31584. Removed OBPOS_PRINT_TEMPLATE table from Client Definition dataset because this table is already included in the Application Dictionary, which is the right dataset for it.

---
M src-db/database/sourcedata/AD_DATASET_TABLE.xml
---
(0084131)
marvintm   
2016-02-11 17:46   
Finally this issue doesn't need to be fixed. The reason is that the table OBPOS_PRINT_TEMPLATE is already included in the dataset AD, and this is correct due to the fact that this table contains source information (in this case, printing template definitions) which should be exported to the sourcedata information of modules.

It is therefore not needed to export this information into the Client definition.