Difference Between Search and
Browse in Odoo 16
Search and Browse are commonly used ORM methods,
which helps to return a set of records based on our
requirements.
● search() :
○ search method is used to search records within the given model based on the
search domain that passed as the argument
○ This method accepts a search domain to check for matching conditions inside
the model and returns the recordsets
○ syntax:
Model.search(args[, offset=0][, limit=None][, order=None][,
count=False])
○ example: it will change the name based on selected product.
● browse():
○ browse method is used to return a set of records for the IDs passed as the
parameter in the current working model
○ This method accepts a set of IDs and returns the record sets corresponding to
that IDs
○ syntax:
Model.browse([ids])
○ example: it will select the sale person when selecting the invoice
Check our company website
for related blogs and Odoo book.
https://www.youtube.com/watch?v=Mv48qgPAoI4

Difference Between Search and Browse in Odoo 16

  • 1.
    Difference Between Searchand Browse in Odoo 16
  • 2.
    Search and Browseare commonly used ORM methods, which helps to return a set of records based on our requirements.
  • 3.
    ● search() : ○search method is used to search records within the given model based on the search domain that passed as the argument ○ This method accepts a search domain to check for matching conditions inside the model and returns the recordsets ○ syntax: Model.search(args[, offset=0][, limit=None][, order=None][, count=False])
  • 4.
    ○ example: itwill change the name based on selected product.
  • 5.
    ● browse(): ○ browsemethod is used to return a set of records for the IDs passed as the parameter in the current working model ○ This method accepts a set of IDs and returns the record sets corresponding to that IDs ○ syntax: Model.browse([ids])
  • 6.
    ○ example: itwill select the sale person when selecting the invoice
  • 7.
    Check our companywebsite for related blogs and Odoo book. https://www.youtube.com/watch?v=Mv48qgPAoI4