Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
2666 Widoki

Hello,

We would like to read a data xml file to Odoo into ir.actions.server and would like to give the name-field of the action a description in two languages. Is this possible using xml?

For example:

<field name="name">Reserve picking lines</field>

<field name="name">Reservera plocklinjer</field>

So the idea would be to show Reserve picking lines for the name of the action for english users and Reservera plocklinjer for swedish users.

Awatar
Odrzuć
Najlepsza odpowiedź

Hi,

In the XML just define the field once with the base language, usually English, as an example:


<record id="action_reserve_picking" model="ir.actions.server">

    <field name="name">Reserve picking lines</field>

    <field name="model_id" ref="model_stock_picking"/>

     ……

</record>


Then translate it in a .po file for Swedish (or other languages):


File path: your_module/i18n/sv.po

#. module: your_module

#: model:ir.actions.server,name:your_module.action_reserve_picking

msgid "Reserve picking lines"

msgstr "Reservera plocklinjer"


Replace your module name with your_module.


Hope it helps.

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
0
paź 21
2447
0
lut 25
834
3
sty 19
12365
0
sie 16
3517
1
lip 24
1356