From d208570bd4d1044568e667f3bf7ab0cbb91df089 Mon Sep 17 00:00:00 2001 From: Alexei Rivera Date: Sun, 28 Mar 2021 18:10:22 -0400 Subject: [PATCH] [IMP] partner_label: black, isort, prettier --- partner_label/models/res_company.py | 20 ++++++++++++---- partner_label/models/res_config_settings.py | 24 ++++++++++++++----- setup/partner_label/odoo/addons/partner_label | 1 + setup/partner_label/setup.py | 6 +++++ 4 files changed, 41 insertions(+), 10 deletions(-) create mode 120000 setup/partner_label/odoo/addons/partner_label create mode 100644 setup/partner_label/setup.py diff --git a/partner_label/models/res_company.py b/partner_label/models/res_company.py index 8446c787d..d8ead5a6e 100644 --- a/partner_label/models/res_company.py +++ b/partner_label/models/res_company.py @@ -7,16 +7,28 @@ class ResCompany(models.Model): _inherit = "res.company" partner_labels_width = fields.Float( - "Width", default=60, help="Width in millimeters", required=True, + "Width", + default=60, + help="Width in millimeters", + required=True, ) partner_labels_height = fields.Float( - "Height", default=42.3, help="Height in millimeters", required=True, + "Height", + default=42.3, + help="Height in millimeters", + required=True, ) partner_labels_padding = fields.Float( - "Padding", default=5, help="Padding in millimeters", required=True, + "Padding", + default=5, + help="Padding in millimeters", + required=True, ) partner_labels_margin_top = fields.Float( - string="Margin Top", default=1, help="Margin top in millimeters", required=True, + string="Margin Top", + default=1, + help="Margin top in millimeters", + required=True, ) partner_labels_margin_bottom = fields.Float( string="Margin Bottom", diff --git a/partner_label/models/res_config_settings.py b/partner_label/models/res_config_settings.py index d104fb74c..407203287 100644 --- a/partner_label/models/res_config_settings.py +++ b/partner_label/models/res_config_settings.py @@ -7,16 +7,24 @@ class ResConfigSettings(models.TransientModel): _inherit = "res.config.settings" partner_labels_width = fields.Float( - related="company_id.partner_labels_width", required=True, readonly=False, + related="company_id.partner_labels_width", + required=True, + readonly=False, ) partner_labels_height = fields.Float( - related="company_id.partner_labels_height", required=True, readonly=False, + related="company_id.partner_labels_height", + required=True, + readonly=False, ) partner_labels_padding = fields.Float( - related="company_id.partner_labels_padding", required=True, readonly=False, + related="company_id.partner_labels_padding", + required=True, + readonly=False, ) partner_labels_margin_top = fields.Float( - related="company_id.partner_labels_margin_top", required=True, readonly=False, + related="company_id.partner_labels_margin_top", + required=True, + readonly=False, ) partner_labels_margin_bottom = fields.Float( related="company_id.partner_labels_margin_bottom", @@ -24,10 +32,14 @@ class ResConfigSettings(models.TransientModel): readonly=False, ) partner_labels_margin_left = fields.Float( - related="company_id.partner_labels_margin_left", required=True, readonly=False, + related="company_id.partner_labels_margin_left", + required=True, + readonly=False, ) partner_labels_margin_right = fields.Float( - related="company_id.partner_labels_margin_right", required=True, readonly=False, + related="company_id.partner_labels_margin_right", + required=True, + readonly=False, ) partner_labels_paperformat_id = fields.Many2one( "report.paperformat", diff --git a/setup/partner_label/odoo/addons/partner_label b/setup/partner_label/odoo/addons/partner_label new file mode 120000 index 000000000..074036e5d --- /dev/null +++ b/setup/partner_label/odoo/addons/partner_label @@ -0,0 +1 @@ +../../../../partner_label \ No newline at end of file diff --git a/setup/partner_label/setup.py b/setup/partner_label/setup.py new file mode 100644 index 000000000..28c57bb64 --- /dev/null +++ b/setup/partner_label/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +)