Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
2 Відповіді
1253 Переглядів

Hi all

Ive made some custom fields on our SO documents and now when we want to use them in the mails we send trough the templates.

Is there a way to do it when using the code view.

one field is "werfadres" this are the properties.

field: x_studio_werfadres
Object: sale.order
Soort: CHAR

Thank you!

Аватар
Відмінити
Найкраща відповідь

Hi Wesley,

Yes, you can access your custom field in a mail template. First, create the custom field in the sale order model. Then, select the corresponding mail template that you want to modify. In the content section of the mail template view, you can edit the template code.

To add your custom field, you can use the following syntax:

<span t-out="format_amount(object.custom_field_name, object.currency_id) or ''">Custom Field Value</span>

Replace 'custom_field_name' with the name of your custom field. You can also apply any necessary formatting to the custom field value within the template.

Make sure to test your changes to ensure that the mail template renders as expected with the inclusion of your custom field.

Hope it helps

Аватар
Відмінити
Найкраща відповідь

Yes, all fields are available.

If it's a Sales Order document you should be able to access your new field as 

object.x_studio_werfadres
Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
1
груд. 20
3377
1
серп. 19
3970
1
квіт. 19
4699
1
лип. 25
1335
2
бер. 25
1580