Index was outside the bounds of the array

Topics: OpenErpNet Connector
Apr 4, 2014 at 9:57 AM
To recover pricelist_id , following definition:

function : _fnct_read
digits : [16,2]
domain : []
fnct_inv : _fnct_write
fnct_inv_arg: false
fnct_search : false
relation : product.pricelist
context : {}
type : many2one
store : false
string : Pricelist

I used the following command :

[OpenErpMap("pricelist_id")]
public int pricelist_id { get; set; }

I've received the following exception IndexOutOfRangeException, Index was outside the bounds of the array.

What is the solution?

Thanks.
Coordinator
Apr 4, 2014 at 4:10 PM
I need more info.

What entity are you trying to recover? producs? and then for each product its productlist_id?

Please, give me more info/code so i can reproduce error.

thanks
Apr 4, 2014 at 5:20 PM
This is my class :
        [OpenErpMap("product.product")]
        public class product_product
        {
                [OpenErpMap("pricelist_id")]
                public Int32[] pricelist_id { get; set; }
        }
this is the code how i use OpenErpService :
        OpenErpService openErpService = new OpenErpService("http://mydomain", "database", "user", "pwd");

        IEnumerable<product_product> prod = openErpService.GetEntities<product_product>(a => true);
Coordinator
Apr 4, 2014 at 6:26 PM
Thanks!

Now i can reproduce error so i will try to give you an answer ASAP.
Coordinator
Apr 14, 2014 at 8:48 PM
Edited Apr 14, 2014 at 8:48 PM
This bug is fixed on latest release, please download checks if its work.
Apr 25, 2014 at 2:57 PM
Perfect !