[英]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.