From 3e3defed94eae73df15707437ef7561d7eb73a66 Mon Sep 17 00:00:00 2001 From: "Thomas Lefebvre (thle)" Date: Mon, 17 Oct 2022 13:02:00 +0000 Subject: [PATCH] [IMP] hr_maintenance, maintenance, l10n_ch, l10n_generic_coa, l10n_il: equipments renamed equipment Modules: - hr_maintenance; - maintenance; - l10n_ch; - l10n_generic_coa - l10n_il. The plural of "equipment" is "equipment" and not "equipments" changes in the enterprise version: odoo/enterprise#31498 Remark: Runbot test log: Two fields (equipment_count, equipment_ids) of maintenance.equipment.category() have the same label: Equipment. [Modules: maintenance and maintenance] Two fields (equipment_count, equipment_ids) of hr.employee() have the same label: Equipment. [Modules: hr_maintenance and hr_maintenance] Using "Equipment Count" to differentiate them opw-2981186 closes odoo/odoo#100558 Signed-off-by: Adrien Widart --- addons/hr_maintenance/__manifest__.py | 2 +- addons/hr_maintenance/models/res_users.py | 6 +++--- addons/hr_maintenance/security/equipment.xml | 2 +- addons/l10n_ch/data/account.account.template.csv | 4 ++-- .../data/account.account.template.csv | 2 +- addons/l10n_il/data/account.account.template.csv | 2 +- addons/l10n_in/data/account.account.template.csv | 2 +- addons/maintenance/__manifest__.py | 2 +- addons/maintenance/data/maintenance_demo.xml | 2 +- addons/maintenance/models/maintenance.py | 6 +++--- addons/maintenance/security/maintenance.xml | 6 +++--- .../tests/test_maintenance_multicompany.py | 2 +- addons/maintenance/views/maintenance_views.xml | 16 ++++++++-------- 13 files changed, 27 insertions(+), 27 deletions(-) diff --git a/addons/hr_maintenance/__manifest__.py b/addons/hr_maintenance/__manifest__.py index 74e38fceec9..02dc16b2310 100644 --- a/addons/hr_maintenance/__manifest__.py +++ b/addons/hr_maintenance/__manifest__.py @@ -8,7 +8,7 @@ 'description': """ Bridge between HR and Maintenance.""", 'depends': ['hr', 'maintenance'], - 'summary': 'Equipments, Assets, Internal Hardware, Allocation Tracking', + 'summary': 'Equipment, Assets, Internal Hardware, Allocation Tracking', 'data': [ 'security/equipment.xml', 'views/maintenance_views.xml', diff --git a/addons/hr_maintenance/models/res_users.py b/addons/hr_maintenance/models/res_users.py index 67b00bbd3df..45151026747 100644 --- a/addons/hr_maintenance/models/res_users.py +++ b/addons/hr_maintenance/models/res_users.py @@ -4,8 +4,8 @@ from odoo import api, models, fields class Users(models.Model): _inherit = 'res.users' - equipment_ids = fields.One2many('maintenance.equipment', 'owner_user_id', string="Managed Equipments") - equipment_count = fields.Integer(related='employee_id.equipment_count', string="Assigned Equipments") + equipment_ids = fields.One2many('maintenance.equipment', 'owner_user_id', string="Managed Equipment") + equipment_count = fields.Integer(related='employee_id.equipment_count', string="Assigned Equipment") @property def SELF_READABLE_FIELDS(self): @@ -16,7 +16,7 @@ class Employee(models.Model): _inherit = 'hr.employee' equipment_ids = fields.One2many('maintenance.equipment', 'employee_id') - equipment_count = fields.Integer('Equipments', compute='_compute_equipment_count') + equipment_count = fields.Integer('Equipment Count', compute='_compute_equipment_count') @api.depends('equipment_ids') def _compute_equipment_count(self): diff --git a/addons/hr_maintenance/security/equipment.xml b/addons/hr_maintenance/security/equipment.xml index 991651d813b..b99b58e0f73 100644 --- a/addons/hr_maintenance/security/equipment.xml +++ b/addons/hr_maintenance/security/equipment.xml @@ -1,6 +1,6 @@ - + diff --git a/addons/l10n_ch/data/account.account.template.csv b/addons/l10n_ch/data/account.account.template.csv index d541a5088e9..417aa0a9d4a 100644 --- a/addons/l10n_ch/data/account.account.template.csv +++ b/addons/l10n_ch/data/account.account.template.csv @@ -56,8 +56,8 @@ "ch_coa_1549","Accumulated depreciation on tools","1549","asset_current","l10n_ch.l10nch_chart_template","False" "ch_coa_1550","Warehouse","1550","asset_current","l10n_ch.l10nch_chart_template","False" "ch_coa_1559","Accumulated depreciation on warehouse","1559","asset_current","l10n_ch.l10nch_chart_template","False" -"ch_coa_1570","Equipments and Facilities","1570","asset_current","l10n_ch.l10nch_chart_template","False" -"ch_coa_1579","Accumulated depreciation on Equipments and Facilities","1579","asset_current","l10n_ch.l10nch_chart_template","False" +"ch_coa_1570","Equipment and Facilities","1570","asset_current","l10n_ch.l10nch_chart_template","False" +"ch_coa_1579","Accumulated depreciation on Equipment and Facilities","1579","asset_current","l10n_ch.l10nch_chart_template","False" "ch_coa_1590","Other movable tangible assets","1590","asset_current","l10n_ch.l10nch_chart_template","False" "ch_coa_1599","Accumulated depreciation on Other movable tangible assets","1599","asset_current","l10n_ch.l10nch_chart_template","False" "ch_coa_1600","Real Estate","1600","asset_current","l10n_ch.l10nch_chart_template","False" diff --git a/addons/l10n_generic_coa/data/account.account.template.csv b/addons/l10n_generic_coa/data/account.account.template.csv index 907dbebd09b..c1c755f869c 100644 --- a/addons/l10n_generic_coa/data/account.account.template.csv +++ b/addons/l10n_generic_coa/data/account.account.template.csv @@ -24,7 +24,7 @@ "other_income","Other Income","4500","income_other","l10n_generic_coa.configurable_chart_template","","False" "cost_of_goods_sold","Cost of Goods Sold","5000","expense_direct_cost","l10n_generic_coa.configurable_chart_template","account.account_tag_operating","False" "expense","Expenses","6000","expense","l10n_generic_coa.configurable_chart_template","account.account_tag_operating","False" -"expense_invest","Purchase of Equipments","6110","expense","l10n_generic_coa.configurable_chart_template","account.account_tag_investing","False" +"expense_invest","Purchase of Equipment","6110","expense","l10n_generic_coa.configurable_chart_template","account.account_tag_investing","False" "expense_rent","Rent","6120","expense","l10n_generic_coa.configurable_chart_template","account.account_tag_investing","False" "expense_finance","Bank Fees","6200","expense","l10n_generic_coa.configurable_chart_template","account.account_tag_financing","False" "expense_salary","Salary Expenses","6300","expense","l10n_generic_coa.configurable_chart_template","account.account_tag_operating","False" diff --git a/addons/l10n_il/data/account.account.template.csv b/addons/l10n_il/data/account.account.template.csv index ab649f550c1..135d16d3181 100644 --- a/addons/l10n_il/data/account.account.template.csv +++ b/addons/l10n_il/data/account.account.template.csv @@ -65,7 +65,7 @@ il_account_201000,201000,Cost of Goods Sold,expense_direct_cost,FALSE,account.ac il_account_211000,211000,Cost of Services Sold,expense_direct_cost,FALSE,account.account_tag_operating,il_chart_template il_account_212000,212000,Customer discounts,expense,FALSE,account.account_tag_operating,il_chart_template il_account_212100,212100,Salary Expenses,expense,FALSE,account.account_tag_operating,il_chart_template -il_account_212200,212200,Purchase of Equipments,expense,FALSE,account.account_tag_investing,il_chart_template +il_account_212200,212200,Purchase of Equipment,expense,FALSE,account.account_tag_investing,il_chart_template il_account_212300,212300,Bank Fees,expense,FALSE,account.account_tag_financing,il_chart_template il_account_213000,213000,Customer returns,expense_direct_cost,FALSE,account.account_tag_operating,il_chart_template il_account_214000,214000,Vendor returns,expense_direct_cost,FALSE,account.account_tag_operating,il_chart_template diff --git a/addons/l10n_in/data/account.account.template.csv b/addons/l10n_in/data/account.account.template.csv index d5e23f418b3..31f9f5680a9 100644 --- a/addons/l10n_in/data/account.account.template.csv +++ b/addons/l10n_in/data/account.account.template.csv @@ -11,7 +11,7 @@ "p10071","Prepaid Insurance","10071","asset_current","l10n_in.indian_chart_template_standard","","False" "p1011","Buildings","1011","asset_fixed","l10n_in.indian_chart_template_standard","","False" "p1012","Land","1012","asset_fixed","l10n_in.indian_chart_template_standard","","False" -"p1013","Equipments","1013","asset_fixed","l10n_in.indian_chart_template_standard","","False" +"p1013","Equipment","1013","asset_fixed","l10n_in.indian_chart_template_standard","","False" "p1014","Vehicle","1014","asset_fixed","l10n_in.indian_chart_template_standard","","False" "p1015","Computer/Laptops (Assets)","1015","asset_fixed","l10n_in.indian_chart_template_standard","","False" "p1016","Furniture","1016","asset_fixed","l10n_in.indian_chart_template_standard","","False" diff --git a/addons/maintenance/__manifest__.py b/addons/maintenance/__manifest__.py index 8dcf13dd0a7..725ad9e1b76 100644 --- a/addons/maintenance/__manifest__.py +++ b/addons/maintenance/__manifest__.py @@ -6,7 +6,7 @@ 'sequence': 100, 'category': 'Manufacturing/Maintenance', 'description': """ - Track equipments and maintenance requests""", + Track equipment and maintenance requests""", 'depends': ['mail'], 'summary': 'Track equipment and manage maintenance requests', 'website': 'https://www.odoo.com/app/maintenance', diff --git a/addons/maintenance/data/maintenance_demo.xml b/addons/maintenance/data/maintenance_demo.xml index 5707b3e6782..150df225b46 100644 --- a/addons/maintenance/data/maintenance_demo.xml +++ b/addons/maintenance/data/maintenance_demo.xml @@ -31,7 +31,7 @@ - + Samsung Monitor 15" diff --git a/addons/maintenance/models/maintenance.py b/addons/maintenance/models/maintenance.py index 8c68044155c..73509717779 100644 --- a/addons/maintenance/models/maintenance.py +++ b/addons/maintenance/models/maintenance.py @@ -42,8 +42,8 @@ class MaintenanceEquipmentCategory(models.Model): technician_user_id = fields.Many2one('res.users', 'Responsible', tracking=True, default=lambda self: self.env.uid) color = fields.Integer('Color Index') note = fields.Html('Comments', translate=True) - equipment_ids = fields.One2many('maintenance.equipment', 'category_id', string='Equipments', copy=False) - equipment_count = fields.Integer(string="Equipment", compute='_compute_equipment_count') + equipment_ids = fields.One2many('maintenance.equipment', 'category_id', string='Equipment', copy=False) + equipment_count = fields.Integer(string="Equipment Count", compute='_compute_equipment_count') maintenance_ids = fields.One2many('maintenance.request', 'category_id', copy=False) maintenance_count = fields.Integer(string="Maintenance Count", compute='_compute_maintenance_count') alias_id = fields.Many2one( @@ -68,7 +68,7 @@ class MaintenanceEquipmentCategory(models.Model): def _unlink_except_contains_maintenance_requests(self): for category in self: if category.equipment_ids or category.maintenance_ids: - raise UserError(_("You cannot delete an equipment category containing equipments or maintenance requests.")) + raise UserError(_("You cannot delete an equipment category containing equipment or maintenance requests.")) def _alias_get_creation_values(self): values = super(MaintenanceEquipmentCategory, self)._alias_get_creation_values() diff --git a/addons/maintenance/security/maintenance.xml b/addons/maintenance/security/maintenance.xml index 94c0135db21..f4195b53e4a 100644 --- a/addons/maintenance/security/maintenance.xml +++ b/addons/maintenance/security/maintenance.xml @@ -6,7 +6,7 @@ - The user will be able to manage equipments. + The user will be able to manage equipment. @@ -20,7 +20,7 @@ - Users are allowed to access equipments they follow + Users are allowed to access equipment they follow [('message_partner_ids', 'in', [user.partner_id.id])] @@ -34,7 +34,7 @@ - Equipments administrator + Equipment administrator [(1, '=', 1)] diff --git a/addons/maintenance/tests/test_maintenance_multicompany.py b/addons/maintenance/tests/test_maintenance_multicompany.py index 5ec2a6bce71..eabb3bf660e 100644 --- a/addons/maintenance/tests/test_maintenance_multicompany.py +++ b/addons/maintenance/tests/test_maintenance_multicompany.py @@ -127,7 +127,7 @@ class TestEquipmentMulticompany(TransactionCase): 'company_id': company_b.id, 'owner_user_id': equipment_manager.id, }) - # Now there are total 2 equipments created and can view by equipment_manager user + # Now there are total 2 equipment created and can view by equipment_manager user self.assertEqual(Equipment.with_user(equipment_manager).with_context(allowed_company_ids=cids).search_count([]), 2) # And there is total 1 equipment can be view by Normal User ( Which user is followers) diff --git a/addons/maintenance/views/maintenance_views.xml b/addons/maintenance/views/maintenance_views.xml index b735280d4ef..047dde0b53e 100644 --- a/addons/maintenance/views/maintenance_views.xml +++ b/addons/maintenance/views/maintenance_views.xml @@ -336,7 +336,7 @@ equipment.form maintenance.equipment -
+
@@ -514,7 +514,7 @@ ('name', 'ilike', self), ('model', 'ilike', self), ('serial_no', 'ilike', self), ('partner_ref', 'ilike', self)]"/> - + @@ -542,7 +542,7 @@ - Equipments + Equipment maintenance.equipment kanban,tree,form @@ -550,7 +550,7 @@

Add a new equipment

- Track equipments and link it to an employee or department. + Track equipment and link it to an employee or department. You will be able to manage allocations, issues and maintenance of your equipment.

@@ -558,7 +558,7 @@ - Equipments + Equipment maintenance.equipment kanban,tree,form @@ -571,7 +571,7 @@

Add a new equipment

- Track equipments and link it to an employee or department. + Track equipment and link it to an employee or department. You will be able to manage allocations, issues and maintenance of your equipment.

@@ -670,7 +670,7 @@
- Equipments: + Equipment:
@@ -1006,7 +1006,7 @@