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

Hello,  We're trying to implement an automated email payroll. which is this one




And my email template is on this one




but when I go to payslips -> to pay -> new -> choose and employee -> compute sheet -> create Draft entry

when I click Create Draft Entry. I get this error


So this is where I think i get the error, I check on the employee and private address and I'm guessing its the language. 





Does the  {{ object.employee_id.address_home_id.lang}})  = the language of the employee? Or should I provide more information? 

Awatar
Odrzuć
Najlepsza odpowiedź

Hi Emman, Hi Joe,

i'm on odoo 16 so can't give an exact answer. But for odoo 16 I have to choose an res_partner-Object for the private adress.
And object.employee_id.address_home_id.lang means the LANG-Setting from this Partner-Object.

In your example I would suggest to try object.employee_id.lang, this is the language of the employee-object.

An alternative aproach would be to add an fallback: {{ object.employee_id.address_home_id.lang or 'en_US' }}
Where en_US is your default language for everyone where the lang-attribute is missing.


For me it looks like this behaviour was changed in the update 16 to 17 but the template was not updated.

Best regards, Luke

Awatar
Odrzuć
Najlepsza odpowiedź

Did you get your answer ?

i am geeting same error when creating ewallet for customer

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
2
kwi 20
4952
0
lis 24
1278
3
cze 25
2298
2
mar 25
995
5
lut 25
7300