[TMP]Qweb report work in proges

This commit is contained in:
michel 2018-02-13 18:13:43 +01:00
parent 680604aecc
commit cec41edc7f
2 changed files with 62 additions and 6 deletions

View File

@ -0,0 +1,33 @@
# -*- coding: utf-8 -*-
#
# Copyright 2016 Fabien Bourgeois <fabien@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/>.
from odoo import models, fields
class GolemMember(models.Model):
_name = '.golem.member.report'
_description = 'Golem member Report'
_sql = """
CREATE OR REPLACE VIEW todo_task_report AS
SELECT *
FROM todo_task
WHERE active = True
"""
name = fields.Char('Description')
is_done = fields.Boolean('Done?')
active = fields.Boolean('Active?')
user_id = fields.Many2one('res.users', 'Responsible')
date_deadline = fields.Date('Deadline')

View File

@ -49,19 +49,42 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<t t-call="report.external_layout">
<div class="page">
<!-- Report page content -->
<div class="col-xs-3">
<div t-field="res_company.partner_id"
t-field-options='{
"widget": "contact",
"fields": ["address", "name", "phone", "fax"],
"no_marker": true}' />
</div>
<table class="table table-striped">
<tr>
<th>Title</th>
<th>Owner</th>
<th>Deadline</th>
<th>Member</th>
<th>Season</th>
</tr>
<t t-foreach="docs" t-as="o">
<tr>
<td class="col-xs-6">
<span t-field="o.name" />
<strong><span t-field="o.name" /></strong><br></br>
<span t-field="o.street" /><br></br>
<t t-if="o.street2">
<span t-field="o.street2" /><br></br>
</t>
<span t-field="o.zip" /><br></br>
<span t-field="o.city" /><br></br>
<t t-if="o.state">
<span t-field="o.state" /><br></br>
</t>
<span t-field="o.country_id" /><br></br>
</td>
<td class="col-xs-3">
<span t-field="o.user_id" />
<td class="col-xs-6">
<span class="" t-field="o.name" /><br></br>
<span t-field="o.street" /><br></br>
<span t-field="o.street2" /><br></br>
<span t-field="o.zip" /><br></br>
<span t-field="o.city" /><br></br>
<span t-field="o.state_id" /><br></br>
<span t-field="o.country_id" /><br></br>
</td>
</tr>
</t>