mirror of
https://github.com/OCA/report-print-send.git
synced 2025-02-16 07:11:31 +02:00
[IMP] base_report_to_printer: black, isort, prettier
This commit is contained in:
@@ -133,8 +133,7 @@ class TestIrActionsReportXml(TransactionCase):
|
|||||||
)
|
)
|
||||||
|
|
||||||
def test_behaviour_printing_action_on_wrong_user(self):
|
def test_behaviour_printing_action_on_wrong_user(self):
|
||||||
""" It should return the action and printer ignoring printing action
|
"""It should return the action and printer ignoring printing action"""
|
||||||
"""
|
|
||||||
report = self.Model.search([], limit=1)
|
report = self.Model.search([], limit=1)
|
||||||
self.env.user.printing_action = "client"
|
self.env.user.printing_action = "client"
|
||||||
printing_action = self.new_printing_action()
|
printing_action = self.new_printing_action()
|
||||||
@@ -147,8 +146,7 @@ class TestIrActionsReportXml(TransactionCase):
|
|||||||
)
|
)
|
||||||
|
|
||||||
def test_behaviour_printing_action_on_wrong_report(self):
|
def test_behaviour_printing_action_on_wrong_report(self):
|
||||||
""" It should return the action and printer ignoring printing action
|
"""It should return the action and printer ignoring printing action"""
|
||||||
"""
|
|
||||||
report = self.Model.search([], limit=1)
|
report = self.Model.search([], limit=1)
|
||||||
self.env.user.printing_action = "client"
|
self.env.user.printing_action = "client"
|
||||||
printing_action = self.new_printing_action()
|
printing_action = self.new_printing_action()
|
||||||
|
|||||||
@@ -98,7 +98,8 @@ class TestPrintingServer(TransactionCase):
|
|||||||
cups.Connection().getPrinters().get.return_value = False
|
cups.Connection().getPrinters().get.return_value = False
|
||||||
self.Model.action_update_printers()
|
self.Model.action_update_printers()
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
"unavailable", rec_id.status,
|
"unavailable",
|
||||||
|
rec_id.status,
|
||||||
)
|
)
|
||||||
|
|
||||||
@mock.patch("%s.cups" % model)
|
@mock.patch("%s.cups" % model)
|
||||||
|
|||||||
@@ -82,8 +82,7 @@ class TestReport(common.HttpCase):
|
|||||||
self.assertFalse(res)
|
self.assertFalse(res)
|
||||||
|
|
||||||
def test_render_qweb_pdf_not_printable(self):
|
def test_render_qweb_pdf_not_printable(self):
|
||||||
""" It should print the report, only if it is printable
|
"""It should print the report, only if it is printable"""
|
||||||
"""
|
|
||||||
with mock.patch(
|
with mock.patch(
|
||||||
"odoo.addons.base_report_to_printer.models."
|
"odoo.addons.base_report_to_printer.models."
|
||||||
"printing_printer.PrintingPrinter."
|
"printing_printer.PrintingPrinter."
|
||||||
@@ -93,8 +92,7 @@ class TestReport(common.HttpCase):
|
|||||||
print_document.assert_not_called()
|
print_document.assert_not_called()
|
||||||
|
|
||||||
def test_render_qweb_pdf_printable(self):
|
def test_render_qweb_pdf_printable(self):
|
||||||
""" It should print the report, only if it is printable
|
"""It should print the report, only if it is printable"""
|
||||||
"""
|
|
||||||
with mock.patch(
|
with mock.patch(
|
||||||
"odoo.addons.base_report_to_printer.models."
|
"odoo.addons.base_report_to_printer.models."
|
||||||
"printing_printer.PrintingPrinter."
|
"printing_printer.PrintingPrinter."
|
||||||
|
|||||||
2
requirements.txt
Normal file
2
requirements.txt
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
# generated from manifests external_dependencies
|
||||||
|
pycups
|
||||||
1
setup/base_report_to_printer/odoo/addons/base_report_to_printer
Symbolic link
1
setup/base_report_to_printer/odoo/addons/base_report_to_printer
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../../../../base_report_to_printer
|
||||||
6
setup/base_report_to_printer/setup.py
Normal file
6
setup/base_report_to_printer/setup.py
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
import setuptools
|
||||||
|
|
||||||
|
setuptools.setup(
|
||||||
|
setup_requires=['setuptools-odoo'],
|
||||||
|
odoo_addon=True,
|
||||||
|
)
|
||||||
Reference in New Issue
Block a user