Openbravo Issue Tracking System - Retail Modules
View Issue Details
0038687Retail ModulesAuto BOM For Retailpublic2018-06-01 14:092019-06-06 08:31
VictorVillar 
rqueralta 
urgentmajoralways
closedfixed 
5
 
RR18Q3 
marvintm
No
0038687: Autobom not working wth products that have attributes and if there is not stock.
Autobom not working wth products that have attributes and if there is not stock.
Install https://code.openbravo.com/erp/pmods/org.openbravo.retail.autobom [^] [^] module.

Login to Openbravo backoffice:
 * Go to Preference window and create a new preference for Property "Auto BOM: Allow negative stock in raw materials" with value "Y"
 * Go to "Lot Number Sequence" window and create a new record:
   - Name: LOT
   - Starting No: 100
   - Incremented By: 1
   - Next Assigned Number: 100
 * Go to "Attribute Set" window and create a new record:
   - Name: LOT
   - Lot flag checked.
   - Lot Control: LOT
 * Go to Product window and search "Mountain pack" product.
   - Check "Auto Generate BOM" property
   - Set "Attribute Set": Lot
   - In "Manufacturing" tab (In order to display this tab the instance needs to be active and "Apply configuration script" flag in Retail Template unchecked. After unchecking update.database is needed) add new record:
      * Organization: Vall Blanca Store
      * Storage Bin: VBS/001 0-0-0
 * Search "Europe mountains guide" product in Product window.
   - Set "Attribute Set": Lot

Login into Web POS:
  * Add "Mountain pack" product.
  * Pay and close the ticket.

Login into backoffice:
  * Open Errors While Importing window. The following error appears:

org.postgresql.util.PSQLException: ERROR: @20112@ - Mountain pack
    at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2433)
    at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2178)
    at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:479)
    at org.postgresql.jdbc.PgStatement.executeBatch(PgStatement.java:835)
    at org.postgresql.jdbc.PgPreparedStatement.executeBatch(PgPreparedStatement.java:1556)
    at sun.reflect.GeneratedMethodAccessor811.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.apache.tomcat.jdbc.pool.StatementFacade$StatementProxy.invoke(StatementFacade.java:138)
    at com.sun.proxy.$Proxy26.executeBatch(Unknown Source)
    at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:70)
    at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:268)
    at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:114)
    at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:109)
    at org.hibernate.jdbc.AbstractBatcher.prepareBatchStatement(AbstractBatcher.java:244)
    at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2411)
    at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2868)
    at org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:79)
    at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:273)
    at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:265)
    at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:184)
    at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
    at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:51)
    at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1216)
    at org.openbravo.dal.service.OBDal.flush(OBDal.java:262)
    at org.openbravo.dal.service.OBDal.getConnection(OBDal.java:187)
    at org.openbravo.dal.service.OBDal.getConnection(OBDal.java:171)
    at org.openbravo.dal.core.TriggerHandler.disable(TriggerHandler.java:64)
    at org.openbravo.retail.posterminal.OrderLoader.saveRecord(OrderLoader.java:288)
    at org.openbravo.mobile.core.process.DataSynchronizationProcess.saveRecord(DataSynchronizationProcess.java:200)
    at org.openbravo.mobile.core.process.DataSynchronizationProcess.exec(DataSynchronizationProcess.java:154)
    at org.openbravo.mobile.core.process.DataSynchronizationProcess.exec(DataSynchronizationProcess.java:86)
    at org.openbravo.mobile.core.process.MobileImportEntryProcessorRunnable.processEntry(MobileImportEntryProcessorRunnable.java:53)
    at org.openbravo.retail.posterminal.importprocess.OrderImportEntryProcessor$OrderLoaderRunnable.processEntry(OrderImportEntryProcessor.java:59)
    at org.openbravo.service.importprocess.ImportEntryProcessor$ImportEntryProcessRunnable.doRunCycle(ImportEntryProcessor.java:367)
    at org.openbravo.service.importprocess.ImportEntryProcessor$ImportEntryProcessRunnable.run(ImportEntryProcessor.java:288)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
The behaviour should be exactly the same as in regular retail: If there is no stock of a product that requires attributes the warehouse transaction generated in the m_transaction is created without att values.
No tags attached.
related to defect 0038583 closed rqueralta Retail Modules Orders having BOM products made by raw materials with attributes give a weird error while processing if there is no stock 
related to defect 0038685 closed collazoandy4 Openbravo ERP It is not possible to process a Physical Inventory for a product with attributes that has negative stock without attributes 
related to defect 0039120 closed rqueralta Retail Modules Order goes to Errors While Importing POS Data if the product is Auto Generate BOM and has a mandatory Attribute Set assigned 
causes defect 0044596 closed ranjith_qualiantech_com Retail Modules Wrong M_STORAGE_DETAIL table when using AutoBOM with attributes and no stock 
Issue History
2018-06-01 14:09VictorVillarNew Issue
2018-06-01 14:09VictorVillarAssigned To => Retail
2018-06-01 14:09VictorVillarTriggers an Emergency Pack => No
2018-06-01 14:12VictorVillarRelationship addedrelated to 0038583
2018-06-01 14:15maiteResolution time => 1529618400
2018-06-01 14:15maiteIssue Monitored: networkb
2018-06-01 14:16VictorVillarRelationship addedrelated to 0038685
2018-06-04 12:40martinsdanIssue Monitored: martinsdan
2018-06-06 00:05rqueraltaAssigned ToRetail => rqueralta
2018-06-06 00:05rqueraltaStatusnew => scheduled
2018-06-10 05:35hgbotCheckin
2018-06-10 05:35hgbotNote Added: 0105047
2018-06-10 05:35hgbotStatusscheduled => resolved
2018-06-10 05:35hgbotResolutionopen => fixed
2018-06-10 05:35hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.autobom/rev/9a7c5890f72671d0b362dc73e3a0a85e23ace0e9 [^]
2018-06-25 08:24marvintmReview Assigned To => marvintm
2018-06-25 08:24marvintmStatusresolved => closed
2018-06-25 08:24marvintmFixed in Version => RR18Q3
2018-09-03 11:09ngarciaRelationship addedrelated to 0039120
2019-06-05 15:02hgbotCheckin
2019-06-05 15:02hgbotNote Added: 0112423
2019-06-05 15:02hgbotStatusclosed => resolved
2019-06-05 15:02hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.retail.autobom/rev/9a7c5890f72671d0b362dc73e3a0a85e23ace0e9 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.autobom/rev/43dd593fac945b14f252e7683e1f05700c966135 [^]
2019-06-06 08:31marvintmStatusresolved => closed
2020-07-10 17:18gorkaionRelationship addedcauses 0044596

Notes
(0105047)
hgbot   
2018-06-10 05:35   
Repository: erp/pmods/org.openbravo.retail.autobom
Changeset: 9a7c5890f72671d0b362dc73e3a0a85e23ace0e9
Author: Rafael Queralta <rafaelcuba81 <at> gmail.com>
Date: Sat Jun 09 23:34:15 2018 -0400
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.autobom/rev/9a7c5890f72671d0b362dc73e3a0a85e23ace0e9 [^]

Fixed issue 38687: Autobom not working wth products that have attributes and if
there is not stock.

- If "Auto BOM Allow negative stock in raw materials" is enable, triggers are
disabled for Auto Generate BOM products with attributes set.

---
M src/org/openbravo/retail/autobom/BOMProcess.java
---
(0112423)
hgbot   
2019-06-05 15:02   
Repository: erp/pmods/org.openbravo.retail.autobom
Changeset: 43dd593fac945b14f252e7683e1f05700c966135
Author: Rafael Queralta <rafaelcuba81 <at> gmail.com>
Date: Sat Jun 09 23:34:15 2018 -0400
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.autobom/rev/43dd593fac945b14f252e7683e1f05700c966135 [^]

Fixed issue 38687: Autobom not working wth products that have attributes and if
there is not stock.

- If "Auto BOM Allow negative stock in raw materials" is enable, triggers are
disabled for Auto Generate BOM products with attributes set.

---
M src/org/openbravo/retail/autobom/process/BOMProcess.java
---