mirror of
https://github.com/OCA/report-print-send.git
synced 2025-02-16 07:11:31 +02:00
Apply dotfiles
This commit is contained in:
@@ -138,4 +138,3 @@ repos:
|
|||||||
args:
|
args:
|
||||||
- --rcfile=.pylintrc-mandatory
|
- --rcfile=.pylintrc-mandatory
|
||||||
additional_dependencies: *pylint_deps
|
additional_dependencies: *pylint_deps
|
||||||
|
|
||||||
|
|||||||
@@ -1,50 +0,0 @@
|
|||||||
diff a/README.md b/README.md (rejected hunks)
|
|
||||||
@@ -1,37 +1,14 @@
|
|
||||||
+
|
|
||||||
+[](https://runbot.odoo-community.org/runbot/repo/github-com-oca-report-print-send-144)
|
|
||||||
+[](https://travis-ci.org/OCA/report-print-send)
|
|
||||||
+[](https://coveralls.io/github/OCA/report-print-send?branch=13.0)
|
|
||||||
|
|
||||||
-[](https://runboat.odoo-community.org/builds?repo=OCA/report-print-send&target_branch=13.0)
|
|
||||||
-[](https://github.com/OCA/report-print-send/actions/workflows/pre-commit.yml?query=branch%3A13.0)
|
|
||||||
-[](https://github.com/OCA/report-print-send/actions/workflows/test.yml?query=branch%3A13.0)
|
|
||||||
-[](https://codecov.io/gh/OCA/report-print-send)
|
|
||||||
-[](https://translation.odoo-community.org/engage/report-print-send-13-0/?utm_source=widget)
|
|
||||||
+Report - Printing and Sending
|
|
||||||
+=============================
|
|
||||||
|
|
||||||
-<!-- /!\ do not modify above this line -->
|
|
||||||
+This project aim to deal with modules related to manage document printing and sending in a generic way. You'll find modules that:
|
|
||||||
|
|
||||||
-# report-print-send
|
|
||||||
-
|
|
||||||
-TODO: add repo description.
|
|
||||||
-
|
|
||||||
-<!-- /!\ do not modify below this line -->
|
|
||||||
-
|
|
||||||
-<!-- prettier-ignore-start -->
|
|
||||||
-
|
|
||||||
-[//]: # (addons)
|
|
||||||
-
|
|
||||||
-This part will be replaced when running the oca-gen-addons-table script from OCA/maintainer-tools.
|
|
||||||
-
|
|
||||||
-[//]: # (end addons)
|
|
||||||
-
|
|
||||||
-<!-- prettier-ignore-end -->
|
|
||||||
-
|
|
||||||
-## Licenses
|
|
||||||
-
|
|
||||||
-This repository is licensed under [AGPL-3.0](LICENSE).
|
|
||||||
-
|
|
||||||
-However, each module can have a totally different license, as long as they adhere to Odoo Community Association (OCA)
|
|
||||||
-policy. Consult each module's `__manifest__.py` file, which contains a `license` key
|
|
||||||
-that explains its license.
|
|
||||||
-
|
|
||||||
-----
|
|
||||||
-OCA, or the [Odoo Community Association](http://odoo-community.org/), is a nonprofit
|
|
||||||
-organization whose mission is to support the collaborative development of Odoo features
|
|
||||||
-and promote its widespread use.
|
|
||||||
+ - Interface Odoo with Pingen (https://www.pingen.com/en)
|
|
||||||
+ - Add an printing queue
|
|
||||||
+ - Allow to choose printer
|
|
||||||
+ - ...
|
|
||||||
@@ -98,8 +98,7 @@ 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",
|
"unavailable", rec_id.status,
|
||||||
rec_id.status,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
@mock.patch("%s.cups" % model)
|
@mock.patch("%s.cups" % model)
|
||||||
|
|||||||
@@ -63,9 +63,7 @@ class PrintingLabelZpl2(models.Model):
|
|||||||
default=True,
|
default=True,
|
||||||
)
|
)
|
||||||
action_window_id = fields.Many2one(
|
action_window_id = fields.Many2one(
|
||||||
comodel_name="ir.actions.act_window",
|
comodel_name="ir.actions.act_window", string="Action", readonly=True,
|
||||||
string="Action",
|
|
||||||
readonly=True,
|
|
||||||
)
|
)
|
||||||
test_print_mode = fields.Boolean(string="Mode Print")
|
test_print_mode = fields.Boolean(string="Mode Print")
|
||||||
test_labelary_mode = fields.Boolean(string="Mode Labelary")
|
test_labelary_mode = fields.Boolean(string="Mode Labelary")
|
||||||
|
|||||||
@@ -359,9 +359,7 @@ class Zpl2(object):
|
|||||||
def _field_data(self, data):
|
def _field_data(self, data):
|
||||||
"""Add data to the buffer, between start and stop commands"""
|
"""Add data to the buffer, between start and stop commands"""
|
||||||
command = "{start}{data}{stop}".format(
|
command = "{start}{data}{stop}".format(
|
||||||
start=self._field_data_start(),
|
start=self._field_data_start(), data=data, stop=self._field_data_stop(),
|
||||||
data=data,
|
|
||||||
stop=self._field_data_stop(),
|
|
||||||
)
|
)
|
||||||
return command
|
return command
|
||||||
|
|
||||||
@@ -500,11 +498,9 @@ class Zpl2(object):
|
|||||||
bytes_per_row = rounded_width / 8
|
bytes_per_row = rounded_width / 8
|
||||||
total_bytes = bytes_per_row * height
|
total_bytes = bytes_per_row * height
|
||||||
graphic_image_command = (
|
graphic_image_command = (
|
||||||
"^GFA,{total_bytes},{total_bytes},{bytes_per_row},{ascii_data}".format(
|
"^GFA,{total_bytes},{total_bytes},{bytes_per_row},{ascii_data}"
|
||||||
total_bytes=total_bytes,
|
).format(
|
||||||
bytes_per_row=bytes_per_row,
|
total_bytes=total_bytes, bytes_per_row=bytes_per_row, ascii_data=ascii_data,
|
||||||
ascii_data=ascii_data,
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
# Generate the ZPL II command
|
# Generate the ZPL II command
|
||||||
command = "{origin}{data}{stop}".format(
|
command = "{origin}{data}{stop}".format(
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
"version": "13.0.1.1.0",
|
"version": "13.0.1.1.0",
|
||||||
"category": "Generic Modules/Base",
|
"category": "Generic Modules/Base",
|
||||||
"author": "Creu Blanca, Odoo Community Association (OCA)",
|
"author": "Creu Blanca, Odoo Community Association (OCA)",
|
||||||
"website": "http://www.github.com/OCA/report-print-send",
|
"website": "https://github.com/OCA/report-print-send",
|
||||||
"license": "AGPL-3",
|
"license": "AGPL-3",
|
||||||
"depends": ["base_remote", "base_report_to_printer"],
|
"depends": ["base_remote", "base_report_to_printer"],
|
||||||
"data": [
|
"data": [
|
||||||
|
|||||||
@@ -13,6 +13,4 @@ class PrintingAction(models.Model):
|
|||||||
res.append(("remote_default", "Use remote's default"))
|
res.append(("remote_default", "Use remote's default"))
|
||||||
return res
|
return res
|
||||||
|
|
||||||
action_type = fields.Selection(
|
action_type = fields.Selection(selection=_available_action_types,)
|
||||||
selection=_available_action_types,
|
|
||||||
)
|
|
||||||
|
|||||||
@@ -7,8 +7,7 @@ class ResRemote(models.Model):
|
|||||||
_inherit = "res.remote"
|
_inherit = "res.remote"
|
||||||
|
|
||||||
remote_printer_ids = fields.One2many(
|
remote_printer_ids = fields.One2many(
|
||||||
"res.remote.printer",
|
"res.remote.printer", inverse_name="remote_id",
|
||||||
inverse_name="remote_id",
|
|
||||||
)
|
)
|
||||||
|
|
||||||
def get_printer_behaviour(self):
|
def get_printer_behaviour(self):
|
||||||
|
|||||||
@@ -8,19 +8,10 @@ class ResRemotePrinter(models.Model):
|
|||||||
_name = "res.remote.printer"
|
_name = "res.remote.printer"
|
||||||
_description = "Remote Printer"
|
_description = "Remote Printer"
|
||||||
|
|
||||||
remote_id = fields.Many2one(
|
remote_id = fields.Many2one("res.remote", ondelete="cascade", readonly=True,)
|
||||||
"res.remote",
|
printer_id = fields.Many2one("printing.printer", ondelete="cascade",)
|
||||||
ondelete="cascade",
|
|
||||||
readonly=True,
|
|
||||||
)
|
|
||||||
printer_id = fields.Many2one(
|
|
||||||
"printing.printer",
|
|
||||||
ondelete="cascade",
|
|
||||||
)
|
|
||||||
printer_tray_id = fields.Many2one(
|
printer_tray_id = fields.Many2one(
|
||||||
"printing.tray",
|
"printing.tray", ondelete="cascade", domain="[('printer_id', '=', printer_id)]",
|
||||||
ondelete="cascade",
|
|
||||||
domain="[('printer_id', '=', printer_id)]",
|
|
||||||
)
|
)
|
||||||
is_default = fields.Boolean(default=False)
|
is_default = fields.Boolean(default=False)
|
||||||
printer_usage = fields.Selection([("standard", "Standard")], default="standard")
|
printer_usage = fields.Selection([("standard", "Standard")], default="standard")
|
||||||
|
|||||||
@@ -1 +1,2 @@
|
|||||||
pycups==1.9.74
|
# generated from manifests external_dependencies
|
||||||
|
pycups
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
"license": "AGPL-3",
|
"license": "AGPL-3",
|
||||||
"author": "Open Source Integrators, Odoo Community Association (OCA)",
|
"author": "Open Source Integrators, Odoo Community Association (OCA)",
|
||||||
"category": "Generic Modules/Base",
|
"category": "Generic Modules/Base",
|
||||||
"website": "http://www.opensourceintegrators.com",
|
"website": "https://github.com/OCA/report-print-send",
|
||||||
"depends": ["sale_stock", "base_report_to_printer"],
|
"depends": ["sale_stock", "base_report_to_printer"],
|
||||||
"data": ["views/ir_action_report_view.xml"],
|
"data": ["views/ir_action_report_view.xml"],
|
||||||
"maintainers": ["bodedra"],
|
"maintainers": ["bodedra"],
|
||||||
|
|||||||
Reference in New Issue
Block a user