Browse Source

[IMP] report_xml: black, isort, prettier

myc-14.0-py3o
Francisco Ivan Anton Prieto 4 years ago
committed by Enric Tobella
parent
commit
09d1d54ee6
  1. 20
      report_xml/demo/demo_report.xsd
  2. 6
      report_xml/static/src/js/report/action_manager_report.js
  3. 1
      requirements.txt
  4. 1
      setup/report_xml/odoo/addons/report_xml
  5. 6
      setup/report_xml/setup.py

20
report_xml/demo/demo_report.xsd

@ -1,22 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="root" type="root_type"/>
<xs:element name="root" type="root_type" />
<xs:complexType name="root_type">
<xs:sequence>
<xs:element name="user"
type="user_type"
minOccurs="0"
maxOccurs="unbounded"/>
<xs:element
name="user"
type="user_type"
minOccurs="0"
maxOccurs="unbounded"
/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="user_type">
<xs:sequence>
<xs:element name="id" type="xs:int"/>
<xs:element name="name" type="xs:string"/>
<xs:element name="vat" type="xs:string" minOccurs="0"/>
<xs:element name="id" type="xs:int" />
<xs:element name="name" type="xs:string" />
<xs:element name="vat" type="xs:string" minOccurs="0" />
</xs:sequence>
</xs:complexType>

6
report_xml/static/src/js/report/action_manager_report.js

@ -1,16 +1,16 @@
odoo.define("report_xml.ReportActionManager", function(require) {
odoo.define("report_xml.ReportActionManager", function (require) {
"use strict";
var ActionManager = require("web.ActionManager");
ActionManager.include({
_executeReportAction: function(action, options) {
_executeReportAction: function (action, options) {
if (action.report_type === "qweb-xml") {
return this._triggerDownload(action, options, "xml");
}
return this._super(action, options);
},
_makeReportUrls: function(action) {
_makeReportUrls: function (action) {
var reportUrls = this._super(action);
reportUrls.xml = reportUrls.text.replace("/report/text/", "/report/xml/");
return reportUrls;

1
requirements.txt

@ -1,4 +1,5 @@
# generated from manifests external_dependencies
lxml
PyPDF2
xlrd
xlsxwriter

1
setup/report_xml/odoo/addons/report_xml

@ -0,0 +1 @@
../../../../report_xml

6
setup/report_xml/setup.py

@ -0,0 +1,6 @@
import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
Loading…
Cancel
Save