fix: secure Return to Draft button, clean [PREVOD] translation placeholders

- mrp_production_back_to_draft: add confirm dialog and mrp.group_mrp_manager restriction
- mrp_production_back_to_draft: server-side group check, bump to 16.0.1.1.0
- Clean [PREVOD...] placeholder translations across multiple MRP modules
- Regenerate bs.po files from translation database

🤖 assisted by claude
This commit is contained in:
Ernad Husremovic 2026-02-07 20:47:51 +01:00
parent 7cf02c9445
commit ba2add3abb
15 changed files with 58 additions and 61 deletions

View file

@ -16,7 +16,7 @@ msgstr ""
#. module: mrp_multi_level_estimate
#: model:ir.model.fields.selection,name:mrp_multi_level_estimate.selection__mrp_area__estimate_demand_and_other_sources_strat__all
msgid "Always consider all sources"
msgstr "[PREVOD POTREBAN: Always consider all sources...]"
msgstr ""
#. module: mrp_multi_level_estimate
#: model:ir.model.fields,help:mrp_multi_level_estimate.field_mrp_area__estimate_demand_and_other_sources_strat
@ -49,13 +49,11 @@ msgstr "Dani grupiranja procjena moraju biti veći ili jednaki nuli."
#: model:ir.model.fields.selection,name:mrp_multi_level_estimate.selection__mrp_area__estimate_demand_and_other_sources_strat__ignore_overlapping
msgid "Ignore other sources during periods with estimates"
msgstr ""
"[PREVOD POTREBAN: Ignore other sources during periods with estimates...]"
#. module: mrp_multi_level_estimate
#: model:ir.model.fields.selection,name:mrp_multi_level_estimate.selection__mrp_area__estimate_demand_and_other_sources_strat__ignore_others_if_estimates
msgid "Ignore other sources for products with estimates"
msgstr ""
"[PREVOD POTREBAN: Ignore other sources for products with estimates...]"
#. module: mrp_multi_level_estimate
#: model:ir.model,name:mrp_multi_level_estimate.model_mrp_area
@ -80,5 +78,3 @@ msgid ""
"not be greater, in that caseonly grouping until the total length of the date"
" range will be done."
msgstr ""
"[PREVOD POTREBAN: The days to group your estimates as demand for the MRP.It "
"ca...]"

View file

@ -26,7 +26,7 @@ msgstr "Pakovanje"
#. module: mrp_packaging_default
#: model:ir.model.fields,field_description:mrp_packaging_default.field_mrp_bom_line__product_packaging_qty
msgid "Packaging Qty."
msgstr "[PREVOD: Packaging Qty.]"
msgstr ""
#. module: mrp_packaging_default
#: model:ir.model,name:mrp_packaging_default.model_mrp_production

View file

@ -21,7 +21,7 @@ msgstr "Otkaži"
#. module: mrp_planned_order_matrix
#: model:ir.actions.act_window,name:mrp_planned_order_matrix.action_mrp_planned_order_wizard
msgid "Create Fixed Planned Orders"
msgstr "[PREVOD POTREBAN: Create Fixed Planned Orders...]"
msgstr ""
#. module: mrp_planned_order_matrix
#: model:ir.model.fields,field_description:mrp_planned_order_matrix.field_mrp_planned_order_sheet__create_uid
@ -93,27 +93,27 @@ msgstr "Zadnje ažurirano"
#: code:addons/mrp_planned_order_matrix/wizards/mrp_planned_order_wizard.py
#, python-format
msgid "MPS Sheet"
msgstr "[PREVOD: MPS Sheet]"
msgstr ""
#. module: mrp_planned_order_matrix
#: model:ir.model,name:mrp_planned_order_matrix.model_mrp_planned_order_sheet_line
msgid "MPS Sheet Line"
msgstr "[PREVOD: MPS Sheet Line]"
msgstr ""
#. module: mrp_planned_order_matrix
#: model:ir.model,name:mrp_planned_order_matrix.model_mrp_planned_order_wizard
msgid "MPS Wizard"
msgstr "[PREVOD: MPS Wizard]"
msgstr ""
#. module: mrp_planned_order_matrix
#: model_terms:ir.ui.view,arch_db:mrp_planned_order_matrix.stock_mrp_planned_order_sheet_view_form
msgid "MPS quantity"
msgstr "[PREVOD: MPS quantity]"
msgstr ""
#. module: mrp_planned_order_matrix
#: model:ir.model.fields,field_description:mrp_planned_order_matrix.field_mrp_planned_order_sheet_line__mrp_planned_order_ids
msgid "Mrp Planned Order"
msgstr "[PREVOD: Mrp Planned Order]"
msgstr ""
#. module: mrp_planned_order_matrix
#: model:ir.model.fields,field_description:mrp_planned_order_matrix.field_mrp_planned_order_sheet_line__value_x
@ -125,12 +125,12 @@ msgstr "Period"
#: code:addons/mrp_planned_order_matrix/wizards/mrp_planned_order_wizard.py
#, python-format
msgid "Planned Orders"
msgstr "[PREVOD: Planned Orders]"
msgstr ""
#. module: mrp_planned_order_matrix
#: model_terms:ir.ui.view,arch_db:mrp_planned_order_matrix.mrp_planned_order_wizard_view_form
msgid "Prepare"
msgstr "[PREVOD: Prepare]"
msgstr ""
#. module: mrp_planned_order_matrix
#: model:ir.model.fields,field_description:mrp_planned_order_matrix.field_mrp_planned_order_sheet_line__value_y
@ -140,7 +140,7 @@ msgstr "Artikal"
#. module: mrp_planned_order_matrix
#: model:ir.model.fields,field_description:mrp_planned_order_matrix.field_mrp_planned_order_sheet__product_mrp_area_ids
msgid "Product Parameters"
msgstr "[PREVOD: Product Parameters]"
msgstr ""
#. module: mrp_planned_order_matrix
#: model_terms:ir.ui.view,arch_db:mrp_planned_order_matrix.mrp_planned_order_wizard_view_form
@ -155,7 +155,7 @@ msgstr "Količina"
#. module: mrp_planned_order_matrix
#: model_terms:ir.ui.view,arch_db:mrp_planned_order_matrix.stock_mrp_planned_order_sheet_view_form
msgid "TEST DOS"
msgstr "[PREVOD: TEST DOS]"
msgstr ""
#. module: mrp_planned_order_matrix
#. odoo-python
@ -163,14 +163,13 @@ msgstr "[PREVOD: TEST DOS]"
#, python-format
msgid "The start date cannot be later than the end date."
msgstr ""
"[PREVOD POTREBAN: The start date cannot be later than the end date....]"
#. module: mrp_planned_order_matrix
#. odoo-python
#: code:addons/mrp_planned_order_matrix/wizards/mrp_planned_order_wizard.py
#, python-format
msgid "There are no date ranges created."
msgstr "[PREVOD POTREBAN: There are no date ranges created....]"
msgstr ""
#. module: mrp_planned_order_matrix
#: model_terms:ir.ui.view,arch_db:mrp_planned_order_matrix.stock_mrp_planned_order_sheet_view_form
@ -183,7 +182,6 @@ msgstr "Ovjeri"
#, python-format
msgid "You must select at least one Product MRP parameter."
msgstr ""
"[PREVOD POTREBAN: You must select at least one Product MRP parameter....]"
#. module: mrp_planned_order_matrix
#: model_terms:ir.ui.view,arch_db:mrp_planned_order_matrix.mrp_planned_order_wizard_view_form

View file

@ -16,32 +16,32 @@ msgstr ""
#. module: mrp_product_characterisation
#: model_terms:ir.ui.view,arch_db:mrp_product_characterisation.view_mrp_bom_search
msgid "BoM for finished product"
msgstr "[PREVOD POTREBAN: BoM for finished product...]"
msgstr ""
#. module: mrp_product_characterisation
#: model_terms:ir.ui.view,arch_db:mrp_product_characterisation.view_mrp_bom_search
msgid "BoM for intermediate product"
msgstr "[PREVOD POTREBAN: BoM for intermediate product...]"
msgstr ""
#. module: mrp_product_characterisation
#: model_terms:ir.ui.view,arch_db:mrp_product_characterisation.view_mrp_product_product_search
msgid "Components Products"
msgstr "[PREVOD: Components Products]"
msgstr ""
#. module: mrp_product_characterisation
#: model_terms:ir.ui.view,arch_db:mrp_product_characterisation.view_mrp_product_product_search
msgid "Intermediates Products"
msgstr "[PREVOD POTREBAN: Intermediates Products...]"
msgstr ""
#. module: mrp_product_characterisation
#: model:ir.model.fields,field_description:mrp_product_characterisation.field_product_product__is_component
msgid "Is Component"
msgstr "[PREVOD: Is Component]"
msgstr ""
#. module: mrp_product_characterisation
#: model:ir.model.fields,field_description:mrp_product_characterisation.field_product_product__is_intermediate
msgid "Is Intermediate"
msgstr "[PREVOD: Is Intermediate]"
msgstr ""
#. module: mrp_product_characterisation
#: model:ir.model.fields,help:mrp_product_characterisation.field_product_product__is_component
@ -49,7 +49,6 @@ msgid ""
"Is component a product which has no BoM based on it + is used "
"in a BoM line"
msgstr ""
"[PREVOD POTREBAN: Is component a product which has no BoM based on it + ...]"
#. module: mrp_product_characterisation
#: model:ir.model.fields,help:mrp_product_characterisation.field_product_product__is_intermediate
@ -57,8 +56,6 @@ msgid ""
"Is intermediate a product which has a BoM based on it + is used"
" in a BoM line"
msgstr ""
"[PREVOD POTREBAN: Is intermediate a product which has a BoM based on it + "
"...]"
#. module: mrp_product_characterisation
#: model:ir.model,name:mrp_product_characterisation.model_product_template

View file

@ -30,8 +30,6 @@ msgstr ""
#: model:ir.model.fields,help:mrp_product_produce_delay_in_hour.field_product_product__produce_delay_in_hour
msgid "Average lead time in hours to manufacture this Product."
msgstr ""
"[PREVOD POTREBAN: Average lead time in hours to manufacture this "
"Product....]"
#. module: mrp_product_produce_delay_in_hour
#: model_terms:ir.ui.view,arch_db:mrp_product_produce_delay_in_hour.view_mrp_product_produce_delay_in_hour
@ -46,7 +44,7 @@ msgstr "Vrijeme vođenja proizvodnje"
#. module: mrp_product_produce_delay_in_hour
#: model:ir.model.fields,field_description:mrp_product_produce_delay_in_hour.field_product_product__produce_delay_in_hour
msgid "Produce Delay In Hour"
msgstr "[PREVOD POTREBAN: Produce Delay In Hour...]"
msgstr ""
#. module: mrp_product_produce_delay_in_hour
#: model:ir.model,name:mrp_product_produce_delay_in_hour.model_product_template

View file

@ -16,12 +16,12 @@ msgstr ""
#. module: mrp_production_allow_recursive
#: model:ir.model.fields,field_description:mrp_production_allow_recursive.field_res_company__allow_same_product_component_finish
msgid "Allow Same Product Component Finish"
msgstr "[PREVOD POTREBAN: Allow Same Product Component Finish...]"
msgstr ""
#. module: mrp_production_allow_recursive
#: model:ir.model.fields,field_description:mrp_production_allow_recursive.field_res_config_settings__allow_same_product_component_finish
msgid "Allow Same Product for Component and Finish"
msgstr "[PREVOD POTREBAN: Allow Same Product for Component and Finish...]"
msgstr ""
#. module: mrp_production_allow_recursive
#: model_terms:ir.ui.view,arch_db:mrp_production_allow_recursive.view_stock_config_settings
@ -29,8 +29,6 @@ msgid ""
"Allow the same product to be used as both a component and a finished product\n"
" in manufacturing orders."
msgstr ""
"[PREVOD POTREBAN: Allow the same product to be used as both a component and "
"a ...]"
#. module: mrp_production_allow_recursive
#: model:ir.model,name:mrp_production_allow_recursive.model_res_company

View file

@ -3,7 +3,7 @@
{
"name": "MRP Production Back to Draft",
"version": "16.0.1.0.0",
"version": "16.0.1.1.0",
"author": "ForgeFlow, Odoo Community Association (OCA)",
"summary": "Allows to return to draft a confirmed or cancelled MO.",
"website": "https://github.com/OCA/manufacture",

View file

@ -18,8 +18,7 @@ msgstr ""
#: code:addons/mrp_production_back_to_draft/models/mrp_production.py
#, python-format
msgid "Could not set the production order back to draft"
msgstr ""
"[PREVOD POTREBAN: Could not set the production order back to draft...]"
msgstr "Nije moguće vratiti proizvodni nalog u pripremu"
#. module: mrp_production_back_to_draft
#: model:ir.model,name:mrp_production_back_to_draft.model_mrp_production
@ -29,7 +28,7 @@ msgstr "Proizvodni nalog"
#. module: mrp_production_back_to_draft
#: model_terms:ir.ui.view,arch_db:mrp_production_back_to_draft.mrp_production_form_view_return_to_draft
msgid "Return to Draft"
msgstr "[PREVOD: Return to Draft]"
msgstr "Vrati u pripremu"
#. module: mrp_production_back_to_draft
#. odoo-python
@ -39,5 +38,21 @@ msgid ""
"You cannot return to draft the following MO: %s. Only confirmed or cancelled"
" MO can be returned to draft."
msgstr ""
"[PREVOD POTREBAN: You cannot return to draft the following MO: %s. Only "
"confir...]"
"Ne možete vratiti u pripremu sljedeće radne naloge: %s. Samo potvrđeni ili "
"otkazani radni nalozi mogu biti vraćeni u pripremu."
#. module: mrp_production_back_to_draft
#: model_terms:ir.ui.view,arch_db:mrp_production_back_to_draft.mrp_production_form_view_return_to_draft
msgid ""
"Are you absolutely sure you want to return this manufacturing order to"
" draft?"
msgstr ""
"Da li ste potpuno sigurni da želite vratiti ovaj proizvodni nalog u"
" pripremu?"
#. module: mrp_production_back_to_draft
#. odoo-python
#: code:addons/mrp_production_back_to_draft/models/mrp_production.py
#, python-format
msgid "Only Manufacturing Managers can return orders to draft."
msgstr "Samo menadžeri proizvodnje mogu vratiti naloge u pripremu."

View file

@ -9,6 +9,10 @@ class MrpProduction(models.Model):
_inherit = "mrp.production"
def action_return_to_draft(self):
if not self.env.user.has_group("mrp.group_mrp_manager"):
raise UserError(
_("Only Manufacturing Managers can return orders to draft.")
)
self._check_company()
for rec in self:
if rec.state not in ["confirmed", "cancel"]:

View file

@ -15,6 +15,8 @@
type="object"
class="oe_stat_button"
string="Return to Draft"
confirm="Are you absolutely sure you want to return this manufacturing order to draft?"
groups="mrp.group_mrp_manager"
attrs="{'invisible': [('state', 'not in', ['confirmed', 'cancel'])]}"
>
</button>

View file

@ -16,12 +16,12 @@ msgstr ""
#. module: mrp_production_grouped_by_product
#: model:ir.model.fields,field_description:mrp_production_grouped_by_product.field_stock_picking_type__mo_grouping_interval
msgid "MO grouping interval (days)"
msgstr "[PREVOD POTREBAN: MO grouping interval (days)...]"
msgstr ""
#. module: mrp_production_grouped_by_product
#: model:ir.model.fields,field_description:mrp_production_grouped_by_product.field_stock_picking_type__mo_grouping_max_hour
msgid "MO grouping max. hour (UTC)"
msgstr "[PREVOD POTREBAN: MO grouping max. hour (UTC)...]"
msgstr ""
#. module: mrp_production_grouped_by_product
#: model:ir.model,name:mrp_production_grouped_by_product.model_stock_picking_type
@ -50,16 +50,12 @@ msgid ""
" inside the same interval period, and thus being grouped on the same MO. "
"IMPORTANT: The hour should be expressed in UTC."
msgstr ""
"[PREVOD POTREBAN: The maximum hour (between 0 and 23) for considering new "
"manu...]"
#. module: mrp_production_grouped_by_product
#: model:ir.model.fields,help:mrp_production_grouped_by_product.field_stock_picking_type__mo_grouping_interval
msgid ""
"The number of days for grouping together on the same manufacturing order."
msgstr ""
"[PREVOD POTREBAN: The number of days for grouping together on the same "
"manufac...]"
#. module: mrp_production_grouped_by_product
#. odoo-python
@ -67,7 +63,6 @@ msgstr ""
#, python-format
msgid "You have to enter a positive value for interval."
msgstr ""
"[PREVOD POTREBAN: You have to enter a positive value for interval....]"
#. module: mrp_production_grouped_by_product
#. odoo-python
@ -75,4 +70,3 @@ msgstr ""
#, python-format
msgid "You have to enter a valid hour between 0 and 23."
msgstr ""
"[PREVOD POTREBAN: You have to enter a valid hour between 0 and 23....]"

View file

@ -16,17 +16,17 @@ msgstr ""
#. module: mrp_production_move_line_auto_fill
#: model:ir.model.fields,field_description:mrp_production_move_line_auto_fill.field_mrp_production__action_op_auto_fill_allowed
msgid "Action Op Auto Fill Allowed"
msgstr "[PREVOD POTREBAN: Action Op Auto Fill Allowed...]"
msgstr ""
#. module: mrp_production_move_line_auto_fill
#: model:ir.model.fields,field_description:mrp_production_move_line_auto_fill.field_mrp_production__auto_fill_operation
msgid "Auto Fill Operations"
msgstr "[PREVOD: Auto Fill Operations]"
msgstr ""
#. module: mrp_production_move_line_auto_fill
#: model_terms:ir.ui.view,arch_db:mrp_production_move_line_auto_fill.mrp_production_form_view
msgid "AutoFill"
msgstr "[PREVOD: AutoFill]"
msgstr ""
#. module: mrp_production_move_line_auto_fill
#. odoo-python
@ -36,8 +36,6 @@ msgid ""
"Filling the operations automatically is not possible. Perhaps the "
"productions are not in the right state."
msgstr ""
"[PREVOD POTREBAN: Filling the operations automatically is not possible. "
"Perhap...]"
#. module: mrp_production_move_line_auto_fill
#: model:ir.model,name:mrp_production_move_line_auto_fill.model_mrp_production
@ -56,5 +54,3 @@ msgid ""
"- If checked, auto fill done quantity automatically\n"
"- If unchecked, show button AutoFill for user to do the auto fill manually"
msgstr ""
"[PREVOD POTREBAN: To auto fill done quantity in picking document.\n"
"- If checked...]"

View file

@ -21,13 +21,12 @@ msgstr "Dodijeli vlasnika"
#. module: mrp_stock_owner_restriction
#: model:ir.model.fields,field_description:mrp_stock_owner_restriction.field_mrp_production__owner_restriction
msgid "Owner Restriction"
msgstr "[PREVOD: Owner Restriction]"
msgstr ""
#. module: mrp_stock_owner_restriction
#: model:ir.model.fields,help:mrp_stock_owner_restriction.field_mrp_production__owner_id
msgid "Produced products will be assigned to this owner."
msgstr ""
"[PREVOD POTREBAN: Produced products will be assigned to this owner....]"
#. module: mrp_stock_owner_restriction
#: model:ir.model,name:mrp_stock_owner_restriction.model_stock_move_line

View file

@ -16,12 +16,12 @@ msgstr ""
#. module: mrp_order_report_lot
#: model_terms:ir.ui.view,arch_db:mrp_order_report_lot.report_mrp_production_components
msgid "Lot / SN"
msgstr "[PREVOD: Lot / SN]"
msgstr ""
#. module: mrp_order_report_lot
#: model_terms:ir.ui.view,arch_db:mrp_order_report_lot.report_mrp_production_components
msgid "Lot missing"
msgstr "[PREVOD: Lot missing]"
msgstr ""
#. module: mrp_order_report_lot
#: model:ir.model,name:mrp_order_report_lot.model_stock_move

View file

@ -16,4 +16,4 @@ msgstr ""
#. module: mrp_order_report_lot_barcode
#: model_terms:ir.ui.view,arch_db:mrp_order_report_lot_barcode.mrp_order_report_product_barcode
msgid "<strong>Lot Barcode</strong>"
msgstr "[PREVOD POTREBAN: <strong>Lot Barcode</strong>...]"
msgstr ""