Hi PEOPLE there;
I want to verify things if it’s possible, I have Tryton version 5.2 and Tryton version 6 , In the menu Balance sheet and Income statement of the tryton 6 from the module account, there was a “type_statement.fodt” that i can print it easily, what i want is make this happen in version 5.2 , everything is good i have adapt the code related to this record;
1/I have create a class AccountTypeStatement in account.py then save this class in “init.py”
2/make the “company.py”
2/I have create a record on account.xml
→ everything is good when i have tried to print this “type_statement.fodt” and there is no error displayed , but there was something wrong but i do no where, because no date shown in the printout when i go to the menu -->Balance sheet, the same for the menu “Income statement” there was no “Fiscal Year” or start date or end date displayed on the printout;
it seems to me that this part of code in “type_statement.fodt” it’s not be readen
<text:p text:style-name="P24"><text:placeholder text:placeholder-type="text"><choose></text:placeholder></text:p>
<text:p text:style-name="P24"><text:placeholder text:placeholder-type="text"><when test="data.get('model_context') == 'account.income_statement.context'"></text:placeholder></text:p>
<text:p text:style-name="P28">Income Statement</text:p>
<text:p text:style-name="P24"><text:span text:style-name="T1">Fiscal Year: </text:span><text:placeholder text:placeholder-type="text"><ctx.fiscalyear.rec_name></text:placeholder></text:p>
<text:p text:style-name="P24"><text:placeholder text:placeholder-type="text"><if test="ctx.start_period or ctx.end_period"></text:placeholder></text:p>
<text:p text:style-name="P24"><text:span text:style-name="T1">From Period</text:span>: <text:placeholder text:placeholder-type="text"><ctx.start_period.name if ctx.start_period else ''></text:placeholder><text:s/><text:span text:style-name="T2">To</text:span> <text:placeholder text:placeholder-type="text"><ctx.end_period.name if ctx.end_period else ''></text:placeholder></text:p>
<text:p text:style-name="P24"><text:placeholder text:placeholder-type="text"></if></text:placeholder></text:p>
<text:p text:style-name="P24"><text:placeholder text:placeholder-type="text"><if test="ctx.from_date or ctx.to_date"></text:placeholder></text:p>
<text:p text:style-name="P25">From Date: <text:placeholder text:placeholder-type="text"><format_date(ctx.from_date, user.language) if ctx.from_date else ''></text:placeholder><text:s/>To <text:placeholder text:placeholder-type="text"><format_date(ctx.to_date, user.language) if ctx.to_date else ''></text:placeholder></text:p>
<text:p text:style-name="P24"><text:placeholder text:placeholder-type="text"></if></text:placeholder></text:p>
<text:p text:style-name="P24"><text:placeholder text:placeholder-type="text"></when></text:placeholder></text:p>
<text:p text:style-name="P24"><text:placeholder text:placeholder-type="text"><when test="data.get('model_context') in ['account.balance_sheet.context', 'account.balance_sheet.comparision.context']"></text:placeholder></text:p>
<text:p text:style-name="P28">Balance Sheet</text:p>
<text:p text:style-name="P26">Date: <text:placeholder text:placeholder-type="text"><format_date(ctx.date, user.language) if ctx.date else ''></text:placeholder></text:p>
<text:p text:style-name="P24"><text:placeholder text:placeholder-type="text"></when></text:placeholder></text:p>
I want to verify is it normal to use the term 'model_context'
in the version 5.2 like in version 6 or is there other thing i should do !
Thanks in advance