Skip to content
Snippets Groups Projects
Commit aaf066c3255d authored by Houzefa Abbasbhay's avatar Houzefa Abbasbhay :slight_smile:
Browse files

Code formatting, add license / docs / badges

parent dfe6e5361b75
No related branches found
No related tags found
1 merge request!29QOL & tests
<?xml version="1.0" encoding="UTF-8" ?>
<svg xmlns="http://www.w3.org/2000/svg" width="114" height="20">
<linearGradient id="b" x2="0" y2="100%">
<stop offset="0" stop-color="#bbb" stop-opacity=".1" />
<stop offset="1" stop-opacity=".1" />
</linearGradient>
<mask id="anybadge_1">
<rect width="114" height="20" rx="3" fill="#fff" />
</mask>
<g mask="url(#anybadge_1)">
<path fill="#555" d="M0 0h72v20H0z" />
<path fill="#000000" d="M72 0h42v20H72z" />
<path fill="url(#b)" d="M0 0h114v20H0z" />
</g>
<g
fill="#fff"
text-anchor="middle"
font-family="DejaVu Sans,Verdana,Geneva,sans-serif"
font-size="11"
>
<text x="37.0" y="15" fill="#010101" fill-opacity=".3">code style</text>
<text x="36.0" y="14">code style</text>
</g>
<g
fill="#fff"
text-anchor="middle"
font-family="DejaVu Sans,Verdana,Geneva,sans-serif"
font-size="11"
>
<text x="94.0" y="15" fill="#010101" fill-opacity=".3">black</text>
<text x="93.0" y="14">black</text>
</g>
</svg>
<?xml version="1.0" encoding="UTF-8" ?>
<svg xmlns="http://www.w3.org/2000/svg" width="129" height="20">
<linearGradient id="b" x2="0" y2="100%">
<stop offset="0" stop-color="#bbb" stop-opacity=".1" />
<stop offset="1" stop-opacity=".1" />
</linearGradient>
<mask id="anybadge_1">
<rect width="129" height="20" rx="3" fill="#fff" />
</mask>
<g mask="url(#anybadge_1)">
<path fill="#555" d="M0 0h72v20H0z" />
<path fill="#ff69b4" d="M72 0h57v20H72z" />
<path fill="url(#b)" d="M0 0h129v20H0z" />
</g>
<g
fill="#fff"
text-anchor="middle"
font-family="DejaVu Sans,Verdana,Geneva,sans-serif"
font-size="11"
>
<text x="37.0" y="15" fill="#010101" fill-opacity=".3">code style</text>
<text x="36.0" y="14">code style</text>
</g>
<g
fill="#fff"
text-anchor="middle"
font-family="DejaVu Sans,Verdana,Geneva,sans-serif"
font-size="11"
>
<text x="101.5" y="15" fill="#010101" fill-opacity=".3">prettier</text>
<text x="100.5" y="14">prettier</text>
</g>
</svg>
<?xml version="1.0" encoding="UTF-8" ?>
<svg xmlns="http://www.w3.org/2000/svg" width="124" height="20">
<linearGradient id="b" x2="0" y2="100%">
<stop offset="0" stop-color="#bbb" stop-opacity=".1" />
<stop offset="1" stop-opacity=".1" />
</linearGradient>
<mask id="anybadge_1">
<rect width="124" height="20" rx="3" fill="#fff" />
</mask>
<g mask="url(#anybadge_1)">
<path fill="#555" d="M0 0h65v20H0z" />
<path fill="#808080" d="M65 0h59v20H65z" />
<path fill="url(#b)" d="M0 0h124v20H0z" />
</g>
<g
fill="#fff"
text-anchor="middle"
font-family="DejaVu Sans,Verdana,Geneva,sans-serif"
font-size="11"
>
<text x="33.5" y="15" fill="#010101" fill-opacity=".3">coverage</text>
<text x="32.5" y="14">coverage</text>
</g>
<g
fill="#fff"
text-anchor="middle"
font-family="DejaVu Sans,Verdana,Geneva,sans-serif"
font-size="11"
>
<text x="95.5" y="15" fill="#010101" fill-opacity=".3">unknown</text>
<text x="94.5" y="14">unknown</text>
</g>
</svg>
<?xml version="1.0" encoding="UTF-8" ?>
<svg xmlns="http://www.w3.org/2000/svg" width="107" height="20">
<linearGradient id="b" x2="0" y2="100%">
<stop offset="0" stop-color="#bbb" stop-opacity=".1" />
<stop offset="1" stop-opacity=".1" />
</linearGradient>
<mask id="anybadge_1">
<rect width="107" height="20" rx="3" fill="#fff" />
</mask>
<g mask="url(#anybadge_1)">
<path fill="#555" d="M0 0h53v20H0z" />
<path fill="#0000FF" d="M53 0h54v20H53z" />
<path fill="url(#b)" d="M0 0h107v20H0z" />
</g>
<g
fill="#fff"
text-anchor="middle"
font-family="DejaVu Sans,Verdana,Geneva,sans-serif"
font-size="11"
>
<text x="27.5" y="15" fill="#010101" fill-opacity=".3">licence</text>
<text x="26.5" y="14">licence</text>
</g>
<g
fill="#fff"
text-anchor="middle"
font-family="DejaVu Sans,Verdana,Geneva,sans-serif"
font-size="11"
>
<text x="81.0" y="15" fill="#010101" fill-opacity=".3">AGPL-3</text>
<text x="80.0" y="14">AGPL-3</text>
</g>
</svg>
<?xml version="1.0" encoding="UTF-8" ?>
<svg xmlns="http://www.w3.org/2000/svg" width="108" height="20">
<linearGradient id="b" x2="0" y2="100%">
<stop offset="0" stop-color="#bbb" stop-opacity=".1" />
<stop offset="1" stop-opacity=".1" />
</linearGradient>
<mask id="anybadge_1">
<rect width="108" height="20" rx="3" fill="#fff" />
</mask>
<g mask="url(#anybadge_1)">
<path fill="#555" d="M0 0h61v20H0z" />
<path fill="#4C1" d="M61 0h47v20H61z" />
<path fill="url(#b)" d="M0 0h108v20H0z" />
</g>
<g
fill="#fff"
text-anchor="middle"
font-family="DejaVu Sans,Verdana,Geneva,sans-serif"
font-size="11"
>
<text x="31.5" y="15" fill="#010101" fill-opacity=".3">maturity</text>
<text x="30.5" y="14">maturity</text>
</g>
<g
fill="#fff"
text-anchor="middle"
font-family="DejaVu Sans,Verdana,Geneva,sans-serif"
font-size="11"
>
<text x="85.5" y="15" fill="#010101" fill-opacity=".3">Stable</text>
<text x="84.5" y="14">Stable</text>
</g>
</svg>
<?xml version="1.0" encoding="UTF-8" ?>
<svg xmlns="http://www.w3.org/2000/svg" width="103" height="20">
<linearGradient id="b" x2="0" y2="100%">
<stop offset="0" stop-color="#bbb" stop-opacity=".1" />
<stop offset="1" stop-opacity=".1" />
</linearGradient>
<mask id="anybadge_1">
<rect width="103" height="20" rx="3" fill="#fff" />
</mask>
<g mask="url(#anybadge_1)">
<path fill="#555" d="M0 0h44v20H0z" />
<path fill="#808080" d="M44 0h59v20H44z" />
<path fill="url(#b)" d="M0 0h103v20H0z" />
</g>
<g
fill="#fff"
text-anchor="middle"
font-family="DejaVu Sans,Verdana,Geneva,sans-serif"
font-size="11"
>
<text x="23.0" y="15" fill="#010101" fill-opacity=".3">pylint</text>
<text x="22.0" y="14">pylint</text>
</g>
<g
fill="#fff"
text-anchor="middle"
font-family="DejaVu Sans,Verdana,Geneva,sans-serif"
font-size="11"
>
<text x="74.5" y="15" fill="#010101" fill-opacity=".3">unknown</text>
<text x="73.5" y="14">unknown</text>
</g>
</svg>
# Configuration for known file extensions
[*.{css,htm,html,js,json,jsx,less,markdown,md,py,rst,sass,scss,toml,xml,yaml,yml}]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
[*.{json,yml,yaml,rst,markdown,md,toml}]
indent_size = 2
# Do not configure editor for libs
[{*/static/{lib,src/lib}/**}]
charset = unset
end_of_line = unset
indent_size = unset
indent_style = unset
insert_final_newline = false
trim_trailing_whitespace = false
[flake8]
per-file-ignores=
__init__.py:F401
include:
- project: xcg/ci-templates
file: /odoo/11.0/gitlab-ci.yaml
# vim: set shiftwidth=2:
syntax: glob
*.pyc
*~
*.swp
pyproject.toml
.isort.cfg
./doc/_build
./doc/autotodo
# Defaults for all prettier-supported languages.
# Prettier will complete this with settings from .editorconfig file.
bracketSpacing: false
printWidth: 88
proseWrap: always
semi: true
trailingComma: "es5"
xmlWhitespaceSensitivity: "ignore"
rules:
document-start: disable
indentation:
indent-sequences: true
LICENSE 0 → 100644
This diff is collapsed.
====
NEWS
====
=========
Changelog
=========
11.0.2.9.0
----------
* Code formatting, add license / docs / badges.
11.0.2.8.1
......@@ -4,7 +9,7 @@
11.0.2.8.1
==========
----------
* Fix send_to_rednerd_server to handle ODT document.
11.0.2.8.0
......@@ -7,9 +12,9 @@
* Fix send_to_rednerd_server to handle ODT document.
11.0.2.8.0
==========
----------
* Server URL rework: Expect an URL without path, add /api/v1 in the code.
11.0.2.7.0
......@@ -12,9 +17,9 @@
* Server URL rework: Expect an URL without path, add /api/v1 in the code.
11.0.2.7.0
==========
----------
Improve search view of redner templates.
11.0.2.6.0
......@@ -17,9 +22,9 @@
Improve search view of redner templates.
11.0.2.6.0
==========
----------
Redner server an use an unix socket too so also handle it.
11.0.2.5.1
......@@ -22,10 +27,10 @@
Redner server an use an unix socket too so also handle it.
11.0.2.5.1
==========
----------
* Sort substitutions by keyword to improve readability in redner report.
* Add confirmation on the get substitutions button to protect it from unwanted actions.
11.0.2.5.0
......@@ -27,10 +32,10 @@
* Sort substitutions by keyword to improve readability in redner report.
* Add confirmation on the get substitutions button to protect it from unwanted actions.
11.0.2.5.0
==========
----------
* Configurable timeout for redner calls, default is 20 seconds.
11.0.2.4.1
......@@ -33,9 +38,9 @@
* Configurable timeout for redner calls, default is 20 seconds.
11.0.2.4.1
==========
----------
* Improve logging - request contents only logged at debug level.
11.0.2.4.0
......@@ -38,9 +43,9 @@
* Improve logging - request contents only logged at debug level.
11.0.2.4.0
==========
----------
* Allow 1 report on multiple records.
11.0.2.3
......@@ -43,9 +48,9 @@
* Allow 1 report on multiple records.
11.0.2.3
========
--------
* Add a new template engine "od+mustache"
11.0.2.2
......@@ -48,7 +53,7 @@
* Add a new template engine "od+mustache"
11.0.2.2
========
--------
* Previous working 11.0 version.
......@@ -2,9 +2,32 @@
Redner
======
Redner is an innovative solution to produce transactional emails
.. |coverage| image:: .badges/coverage.svg
:target: https://orus.io/xcg/odoo-modules/redner/-/pipelines?ref=branch/11.0
:alt: Coverage report
.. |pylint| image:: .badges/pylint.svg
:target: https://orus.io/xcg/odoo-modules/redner/-/pipelines?ref=branch/11.0
:alt: pylint score
.. |maturity| image:: .badges/maturity.svg
:target: https://odoo-community.org/page/development-status
:alt: Stable
.. |license| image:: .badges/licence-AGPL--3-blue.svg
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |black| image:: .badges/code_style-black-000000.svg
:target: https://github.com/psf/black
:alt: Black
.. |prettier| image:: .badges/code_style-prettier-ff69b4.svg
:target: https://github.com/prettier/prettier
:alt: Prettier
|coverage| |pylint| |maturity| |license| |black| |prettier|
Produce reports & emails with Redner_.
Redner_ is an innovative solution to produce transactional emails
and documents in PDF or HTML format.
It's designed to help applications or websites that need to send transactional
email like password resets, order confirmations, and welcome messages.
......@@ -6,9 +29,9 @@
and documents in PDF or HTML format.
It's designed to help applications or websites that need to send transactional
email like password resets, order confirmations, and welcome messages.
Redner offers advanced tracking, easy-to-understand reports & email
Redner_ offers advanced tracking, easy-to-understand reports & email
templates.
This Module allow you to use email template designed with mailjet app
(languages uses in template must be mjml or mustache) which you can add
......@@ -36,3 +59,4 @@
"Send to redner server".
.. _mjml-app: http://mjmlio.github.io/mjml-app/
.. _Redner: https://orus.io/orus-io/rednerd
# flake8: noqa
from . import controllers, models
###############################################################################
##############################################################################
#
......@@ -2,6 +2,6 @@
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2016, 2022 XCG Consulting (http://www.xcg-consulting.fr/)
# Redner Odoo module
# Copyright (C) 2016 XCG Consulting <https://xcg-consulting.fr>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
......@@ -16,6 +16,7 @@
# 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/>.
#
###############################################################################
##############################################################################
{
"name": "Redner",
......@@ -20,5 +21,4 @@
{
"name": "Redner",
"summary": """
Allows to generate transactional emails and documents in PDF or HTML format""",
"license": "AGPL-3",
"version": "11.0.2.8.1",
......@@ -24,2 +24,3 @@
"version": "11.0.2.8.1",
"category": "Reporting",
"author": "XCG Consulting",
......@@ -25,6 +26,7 @@
"author": "XCG Consulting",
"category": "Technical",
"depends": ["base", "mail", "converter"],
"website": "https://odoo.consulting/",
# converter: https://orus.io/xcg/odoo-modules/converter
"depends": ["converter", "mail", "web"],
"data": [
"security/ir.model.access.csv",
"views/redner_template_views.xml",
......@@ -33,4 +35,6 @@
"views/report_redner.xml",
"views/menu.xml",
],
"installable": True,
# These dependencies are in the "requirements" file.
"external_dependencies": {"python": ["requests_unixsocket"]},
......@@ -36,3 +40,2 @@
"external_dependencies": {"python": ["requests_unixsocket"]},
"demo": [],
}
from . import main # noqa: F401
from . import main
##############################################################################
#
# Redner Odoo module
# Copyright (C) 2016 XCG Consulting <https://xcg-consulting.fr>
#
# 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/>.
#
##############################################################################
import json
import mimetypes
......
##############################################################################
#
# Redner Odoo module
# Copyright (C) 2016 XCG Consulting <https://xcg-consulting.fr>
#
# 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/>.
#
##############################################################################
import base64
from typing import Any, Dict, Optional
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment