How to create xpath expressions?

  • language
      English
  • type
      technical
  • info created for version
      14.0
  • mvc
      XML (records/views/templates)
Add to Cart

https://docs.python.org/3/library/xml.etree.elementtree.html#supported-xpath-syntax

<xpath expr="//field[@name='invoice_line_ids']/tree/field[@name='company_id']" position="after">
<xpath expr="//div[hasclass('o_primary')]" position="after">
<xpath expr="//link[last()]" position="after">
<xpath expr="." position="inside">
<xpath expr="//templates/descendant::field[@name='partner_id']" position="after">
<xpath expr="//button[@name='action_timer_start'][hasclass('btn-primary')]" position='after'>He
Here are some interesting tips > https://dev.to/opencode/don-t-break-your-and-others-odoo-xml-373i.