Apply dotfiles

This commit is contained in:
Stéphane Bidoul
2023-03-13 09:47:33 +01:00
parent 250eeb49ac
commit c59cd1b564
11 changed files with 15 additions and 84 deletions

View File

@@ -138,4 +138,3 @@ repos:
args:
- --rcfile=.pylintrc-mandatory
additional_dependencies: *pylint_deps

View File

@@ -1,50 +0,0 @@
diff a/README.md b/README.md (rejected hunks)
@@ -1,37 +1,14 @@
+![Licence](https://img.shields.io/badge/licence-AGPL--3-blue.svg)
+[![Runbot Status](https://runbot.odoo-community.org/runbot/badge/flat/144/13.0.svg)](https://runbot.odoo-community.org/runbot/repo/github-com-oca-report-print-send-144)
+[![Build Status](https://travis-ci.org/OCA/report-print-send.svg?branch=13.0)](https://travis-ci.org/OCA/report-print-send)
+[![Coverage Status](https://coveralls.io/repos/github/OCA/report-print-send/badge.svg?branch=13.0)](https://coveralls.io/github/OCA/report-print-send?branch=13.0)
-[![Runboat](https://img.shields.io/badge/runboat-Try%20me-875A7B.png)](https://runboat.odoo-community.org/builds?repo=OCA/report-print-send&target_branch=13.0)
-[![Pre-commit Status](https://github.com/OCA/report-print-send/actions/workflows/pre-commit.yml/badge.svg?branch=13.0)](https://github.com/OCA/report-print-send/actions/workflows/pre-commit.yml?query=branch%3A13.0)
-[![Build Status](https://github.com/OCA/report-print-send/actions/workflows/test.yml/badge.svg?branch=13.0)](https://github.com/OCA/report-print-send/actions/workflows/test.yml?query=branch%3A13.0)
-[![codecov](https://codecov.io/gh/OCA/report-print-send/branch/13.0/graph/badge.svg)](https://codecov.io/gh/OCA/report-print-send)
-[![Translation Status](https://translation.odoo-community.org/widgets/report-print-send-13-0/-/svg-badge.svg)](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
+ - ...

View File

@@ -98,8 +98,7 @@ class TestPrintingServer(TransactionCase):
cups.Connection().getPrinters().get.return_value = False
self.Model.action_update_printers()
self.assertEqual(
"unavailable",
rec_id.status,
"unavailable", rec_id.status,
)
@mock.patch("%s.cups" % model)

View File

@@ -63,9 +63,7 @@ class PrintingLabelZpl2(models.Model):
default=True,
)
action_window_id = fields.Many2one(
comodel_name="ir.actions.act_window",
string="Action",
readonly=True,
comodel_name="ir.actions.act_window", string="Action", readonly=True,
)
test_print_mode = fields.Boolean(string="Mode Print")
test_labelary_mode = fields.Boolean(string="Mode Labelary")

View File

@@ -359,9 +359,7 @@ class Zpl2(object):
def _field_data(self, data):
"""Add data to the buffer, between start and stop commands"""
command = "{start}{data}{stop}".format(
start=self._field_data_start(),
data=data,
stop=self._field_data_stop(),
start=self._field_data_start(), data=data, stop=self._field_data_stop(),
)
return command
@@ -500,11 +498,9 @@ class Zpl2(object):
bytes_per_row = rounded_width / 8
total_bytes = bytes_per_row * height
graphic_image_command = (
"^GFA,{total_bytes},{total_bytes},{bytes_per_row},{ascii_data}".format(
total_bytes=total_bytes,
bytes_per_row=bytes_per_row,
ascii_data=ascii_data,
)
"^GFA,{total_bytes},{total_bytes},{bytes_per_row},{ascii_data}"
).format(
total_bytes=total_bytes, bytes_per_row=bytes_per_row, ascii_data=ascii_data,
)
# Generate the ZPL II command
command = "{origin}{data}{stop}".format(

View File

@@ -6,7 +6,7 @@
"version": "13.0.1.1.0",
"category": "Generic Modules/Base",
"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",
"depends": ["base_remote", "base_report_to_printer"],
"data": [

View File

@@ -13,6 +13,4 @@ class PrintingAction(models.Model):
res.append(("remote_default", "Use remote's default"))
return res
action_type = fields.Selection(
selection=_available_action_types,
)
action_type = fields.Selection(selection=_available_action_types,)

View File

@@ -7,8 +7,7 @@ class ResRemote(models.Model):
_inherit = "res.remote"
remote_printer_ids = fields.One2many(
"res.remote.printer",
inverse_name="remote_id",
"res.remote.printer", inverse_name="remote_id",
)
def get_printer_behaviour(self):

View File

@@ -8,19 +8,10 @@ class ResRemotePrinter(models.Model):
_name = "res.remote.printer"
_description = "Remote Printer"
remote_id = fields.Many2one(
"res.remote",
ondelete="cascade",
readonly=True,
)
printer_id = fields.Many2one(
"printing.printer",
ondelete="cascade",
)
remote_id = fields.Many2one("res.remote", ondelete="cascade", readonly=True,)
printer_id = fields.Many2one("printing.printer", ondelete="cascade",)
printer_tray_id = fields.Many2one(
"printing.tray",
ondelete="cascade",
domain="[('printer_id', '=', printer_id)]",
"printing.tray", ondelete="cascade", domain="[('printer_id', '=', printer_id)]",
)
is_default = fields.Boolean(default=False)
printer_usage = fields.Selection([("standard", "Standard")], default="standard")

View File

@@ -1 +1,2 @@
pycups==1.9.74
# generated from manifests external_dependencies
pycups

View File

@@ -9,7 +9,7 @@
"license": "AGPL-3",
"author": "Open Source Integrators, Odoo Community Association (OCA)",
"category": "Generic Modules/Base",
"website": "http://www.opensourceintegrators.com",
"website": "https://github.com/OCA/report-print-send",
"depends": ["sale_stock", "base_report_to_printer"],
"data": ["views/ir_action_report_view.xml"],
"maintainers": ["bodedra"],