[IMP]hr_*: Improvement in model description

Purpose of this commit is to give description more "business oriented"
because those descriptions appears in Odoo Studio which is supposed to be used by end users, not only by developers.

Related Task ID : 37311
This commit is contained in:
Nimesh Jethva
2018-09-21 11:45:15 +02:00
committed by Yannick Tivisse
parent afb512a660
commit a308506051
18 changed files with 27 additions and 20 deletions
+4 -2
View File
@@ -10,7 +10,7 @@ from odoo.osv import expression
class FleetVehicle(models.Model):
_inherit = ['mail.thread', 'mail.activity.mixin']
_name = 'fleet.vehicle'
_description = 'Information on a vehicle'
_description = 'Vehicle'
_order = 'license_plate asc, acquisition_date asc'
def _get_default_state(self):
@@ -313,6 +313,7 @@ class FleetVehicleOdometer(models.Model):
class FleetVehicleState(models.Model):
_name = 'fleet.vehicle.state'
_order = 'sequence asc'
_description = 'Vehicle Status'
name = fields.Char(required=True)
sequence = fields.Integer(help="Used to order the note stages")
@@ -322,6 +323,7 @@ class FleetVehicleState(models.Model):
class FleetVehicleTag(models.Model):
_name = 'fleet.vehicle.tag'
_description = 'Vehicle Tag'
name = fields.Char(required=True, translate=True)
color = fields.Integer('Color Index')
@@ -331,7 +333,7 @@ class FleetVehicleTag(models.Model):
class FleetServiceType(models.Model):
_name = 'fleet.service.type'
_description = 'Type of services available on a vehicle'
_description = 'Fleet Service Type'
name = fields.Char(required=True, translate=True)
category = fields.Selection([
+2 -2
View File
@@ -12,7 +12,7 @@ class BadgeUser(models.Model):
"""User having received a badge"""
_name = 'gamification.badge.user'
_description = 'Gamification user badge'
_description = 'Gamification User Badge'
_order = "create_date desc"
_rec_name = "badge_name"
@@ -60,7 +60,7 @@ class GamificationBadge(models.Model):
TOO_MANY = 5
_name = 'gamification.badge'
_description = 'Gamification badge'
_description = 'Gamification Badge'
_inherit = ['mail.thread']
name = fields.Char('Badge', required=True, translate=True)
+1 -1
View File
@@ -56,7 +56,7 @@ class Challenge(models.Model):
"""
_name = 'gamification.challenge'
_description = 'Gamification challenge'
_description = 'Gamification Challenge'
_inherit = 'mail.thread'
_order = 'end_date, start_date, name, id'
+2 -2
View File
@@ -21,7 +21,7 @@ class GoalDefinition(models.Model):
a new gamification_goal_definition
"""
_name = 'gamification.goal.definition'
_description = 'Gamification goal definition'
_description = 'Gamification Goal Definition'
name = fields.Char("Goal Definition", required=True, translate=True)
description = fields.Text("Goal Description")
@@ -146,7 +146,7 @@ class Goal(models.Model):
An individual goal for a user on a specified time period"""
_name = 'gamification.goal'
_description = 'Gamification goal instance'
_description = 'Gamification Goal'
_order = 'start_date desc, end_date desc, definition_id, id'
definition_id = fields.Many2one('gamification.goal.definition', string="Goal Definition", required=True, ondelete="cascade")
@@ -7,6 +7,7 @@ from odoo import api, fields, models, _, exceptions
class grant_badge_wizard(models.TransientModel):
""" Wizard allowing to grant a badge to a user"""
_name = 'gamification.badge.user.wizard'
_description = 'Gamification User Badge Wizard'
user_id = fields.Many2one("res.users", string='User', required=True)
badge_id = fields.Many2one("gamification.badge", string='Badge', required=True)
@@ -6,6 +6,7 @@ from odoo import api, models, fields
class goal_manual_wizard(models.TransientModel):
"""Wizard to update a manual goal"""
_name = 'gamification.goal.wizard'
_description = 'Gamification Goal Wizard'
goal_id = fields.Many2one("gamification.goal", string='Goal', required=True)
current = fields.Float('Current')
@@ -12,7 +12,7 @@ class HrExpenseRefuseWizard(models.TransientModel):
"""
_name = "hr.expense.refuse.wizard"
_description = "Expense refuse Reason wizard"
_description = "Expense Refuse Reason Wizard"
reason = fields.Char(string='Reason', required=True)
hr_expense_ids = fields.Many2many('hr.expense')
@@ -8,7 +8,7 @@ from werkzeug import url_encode
class HrExpenseSheetRegisterPaymentWizard(models.TransientModel):
_name = "hr.expense.sheet.register.payment.wizard"
_description = "Expense Report Register Payment wizard"
_description = "Expense Register Payment Wizard"
@api.model
def _default_partner_id(self):
-2
View File
@@ -5,8 +5,6 @@ from odoo import fields, models
class CalendarLeaves(models.Model):
_inherit = "resource.calendar.leaves"
_description = "Leave Detail"
holiday_id = fields.Many2one("hr.leave", string='Leave Request')
@@ -11,6 +11,7 @@ from odoo.exceptions import UserError
class HrHolidaySummaryReport(models.AbstractModel):
_name = 'report.hr_holidays.report_holidayssummary'
_description = 'Holidays Summary Report'
def _get_header_info(self, start_date, holiday_type):
st_date = fields.Date.from_string(start_date)
@@ -95,6 +95,7 @@ class HrSalaryRuleCategory(models.Model):
class HrSalaryRule(models.Model):
_name = 'hr.salary.rule'
_order = 'sequence, id'
_description = 'Salary Rule'
name = fields.Char(required=True, translate=True)
code = fields.Char(required=True,
@@ -11,6 +11,7 @@ from odoo.exceptions import UserError
class ContributionRegisterReport(models.AbstractModel):
_name = 'report.hr_payroll.report_contributionregister'
_description = 'Payroll Contribution Register Report'
def _get_payslip_lines(self, register_ids, date_from, date_to):
result = {}
@@ -5,6 +5,7 @@ from odoo import api, models
class PayslipDetailsReport(models.AbstractModel):
_name = 'report.hr_payroll.report_payslipdetails'
_description = 'Payslip Details Report'
def get_details_by_rule_category(self, payslip_lines):
PayslipLine = self.env['hr.payslip.line']
@@ -9,7 +9,7 @@ from odoo import api, fields, models
class PayslipLinesContributionRegister(models.TransientModel):
_name = 'payslip.lines.contribution.register'
_description = 'PaySlip Lines by Contribution Registers'
_description = 'Payslip Lines by Contribution Registers'
date_from = fields.Date(string='Date From', required=True,
default=datetime.now().strftime('%Y-%m-01'))
@@ -44,7 +44,7 @@ class RecruitmentSource(models.Model):
class RecruitmentStage(models.Model):
_name = "hr.recruitment.stage"
_description = "Stage of Recruitment"
_description = "Recruitment Stages"
_order = 'sequence'
name = fields.Char("Stage name", required=True, translate=True)
@@ -79,7 +79,7 @@ class RecruitmentStage(models.Model):
class RecruitmentDegree(models.Model):
_name = "hr.recruitment.degree"
_description = "Degree of Recruitment"
_description = "Applicant Degree"
_sql_constraints = [
('name_uniq', 'unique (name)', 'The name of the Degree of Recruitment must be unique!')
]
+4 -4
View File
@@ -160,7 +160,7 @@ class LunchOrder(models.Model):
class LunchOrderLine(models.Model):
_name = 'lunch.order.line'
_description = 'lunch order line'
_description = 'Lunch Order Line'
_order = 'date desc, id desc'
name = fields.Char(related='product_id.name', string="Product Name", readonly=True)
@@ -321,7 +321,7 @@ class LunchOrderLine(models.Model):
class LunchProduct(models.Model):
""" Products available to order. A product is linked to a specific vendor. """
_name = 'lunch.product'
_description = 'lunch product'
_description = 'Lunch Product'
name = fields.Char('Product', required=True)
category_id = fields.Many2one('lunch.product.category', 'Product Category', required=True)
@@ -369,7 +369,7 @@ class LunchProduct(models.Model):
class LunchProductCategory(models.Model):
""" Category of the product such as pizza, sandwich, pasta, chinese, burger... """
_name = 'lunch.product.category'
_description = 'lunch product category'
_description = 'Lunch Product Category'
name = fields.Char('Product Category', required=True)
@@ -377,7 +377,7 @@ class LunchProductCategory(models.Model):
class LunchCashMove(models.Model):
""" Two types of cashmoves: payment (credit) or order (debit) """
_name = 'lunch.cashmove'
_description = 'lunch cashmove'
_description = 'Lunch Cashmove'
user_id = fields.Many2one('res.users', 'User',
default=lambda self: self.env.uid)
+1
View File
@@ -9,6 +9,7 @@ from odoo.exceptions import UserError
class LunchOrderLineLucky(models.TransientModel):
_name = 'lunch.order.line.lucky'
_description = 'Lunch Order Line Lucky'
def _default_supplier(self):
suppliers_obj = self.env['lunch.product'].search([]).mapped("supplier")
+2 -2
View File
@@ -23,7 +23,7 @@ class MaintenanceStage(models.Model):
class MaintenanceEquipmentCategory(models.Model):
_name = 'maintenance.equipment.category'
_inherit = ['mail.alias.mixin', 'mail.thread']
_description = 'Asset Category'
_description = 'Maintenance Equipment Category'
@api.one
@api.depends('equipment_ids')
@@ -92,7 +92,7 @@ class MaintenanceEquipmentCategory(models.Model):
class MaintenanceEquipment(models.Model):
_name = 'maintenance.equipment'
_inherit = ['mail.thread', 'mail.activity.mixin']
_description = 'Equipment'
_description = 'Maintenance Equipment'
@api.multi
def _track_subtype(self, init_values):