title: Unable to translate a term inside a Qweb condition in Odoo 10. How to do this?
body: <p>I'm trying to translate a specific term which appears in a Qweb report, but its behaviour is very different from expected.</p>
  
  <p>If you install the standard <code>sale</code> module in Odoo 10, take a look at its sale order report (XML ID = <code>report_saleorder_document</code>). Its code is in the <code>report</code> folder, file <code>sale_report_templates.xml</code>. You'll find the following line:</p>
  
  <pre><code>&lt;td&gt;&lt;span t-esc="amount_by_group[0] or 'Taxes'"/&gt;&lt;/td&gt;
  </code></pre>
  
  <p>As you can see, there is a literal string, <em>Taxes</em>, which must be translated if you choose a language different from English. Try to translate the word to a language which hasn't translated it yet.</p>
  
  <p>In my case, I'm trying to translate the term to Galician, in which the translation of <em>Taxes</em> was empty:</p>
  
  <pre><code>#. module: sale
  #: model:ir.model.fields,field_description:sale.field_sale_order_amount_tax
  #: model:ir.model.fields,field_description:sale.field_sale_order_line_price_tax
  #: model:ir.model.fields,field_description:sale.field_sale_order_line_tax_id
  #: model:ir.ui.view,arch_db:sale.report_invoice_layouted
  #: model:ir.ui.view,arch_db:sale.report_saleorder_document
  msgid "Taxes"
  msgstr "Impostos"
  </code></pre>
  
  <p>But after restarting the service, updating the <code>sale</code> module, loading the Galician translation overwriting terms, synchronizing the terms, updating the browser, removing its cookies, and even updating <code>base</code> module, nothing happened.</p>
  
  <p>Then I made the following query in PostgreSQL:</p>
  
  <blockquote>
    <p>SELECT id, lang, src, name, module, value, res_id FROM ir_translation WHERE src='Taxes' AND lang='gl_ES' ORDER BY id DESC;</p>
  </blockquote>
  
  <pre><code>   id   | lang  |  src  |               name                |  module  |    value    | res_id 
  --------+-------+-------+-----------------------------------+----------+-------------+--------
   123634 | gl_ES | Taxes | account.account.tag,applicability | account  | Taxes       |      0
   121625 | gl_ES | Taxes | ir.ui.view,arch_db                | account  | Taxes       |    364
   121624 | gl_ES | Taxes | ir.ui.view,arch_db                | account  | Taxes       |    428
   121619 | gl_ES | Taxes | ir.ui.view,arch_db                | account  | Taxes       |    414
   121618 | gl_ES | Taxes | ir.ui.view,arch_db                | account  | Taxes       |    415
   121617 | gl_ES | Taxes | ir.ui.view,arch_db                | account  | Taxes       |    441
   120817 | gl_ES | Taxes | ir.ui.menu,name                   | account  | Taxes       |    108
   113387 | gl_ES | Taxes | ir.model.fields,field_description | account  | Taxes       |   2878
   113385 | gl_ES | Taxes | ir.model.fields,field_description | account  | Taxes       |   2700
   111845 | gl_ES | Taxes | ir.actions.act_window,name        | account  | Taxes       |    158
   111431 | gl_ES | Taxes | account.tax.group,name            | account  | Taxes       |      1
    47094 | gl_ES | Taxes | ir.ui.view,arch_db                | account  | Taxes       |    430
    46953 | gl_ES | Taxes | ir.ui.view,arch_db                | purchase | Impostos    |    746
    46952 | gl_ES | Taxes | ir.model.fields,field_description | purchase | Impostos    |   5045
    46951 | gl_ES | Taxes | ir.model.fields,field_description | purchase | Impostos    |   4992
    45544 | gl_ES | Taxes | ir.ui.view,arch_db                | sale     | Impostos    |    554
    45543 | gl_ES | Taxes | ir.ui.view,arch_db                | sale     | Impostos    |    556
    45542 | gl_ES | Taxes | ir.model.fields,field_description | sale     | Impostos    |   4128
    45541 | gl_ES | Taxes | ir.model.fields,field_description | sale     | Impostos    |   4120
    45540 | gl_ES | Taxes | ir.model.fields,field_description | sale     | Impostos    |   4085
  (20 rows)
  </code></pre>
  
  <p>And I realized that the problem is that may be I had to translate the <code>account</code> module too (which I didn't understand because the term is in <code>sale</code> module), so I went to the Galician translation file of <code>account</code> module and updated it:</p>
  
  <pre><code>#. module: account
  #: selection:account.account.tag,applicability:0
  #: model:account.tax.group,name:account.tax_group_taxes
  #: model:ir.actions.act_window,name:account.action_tax_form
  #: model:ir.model.fields,field_description:account.field_account_invoice_line_invoice_line_tax_ids
  #: model:ir.model.fields,field_description:account.field_account_move_line_tax_ids
  #: model:ir.ui.menu,name:account.menu_action_tax_form
  #: model:ir.ui.view,arch_db:account.account_planner
  #: model:ir.ui.view,arch_db:account.invoice_form
  #: model:ir.ui.view,arch_db:account.invoice_supplier_form
  #: model:ir.ui.view,arch_db:account.report_invoice_document
  #: model:ir.ui.view,arch_db:account.view_account_config_settings
  #: model:ir.ui.view,arch_db:account.view_move_line_form
  msgid "Taxes"
  msgstr "Impostos"
  </code></pre>
  
  <p>But same problem, so I did the same query again and the result was this:</p>
  
  <pre><code>   id   | lang  |  src  |               name                |  module  |    value    | res_id 
  --------+-------+-------+-----------------------------------+----------+-------------+--------
   123634 | gl_ES | Taxes | account.account.tag,applicability | account  | Impostos    |      0
   121625 | gl_ES | Taxes | ir.ui.view,arch_db                | account  | Impostos    |    364
   121624 | gl_ES | Taxes | ir.ui.view,arch_db                | account  | Impostos    |    428
   121619 | gl_ES | Taxes | ir.ui.view,arch_db                | account  | Impostos    |    414
   121618 | gl_ES | Taxes | ir.ui.view,arch_db                | account  | Impostos    |    415
   121617 | gl_ES | Taxes | ir.ui.view,arch_db                | account  | Impostos    |    441
   120817 | gl_ES | Taxes | ir.ui.menu,name                   | account  | Impostos    |    108
   113387 | gl_ES | Taxes | ir.model.fields,field_description | account  | Impostos    |   2878
   113385 | gl_ES | Taxes | ir.model.fields,field_description | account  | Impostos    |   2700
   111845 | gl_ES | Taxes | ir.actions.act_window,name        | account  | Impostos    |    158
   111431 | gl_ES | Taxes | account.tax.group,name            | account  | Taxes       |      1
    47094 | gl_ES | Taxes | ir.ui.view,arch_db                | account  | Impostos    |    430
    46953 | gl_ES | Taxes | ir.ui.view,arch_db                | purchase | Impostos    |    746
    46952 | gl_ES | Taxes | ir.model.fields,field_description | purchase | Impostos    |   5045
    46951 | gl_ES | Taxes | ir.model.fields,field_description | purchase | Impostos    |   4992
    45544 | gl_ES | Taxes | ir.ui.view,arch_db                | sale     | Impostos    |    554
    45543 | gl_ES | Taxes | ir.ui.view,arch_db                | sale     | Impostos    |    556
    45542 | gl_ES | Taxes | ir.model.fields,field_description | sale     | Impostos    |   4128
    45541 | gl_ES | Taxes | ir.model.fields,field_description | sale     | Impostos    |   4120
    45540 | gl_ES | Taxes | ir.model.fields,field_description | sale     | Impostos    |   4085
  (20 rows)
  </code></pre>
  
  <p>So I thought that the problem was this translation:</p>
  
  <pre><code>111431 | gl_ES | Taxes | account.tax.group,name            | account  | Taxes
  </code></pre>
  
  <p>And it is. If I modify this translation through a query in PostgreSQL, then when I print the sale order report, I can see the word translated to Galician.</p>
  
  <p>But my question is: <strong>what I have to do to translate that term through PO files and without executing a query?</strong></p>
  
  <p>It's annoying as in some languages like Spanish the term is well translated through PO files... I think that this problem is easy to replicate, so I'll appreciate a lot if anyone tries it, understands what is happening and can explain it to me.</p>