简体   繁体   English

XML-RPC Odoo - C# 带有运算符或的多个搜索条件

[英]XML-RPC Odoo - C # multiple search conditions with operator or

I want to do a search but I need to use the or operator我想进行搜索,但我需要使用 or 运算符

ids = models.execute_kw (db, uid, password, 'res.partner', 'search', [[['name', '=', "jhon"] or ['name', '=', "wil"]]])

Can someone help me.有人能帮我吗。

The code above is not C# but seems like Python上面的代码不是C#而是Python

The OR operator is written like this | OR运算符是这样写的| and the new code will be ids = models.execute_kw (db, uid, password, 'res.partner', 'search', [['|', ['name', '=', "jhon"], ['name', '=', "wil"]]])新代码将是ids = models.execute_kw (db, uid, password, 'res.partner', 'search', [['|', ['name', '=', "jhon"], ['name', '=', "wil"]]])

To learn more about Odoo search domains check these two links search domains docs - Domain notation要了解有关 Odoo 搜索域的更多信息,请查看这两个链接搜索域文档- 域符号

I don't have experience with C# but I did a quick research and here is a link to get you started C# Stackoverflow link .我没有C#经验,但我做了一个快速的研究,这里有一个链接让你开始C# Stackoverflow 链接 And for the domain here is an example对于域,这里是一个示例

object[] do1 = new object[] { "name", "=", "jhon" };
object[] do2 = new object[] { "name", "=", "wil" };
object[] domain = new object[] { "|", do1 , do2};

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM