Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||||||
ID | ||||||||||||
0055021 | ||||||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||||||
defect | [Openbravo ERP] 02. Master data management | minor | always | 2024-03-20 20:57 | 2024-04-24 14:04 | |||||||
Reporter | sdossantos | View Status | public | |||||||||
Assigned To | gonzalo_fernandez | |||||||||||
Priority | normal | Resolution | open | Fixed in Version | ||||||||
Status | scheduled | Fix in branch | Fixed in SCM revision | |||||||||
Projection | none | ETA | none | Target Version | ||||||||
OS | Any | Database | Any | Java version | ||||||||
OS Version | Database version | Ant version | ||||||||||
Product Version | SCM revision | |||||||||||
Review Assigned To | ||||||||||||
Web browser | ||||||||||||
Modules | Core | |||||||||||
Regression level | ||||||||||||
Regression date | ||||||||||||
Regression introduced in release | ||||||||||||
Regression introduced by commit | ||||||||||||
Triggers an Emergency Pack | No | |||||||||||
Summary | 0055021: Error with computed image column | |||||||||||
Description | If I create a computed image column, an error is generated. When a modification is performed, the RemoveImagesEventHandler event is triggered and it tries to recover a property that does not exist in the database, returning an error. The problem is that the ModelProvider is uploading all the ADImage properties without taking into account whether they are computed or not. | |||||||||||
Steps To Reproduce | 1- Create a computed column in c_orderline to see the product image. Example: (select m_product.ad_image_id from m_product where m_product.m_product_id = M_product_ID) Use it creating a field for the Sales Order window and opening it (you would see the error). | |||||||||||
Proposed Solution | --- a/src/org/openbravo/base/model/ModelProvider.java 2022-03-01 14:20:59.000000000 +0100 +++ b/src/org/openbravo/base/model/ModelProvider.java 2024-03-20 11:53:19.183266000 +0100 @@ -338,8 +338,10 @@ if (p.getReferencedProperty() != null) { Entity referencedEntity = p.getReferencedProperty().getEntity(); if ("ADImage".equals(referencedEntity.getName())) { - entitiesWithImage.computeIfAbsent(p.getEntity(), k -> new ArrayList<>()) - .add(p.getName()); + if (!p.isComputedColumn()) { + entitiesWithImage.computeIfAbsent(p.getEntity(), k -> new ArrayList<>()) + .add(p.getName()); + } } else if ("OBPRF_FILE".equals(referencedEntity.getName())) { entitiesWithFile.computeIfAbsent(p.getEntity(), k -> new ArrayList<>()) .add(p.getName()); | |||||||||||
Tags | No tags attached. | |||||||||||
Attached Files | ||||||||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | |
Notes | |
(0163008) AugustoMauch (manager) 2024-04-10 09:15 |
Hello, could you rephrase a little the steps to reproduce? "And use it - you can see the error" -> I would like to know what do you mean by "use it", and it would be useful if you could paste the error message |
(0163658) hgbot (developer) 2024-04-24 13:38 |
Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/1214 [^] |
Issue History | |||
Date Modified | Username | Field | Change |
2024-03-20 20:57 | sdossantos | New Issue | |
2024-03-20 20:57 | sdossantos | Assigned To | => Triage Omni OMS |
2024-03-20 20:57 | sdossantos | Modules | => Core |
2024-03-20 20:57 | sdossantos | Triggers an Emergency Pack | => No |
2024-03-20 21:03 | Practics | Issue Monitored: Practics | |
2024-03-21 10:56 | aferraz | Assigned To | Triage Omni OMS => Triage Platform Base |
2024-04-10 09:15 | AugustoMauch | Note Added: 0163008 | |
2024-04-10 09:15 | AugustoMauch | Status | new => feedback |
2024-04-24 09:58 | AugustoMauch | Assigned To | Triage Platform Base => gonzalo_fernandez |
2024-04-24 13:38 | hgbot | Note Added: 0163658 | |
2024-04-24 14:04 | gonzalo_fernandez | Status | feedback => scheduled |
2024-04-24 14:04 | gonzalo_fernandez | Summary | Error with computed image field => Error with computed image column |
2024-04-24 14:04 | gonzalo_fernandez | Description Updated | View Revisions |
2024-04-24 14:04 | gonzalo_fernandez | Steps to Reproduce Updated | View Revisions |
Copyright © 2000 - 2009 MantisBT Group |