[IMP] report_qweb_signer: Black python code

This commit is contained in:
Laurent-Corron
2021-06-29 10:10:17 +02:00
committed by Omar (Comunitea)
parent e9665dcfb3
commit b2b51f0e4c
13 changed files with 217 additions and 183 deletions

View File

@@ -1,20 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8" ?>
<!--
Copyright 2015 Tecnativa - Antonio Espinosa
Copyright 2017 Tecnativa - Pedro M. Baeza
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
-->
<odoo noupdate="1">
<record id="demo_certificate_test" model="report.certificate">
<field name="company_id" ref="base.main_company"/>
<field name="company_id" ref="base.main_company" />
<field name="name">Test OCA certificate</field>
<field name="path">test.p12</field>
<field name="password_file">test.passwd</field>
<field name="model_id" ref="base.model_res_partner"/>
<field name="model_id" ref="base.model_res_partner" />
<field name="domain">[('customer', '=', True)]</field>
<field name="allow_only_one" eval="True"/>
<field name="attachment">'test_' + (object.name or '').replace(' ', '_').lower() + '.signed.pdf'</field>
<field name="allow_only_one" eval="True" />
<field
name="attachment"
>'test_' + (object.name or '').replace(' ', '_').lower() + '.signed.pdf'</field>
</record>
</odoo>

View File

@@ -1,45 +1,46 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8" ?>
<!--
Copyright 2015 Tecnativa - Antonio Espinosa
Copyright 2017 Tecnativa - Pedro M. Baeza
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
-->
<odoo>
<template id="report_partner_demo_document">
<t t-call="web.external_layout">
<div class="page">
<div class="row">
<div class="col-md-12">
<span>This is a sample report for testing PDF certificates.</span>
<span
>This is a sample report for testing PDF certificates.</span>
</div>
</div>
<div class="row">
<div class="col-md-12">
<strong>Partner:</strong> <span t-field="o.name"/>
<strong>Partner:</strong>
<span t-field="o.name" />
</div>
</div>
</div>
</t>
</template>
<template id="report_partner_demo">
<t t-call="web.html_container">
<t t-foreach="docs" t-as="o">
<t t-call="report_qweb_signer.report_partner_demo_document" t-lang="o.lang"/>
<t
t-call="report_qweb_signer.report_partner_demo_document"
t-lang="o.lang"
/>
</t>
</t>
</template>
<report
id="partner_demo_report"
model="res.partner"
string="Test PDF certificate"
report_type="qweb-pdf"
name="report_qweb_signer.report_partner_demo"
file="report_qweb_signer.report_partner_demo"
attachment_use="True"
attachment="'test_' + (object.name or '').replace(' ', '_').lower() + '.pdf'"
id="partner_demo_report"
model="res.partner"
string="Test PDF certificate"
report_type="qweb-pdf"
name="report_qweb_signer.report_partner_demo"
file="report_qweb_signer.report_partner_demo"
attachment_use="True"
attachment="'test_' + (object.name or '').replace(' ', '_').lower() + '.pdf'"
/>
</odoo>