Browse Source

[IMP] partner_label: black, isort, prettier

14.0
Alexei Rivera 4 years ago
parent
commit
d208570bd4
  1. 20
      partner_label/models/res_company.py
  2. 24
      partner_label/models/res_config_settings.py
  3. 1
      setup/partner_label/odoo/addons/partner_label
  4. 6
      setup/partner_label/setup.py

20
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",

24
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",

1
setup/partner_label/odoo/addons/partner_label

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

6
setup/partner_label/setup.py

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