Skip to content
Snippets Groups Projects
Commit 3c635fb8 authored by niyasraphy's avatar niyasraphy
Browse files

[FIX] *: translatable action name


* account, purchase, mrp_account

before this commit, the action name was not getting translated to user language.

after this commit, the action name will get translated to user language.

closes odoo/odoo#110646

Signed-off-by: default avatarTiffany Chang <tic@odoo.com>
parent 9e95dd19
Branches
Tags
No related merge requests found
......@@ -4473,6 +4473,7 @@ msgid "Customer Invoice"
msgstr ""
 
#. module: account
#: code:addons/account/models/account_analytic_line.py:0
#: code:addons/account/models/chart_template.py:0
#: model_terms:ir.ui.view,arch_db:account.account_analytic_account_view_form_inherit
#: model_terms:ir.ui.view,arch_db:account.res_config_settings_view_form
......@@ -14647,6 +14648,7 @@ msgid "Vendor Bill Created"
msgstr ""
 
#. module: account
#: code:addons/account/models/account_analytic_line.py:0
#: code:addons/account/models/chart_template.py:0
#: model_terms:ir.ui.view,arch_db:account.account_analytic_account_view_form_inherit
#: model_terms:ir.ui.view,arch_db:account.res_config_settings_view_form
......
......@@ -62,7 +62,7 @@ class AccountAnalyticAccount(models.Model):
"res_model": "account.move",
"domain": [('id', 'in', self.line_ids.move_id.move_id.ids), ('move_type', 'in', self.env['account.move'].get_sale_types())],
"context": {"create": False},
"name": "Customer Invoices",
"name": _("Customer Invoices"),
'view_mode': 'tree,form',
}
return result
......@@ -74,7 +74,7 @@ class AccountAnalyticAccount(models.Model):
"res_model": "account.move",
"domain": [('id', 'in', self.line_ids.move_id.move_id.ids), ('move_type', 'in', self.env['account.move'].get_purchase_types())],
"context": {"create": False},
"name": "Vendor Bills",
"name": _("Vendor Bills"),
'view_mode': 'tree,form',
}
return result
......
......@@ -16,11 +16,13 @@ msgstr ""
"Plural-Forms: \n"
#. module: mrp_account
#: code:addons/mrp_account/models/mrp_production.py:0
#: model:ir.model,name:mrp_account.model_account_analytic_account
#: model:ir.model.fields,field_description:mrp_account.field_mrp_bom__analytic_account_id
#: model:ir.model.fields,field_description:mrp_account.field_mrp_production__analytic_account_id
#: model:ir.model.fields,field_description:mrp_account.field_mrp_workcenter__costs_hour_account_id
#: model_terms:ir.ui.view,arch_db:mrp_account.mrp_production_form_view_inherited
#, python-format
msgid "Analytic Account"
msgstr ""
......@@ -49,8 +51,10 @@ msgid "Bill of Material"
msgstr ""
#. module: mrp_account
#: code:addons/mrp_account/models/analytic_account.py:0
#: model:ir.model.fields,field_description:mrp_account.field_account_analytic_account__bom_ids
#: model_terms:ir.ui.view,arch_db:mrp_account.account_analytic_account_view_form_mrp
#, python-format
msgid "Bills of Materials"
msgstr ""
......@@ -110,8 +114,10 @@ msgid "Manufacturing Order"
msgstr ""
#. module: mrp_account
#: code:addons/mrp_account/models/analytic_account.py:0
#: model:ir.model.fields,field_description:mrp_account.field_account_analytic_account__production_ids
#: model_terms:ir.ui.view,arch_db:mrp_account.account_analytic_account_view_form_mrp
#, python-format
msgid "Manufacturing Orders"
msgstr ""
......@@ -189,6 +195,12 @@ msgstr ""
msgid "Work Order Count"
msgstr ""
#. module: mrp_account
#: code:addons/mrp_account/models/analytic_account.py:0
#, python-format
msgid "Work Orders"
msgstr ""
#. module: mrp_account
#: model:ir.model,name:mrp_account.model_mrp_workcenter_productivity
msgid "Workcenter Productivity Log"
......
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import api, fields, models
from odoo import api, fields, models, _
class AccountAnalyticAccount(models.Model):
......@@ -36,7 +36,7 @@ class AccountAnalyticAccount(models.Model):
"type": "ir.actions.act_window",
"res_model": "mrp.production",
"domain": [['id', 'in', self.production_ids.ids]],
"name": "Manufacturing Orders",
"name": _("Manufacturing Orders"),
'view_mode': 'tree,form',
"context": {'default_analytic_account_id': self.id},
}
......@@ -51,7 +51,7 @@ class AccountAnalyticAccount(models.Model):
"type": "ir.actions.act_window",
"res_model": "mrp.bom",
"domain": [['id', 'in', self.bom_ids.ids]],
"name": "Bills of Materials",
"name": _("Bills of Materials"),
'view_mode': 'tree,form',
"context": {'default_analytic_account_id': self.id},
}
......@@ -67,7 +67,7 @@ class AccountAnalyticAccount(models.Model):
"res_model": "mrp.workorder",
"domain": [['id', 'in', (self.workcenter_ids.order_ids | self.production_ids.workorder_ids).ids]],
"context": {"create": False},
"name": "Work Orders",
"name": _("Work Orders"),
'view_mode': 'tree',
}
return result
......
......@@ -70,7 +70,7 @@ class MrpProduction(models.Model):
"res_model": "account.analytic.account",
'res_id': self.analytic_account_id.id,
"context": {"create": False},
"name": "Analytic Account",
"name": _("Analytic Account"),
'view_mode': 'form',
}
......
......@@ -1990,6 +1990,7 @@ msgid "Purchase Order: Vendor Reminder"
msgstr ""
#. module: purchase
#: code:addons/purchase/models/analytic_account.py:0
#: model:ir.actions.act_window,name:purchase.purchase_form_action
#: model:ir.ui.menu,name:purchase.menu_purchase_form_action
#: model_terms:ir.ui.view,arch_db:purchase.account_analytic_account_view_form_purchase
......@@ -1999,6 +2000,7 @@ msgstr ""
#: model_terms:ir.ui.view,arch_db:purchase.view_purchase_bill_union_filter
#: model_terms:ir.ui.view,arch_db:purchase.view_purchase_order_filter
#: model_terms:ir.ui.view,arch_db:purchase.view_purchase_order_search
#, python-format
msgid "Purchase Orders"
msgstr ""
......
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import api, fields, models
from odoo import api, fields, models, _
class AccountAnalyticAccount(models.Model):
......@@ -25,7 +25,7 @@ class AccountAnalyticAccount(models.Model):
"type": "ir.actions.act_window",
"res_model": "purchase.order",
"domain": [['id', 'in', purchase_orders.ids]],
"name": "Purchase Orders",
"name": _("Purchase Orders"),
'view_mode': 'tree,form',
}
if len(purchase_orders) == 1:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment