Contributors mailing list archives

contributors@odoo-community.org

Browse archives

Avatar

回复: Assistance Needed: Searching for Specific Products in Sales Orders (Odoo CE 17.0+)

by
feihu.zhang
- 13/11/2024 10:50:26

Sure, I've tried the user training search method and no obstacles, it's amazing!

 

 

 

feihu zhang

feihu.zhang@live.com

 

发件人: Graeme Gellatly <notifications@odoo-community.org>
发送时间: 2024-11-13 17:43
收件人: Contributors <contributors@odoo-community.org>
主题: Re: Assistance Needed: Searching for Specific Products in Sales Orders (Odoo CE 17.0+)

 

% acts like * in search is all the guidance most users need. In my experience that is far simpler than explaining domains and comes in far more useful for them in other ways, esp contacts and m2o dropdowns.

 

On Wed, Nov 13, 2024 at 10:27PM 张 飞虎 <notifications@odoo-community.org> wrote:

Hi Graeme

 

I apologize for the incorrect domain I provided in the email.

 

The method you suggested using blue%desk can indeed solve my problem.

However, for end users without development experience, understanding and remembering this method might be challenging, especially if they do not use it frequently.

 

I look forward to any other potential solutions you or other contributors might offer.

 

Thank you once again!

 

Best regards,    

 

 

 

发件人: Graeme Gellatly <notifications@odoo-community.org>
发送时间: 2024-11-13 16:44
收件人: Contributors <contributors@odoo-community.org>
主题: Re: Assistance Needed: Searching for Specific Products in Sales Orders (Odoo CE 17.0+)

 

Maybe the weird brackets. In any case the easiest domain is "ilike" ,"blue%desk". But you can search blue%desk straight from the search bar in UI. No need to write domains.

 

On Wed, Nov 13, 2024 at 7:02PM 张 飞虎 <notifications@odoo-community.org> wrote:

Dear Contributors

 

       I have a question regarding the search for one2many fields and would like to seek assistance from the community.

      

       Odoo VersionCommunity 17.0+

      

       I created some products:

l   Blue xxxsome_elsexx T-shirt

l   Blue xxxsome_elsexx Desk

l   White xxxsome_elsexx T-shirt

l   White xxxsome_elsexx Desk

 

Then, I randomly created some sales orders using these products. Now, if I want to search for the product "Blue xxxsome_elsexx Desk" within sales orders using this domain:

[("order_line.product_id.name", "ilike", "blue"),(("order_line.product_id.name", "ilike", "desk"))]

 

I expect to get sales orders only containing the productBlue xxxsome_elsexx Desk

However, the search results return sales orders containing Blue xxxsome_elsexx T-shirt and White xxxsome_elsexx Deskbut not those containing Blue xxxsome_elsexx Desk

 

I am not sure if I have expressed this clearly. You can test the scenario with the sales orders I created in the runbot instance, and there are a few images to help with understanding.

Testing environment on runbot: https://70500325-17-0-all.runbot143.odoo.com/web?debug=1#action=988&model=sale.order&view_type=list&cids=1&menu_id=660

 

 

 

 

       Thank you for your assistance.

Best regards,

 

 

 

feihu.zhang@live.com

_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe

_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe

Reference