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

View Revisions: Issue #17008 All Revisions ] Back to Issue ]
Summary 0017008: Not possible to set a column different to the ID with OBUISEL selectors
Revision 2011-05-11 14:01 by AinhoaPagola
Steps To Reproduce * To test this issue at least 2 products are needed. This products must have an Attribute set. And some transactions with these products are needed. For example, "vino tinto" and "vino blanco".

1) Create a new selector as defined in [1]
- In Defined Selector tab set:
  * Table: "M_transaction"
  * HQL where clause: e.attributeSetValue!='0'
- In Defined Selector Field create 4 new fields:
  * Movement date - Property: movementDate
  * Identificator - Property: _identifier
  * Attribute - Property: attributeSetValue
  * Article - Property: product. Default Expresion: OB.getParameters().get('inpmProductId'). With this default expresion, the filter should show only the attributes of the selected product.
For all the fileds check central maintenance, sortable, filtable and show in grid.

2) Go to Tables and Columns and select OrderLine table.
- Select M_AttributeSetInstance_ID column and change its reference to OBUISEL_Selector Reference.
- Set Reference Serach Key to the new selector.

3) Change to Admin rol. Go to Saler Order. Create a new header. Create a new line selecting the product "vino tinto". The attribute selector will be displayed. Select one of the records. Try to save the line.

Note: If in Reference | Defined Selector, the field "value" is blank, the user will be able to select a value and try to save. An error will be displayed. It says that the Foreing Key is not respected (because the ID of the transaction is been inserted in the attribute field!)
Instead, if the attribute field of the selector is chosen in the "value field", the user won't be able to even select a value, as it wil be reseted to blanck even after choosing one.


[1] http://wiki.openbravo.com/wiki/Projects/Selector/Developers_Manual#Step_1:_Define_a_Reference [^] [^]
Revision 2011-05-05 10:27 by AinhoaPagola
Steps To Reproduce * To test this issue at least 2 products are needed. This products must have an Attribute set. And some transactions with these products are needed. For example, "vino tinto" and "vino blanco".

1) Create a new selector as defined in [1]
- In Defined Selector tab set:
  * Table: "M_transaction"
  * HQL where clause: e.attributeSetValue!='0'
- In Defined Selector Field create 4 new fields:
  * Movement date - Property: movementDate
  * Identificator - Property: _identifier
  * Attribute - Property: attributeSetValue
  * Article - Property: product. Default Expresion: OB.getParameters().get('inpmProductId'). With this default expresion, the filter should show only the attributes of the selected product.
For all the fileds check central maintenance, sortable, filtable and show in grid.

2) Go to Tables and Columns and select OrderLine table.
- Select M_AttributeSetInstance_ID column and change its reference to OBUISEL_Selector Reference.
- Set Reference Serach Key to the new selector.

3) Change to Admin rol. Go to Saler Order. Create a new header. Create a new line selecting the product "vino tinto". The attribute selector will be displayed. Select one of the records. Try to save the line.

[1] http://wiki.openbravo.com/wiki/Projects/Selector/Developers_Manual#Step_1:_Define_a_Reference [^] [^]


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker