Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
708 มุมมอง

I'm using flutter's odoo_rpc. I've created a custom model, and want to create a new incident with this "create" method:

try{

​final result = await _client.callKw({

​'model': 'x_fires',

​'method': 'create',

​'args': [

​{

​'x_manager_id': responsible,

​'x_visitors': visitorListId,

​'x_employees': employeeListId

​}

​],

​'kwargs': {},

​});


​if (result != -1){

​final test = await _client.callKw({

​'model': 'x_fires',

​'method': 'search_read',

​'args': [],

​'kwargs': {

​​'fields': [],

​},

​});

​return Fire(result, employeeMap, visitorMap);

​}else{

​return Incident.failure();

​}

}


"result" increments every time I call this create method, implying that it is successfully creating the entry and appending it to the model. However, "test" always returns an empty map when I call the "search_read" method. The catch part of this try catch clause catches nothing, the debug console reveals no errors, and other odoo calls works perfectly fine so it can't be a connection issue.

The only problems I can think of are something to do with the custom model, but I don't know where to start looking.

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
2
ก.พ. 20
4159
1
พ.ย. 23
2204
3
พ.ย. 24
29958
0
เม.ย. 24
1916
1
ธ.ค. 21
2722