how do I force a field to be translated in my Odoo code?
<p>I am developing a module for electronic invoicing, and should express the payment term in spanish, so I am setting a dictionary with all the needed fields, and when I do this:</p>

<pre><code>{
...
'FmaPago': inv.payment_term.name,
...
}
</code></pre>

<p>The output file contains the value "name" in english. I've tried something like </p>

<pre><code>_(inv.payment_term.name)
</code></pre>

<p>but with the same result.</p>

<p>How should I force the value to be expressed in a defined translation?</p>