Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0007912Openbravo ERP00. Application dictionarypublic2009-03-03 11:172009-04-22 00:01
networkb 
alostale 
immediatemajoralways
closedfixed 
5
2.40 
2.50 
Core
No
0007912: Default values configured in some columns are not loaded when creating a new record
Some default values set in columns of the AD are not loaded when creating a new record.
1. Logged as System Administrator, set a default value of I in column InvoiceRule of table C_BPartner.
2. Log out as System Administrator and log into the application as Openbravo Admin.
3. Create a new Business Partner, save and navigate to Customer tab.
4. Check now that neither field Invoice Terms default value (Immediate) is loaded nor other fields in which a default value has been configured.
5. Click on new record, and now the default values are loaded, but record cannot be saved now.
No tags attached.
depends on backport 0007970 closed alostale Default values configured in some columns are not loaded when creating a new record 
Issue History
2009-03-03 11:17networkbNew Issue
2009-03-03 11:17networkbAssigned To => rafaroda
2009-03-03 11:17networkbRegression testing => No
2009-03-03 12:21rafarodaNote Added: 0014291
2009-03-03 12:21rafarodaPrioritynormal => immediate
2009-03-03 12:21rafarodaStatusnew => feedback
2009-03-03 12:21rafarodaSummaryDefault values configured in some tables are not loaded when creating a new record => Default values configured in some columns are not loaded when creating a new record
2009-03-03 12:21rafarodaDescription Updated
2009-03-03 12:21rafarodaProposed Solution updated
2009-03-04 12:36networkbNote Added: 0014381
2009-03-04 16:22rafarodaStatusfeedback => new
2009-03-04 16:43rafarodaAssigned Torafaroda => alostale
2009-03-04 16:43rafarodaStatusnew => acknowledged
2009-03-05 11:57rafarodaStatusacknowledged => scheduled
2009-03-05 11:57rafarodafix_in_branch => pi
2009-03-05 12:33alostaleNote Added: 0014434
2009-03-05 17:53jpabloaeStatusscheduled => resolved
2009-03-05 17:53jpabloaeFixed in Version => pi
2009-03-05 17:53jpabloaeFixed in SCM revision => https://code.openbravo.com/erp/d [^]
2009-03-05 17:53jpabloaeResolutionopen => fixed
2009-03-05 17:53jpabloaeFixed in SCM revisionhttps://code.openbravo.com/erp/d [^] => https://code.openbravo.com/erp/devel/pi/rev/fda1398e8788 [^]
2009-03-05 17:53jpabloaefix_in_branchpi =>
2009-04-21 10:33psarobeStatusresolved => closed
2009-04-22 00:01anonymoussf_bug_id0 => 2778040

Notes
(0014291)
rafaroda   
2009-03-03 12:21   
I disagree that this is a bug.

1) Please notice that, when entering Customer tab, the record is not created, it is already there. This happens because Customer tab is based on C_BPartner table. It is not a child table C_Customer.

2) If you create a new record, default values are correctly set in the corresponding fields. This confirms that the functionality of loading default values is working properly.

3) This new record can not be saved. This is normal since you can not record more than one Customer information (Invoice Terms, Invoice Schedule, ...) per Business Partner.

Please try to set default values in columns shown in a "normal" tab and let us know if it fails.
(0014381)
networkb   
2009-03-04 12:36   
I also disagree with you. For me it's clearly a bug.

Default values in a "normal" tab work fine. There's is no discussion about that, I was just talking about Customer tab (or other similar tabs)

1) For the customer, it should be transparent whether it is a child tab or not. This is not an explanation to him. Default values are configured, and the user does not see them, so he has to fill in again...

2) Creating a new record and checking that default values appear is useless for us just confirm the bug, if it cannot be stored as you confirm in point 3).
(0014434)
alostale   
2009-03-05 12:33   
Default values can be defined at database column level or in application dictionary.

When a default value is defined in application dictionary is only taken into account in case there is a field in the tab for the column with the default value, other case is not used and it is used the database's one in case it is defined. This is the current Openbravo ERP behavior and it is not going to be changed because it could affect to the expected behavior in some parts of the application.

To fix this bug I'm including in the Business Partner main tab all the fields as hidden which column has a default value but did not exist in the tab. They are:

InvoiceRule
Isworker
Invoicegrouping