Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
2789 Zobrazení

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

Avatar
Zrušit
Autor Nejlepší odpověď

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 


Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
3
kvě 22
5627
0
led 25
1031
1
lis 23
2110
0
zář 21
1926
1
bře 15
4489