Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0055021
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 02. Master data managementminoralways2024-03-20 20:572024-04-24 14:04
ReportersdossantosView Statuspublic 
Assigned Togonzalo_fernandez 
PrioritynormalResolutionopenFixed in Version
StatusscheduledFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0055021: Error with computed image column

DescriptionIf 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 Reproduce1- 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());
TagsNo 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
Powered by Mantis Bugtracker