Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[16.0][MIG] cb_knowledge: Migration to 16.0 #520

Merged
merged 9 commits into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions cb_knowledge/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
============
Cb Knowledge
============

Knowledge for CB
Empty file added cb_knowledge/__init__.py
Empty file.
18 changes: 18 additions & 0 deletions cb_knowledge/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright 2019 Creu Blanca
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "Cb Knowledge",
"summary": """
Knowledge for CB""",
"version": "16.0.1.0.0",
"license": "AGPL-3",
"author": "CreuBlanca,Odoo Community Association (OCA)",
"website": "https://github.com/tegin/cb-addons",
"depends": [
"document_page_reference",
"document_page_approval",
"report_qr",
],
"data": ["views/report_document_page.xml"],
}
Binary file added cb_knowledge/static/description/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
73 changes: 73 additions & 0 deletions cb_knowledge/views/report_document_page.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<template t-name="cb_knowledge.document_structure">
<t t-set="company" t-value="doc.company_id.sudo()" />
<t t-if="not company">
<t t-set="company" t-value="doc.env.user.company_id.sudo()" />
</t>
<div class="header">
<div class="o_boxed_header">
<div class="row mb8">
<div class="col-2">
<img
t-if="company.logo"
t-att-src="image_data_uri(company.logo)"
t-att-style="'max-height: %dmm;' % (din_header_spacing or 35)"
/>
</div>
<div class="col-7 text-left mb4">
<h4 class="mt0" t-field="doc.name" />
</div>
<div class="col-3 text-left mb4">
<h6 class="mt0">
<span>Version:</span>
<span t-field="doc.history_head.name" />
</h6>
<h6 class="mt0">
<span>Approved:</span>
<span
t-field="doc.approved_date"
t-options="{'widget': 'date'}"
/>
</h6>
</div>
</div>
</div>
<div class="row">
<div class="col-2">
<span style="font-size:10px" t-esc="doc.reference" />
</div>
</div>
</div>
<div class="article o_report_layout_boxed">
<t t-raw="0" />
</div>
<div class="footer o_boxed_footer">
<div class="row">
<div class="col-3">
<img
t-att-src="'/report/qr/?value=%s&amp;error_correction=%s' % (doc.reference, 3)"
style="width:100;height:100"
t-if="doc.reference"
/>
</div>
<div class="text-center col-6">
<div>
Page: <span class="page" /> / <span class="topage" />
</div>
</div>
</div>
</div>
</template>
<template
id="report_documentpage_doc"
inherit_id="document_page.report_documentpage_doc"
>
<xpath expr="//t[@t-call='web.external_layout']" position="attributes">
<attribute name="t-call">cb_knowledge.document_structure</attribute>
</xpath>
<xpath expr="//h1[@t-field='doc.name']" position="attributes">
<attribute name="t-if">1==0</attribute>
</xpath>
</template>
</odoo>
1 change: 1 addition & 0 deletions setup/cb_knowledge/odoo/addons/cb_knowledge
6 changes: 6 additions & 0 deletions setup/cb_knowledge/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import setuptools

setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
Loading