Browse Source

[FIX] emc: Capital request and coop certificate

pull/16/head
Rémy Taymans 5 years ago
parent
commit
c778d4f626
  1. 4
      easy_my_coop/__manifest__.py
  2. 283
      easy_my_coop/report/cooperator_certificat_G001.xml
  3. 3
      easy_my_coop/report/cooperator_invoice_G002.xml
  4. 10
      easy_my_coop/report/layout.xml

4
easy_my_coop/__manifest__.py

@ -5,9 +5,10 @@
{
"name": "Easy My Coop",
"version": "12.0.2.0.1",
"version": "12.0.2.0.2",
"depends": [
"base",
"web",
"sale",
"account",
"base_iban",
@ -43,6 +44,7 @@
'views/res_company_view.xml',
'views/account_journal_view.xml',
'report/easy_my_coop_report.xml',
'report/layout.xml',
'report/cooperator_invoice_G002.xml',
'report/cooperator_certificat_G001.xml',
'report/cooperator_subscription_G001.xml',

283
easy_my_coop/report/cooperator_certificat_G001.xml

@ -1,173 +1,110 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<template id="cooperator_certificat_G001_document">
<t t-call="web.external_layout">
<div class="page">
<head>
<link href="/easy_my_coop/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:90px;">
<strong><span t-field="o.name" /><br/><br/></strong>
<span t-field="o.street" /><br/>
<span>
<span t-field="o.zip"/>
<span t-field="o.city"/>
</span><br/>
<span t-field="o.country_id.name" /><br/>
</div>
</div>
<div style="position:absolute; top:364px">
<h2 style="font-family:Bebasneue-Bold;font-size:20pt;line-height:14pt;">
<div>
<span>COOPERATOR CERTIFICAT</span>
</div>
<div style="width:125px;position:relative;top:10px;border-bottom: 4pt solid #fcc300;"/>
</h2>
<div name="label_coop_number" style="position:relative;top:55px;">
<span t-field="o.name"></span>
<span> is recorded in the register of cooperators under number </span>
<span t-field="o.cooperator_register_number"></span>
</div>
<table class="table border-easymy-coop-cert" style="position:relative;top:85px;width:90%;align:center;">
<thead class="easymy-coop-info-title">
<tr>
<th width="15%">Effective date</th>
<th width="10%">Share type</th>
<th width="10%">Quantity</th>
<th width="15%">Unit Price</th>
<th width="15%">Total</th>
</tr>
</thead>
<tbody class="easymy-coop-normal">
<t t-set="nb_ligne" t-value="0"/>
<t t-foreach="o.share_ids" t-as="line">
<t t-set="nb_ligne" t-value="nb_ligne+1"/>
<tr height="40px">
<div t-if="(nb_ligne%2)==1" >
<td class="lgn_impair">
<span t-field="line.effective_date" ></span>
</td>
<td>
<span t-field="line.share_short_name" ></span>
</td>
<td>
<span t-field="line.share_number" ></span>
</td>
<td>
<span t-field="line.share_unit_price"
t-field-options='{"widget": "monetary", "display_currency": "res_company.currency_id"}'/>
</td>
<td>
<span t-field="line.total_amount_line"
t-field-options='{"widget": "monetary", "display_currency": "res_company.currency_id"}'/>
</td>
</div>
<div t-if="(nb_ligne%2)==0" >
<td class="lgn_pair" style="background-color:#ffffff">
<span t-field="line.effective_date"> </span>
</td>
<td>
<span t-field="line.share_short_name" ></span>
</td>
<td class="lgn_pair" style="background-color:#ffffff">
<span t-field="line.share_number" ></span>
</td>
<td class="lgn_pair" style="background-color:#ffffff">
<span t-field="line.share_unit_price"
t-field-options='{"widget": "monetary", "display_currency": "res_company.currency_id"}'/>
</td>
<td class="lgn_pair" style="background-color:#ffffff">
<span t-field="line.total_amount_line"
t-field-options='{"widget": "monetary", "display_currency": "res_company.currency_id"}'/>
</td>
</div>
</tr>
</t>
</tbody>
</table>
<div name="total_table" class="row">
<div class="col-xs-6 pull-right">
<table class="table table-condensed easymy-coop-info-title" style="position:relative;top:145px;width:85%">
<tr class="border-top-easymy-coop-cert">
<td width="20%"/>
<td class="total_table color_text" style="text-align:center" width="20%">TOTAL : </td>
<td class="total_table" style="text-align:center" width="25%">
<span t-field="o.number_of_share"/>
<span> share(s) </span>
</td>
<td class="total_table" width="25%">
<span t-field="o.total_value"
t-field-options='{"widget": "monetary", "display_currency": "res_company.currency_id"}'/>
</td>
</tr>
</table>
</div>
</div>
<div class="row">
<div name="board_commitee" class="col-xs-6 pull-left" style="position:relative;top:205px;font-size:20;color:black;font-family:Roboto-Regular;">
<div style="position:relative;top:205px;">
Pour le Conseil d'administration de <span t-field="o.company_id.name"/>.
</div>
<div style="position:relative;top:215px;">
<strong><span t-field="o.company_id.board_representative"/></strong>
</div>
<div style="position:relative;top:225px;">
<img t-if="o.company_id.signature_scan" t-att-src="'data:image/png;base64,%s' % o.company_id.signature_scan" style="width:240px;height:200px;padding-bottom:5px;"/>
</div>
</div>
</div>
</div>
</div>
</t>
</template>
<template id="cooperator_certificat_G001">
<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.cooperator_certificat_G001_document" t-lang="o.lang"/>
</t>
</t>
</template>
</data>
</openerp>
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="cooperator_certificat_G001_document">
<t t-call="web.external_layout">
<t t-set="address">
<address t-field="o.commercial_partner_id" t-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": True}' />
</t>
<div class="page mt32">
<h2>
<span>Cooperator Certificate</span>
</h2>
<p class="mt16">
<span t-field="o.name"/>
is recorded in the register of cooperators under number
<span t-field="o.cooperator_register_number"/>.
</p>
<table class="table table-sm o_main_table mt16" name="invoice_line_table">
<thead>
<tr>
<t t-set="colspan" t-value="5"/>
<th class="text-left">Effective date</th>
<th class="text-right">Share type</th>
<th class="text-right">Quantity</th>
<th class="text-right">Unit Price</th>
<th class="text-right">Total</th>
</tr>
</thead>
<tbody class="invoice_tbody">
<t t-set="nb_ligne" t-value="0"/>
<t t-foreach="o.share_ids" t-as="line">
<tr>
<td class="text-left" name="effective_date">
<span t-field="line.effective_date"/>
</td>
<td class="text-right" name="share_short_name">
<span t-field="line.share_short_name"/>
</td>
<td class="text-right" name="share_number">
<span t-field="line.share_number"/>
</td>
<td t-attf-class="text-right {{ 'd-none d-md-table-cell' if report_type == 'html' else '' }}"
name="share_unit_price">
<span t-field="line.share_unit_price"
t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
</td>
<td class="text-right" name="total_amount_line">
<span t-field="line.total_amount_line"
t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
</td>
</tr>
</t>
</tbody>
</table>
<div class="clearfix">
<div id="total" class="row">
<div t-attf-class="#{'col-4' if report_type != 'html' else 'col-sm-7 col-md-5'} ml-auto">
<table class="table table-sm">
<tr class="border-black o_total">
<td><strong>Total</strong></td>
<td class="text-right">
<span t-field="o.number_of_share"/>
<span> share(s) </span>
</td>
<td class="text-right">
<span t-field="o.total_value"
t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="row mt32">
<div name="board_commitee" class="col-sm-6">
<p>
For the board of <span t-field="o.company_id.name"/>.
</p>
<p>
<strong>
<span t-field="o.company_id.board_representative"/>
</strong>
</p>
<img t-if="o.company_id.signature_scan"
t-attf-class="mt16 w-50"
t-attf-style="{{ 'min-width: 100px; max-width: 250px' if report_type == 'pdf' else '' }}"
t-att-src="'data:image/png;base64,%s' % o.company_id.signature_scan.decode()"/>
</div>
</div>
</div>
</t>
</template>
<template id="cooperator_certificat_G001">
<t t-call="web.html_container">
<t t-foreach="docs" t-as="o">
<t t-call="easy_my_coop.cooperator_certificat_G001_document" t-lang="o.lang"/>
</t>
</t>
</template>
</odoo>

3
easy_my_coop/report/cooperator_invoice_G002.xml

@ -4,12 +4,11 @@
<template id="theme_invoice_G002_document">
<t t-call="web.external_layout">
<t t-set="o" t-value="o.with_context({'lang':o.partner_id.lang})" />
<t t-set="address">
<address t-field="o.partner_id" t-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": True}' />
<div t-if="o.partner_id.vat" class="mt16"><t t-esc="o.company_id.country_id.vat_label or 'Tax ID'"/>: <span t-field="o.partner_id.vat"/></div>
</t>
<div class="page">
<div class="page mt32">
<h2>
<span t-if="o.release_capital_request">Request to Release Capital</span>
<span t-else="">

10
easy_my_coop/report/layout.xml

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="emc_external_layout_standard" inherit_id="web.external_layout_standard" primary="True">
<xpath expr="//div[hasclass('header')]//div//img" position="replace">
<img t-if="company.logo" t-att-src="image_data_uri(company.logo)" style="min-height: 75px; max-height: 75px" alt="Logo"/>
</xpath>
</template>
</odoo>
Loading…
Cancel
Save