跳至内容
菜单
此问题已终结
1 回复
2439 查看

want to change before template email, to format for thousand separator 

(but this also not working) 

after changing email template, now showing error Failed to render template : 'goal' is undefined

already revert html code and also the translation, but it none helps


https://drive.google.com/file/d/1Rm1pzWIMkD4_1dPbkllpEu2tbkC06Dzw/view?usp=sharing 

https://drive.google.com/file/d/1RjqzvmRLFlfmtPHvdvE0zobRWL1gC2_p/view?usp=sharing 


file templates: 

https://drive.google.com/file/d/1RmRAkbQX2ivmNx_Pp-a3n5YBJwm8vLUl/view?usp=sharing


it works a day before, don't know what happened, as this should change email template only, 

creating new email template, dont help either, how to check for the problem cause?


in the log showing this error:

odoo journal[45279]: Odoo Server 14.0+e-20210930:Final6:INFO:odoo.addons.mail.models.mail_render_mixin:Failed to render template : 'goal' is undefined#012Traceback (most recent call last):#012 File "/opt/odoo/odoo14/odoo/addons/mail/models/mail_render_mixin.py", line 352, in _render_template_jinja#012 render_result = template.render(variables)#012 File "/opt/odoo/odoo14-venv-python3.8.6/lib64/python3.8/site-packages/jinja2/environment.py", line 1090, in render#012 self.environment.handle_exception()#012 File "/opt/odoo/odoo14-venv-python3.8.6/lib64/python3.8/site-packages/jinja2/environment.py", line 832, in handle_exception#012 reraise(*rewrite_traceback_stack(source=source))#012 File "/opt/odoo/odoo14-venv-python3.8.6/lib64/python3.8/site-packages/jinja2/_compat.py", line 28, in reraise#012 raise value.with_traceback(tb)#012 File "", line 173, in top-level template code#012 File "/opt/odoo/odoo14-venv-python3.8.6/lib64/python3.8/site-packages/jinja2/sandbox.py", line 384, in getitem#012 return obj[argument]#012jinja2.exceptions.UndefinedError: 'goal' is undefined

形象
丢弃
编写者 最佳答案

odoo seems reformat for the html that put loop for in the wrong line:

% for goal in line[''goals'']:
% set tdBgColor = ''#fff''
% set tdColor = ''gray''
% set mutedColor = ''#AAAAAA''
% set tdPercentageColor = ''#9A6C8E''
table html div and stuff
% endfor


it should format like this in the sql, manually update in database:

https://drive.google.com/file/d/1Rvj73Tk6IPb_RN_3FxZC1NOFWzUywQQ2/view?usp=sharing 


形象
丢弃
相关帖文 回复 查看 活动
3
5月 22
5361
0
1月 25
708
1
11月 23
1775
0
9月 21
1713
1
3月 15
4224