This question has been flagged
1926 Views

 data1 = sock.execute_kw(dbname, uid, pwd, 'res.partner', 'search_read' ,[[]],{'limit':1})

[{"ean13": false, "property_account_position": false, "signup_valid": false, "ref_companies": [], "sale_order_count": 0, "purchase_order_count": 0, "write_uid": [1, "Administrator"], "contact_address": "\n\n \n", "property_product_pricelist": [1, "Public Pricelist (CNY)"], "signup_url": "http://192.16.1.59:8069/web/login?login=admin&db=lvjienew", "journal_item_count": 0, "parent_name": false, "display_name": "Administrator", "opt_out": false, "title": false, "company_id": [1, "限公司"], "parent_id": false, "last_reconciliation_date": false, "contracts_count": 0, "employee": false, "supplier_invoice_count": 0, "fax": false, "child_ids": [], "user_ids": [1], "calendar_last_notif_ack": false, "image_medium": false, "name": "Administrator", "debit_limit": 0.0, "signup_token": false, "property_account_receivable": [8, "1122 应收账款"], "contract_ids": [], "commercial_partner_id": [3, "Administrator"], "message_follower_ids": [], "total_invoiced": 0.0, "notify_email": "none", "street": false, "task_ids": [], "country_id": false, "tz_offset": "+0800", "debit": 0.0, "supplier": false, "message_summary": " ", "ref": false, "email": "admin@example.com", "city": false, "street2": false, "active": true, "tz": "Hongkong", "signup_expiration": false, "zip": false, "property_product_pricelist_purchase": [2, "Default Purchase Pricelist (CNY)"], "credit": 0.0, "message_unread": false, "comment": false, "color": 0, "image": false, "invoice_ids": [], "create_date": "2015-11-18 12:15:21", "create_uid": [1, "Administrator"], "user_id": false, "message_is_follower": false, "__last_update": "2016-07-18 03:02:47", "message_last_post": false, "type": "contact", "vat": false, "function": false, "phone": false, "task_count": 0, "customer": false, "sale_order_ids": [], "image_small": false, "birthdate": false, "has_image": false, "state_id": false, "website": false, "use_parent_address": false, "signup_type": false, "id": 3, "date": false, "message_ids": [], "property_account_payable": [38, "2202 应付账款"], "property_stock_supplier": [8, "Partner Locations/Suppliers"], "is_company": false, "bank_ids": [], "vat_subjected": false, "section_id": false, "property_supplier_payment_term": false, "write_date": "2016-07-18 03:02:47", "property_stock_customer": [9, "Partner Locations/Customers"], "lang": "zh_CN", "credit_limit": 0.0, "mobile": false, "property_payment_term": false, "category_id": []}]


but "user_ids": [1]


i want to know :

     if user_ids contain 1:

     sock.execute_kw(dbname, uid, pwd, 'res.partner', 'search_read' ,[[??????]],{'limit':1})



Avatar
Discard