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

Hi,
I have to add a field in the change document template view.I tried xpath the existing template and adding the field. But it doesn’t work.
Can anyone help?

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

Hi,

Along with xpath the new field to the template try the below code also

class ResConfigSettings(models.TransientModel):
_inherit = 'res.config.settings'

def change_report_template(self):
res = super(ResConfigSettings, self).change_report_template()
template = self.env.ref(module_name.custom_template_id') #This replace original template by the custom template which you created.
return res

In the above function you can pass your template which the new field added.

Hope it helps

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

You must give a little code so that one can give exact answer. But this is one way of xpathing templates

<xpath expr="//div[hasclass('row', 'mt32')]" position="inside">
Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
Odoo Mail Sending Limit Вирішено
2
груд. 23
15551
0
жовт. 23
33
3
жовт. 23
790
1
жовт. 23
569
1
серп. 23
2907