forked from Yaltik/golem
109 lines
3.9 KiB
XML
109 lines
3.9 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
|
|
<!--
|
|
Copyright 2018 Fabien Bourgeois <fabien@yaltik.com>
|
|
Copyright 2018 Michel Dessenne <michel@yaltik.com>
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
|
it under the terms of the GNU Affero General Public License as published by
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
(at your option) any later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU Affero General Public License for more details.
|
|
|
|
You should have received a copy of the GNU Affero General Public License
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
-->
|
|
|
|
<odoo>
|
|
|
|
<report id="golem_family_report_pdf" model="golem.family"
|
|
string="Golem family report [PDF]" report_type="qweb-pdf"
|
|
name="golem_family.golem_family_card_template"
|
|
file="golem_family.golem_family_card_template"
|
|
attachment="(object.name + '.pdf')" />
|
|
<report id="golem_family_report_html" model="golem.family"
|
|
string="Golem family report [HTML]" report_type="qweb-html"
|
|
name="golem_family.golem_family_card_template"
|
|
file="golem_family.golem_family_card_template"
|
|
attachment="(object.name + '.html')" />
|
|
|
|
<template id="golem_family_card_template">
|
|
<t t-call="report.html_container">
|
|
<t t-call="report.external_layout">
|
|
<div class="page">
|
|
<t t-foreach="docs" t-as="o">
|
|
<div class="oe_structure"/>
|
|
<div class="row">
|
|
<div class="col-xs-12">
|
|
<h2 class="golem_report_title">
|
|
Family <span t-field="o.name" />
|
|
</h2>
|
|
</div>
|
|
<div class="col-xs-6">
|
|
<h3>Details</h3>
|
|
<t if="o.city">
|
|
<address>
|
|
<strong>Address</strong> :
|
|
<span t-field="o.street" /><br />
|
|
<t t-if="o.street2">
|
|
<span t-field="o.street2" /><br />
|
|
</t>
|
|
<span t-field="o.zip" />
|
|
<span t-field="o.city" /><br />
|
|
</address>
|
|
</t>
|
|
<t t-if="o.state_id">
|
|
<strong>State</strong> :
|
|
<span t-field="o.state_id" /><br />
|
|
</t>
|
|
<t t-if="o.country_id">
|
|
<strong>Country</strong> :
|
|
<span t-field="o.country_id" />
|
|
</t>
|
|
</div>
|
|
<div class="col-xs-6">
|
|
<h3>Communication</h3>
|
|
<t t-if="o.phone">
|
|
Phone : <span t-field="o.phone" /><br />
|
|
</t>
|
|
<t t-if="o.mobile">
|
|
Mobile : <span t-field="o.mobile" /><br />
|
|
</t>
|
|
<t t-if="o.email">
|
|
Mail : <span t-field="o.email" /><br />
|
|
</t>
|
|
<t t-if="o.website">
|
|
Website : <span t-field="o.website" /><br />
|
|
</t>
|
|
</div>
|
|
</div>
|
|
</t>
|
|
</div>
|
|
<t t-foreach="docs" t-as="o">
|
|
<t t-foreach="o.member_ids" t-as="i" >
|
|
<t t-call="golem_member.golem_member_card_template" >
|
|
<t t-set="docs" t-value="i.member_id" />
|
|
</t>
|
|
</t>
|
|
</t>
|
|
</t>
|
|
</t>
|
|
</template>
|
|
|
|
<template id="golem_member_card_template_inherit_golem_family"
|
|
inherit_id="golem_member.golem_member_card_template">
|
|
<xpath expr="//div[@id='season_info']" position="before">
|
|
<div class="col-xs-12 text-right" id="family_info" t-if="member.family_id">
|
|
<strong>Family </strong> <span t-field="member.family_id.name" />
|
|
<t t-if="member.family_role">(<em t-field="member.family_role.name" />)</t>
|
|
</div>
|
|
</xpath>
|
|
</template>
|
|
|
|
|
|
</odoo>
|