Browse Source

[MIG] easy_my_coop_taxshelter_report : adapt to version 12.0

pull/68/head
Elouan Le Bars 4 years ago
parent
commit
6d6471d7e5
  1. 20
      easy_my_coop_taxshelter_report/models/tax_shelter_declaration.py
  2. 81
      easy_my_coop_taxshelter_report/reports/tax_shelter_resold_report.xml
  3. 83
      easy_my_coop_taxshelter_report/reports/tax_shelter_shares_report.xml
  4. 82
      easy_my_coop_taxshelter_report/reports/tax_shelter_subscription_report.xml

20
easy_my_coop_taxshelter_report/models/tax_shelter_declaration.py

@ -237,15 +237,17 @@ class TaxShelterCertificate(models.Model):
certificate.state = 'no_eligible'
self.env.cr.commit()
@api.multi
def print_subscription_certificate(self):
self.ensure_one()
return self.env['report'].get_action(self, 'easy_my_coop_taxshelter_report.tax_shelter_subscription_report')
@api.multi
def print_shares_certificate(self):
self.ensure_one()
return self.env['report'].get_action(self, 'easy_my_coop_taxshelter_report.tax_shelter_shares_report')
@api.multi
def print_subscription_certificate(self):
self.ensure_one()
report = self.env.ref("easy_my_coop_taxshelter_report.action_tax_shelter_subscription_report")
return report.report_action(self)
@api.multi
def print_shares_certificate(self):
self.ensure_one()
report = self.env.ref("easy_my_coop_taxshelter_report.action_tax_shelter_shares_report")
return report.report_action(self)
@api.multi
def _compute_amounts(self):

81
easy_my_coop_taxshelter_report/reports/tax_shelter_resold_report.xml

@ -2,74 +2,42 @@
<odoo>
<data>
<template id="tax_shelter_report_shares_document">
<t t-call="theme_light.invoice_layout">
<t t-call="web.external_layout">
<div class="page">
<head>
<link href="/easy_my_coop_taxshelter_report/static/src/css/coop_report.css" rel="stylesheet"/>
<style type="text/css">
/* Montserrat */
@font-face {
font-family: 'Montserrat-Regular';
font-style: normal;
src: local('Montserrat Regular'), url('/theme_light/static/font/Montserrat-Regular.ttf') format('truetype');
}
/* Roboto Regular */
@font-face {
font-family: 'Roboto-Regular';
font-style: normal;
src: local('Roboto Regular'), url('/theme_light/static/font/Roboto-Regular.ttf') format('truetype');
}
/* Roboto Bold */
@font-face {
font-family: 'Roboto-Bold';
font-style: normal;
src: local('Roboto Bold'), url('/theme_light/static/font/Roboto-Bold.ttf') format('truetype');
}
/* BEBASNEUE Bold */
@font-face {
font-family: 'Bebasneue-Bold';
font-style: normal;
src: local('Bebasneue-Bold'), url('/theme_light/static/font/BEBASNEUE_BOLD.ttf') format('truetype');
}
</style>
</head>
<t t-call="theme_light.invoice_header"/>
<div class="row">
<div class="col-xs-5 col-xs-offset-7 easymy-coop-address" style="top:15px;">
<div class="col-xs-5 col-xs-offset-7 easymy-coop-address">
<strong><span t-field="o.partner_id.name" /><br/></strong>
<span> numéro de coopérateur </span>
<span t-field="o.partner_id.cooperator_register_number"></span><br/><br/>
<span t-field="o.partner_id.street" /><br/>
<span>
<span t-field="o.partner_id.zip"/>
<span>
<span t-field="o.partner_id.zip"/>
<span t-field="o.partner_id.city"/>
</span><br/>
<span t-field="o.partner_id.country_id.name" /><br/>
</div>
</div>
<div style="position:absolute; top:240px">
<h2 style="font-family:Bebasneue-Bold;font-size:16pt;">
<h2>
<div>
<span>Déclaration Tax Shelter - Attestation concernant une des quatre années suivant l’acquisition de parts</span>
<span>Déclaration Tax Shelter - Attestation concernant une des quatre années suivant l’acquisition de parts</span>
</div>
<div style="width:125px;position:relative;top:10px;border-bottom: 4pt solid #fcc300;"/>
<div/>
</h2>
<div class="row">
<div class="col-xs-12 pull-left" style="position:relative;top:15px;font-size:16;color:black;font-family:Roboto-Regular;">
<div class="col-xs-12 pull-left">
<div>
Cher membre,
</div>
<div style="position:relative;top:10px;">
<div>
A la date du <span t-field="o.partner_id.effective_date"/>, vous êtes devenu coopérateur de <span t-field="o.company_id.name"/>.<br/>
<br/>
Cette lettre confirme qu’en date du <span t-field="o.declaration_id.date_to"/>, vous êtes toujours en possession de parts de <span t-field="o.company_id.name"/>
Cette lettre confirme qu’en date du <span t-field="o.declaration_id.date_to"/>, vous êtes toujours en possession de parts de <span t-field="o.company_id.name"/>
pour un montant total de <span t-field="o.partner_id.total_value" t-field-options='{"widget": "monetary", "display_currency": "res_company.currency_id"}'/> euros et que la condition prévue à l’article 145(26), $3, alinéa 2, CIR92 est remplie.
</div>
<div style="position:relative;top:20px;">
<div>
L' Article 145/26, CIR 92 sur les revenus <span t-field="o.declaration_id.fiscal_year"/>, connu aussi comme normative Tax Shelter, donnent droit à une réduction d’impôt à hauteur de &#160; <span t-field="o.declaration_id.tax_shelter_percentage"/> du montant de la valeur des parts souscrites depuis <span t-field="o.declaration_id.month_from"/> (et avant <span t-field="o.declaration_id.month_to"/> pour la déclaration des revenus <span t-field="o.declaration_id.fiscal_year"/>).<br/>
<br/>
Cette lettre vaut donc comme certificat que <span t-field="o.company_id.name"/> remplit en effet tous les critères permettant un tel avantage fiscal. Dans les grandes lignes : <br/>
@ -92,35 +60,34 @@
Cordialement,
</div>
</div>
<div class="row">
<div class="col-xs-6 pull-left" style="position:relative;top:100px;font-size:16;color:black;font-family:Roboto-Regular;">
<div style="position:relative;top:10px;">
<div class="col-xs-6 pull-left">
<div>
Pour le Conseil d'administration de <span t-field="o.company_id.name"/>.
</div>
<div style="position:relative;top:20px;">
<div>
<strong><span t-field="o.company_id.board_representative"/></strong>
</div>
<div style="position:relative;top:25px;">
<img t-if="o.company_id.signature_scan" t-att-src="'data:image/png;base64,%s' % o.company_id.signature_scan" style="width:140px;height:100px;padding-bottom:5px;"/>
<div>
<img t-if="o.company_id.signature_scan" t-att-src="'data:image/png;base64,%s' % o.company_id.signature_scan"/>
</div>
</div>
</div>
</div>
</div>
</div>
</t>
</template>
<template id="tax_shelter_shares_report">
<t t-call="theme_light.html_container">
<t t-call="web.html_container">
<t t-set="data_report_margin_top" t-value="10"/>
<t t-set="data_report_header_spacing" t-value="5"/>
<t t-set="data_report_dpi" t-value="110"/>
<t t-foreach="docs" t-as="o">
<t t-call="easy_my_coop_taxshelter_report.tax_shelter_report_shares_document" t-lang="o.partner_id.lang"/>
</t>
</t>
</t>
</template>
</data>

83
easy_my_coop_taxshelter_report/reports/tax_shelter_shares_report.xml

@ -2,75 +2,43 @@
<odoo>
<data>
<template id="tax_shelter_report_shares_document">
<t t-call="theme_light.invoice_layout">
<t t-call="web.external_layout">
<div class="page">
<head>
<link href="/easy_my_coop_taxshelter_report/static/src/css/coop_report.css" rel="stylesheet"/>
<style type="text/css">
/* Montserrat */
@font-face {
font-family: 'Montserrat-Regular';
font-style: normal;
src: local('Montserrat Regular'), url('/theme_light/static/font/Montserrat-Regular.ttf') format('truetype');
}
/* Roboto Regular */
@font-face {
font-family: 'Roboto-Regular';
font-style: normal;
src: local('Roboto Regular'), url('/theme_light/static/font/Roboto-Regular.ttf') format('truetype');
}
/* Roboto Bold */
@font-face {
font-family: 'Roboto-Bold';
font-style: normal;
src: local('Roboto Bold'), url('/theme_light/static/font/Roboto-Bold.ttf') format('truetype');
}
/* BEBASNEUE Bold */
@font-face {
font-family: 'Bebasneue-Bold';
font-style: normal;
src: local('Bebasneue-Bold'), url('/theme_light/static/font/BEBASNEUE_BOLD.ttf') format('truetype');
}
</style>
</head>
<t t-call="theme_light.invoice_header"/>
<div class="row">
<div class="col-xs-5 col-xs-offset-7 easymy-coop-address" style="top:15px;">
<div class="col-xs-5 col-xs-offset-7 easymy-coop-address">
<strong><span t-field="o.partner_id.name" /><br/></strong>
<span> numéro de coopérateur </span>
<span t-field="o.partner_id.cooperator_register_number"></span><br/><br/>
<span t-field="o.partner_id.street" /><br/>
<span>
<span t-field="o.partner_id.zip"/>
<span>
<span t-field="o.partner_id.zip"/>
<span t-field="o.partner_id.city"/>
</span><br/>
<span t-field="o.partner_id.country_id.name" /><br/>
</div>
</div>
<div style="position:absolute; top:240px">
<h2 style="font-family:Bebasneue-Bold;font-size:14pt;">
<h2>
<div>
<span>Déclaration Tax Shelter - Attestation concernant une des quatre années suivant l’acquisition de parts</span>
<span>Déclaration Tax Shelter - Attestation concernant une des quatre années suivant l’acquisition de parts</span>
</div>
<div style="width:125px;position:relative;top:10px;border-bottom: 4pt solid #fcc300;"/>
<div/>
</h2>
<div class="row">
<div class="col-xs-12 pull-left" style="position:relative;top:15px;font-size:16;color:black;font-family:Roboto-Regular;">
<div class="col-xs-12 pull-left">
<div>
Cher membre,
</div>
<div style="position:relative;top:10px;">
<div>
A la date du <span t-field="o.partner_id.effective_date"/>, vous êtes devenu coopérateur de <span t-field="o.company_id.name"/>.<br/>
<br/>
Cette lettre confirme qu’en date du <span t-field="o.declaration_id.date_to"/>, vous êtes toujours en possession de parts de <span t-field="o.company_id.name"/>
Cette lettre confirme qu’en date du <span t-field="o.declaration_id.date_to"/>, vous êtes toujours en possession de parts de <span t-field="o.company_id.name"/>
pour un montant total de <span t-field="o.partner_id.total_value" t-field-options='{"widget": "monetary", "display_currency": "res_company.currency_id"}'/> euros et que la condition prévue à l’article 145(26), $3, alinéa 2, CIR92 est remplie.
</div>
<div style="position:relative;top:30px;">
<table class="table border-easymy-coop" style="width:90%;align:center;">
<div>
<table class="table border-easymy-coop">
<thead class="invoice_tbody easymy-coop-normal">
<tr>
<th>Type</th>
@ -121,7 +89,7 @@
</tr>
</tbody>
</table>
<div style="position:relative;top:0px;">
<div>
L' Article 145/26, CIR 92 sur les revenus <span t-field="o.declaration_id.fiscal_year"/>, connu aussi comme normative Tax Shelter, donnent droit à une réduction d’impôt à hauteur de &#160;<span t-field="o.declaration_id.tax_shelter_percentage"/> du montant de la valeur des parts souscrites depuis <span t-field="o.declaration_id.month_from"/> (et avant <span t-field="o.declaration_id.month_to"/> pour la déclaration des revenus &#160;<span t-field="o.declaration_id.fiscal_year"/>).<br/>
<br/>
Cette lettre vaut donc comme certificat que <span t-field="o.company_id.name"/> remplit en effet tous les critères permettant un tel avantage fiscal. Dans les grandes lignes : <br/>
@ -144,33 +112,32 @@
Cordialement,
</div>
</div>
<div class="col-xs-6 pull-left" style="position:relative;top:40px;font-size:16;color:black;font-family:Roboto-Regular;">
<div style="position:relative;top:10px;">
<div class="col-xs-6 pull-left">
<div>
Pour le Conseil d'administration de <span t-field="o.company_id.name"/>.
</div>
<div style="position:relative;top:20px;">
<div>
<strong><span t-field="o.company_id.board_representative"/></strong>
</div>
<div style="position:relative;top:25px;">
<img t-if="o.company_id.signature_scan" t-att-src="'data:image/png;base64,%s' % o.company_id.signature_scan" style="width:140px;height:100px;padding-bottom:5px;"/>
<div>
<img t-if="o.company_id.signature_scan" t-att-src="'data:image/png;base64,%s' % o.company_id.signature_scan"/>
</div>
</div>
</div>
</div>
</div>
</div>
</t>
</template>
<template id="tax_shelter_shares_report">
<t t-call="theme_light.html_container">
<t t-call="web.html_container">
<t t-set="data_report_margin_top" t-value="10"/>
<t t-set="data_report_header_spacing" t-value="5"/>
<t t-set="data_report_dpi" t-value="110"/>
<t t-foreach="docs" t-as="o">
<t t-call="easy_my_coop_taxshelter_report.tax_shelter_report_shares_document" t-lang="o.partner_id.lang"/>
</t>
</t>
</t>
</template>
</data>

82
easy_my_coop_taxshelter_report/reports/tax_shelter_subscription_report.xml

@ -2,74 +2,41 @@
<odoo>
<data>
<template id="tax_shelter_report_subscription_document">
<t t-call="theme_light.invoice_layout">
<t t-call="web.external_layout">
<div class="page">
<head>
<link href="/easy_my_coop_taxshelter_report/static/src/css/coop_report.css" rel="stylesheet"/>
<style type="text/css">
/* Montserrat */
@font-face {
font-family: 'Montserrat-Regular';
font-style: normal;
src: local('Montserrat Regular'), url('/theme_light/static/font/Montserrat-Regular.ttf') format('truetype');
}
/* Roboto Regular */
@font-face {
font-family: 'Roboto-Regular';
font-style: normal;
src: local('Roboto Regular'), url('/theme_light/static/font/Roboto-Regular.ttf') format('truetype');
}
/* Roboto Bold */
@font-face {
font-family: 'Roboto-Bold';
font-style: normal;
src: local('Roboto Bold'), url('/theme_light/static/font/Roboto-Bold.ttf') format('truetype');
}
/* BEBASNEUE Bold */
@font-face {
font-family: 'Bebasneue-Bold';
font-style: normal;
src: local('Bebasneue-Bold'), url('/theme_light/static/font/BEBASNEUE_BOLD.ttf') format('truetype');
}
</style>
</head>
<t t-call="theme_light.invoice_header"/>
<div class="row">
<div class="col-xs-5 col-xs-offset-7 easymy-coop-address" style="top:15px;">
<div class="col-xs-5 col-xs-offset-7 easymy-coop-address">
<strong><span t-field="o.partner_id.name" /><br/></strong>
<span> numéro de coopérateur </span>
<span t-field="o.partner_id.cooperator_register_number"></span><br/><br/>
<span t-field="o.partner_id.street" /><br/>
<span>
<span t-field="o.partner_id.zip"/>
<span>
<span t-field="o.partner_id.zip"/>
<span t-field="o.partner_id.city"/>
</span><br/>
<span t-field="o.partner_id.country_id.name" /><br/>
</div>
</div>
<div style="position:absolute; top:240px">
<h2 style="font-family:Bebasneue-Bold;font-size:16pt;">
<h2>
<div>
<span>Déclaration Tax Shelter</span>
<span>Déclaration Tax Shelter</span>
</div>
<div style="width:125px;position:relative;top:10px;border-bottom: 4pt solid #fcc300;"/>
<div/>
</h2>
<div class="row">
<div class="col-xs-12 pull-left" style="position:relative;top:15px;font-size:16;color:black;font-family:Roboto-Regular;">
<div class="col-xs-12 pull-left">
<div>
Cher membre,
</div>
<div style="position:relative;top:10px;">
Durant l'année <span t-field="o.declaration_id.fiscal_year"/> vous avez souscrit des parts de la <span t-field="o.company_id.name"/>. pour un montant total de
<div>
Durant l'année <span t-field="o.declaration_id.fiscal_year"/> vous avez souscrit des parts de la <span t-field="o.company_id.name"/>. pour un montant total de
<span t-field="o.total_amount_subscribed" t-field-options='{"widget": "monetary", "display_currency": "res_company.currency_id"}'/> euros.<br/>
Le montant éligible pour le Tax shelter est de <span t-field="o.total_amount_eligible" t-field-options='{"widget": "monetary", "display_currency": "res_company.currency_id"}'/> euros.<br/>
</div>
<div style="position:relative;top:30px;">
<table class="table border-easymy-coop" style="width:90%;align:center;">
<div>
<table class="table border-easymy-coop">
<thead class="invoice_tbody easymy-coop-normal">
<tr>
<th>Type</th>
@ -102,7 +69,7 @@
</tr>
</tbody>
</table>
<div style="position:relative;top:0px;">
<div>
L' Article 145/26, CIR 92 sur les revenus <span t-field="o.declaration_id.fiscal_year"/>, connu aussi comme normative Tax Shelter, donnent droit à une réduction d’impôt à hauteur de &#160; <span t-field="o.declaration_id.tax_shelter_percentage"/> du montant de la valeur des parts souscrites depuis <span t-field="o.declaration_id.month_from"/> (et avant <span t-field="o.declaration_id.month_to"/> pour la déclaration des revenus &#160;<span t-field="o.declaration_id.name"/>).<br/>
<br/>
Cette lettre vaut donc comme certificat que <span t-field="o.company_id.name"/> remplit en effet tous les critères permettant un tel avantage fiscal. Dans les grandes lignes : <br/>
@ -125,33 +92,32 @@
Cordialement,
</div>
</div>
<div class="col-xs-10 pull-left" style="position:relative;top:60px;font-size:16;color:black;font-family:Roboto-Regular;">
<div style="position:relative;top:10px;">
<div class="col-xs-10 pull-left">
<div>
Pour le Conseil d'administration de <span t-field="o.company_id.name"/>.
</div>
<div style="position:relative;top:20px;">
<div>
<strong><span t-field="o.company_id.board_representative"/></strong>
</div>
<div style="position:relative;top:25px;">
<img t-if="o.company_id.signature_scan" t-att-src="'data:image/png;base64,%s' % o.company_id.signature_scan" style="width:140px;height:100px;padding-bottom:5px;"/>
<div>
<img t-if="o.company_id.signature_scan" t-att-src="'data:image/png;base64,%s' % o.company_id.signature_scan"/>
</div>
</div>
</div>
</div>
</div>
</div>
</t>
</template>
<template id="tax_shelter_subscription_report">
<t t-call="theme_light.html_container">
<t t-call="web.html_container">
<t t-set="data_report_margin_top" t-value="10"/>
<t t-set="data_report_header_spacing" t-value="5"/>
<t t-set="data_report_dpi" t-value="110"/>
<t t-foreach="docs" t-as="o">
<t t-call="easy_my_coop_taxshelter_report.tax_shelter_report_subscription_document" t-lang="o.partner_id.lang"/>
</t>
</t>
</t>
</template>
</data>

Loading…
Cancel
Save