Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0008941 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Openbravo ERP] Z. Others | critical | always | 2009-05-07 10:08 | 2009-05-26 00:00 | |||
Reporter | shor123 | View Status | public | |||||
Assigned To | mtaal | |||||||
Priority | normal | Resolution | fixed | Fixed in Version | ||||
Status | closed | Fix in branch | pi | Fixed in SCM revision | 5f951b435044 | |||
Projection | none | ETA | none | Target Version | ||||
OS | Linux 32 bit | Database | PostgreSQL | Java version | 1.6.0_11 | |||
OS Version | rPath Linux | Database version | 8.3.5 | Ant version | 1.7.1 | |||
Product Version | SCM revision | |||||||
Merge Request Status | ||||||||
Review Assigned To | ||||||||
OBNetwork customer | No | |||||||
Web browser | ||||||||
Modules | Core | |||||||
Support ticket | ||||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0008941: Importing (via DAL) MaterialMgmtMaterialTransaction with AttributeSet id=0 fails | |||||||
Description | When POSTing a MaterialMgmtMaterialTransaction to the corresponding resource of the DAL, the AttributeSet Element is mandatory. If the AttributeSet is defined using "id=0" the import fails. This may be due to the fact that the STANDARD attribute set is not made active (according to gorkaion, mtaal). When a MaterialMgmtMaterialTransaction is GET using the corresponding resource, is has an AttributeSet Element with id=0. | |||||||
Steps To Reproduce | Post the following XMLs (IDs of business objects (e.g. businessPartner/Products etc.) need to exist): <ns0:Openbravo xmlns:ns0="http://www.openbravo.com"><MaterialMgmtShipmentInOut [^] id="2009050101AT"> <id>2009050101AT</id> <active>true</active> <salesTransaction>false</salesTransaction> <documentNo>LIAT0905-01</documentNo> <documentAction>--</documentAction> <documentStatus>CO</documentStatus> <posted>N</posted> <processNow>false</processNow> <processed>false</processed> <documentType id="1000001" /> <description /> <salesOrder /> <orderDate /> <print>false</print> <movementType>V+</movementType> <movementDate>2009-05-01T00:00:00.0Z</movementDate> <accountingDate>2009-05-01T00:00:00.0Z</accountingDate> <businessPartner id="1000000" /> <partnerAddress id="1000000" /> <warehouse id="1000000" /> <orderReference /> <deliveryTerms>A</deliveryTerms> <freightCostRule>I</freightCostRule> <freightAmount>0.00</freightAmount> <deliveryMethod>P</deliveryMethod> <shippingCompany /> <charge /> <chargeAmount>0.00</chargeAmount> <priority>5</priority> <datePrinted /> <invoice /> <createLinesFrom>false</createLinesFrom> <generateTo>false</generateTo> <userContact /> <salesRepresentative /> <numberOfPackages /> <pickDate /> <shipDate /> <trackingNo /> <trxOrganization /> <project /> <salesCampaign /> <activity /> <stDimension /> <ndDimension /> <updateLines>false</updateLines> <logistic>false</logistic> <generateLines>false</generateLines> <calculateFreight>false</calculateFreight> <deliveryLocation /> <freightCategory /> <freightCurrency /> </MaterialMgmtShipmentInOut> </ns0:Openbravo> <ns0:Openbravo xmlns:ns0="http://www.openbravo.com"><MaterialMgmtShipmentInOutLine [^] id="2009050101AT"> <id>2009050101AT</id> <active>true</active> <lineNo>10</lineNo> <description /> <shipmentReceipt id="2009050101AT" /> <salesOrderLine /> <storageBin id="1000000" /> <product id="1000000" /> <uOM id="100" /> <movementQuantity>450</movementQuantity> <reinvoice>false</reinvoice> <attributeSetValue /> <descriptionOnly>false</descriptionOnly> <orderQuantity /> <orderUOM /> </MaterialMgmtShipmentInOutLine> </ns0:Openbravo> <ns0:Openbravo xmlns:ns0="http://www.openbravo.com"><MaterialMgmtMaterialTransaction [^] id="2009050101AT"> <id>2009050101AT</id> <active>true</active> <movementType>V+</movementType> <storageBin id="1000000" /> <product id="1000000" /> <movementDate>2009-05-01T00:00:00.0Z</movementDate> <movementQuantity>450</movementQuantity> <physicalInventoryLine /> <movementLine /> <goodsShipmentLine id="2009050101AT" /> <productionLine /> <projectIssue /> <attributeSetValue id="0" /> <orderUOM /> <orderQuantity /> <uOM id="100" /> <internalConsumptionLine /> </MaterialMgmtMaterialTransaction> </ns0:Openbravo> This leads to the following response (The XMLs were POSTes using the Poster Firefox plug-in): <error><message>org.openbravo.service.web.InvalidContentException: Exception when parsing entity MaterialMgmtMaterialTransaction (2009050101AT):Entity AttributeSetInstance with id 0 not found Referenced object MaterialMgmtMaterialTransaction (id: 2009050101AT) not present in the xml or in the database. Caused by: Exception when parsing entity MaterialMgmtMaterialTransaction (2009050101AT):Entity AttributeSetInstance with id 0 not found Referenced object MaterialMgmtMaterialTransaction (id: 2009050101AT) not present in the xml or in the database.</message></error> | |||||||
Proposed Solution | Making STANDARD attribute set active? I do not know if this has any side-effects... | |||||||
Tags | No tags attached. | |||||||
Attached Files | ![]() | |||||||
![]() |
|
![]() |
|
(0016124) mtaal (viewer) 2009-05-07 11:49 |
To give an update I debugged this further, the issue is the following: attributesetinstance is a table with accesslevel client/organization when importing xml the REST/XML entityresolver therefore searches on client != 0 and org != 0 but not on system level (client=0, org=0) This special record however has client=0 and org=0. The solution is a oneliner, which means that the entityresolver will also search on system level in case of client/org accesslevel. I will probably check in the solution in the afternoon, after some open minor questions have been discussed internally. |
(0016135) shor123 (viewer) 2009-05-07 15:30 |
Hi Martin, thank you for your work! If you fixed the issue could you upload a diff file (or send it to me by e-Mail?) so that I can apply the patch to my Openbravo? Regards, shor123 |
(0016137) mtaal (viewer) 2009-05-07 15:33 |
The patch is attached, note that I did not yet commit this to Mercurial, the eventual solution may differ from this one (but not much). gr. Martin |
(0016139) shor123 (viewer) 2009-05-07 16:06 |
Cool! :-) Thanks! |
(0016163) hgbot (developer) 2009-05-08 07:06 |
Repository: erp/devel/pi Changeset: 5f951b4350446c027e97acff7530d64f89fe4d1e Author: Martin Taal <martin.taal <at> openbravo.com> Date: Fri May 08 07:06:16 2009 +0200 URL: http://code.openbravo.com/erp/devel/pi/rev/5f951b4350446c027e97acff7530d64f89fe4d1e [^] fixes issue 8941: Importing (via DAL) MaterialMgmtMaterialTransaction with AttributeSet id=0 fails --- M src/org/openbravo/dal/xml/EntityResolver.java --- |
![]() |
|||
Date Modified | Username | Field | Change |
2009-05-07 10:08 | shor123 | New Issue | |
2009-05-07 10:08 | shor123 | Assigned To | => rafaroda |
2009-05-07 10:11 | rafaroda | Assigned To | rafaroda => mtaal |
2009-05-07 10:29 | psarobe | Status | new => scheduled |
2009-05-07 10:29 | psarobe | fix_in_branch | => pi |
2009-05-07 11:49 | mtaal | Note Added: 0016124 | |
2009-05-07 15:30 | shor123 | Note Added: 0016135 | |
2009-05-07 15:33 | mtaal | File Added: mt_trans.patch | |
2009-05-07 15:33 | mtaal | Note Added: 0016137 | |
2009-05-07 16:06 | shor123 | Note Added: 0016139 | |
2009-05-08 07:06 | hgbot | Checkin | |
2009-05-08 07:06 | hgbot | Note Added: 0016163 | |
2009-05-08 07:06 | hgbot | Status | scheduled => resolved |
2009-05-08 07:06 | hgbot | Resolution | open => fixed |
2009-05-08 07:06 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/5f951b4350446c027e97acff7530d64f89fe4d1e [^] |
2009-05-25 19:27 | psarobe | Status | resolved => closed |
2009-05-26 00:00 | anonymous | sf_bug_id | 0 => 2796602 |
Copyright © 2000 - 2009 MantisBT Group |