From 9b89424a6d168f7da86934ca655276918da3e95f Mon Sep 17 00:00:00 2001 From: eugenio Date: Tue, 18 Feb 2025 13:53:01 +0100 Subject: [PATCH] [MIG] mrp_production_back_to_draft: Migration to 18.0 --- mrp_production_back_to_draft/README.rst | 10 +++++----- mrp_production_back_to_draft/__manifest__.py | 2 +- mrp_production_back_to_draft/models/mrp_production.py | 6 +++--- .../static/description/index.html | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/mrp_production_back_to_draft/README.rst b/mrp_production_back_to_draft/README.rst index 19cb310e8ed..a94d45cfb8b 100644 --- a/mrp_production_back_to_draft/README.rst +++ b/mrp_production_back_to_draft/README.rst @@ -17,13 +17,13 @@ MRP Production Back to Draft :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fmanufacture-lightgray.png?logo=github - :target: https://github.com/OCA/manufacture/tree/17.0/mrp_production_back_to_draft + :target: https://github.com/OCA/manufacture/tree/18.0/mrp_production_back_to_draft :alt: OCA/manufacture .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/manufacture-17-0/manufacture-17-0-mrp_production_back_to_draft + :target: https://translation.odoo-community.org/projects/manufacture-18-0/manufacture-18-0-mrp_production_back_to_draft :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png - :target: https://runboat.odoo-community.org/builds?repo=OCA/manufacture&target_branch=17.0 + :target: https://runboat.odoo-community.org/builds?repo=OCA/manufacture&target_branch=18.0 :alt: Try me on Runboat |badge1| |badge2| |badge3| |badge4| |badge5| @@ -41,7 +41,7 @@ Bug Tracker Bugs are tracked on `GitHub Issues `_. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed -`feedback `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -72,6 +72,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use. -This module is part of the `OCA/manufacture `_ project on GitHub. +This module is part of the `OCA/manufacture `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/mrp_production_back_to_draft/__manifest__.py b/mrp_production_back_to_draft/__manifest__.py index e6a5a3a187a..ed551cb28b1 100644 --- a/mrp_production_back_to_draft/__manifest__.py +++ b/mrp_production_back_to_draft/__manifest__.py @@ -3,7 +3,7 @@ { "name": "MRP Production Back to Draft", - "version": "17.0.1.0.1", + "version": "18.0.1.0.0", "author": "ForgeFlow, Odoo Community Association (OCA)", "summary": "Allows to return to draft a confirmed or cancelled MO.", "website": "https://github.com/OCA/manufacture", diff --git a/mrp_production_back_to_draft/models/mrp_production.py b/mrp_production_back_to_draft/models/mrp_production.py index 1b79e1ba553..6691977863d 100644 --- a/mrp_production_back_to_draft/models/mrp_production.py +++ b/mrp_production_back_to_draft/models/mrp_production.py @@ -1,7 +1,7 @@ # Copyright 2024 ForgeFlow S.L. (http://www.forgeflow.com) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -from odoo import _, api, models +from odoo import api, models from odoo.exceptions import UserError @@ -13,7 +13,7 @@ def action_return_to_draft(self): for rec in self: if rec.state not in ["confirmed", "cancel"]: raise UserError( - _( + self.env._( "You cannot return to draft the following MO: %s. " "Only confirmed or cancelled MO can be returned to draft." ) @@ -25,7 +25,7 @@ def action_return_to_draft(self): rec.workorder_ids.write({"state": "waiting"}) if rec.state != "draft": raise UserError( - _("Could not set the production order back to draft") + self.env._("Could not set the production order back to draft") ) @api.depends("move_raw_ids.state", "move_finished_ids.state") diff --git a/mrp_production_back_to_draft/static/description/index.html b/mrp_production_back_to_draft/static/description/index.html index b04e5ae1f5b..77bae56fbd3 100644 --- a/mrp_production_back_to_draft/static/description/index.html +++ b/mrp_production_back_to_draft/static/description/index.html @@ -369,7 +369,7 @@

MRP Production Back to Draft

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! source digest: sha256:9832d3670609186eb5f41b10f7c40c8833106ca4363613ba71482418fbebf1ad !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Beta License: AGPL-3 OCA/manufacture Translate me on Weblate Try me on Runboat

+

Beta License: AGPL-3 OCA/manufacture Translate me on Weblate Try me on Runboat

This module allows to return to draft a confirmed or cancelled MO.

Table of contents

@@ -388,7 +388,7 @@

Bug Tracker

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed -feedback.

+feedback.

Do not contact contributors directly about support or help with technical issues.

@@ -415,7 +415,7 @@

Maintainers

OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

-

This module is part of the OCA/manufacture project on GitHub.

+

This module is part of the OCA/manufacture project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.