From 196c5069a018230c6cff65cc8d0406d12e963af7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kh=C3=B4i=20=28Ki=C3=AAn=20Kim=29?= Date: Tue, 15 Oct 2024 17:38:16 +0700 Subject: [PATCH] [MIG] base_report_to_label_printer: Migration to 18.0 --- base_report_to_label_printer/README.rst | 9 +++++++++ base_report_to_label_printer/__manifest__.py | 2 +- base_report_to_label_printer/models/res_users.py | 14 ++++++++------ .../readme/CONTRIBUTORS.md | 1 + base_report_to_label_printer/readme/CREDITS.md | 3 +++ .../static/description/index.html | 14 ++++++++++++-- 6 files changed, 34 insertions(+), 9 deletions(-) create mode 100644 base_report_to_label_printer/readme/CREDITS.md diff --git a/base_report_to_label_printer/README.rst b/base_report_to_label_printer/README.rst index ab3e7ef439f..8b361e7530d 100644 --- a/base_report_to_label_printer/README.rst +++ b/base_report_to_label_printer/README.rst @@ -63,6 +63,15 @@ Contributors ------------ - Hughes Damry +- Khoi (Kien Kim) + +Other credits +------------- + +The migration of this module from 16.0 to 18.0 was financially supported +by: + +- Camptocamp. Maintainers ----------- diff --git a/base_report_to_label_printer/__manifest__.py b/base_report_to_label_printer/__manifest__.py index 50c192aa1d7..3e654a674ab 100644 --- a/base_report_to_label_printer/__manifest__.py +++ b/base_report_to_label_printer/__manifest__.py @@ -3,7 +3,7 @@ { "name": "Report to label printer", - "version": "16.0.1.0.0", + "version": "18.0.1.0.0", "category": "Generic Modules/Base", "author": "Raumschmiede GmbH - Christopher Hansen," " Odoo Community Association (OCA)", diff --git a/base_report_to_label_printer/models/res_users.py b/base_report_to_label_printer/models/res_users.py index 705b28434d8..bcbb10d2b5b 100644 --- a/base_report_to_label_printer/models/res_users.py +++ b/base_report_to_label_printer/models/res_users.py @@ -1,7 +1,7 @@ # Copyright (C) 2022 Raumschmiede GmbH - Christopher Hansen () # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -from odoo import api, fields, models +from odoo import fields, models class ResUsers(models.Model): @@ -11,8 +11,10 @@ class ResUsers(models.Model): comodel_name="printing.printer", string="Default Label Printer" ) - @api.model - def _register_hook(self): - super()._register_hook() - self.SELF_WRITEABLE_FIELDS.extend(["default_label_printer_id"]) - self.SELF_READABLE_FIELDS.extend(["default_label_printer_id"]) + @property + def SELF_READABLE_FIELDS(self): + return super().SELF_READABLE_FIELDS + ["default_label_printer_id"] + + @property + def SELF_WRITEABLE_FIELDS(self): + return super().SELF_WRITEABLE_FIELDS + ["default_label_printer_id"] diff --git a/base_report_to_label_printer/readme/CONTRIBUTORS.md b/base_report_to_label_printer/readme/CONTRIBUTORS.md index 25a068f4f9f..c818afe213d 100644 --- a/base_report_to_label_printer/readme/CONTRIBUTORS.md +++ b/base_report_to_label_printer/readme/CONTRIBUTORS.md @@ -1 +1,2 @@ - Hughes Damry \<\> +- Khoi (Kien Kim) \<\> diff --git a/base_report_to_label_printer/readme/CREDITS.md b/base_report_to_label_printer/readme/CREDITS.md new file mode 100644 index 00000000000..b5f45af1151 --- /dev/null +++ b/base_report_to_label_printer/readme/CREDITS.md @@ -0,0 +1,3 @@ +The migration of this module from 16.0 to 18.0 was financially supported by: + +- Camptocamp. diff --git a/base_report_to_label_printer/static/description/index.html b/base_report_to_label_printer/static/description/index.html index 3ed5e2e9e1c..d7873dedc31 100644 --- a/base_report_to_label_printer/static/description/index.html +++ b/base_report_to_label_printer/static/description/index.html @@ -384,7 +384,8 @@

Report to label printer

  • Credits
  • @@ -409,10 +410,19 @@

    Authors

    Contributors

    + +
    +

    Other credits

    +

    The migration of this module from 16.0 to 18.0 was financially supported +by:

    +
      +
    • Camptocamp.
    -

    Maintainers

    +

    Maintainers

    This module is maintained by the OCA.

    Odoo Community Association