TypeError int object is not iterable

Bug #1835256 reported by Konstantin Malenko
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Web Client
New
Undecided
Unassigned

Bug Description

I used Read method on res.partners with array of IDs and in response I got an unexpected error.
Bellow you can find request and response as raw text.

REQUEST:

POST https://toronto-diner.odoo.com/xmlrpc/2/object HTTP/1.1
Connection: Keep-Alive
Content-Type: text/xml; charset=utf-8
Content-Length: 18965
Host: toronto-diner.odoo.com

<methodCall xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <methodName>execute_kw</methodName>
  <params>
    <param>
      <value>
        <string>toronto-diner</string>
      </value>
    </param>
    <param>
      <value>
        <int>6</int>
      </value>
    </param>
    <param>
      <value>
        <string>**********</string>
      </value>
    </param>
    <param>
      <value>
        <string>res.partner</string>
      </value>
    </param>
    <param>
      <value>
        <string>read</string>
      </value>
    </param>
    <param>
      <value>
        <array>
          <data>
            <value>
              <int>94</int>
            </value>
            <value>
              <int>104</int>
            </value>
            <value>
              <int>16</int>
            </value>
            <value>
              <int>74</int>
            </value>
            <value>
              <int>48</int>
            </value>
            <value>
              <int>26</int>
            </value>
            <value>
              <int>36</int>
            </value>
            <value>
              <int>66</int>
            </value>
            <value>
              <int>27</int>
            </value>
            <value>
              <int>72</int>
            </value>
            <value>
              <int>61</int>
            </value>
            <value>
              <int>65</int>
            </value>
            <value>
              <int>9</int>
            </value>
            <value>
              <int>73</int>
            </value>
            <value>
              <int>14</int>
            </value>
            <value>
              <int>19</int>
            </value>
            <value>
              <int>69</int>
            </value>
            <value>
              <int>114</int>
            </value>
            <value>
              <int>89</int>
            </value>
            <value>
              <int>82</int>
            </value>
            <value>
              <int>85</int>
            </value>
            <value>
              <int>99</int>
            </value>
            <value>
              <int>23</int>
            </value>
            <value>
              <int>24</int>
            </value>
            <value>
              <int>17</int>
            </value>
            <value>
              <int>109</int>
            </value>
            <value>
              <int>29</int>
            </value>
            <value>
              <int>55</int>
            </value>
            <value>
              <int>42</int>
            </value>
            <value>
              <int>43</int>
            </value>
            <value>
              <int>60</int>
            </value>
            <value>
              <int>87</int>
            </value>
            <value>
              <int>44</int>
            </value>
            <value>
              <int>40</int>
            </value>
            <value>
              <int>91</int>
            </value>
            <value>
              <int>86</int>
            </value>
            <value>
              <int>107</int>
            </value>
            <value>
              <int>56</int>
            </value>
            <value>
              <int>111</int>
            </value>
            <value>
              <int>101</int>
            </value>
            <value>
              <int>49</int>
            </value>
            <value>
              <int>45</int>
            </value>
            <value>
              <int>92</int>
            </value>
            <value>
              <int>47</int>
            </value>
            <value>
              <int>15</int>
            </value>
            <value>
              <int>78</int>
            </value>
            <value>
              <int>75</int>
            </value>
            <value>
              <int>18</int>
            </value>
            <value>
              <int>76</int>
            </value>
            <value>
              <int>112</int>
            </value>
            <value>
              <int>77</int>
            </value>
            <value>
              <int>59</int>
            </value>
            <value>
              <int>58</int>
            </value>
            <value>
              <int>67</int>
            </value>
            <value>
              <int>115</int>
            </value>
            <value>
              <int>81</int>
            </value>
            <value>
              <int>80</int>
            </value>
            <value>
              <int>100</int>
            </value>
            <value>
              <int>22</int>
            </value>
            <value>
              <int>98</int>
            </value>
            <value>
              <int>110</int>
            </value>
            <value>
              <int>8</int>
            </value>
            <value>
              <int>30</int>
            </value>
            <value>
              <int>83</int>
            </value>
            <value>
              <int>90</int>
            </value>
            <value>
              <int>52</int>
            </value>
            <value>
              <int>84</int>
            </value>
            <value>
              <int>38</int>
            </value>
            <value>
              <int>105</int>
            </value>
            <value>
              <int>57</int>
            </value>
            <value>
              <int>39</int>
            </value>
            <value>
              <int>62</int>
            </value>
            <value>
              <int>37</int>
            </value>
            <value>
              <int>46</int>
            </value>
            <value>
              <int>103</int>
            </value>
            <value>
              <int>93</int>
            </value>
            <value>
              <int>12</int>
            </value>
            <value>
              <int>102</int>
            </value>
            <value>
              <int>68</int>
            </value>
            <value>
              <int>108</int>
            </value>
            <value>
              <int>10</int>
            </value>
            <value>
              <int>71</int>
            </value>
            <value>
              <int>7</int>
            </value>
            <value>
              <int>79</int>
            </value>
            <value>
              <int>21</int>
            </value>
            <value>
              <int>96</int>
            </value>
            <value>
              <int>95</int>
            </value>
            <value>
              <int>106</int>
            </value>
            <value>
              <int>70</int>
            </value>
            <value>
              <int>113</int>
            </value>
            <value>
              <int>3</int>
            </value>
            <value>
              <int>1</int>
            </value>
            <value>
              <int>20</int>
            </value>
            <value>
              <int>63</int>
            </value>
            <value>
              <int>53</int>
            </value>
            <value>
              <int>88</int>
            </value>
            <value>
              <int>35</int>
            </value>
            <value>
              <int>34</int>
            </value>
            <value>
              <int>31</int>
            </value>
            <value>
              <int>11</int>
            </value>
            <value>
              <int>41</int>
            </value>
            <value>
              <int>33</int>
            </value>
            <value>
              <int>64</int>
            </value>
            <value>
              <int>32</int>
            </value>
            <value>
              <int>13</int>
            </value>
            <value>
              <int>50</int>
            </value>
            <value>
              <int>25</int>
            </value>
            <value>
              <int>28</int>
            </value>
            <value>
              <int>54</int>
            </value>
            <value>
              <int>51</int>
            </value>
            <value>
              <int>97</int>
            </value>
          </data>
        </array>
      </value>
    </param>
    <param>
      <value>
        <struct>
          <member>
            <name>fields</name>
            <value>
              <array>
                <data>
                  <value>
                    <string>property_account_payable_id</string>
                  </value>
                  <value>
                    <string>property_account_receivable_id</string>
                  </value>
                  <value>
                    <string>active</string>
                  </value>
                  <value>
                    <string>activity_date_deadline</string>
                  </value>
                  <value>
                    <string>activity_summary</string>
                  </value>
                  <value>
                    <string>activity_type_id</string>
                  </value>
                  <value>
                    <string>activity_user_id</string>
                  </value>
                  <value>
                    <string>additional_info</string>
                  </value>
                  <value>
                    <string>barcode</string>
                  </value>
                  <value>
                    <string>city</string>
                  </value>
                  <value>
                    <string>color</string>
                  </value>
                  <value>
                    <string>comment</string>
                  </value>
                  <value>
                    <string>commercial_company_name</string>
                  </value>
                  <value>
                    <string>commercial_partner_id</string>
                  </value>
                  <value>
                    <string>company_id</string>
                  </value>
                  <value>
                    <string>company_name</string>
                  </value>
                  <value>
                    <string>country_id</string>
                  </value>
                  <value>
                    <string>create_date</string>
                  </value>
                  <value>
                    <string>create_uid</string>
                  </value>
                  <value>
                    <string>credit</string>
                  </value>
                  <value>
                    <string>credit_limit</string>
                  </value>
                  <value>
                    <string>customer</string>
                  </value>
                  <value>
                    <string>date</string>
                  </value>
                  <value>
                    <string>debit</string>
                  </value>
                  <value>
                    <string>debit_limit</string>
                  </value>
                  <value>
                    <string>display_name</string>
                  </value>
                  <value>
                    <string>email</string>
                  </value>
                  <value>
                    <string>employee</string>
                  </value>
                  <value>
                    <string>function</string>
                  </value>
                  <value>
                    <string>id</string>
                  </value>
                  <value>
                    <string>industry_id</string>
                  </value>
                  <value>
                    <string>invoice_warn_msg</string>
                  </value>
                  <value>
                    <string>is_blacklisted</string>
                  </value>
                  <value>
                    <string>is_company</string>
                  </value>
                  <value>
                    <string>last_time_entries_checked</string>
                  </value>
                  <value>
                    <string>message_bounce</string>
                  </value>
                  <value>
                    <string>message_has_error</string>
                  </value>
                  <value>
                    <string>message_is_follower</string>
                  </value>
                  <value>
                    <string>message_main_attachment_id</string>
                  </value>
                  <value>
                    <string>message_needaction</string>
                  </value>
                  <value>
                    <string>mobile</string>
                  </value>
                  <value>
                    <string>name</string>
                  </value>
                  <value>
                    <string>ocn_token</string>
                  </value>
                  <value>
                    <string>online_partner_bank_account</string>
                  </value>
                  <value>
                    <string>online_partner_vendor_name</string>
                  </value>
                  <value>
                    <string>parent_id</string>
                  </value>
                  <value>
                    <string>parent_name</string>
                  </value>
                  <value>
                    <string>partner_gid</string>
                  </value>
                  <value>
                    <string>partner_share</string>
                  </value>
                  <value>
                    <string>phone</string>
                  </value>
                  <value>
                    <string>property_account_position_id</string>
                  </value>
                  <value>
                    <string>property_payment_term_id</string>
                  </value>
                  <value>
                    <string>property_supplier_payment_term_id</string>
                  </value>
                  <value>
                    <string>ref</string>
                  </value>
                  <value>
                    <string>sale_warn_msg</string>
                  </value>
                  <value>
                    <string>signup_expiration</string>
                  </value>
                  <value>
                    <string>signup_token</string>
                  </value>
                  <value>
                    <string>signup_type</string>
                  </value>
                  <value>
                    <string>state_id</string>
                  </value>
                  <value>
                    <string>street</string>
                  </value>
                  <value>
                    <string>street2</string>
                  </value>
                  <value>
                    <string>supplier</string>
                  </value>
                  <value>
                    <string>team_id</string>
                  </value>
                  <value>
                    <string>title</string>
                  </value>
                  <value>
                    <string>user_id</string>
                  </value>
                  <value>
                    <string>vat</string>
                  </value>
                  <value>
                    <string>website</string>
                  </value>
                  <value>
                    <string>write_date</string>
                  </value>
                  <value>
                    <string>write_uid</string>
                  </value>
                  <value>
                    <string>zip</string>
                  </value>
                  <value>
                    <string>__last_update</string>
                  </value>
                  <value>
                    <string>bank_account_count</string>
                  </value>
                  <value>
                    <string>contact_address</string>
                  </value>
                  <value>
                    <string>contracts_count</string>
                  </value>
                  <value>
                    <string>currency_id</string>
                  </value>
                  <value>
                    <string>email_formatted</string>
                  </value>
                  <value>
                    <string>has_unreconciled_entries</string>
                  </value>
                  <value>
                    <string>im_status</string>
                  </value>
                  <value>
                    <string>journal_item_count</string>
                  </value>
                  <value>
                    <string>message_attachment_count</string>
                  </value>
                  <value>
                    <string>message_has_error_counter</string>
                  </value>
                  <value>
                    <string>message_needaction_counter</string>
                  </value>
                  <value>
                    <string>message_unread</string>
                  </value>
                  <value>
                    <string>message_unread_counter</string>
                  </value>
                  <value>
                    <string>payment_token_count</string>
                  </value>
                  <value>
                    <string>property_product_pricelist</string>
                  </value>
                  <value>
                    <string>sale_order_count</string>
                  </value>
                  <value>
                    <string>self</string>
                  </value>
                  <value>
                    <string>signup_url</string>
                  </value>
                  <value>
                    <string>signup_valid</string>
                  </value>
                  <value>
                    <string>total_invoiced</string>
                  </value>
                  <value>
                    <string>tz_offset</string>
                  </value>
                </data>
              </array>
            </value>
          </member>
        </struct>
      </value>
    </param>
  </params>
</methodCall>

RESPONSE:

HTTP/1.1 200 OK
Server: nginx/1.14.0
Date: Wed, 03 Jul 2019 12:14:08 GMT
Content-Type: text/xml; charset=utf-8
Content-Length: 1741
Connection: keep-alive
X-Content-Type-Options: nosniff

<?xml version='1.0'?>
<methodResponse>
<fault>
<value><struct>
<member>
<name>faultCode</name>
<value><int>1</int></value>
</member>
<member>
<name>faultString</name>
<value><string>Traceback (most recent call last):
  File "/home/odoo/src/odoo/12.0/odoo/addons/base/controllers/rpc.py", line 63, in xmlrpc_2
    response = self._xmlrpc(service)
  File "/home/odoo/src/odoo/12.0/odoo/addons/base/controllers/rpc.py", line 43, in _xmlrpc
    result = dispatch_rpc(service, method, params)
  File "/home/odoo/src/odoo/12.0/odoo/http.py", line 120, in dispatch_rpc
    result = dispatch(method, params)
  File "/home/odoo/src/odoo/12.0/odoo/service/model.py", line 39, in dispatch
    res = fn(db, uid, *params)
  File "/home/odoo/src/odoo/12.0/odoo/service/model.py", line 153, in execute_kw
    return execute(db, uid, obj, method, *args, **kw or {})
  File "/home/odoo/src/odoo/12.0/odoo/service/model.py", line 97, in wrapper
    return f(dbname, *args, **kwargs)
  File "/home/odoo/src/odoo/12.0/odoo/service/model.py", line 160, in execute
    res = execute_cr(cr, uid, obj, method, *args, **kw)
  File "/home/odoo/src/odoo/12.0/odoo/service/model.py", line 149, in execute_cr
    return odoo.api.call_kw(recs, method, args, kw)
  File "/home/odoo/src/odoo/12.0/odoo/api.py", line 749, in call_kw
    return _call_kw_multi(method, model, args, kwargs)
  File "/home/odoo/src/odoo/12.0/odoo/api.py", line 734, in _call_kw_multi
    recs = self.with_context(context or {}).browse(ids)
  File "/home/odoo/src/odoo/12.0/odoo/models.py", line 4788, in with_context
    context = dict(args[0] if args else self._context, **kwargs)
TypeError: 'int' object is not iterable
</string></value>
</member>
</struct></value>
</fault>
</methodResponse>

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.