Openbravo Issue Tracking System - Localization Pack: Spain
View Issue Details
0057688Localization Pack: SpainTaxes Cash VATpublic2025-01-20 09:262025-01-20 10:57
vmromanos 
vmromanos 
normalmajoralways
scheduledopen 
5
 
 
2023-08-28
https://gitlab.com/openbravo/product/openbravo/-/merge_requests/943/diffs#dfcb656b875809f030e107076a23f4200f634fb3_152_152 [^]
Production - Confirmed Stable
0057688: es_ES Cash VAT dataset can't be applied into a fresh instance
In 0052639 a new mandatory column (VALUE) was added with an onCreateDefault = NAME.

However, the es_ES Cash VAT dataset wasn't adapted accordingly. Therefore, if you try to apply this dataset in a fresh instance after 0052639, it will fail because this dataset doesn't have the VALUE in the XML file.
In master, install the es_ES Cash VAT module.
As System Admin, go to Initial Client Setup, fill the mandatory fields. Select the es_ES Taxes datasets (normal and Cash VAT version). Try to create the client.

Several errors are thrown. Example:

ERROR org.hibernate.engine.jdbc.batch.internal.BatchingBatch - HHH000315: Exception executing batch

[java.sql.BatchUpdateException: Batch entry 0 insert into C_Tax (AD_Client_ID, AD_Org_ID, IsActive, Created, CreatedBy, Updated, Name, UpdatedBy, Description, ValidFrom, IsSummary, Rate, C_TaxCategory_ID, IsDefault, IsTaxExempt, SOPOType, Cascade, C_BP_TaxCategory_ID, Line, IsWithholdingTax, IsNoTaxable, IsTaxUndeductable, IsTaxDeductable, IsNoVAT, BaseAmount, DocTaxAmount, IsCashVAT, EM_Obspti_Isreversecharge, EM_OBSPTI_IsEquivalentCharge, EM_Obspti_Isintracommunity, EM_Obspti_Islease, EM_Obspti_Isrealestate, EM_Obspti_Reagyp, EM_Obspti_Isrebu, EM_Obspti_Isexport, EM_Obspti_Isimplicitcharge, C_Tax_ID) values (('03984EBF3CBB4FBDA84635B5237EAAAF'), ('0'), ('Y'), ('2025-01-17 14:27:31.946+01'), ('100'), ('2025-01-17 14:27:31.946+01'), ('Arrendamientos 21% -19%R (cobros) IVA de Caja'), ('100'), ('Arrendamientos 21% -19%R (cobros) IVA de Caja'), ('2016-01-01 00:00:00+01'), ('Y'), ('21'::numeric), ('FF80818123B7FC160123B804AB88000B'), ('N'), ('N'), ('S'), ('N'), ('3B5F9BA2DFC84061979E0C1A9AA9935E'), ('30'::int8), ('N'), ('N'), ('N'), ('N'), ('N'), ('LNA'), ('D'), ('Y'), ('N'), ('N'), ('N'), ('Y'), ('N'), ('N'), ('N'), ('N'), ('N'), ('F856C021A34E49F8A2E949EBCDC9CD27')) was aborted: ERROR: null value in column "value" violates not-null constraint
  Detail: Failing row contains (F856C021A34E49F8A2E949EBCDC9CD27, 03984EBF3CBB4FBDA84635B5237EAAAF, 0, Y, 2025-01-17 14:27:31.946, 100, 2025-01-17 14:27:31.946, Arrendamientos 21% -19%R (cobros) IVA de Caja, 100, Arrendamientos 21% -19%R (cobros) IVA de Caja, null, 2016-01-01 00:00:00, Y, 21, null, null, null, null, null, FF80818123B7FC160123B804AB88000B, N, N, S, N, 3B5F9BA2DFC84061979E0C1A9AA9935E, 30, N, N, null, null, N, N, N, LNA, null, D, Y, null, null, N, N, N, Y, N, N, N, N, N, null). Call getNextException to see other errors in the batch.], SQL: insert into C_Tax (AD_Client_ID, AD_Org_ID, IsActive, Created, CreatedBy, Updated, Name, UpdatedBy, Description, ValidFrom, IsSummary, Rate, C_TaxCategory_ID, IsDefault, IsTaxExempt, SOPOType, Cascade, C_BP_TaxCategory_ID, Line, IsWithholdingTax, IsNoTaxable, IsTaxUndeductable, IsTaxDeductable, IsNoVAT, BaseAmount, DocTaxAmount, IsCashVAT, EM_Obspti_Isreversecharge, EM_OBSPTI_IsEquivalentCharge, EM_Obspti_Isintracommunity, EM_Obspti_Islease, EM_Obspti_Isrealestate, EM_Obspti_Reagyp, EM_Obspti_Isrebu, EM_Obspti_Isexport, EM_Obspti_Isimplicitcharge, C_Tax_ID) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
No tags attached.
caused by feature request 0052639 closed jamie_reid Openbravo ERP It is required to add a unique identifier for each Tax Rate element in OB 
Issue History
2025-01-20 09:26vmromanosNew Issue
2025-01-20 09:26vmromanosAssigned To => vmromanos
2025-01-20 09:27vmromanosRegression date => 2023-08-28
2025-01-20 09:27vmromanosRegression introduced by commit => https://gitlab.com/openbravo/product/openbravo/-/merge_requests/943/diffs#dfcb656b875809f030e107076a23f4200f634fb3_152_152 [^]
2025-01-20 09:27vmromanosRegression level => Production - Confirmed Stable
2025-01-20 09:27vmromanosRelationship addedcaused by 0052639
2025-01-20 10:54hgbotNote Added: 0174373
2025-01-20 10:56vmromanosNote Added: 0174374
2025-01-20 10:57vmromanosStatusnew => scheduled

Notes
(0174373)
hgbot   
2025-01-20 10:54   
Merge Request created: https://gitlab.com/openbravo/product/mods/org.openbravo.localization.spain.referencedata.taxes.cashvat/-/merge_requests/2 [^]
(0174374)
vmromanos   
2025-01-20 10:56   
Test plan:

In master, install the es_ES Cash VAT module.
As System Admin, go to Initial Client Setup, fill the mandatory fields. Select the es_ES Taxes datasets (normal and Cash VAT version). Try to create the client.

It should work fine.