[FIX] {mrp_}account, purchase: translatable action name

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#110856

X-original-commit: 6758cde0358359d76642b0cbea4c208eac57dd92
Signed-off-by: Tiffany Chang <tic@odoo.com>
This commit is contained in:
niyasraphy
2023-01-24 21:11:06 +01:00
committed by Tiffany Chang (tic)
parent 95ceffb782
commit 32fb1e97e7
7 changed files with 27 additions and 10 deletions
+2
View File
@@ -4565,6 +4565,7 @@ msgstr ""
#. module: account
#. odoo-python
#: code:addons/account/models/account_analytic_account.py:0
#: code:addons/account/models/chart_template.py:0
#: model:ir.model.fields.selection,name:account.selection__res_company__quick_edit_mode__out_invoices
#: model_terms:ir.ui.view,arch_db:account.account_analytic_account_view_form_inherit
@@ -14851,6 +14852,7 @@ msgstr ""
#. module: account
#. odoo-python
#: code:addons/account/models/account_analytic_account.py:0
#: code:addons/account/models/chart_template.py:0
#: model:ir.model.fields.selection,name:account.selection__res_company__quick_edit_mode__in_invoices
#: model_terms:ir.ui.view,arch_db:account.account_analytic_account_view_form_inherit
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
from odoo import api, fields, models
from odoo import api, fields, models, _
class AccountAnalyticAccount(models.Model):
@@ -78,7 +78,7 @@ class AccountAnalyticAccount(models.Model):
"res_model": "account.move",
"domain": [('id', 'in', move_ids)],
"context": {"create": False},
"name": "Customer Invoices",
"name": _("Customer Invoices"),
'view_mode': 'tree,form',
}
return result
@@ -96,7 +96,7 @@ class AccountAnalyticAccount(models.Model):
"res_model": "account.move",
"domain": [('id', 'in', move_ids)],
"context": {"create": False},
"name": "Vendor Bills",
"name": _("Vendor Bills"),
'view_mode': 'tree,form',
}
return result
+12
View File
@@ -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 ""
@@ -103,8 +107,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 ""
@@ -185,6 +191,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"
@@ -1,7 +1,7 @@
# -*- 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
+1 -1
View File
@@ -64,7 +64,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',
}
+3
View File
@@ -1985,6 +1985,8 @@ msgid ""
msgstr ""
#. module: purchase
#. odoo-python
#: 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
@@ -1994,6 +1996,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 ""
+2 -2
View File
@@ -1,7 +1,7 @@
# -*- 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: