Commit d473b1c9 authored by Xiaowu Zhang's avatar Xiaowu Zhang

erp5_payroll&l10n_fr: display employer instead of company

parent 244f0873
......@@ -162,6 +162,10 @@ destination_section = context.getDestinationSectionValue()
if destination_section is None:
destination_section = EmptyOrganisation()
destination_trade = context.getDestinationTradeValue()
if destination_trade is None:
destination_trade = EmptyOrganisation()
source_administration = context.getSourceAdministrationValue(
portal_type='Organisation')
if source_administration is None:
......@@ -304,6 +308,15 @@ data_dict = {
'destination_section_social_address': social_organisation is not None and getOneLineAddress(\
social_organisation.getDefaultAddressText(),
social_organisation.getDefaultAddressRegionTitle()) or '',
'destination_trade_title': destination_trade.getProperty('corporate_name') or \
destination_trade.getTitle(),
'destination_trade_address': getOneLineAddress(
context.getDestinationTrade() and context.getDestinationTradeValue().getDefaultAddressText() or '',
context.getDestinationTrade() and context.getDestinationTradeValue().getDefaultAddressRegionTitle() or ''),
'destination_trade_corporate_registration_codeid': getCorporateRegistrationCodeId(context.getDestinationTrade() and
context.getDestinationTradeValue().getProperty('corporate_registration_code') or ''),
'destination_trade_activity_codeid': getActivityCodeId(context.getDestinationTrade() and
context.getDestinationTradeValue().getProperty('activity_code') or ''),
'destination_administration_title':\
destination_administration.getProperty('corporate_name') or \
destination_administration.getTitle(),
......
......@@ -14,10 +14,16 @@
</div>
<div class="payslip-header-detail">
<div class="payslip-header-employer">
<span class='payslip-report-emphasis' tal:content='python:data_dict["destination_section_title"]'>destination_section</span>
<!--span class='payslip-report-emphasis' tal:content='python:data_dict["destination_section_title"]'>destination_section</span>
<span tal:condition="data_dict/destination_section_address" tal:content='python:data_dict["destination_section_address"]'>address</span>
<span tal:condition='data_dict/destination_section_corporate_registration_codeid' tal:content='python:data_dict["destination_section_corporate_registration_codeid"]'>SIRET</span>
<span tal:condition='data_dict/destination_section_activity_codeid' tal:content='python:data_dict["destination_section_activity_codeid"]'>APE</span>
<span tal:condition='data_dict/destination_section_activity_codeid' tal:content='python:data_dict["destination_section_activity_codeid"]'>APE</span-->
<span class='payslip-report-emphasis' tal:content='python:data_dict["destination_trade_title"]'>destination_trade</span>
<span tal:condition="data_dict/destination_trade_address" tal:content='python:data_dict["destination_trade_address"]'>address</span>
<span tal:condition='data_dict/destination_trade_corporate_registration_codeid' tal:content='python:data_dict["destination_trade_corporate_registration_codeid"]'>SIRET</span>
<span tal:condition='data_dict/destination_trade_activity_codeid' tal:content='python:data_dict["destination_trade_activity_codeid"]'>APE</span>
</div>
<div class="payslip-header-employee">
<span class='payslip-report-emphasis' tal:content='python:data_dict["source_section_title"].upper()'>source_section</span>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment