diff options
| author | Nimesh Jethva <nje@odoo.com> | 2018-09-17 16:50:34 +0530 |
|---|---|---|
| committer | Yannick Tivisse <yti@odoo.com> | 2018-09-21 11:45:15 +0200 |
| commit | 2c1549cc597f57a8136783c29a0ee37add8024a1 (patch) | |
| tree | 55f6255bc52ad81d9e8ddd497c2255f47e5d03e1 | |
| parent | e13efbd8b40d0e7b53c8a5b459e109cede4a8ef0 (diff) | |
[IMP]tools, technial modules: 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
25 files changed, 53 insertions, 12 deletions
diff --git a/addons/barcodes/models/barcode_events_mixin.py b/addons/barcodes/models/barcode_events_mixin.py index b8913dfdb09..e0e37f69ad3 100644 --- a/addons/barcodes/models/barcode_events_mixin.py +++ b/addons/barcodes/models/barcode_events_mixin.py @@ -10,6 +10,7 @@ class BarcodeEventsMixin(models.AbstractModel): """ _name = 'barcodes.barcode_events_mixin' + _description = 'Barcode Event Mixin' _barcode_scanned = fields.Char("Barcode Scanned", help="Value of the last barcode scanned.", store=False) diff --git a/addons/barcodes/models/barcodes.py b/addons/barcodes/models/barcodes.py index 6b1ae77edba..c7fd1292b92 100644 --- a/addons/barcodes/models/barcodes.py +++ b/addons/barcodes/models/barcodes.py @@ -16,6 +16,7 @@ UPC_EAN_CONVERSIONS = [ class BarcodeNomenclature(models.Model): _name = 'barcode.nomenclature' + _description = 'Barcode Nomenclature' name = fields.Char(string='Barcode Nomenclature', size=32, required=True, help='An internal identification of the barcode nomenclature') rule_ids = fields.One2many('barcode.rule', 'barcode_nomenclature_id', string='Rules', help='The list of barcode rules') @@ -167,6 +168,7 @@ class BarcodeNomenclature(models.Model): class BarcodeRule(models.Model): _name = 'barcode.rule' + _description = 'Barcode Rule' _order = 'sequence asc' diff --git a/addons/base_automation/tests/test_models.py b/addons/base_automation/tests/test_models.py index fd2255dff6f..3fbba42de03 100644 --- a/addons/base_automation/tests/test_models.py +++ b/addons/base_automation/tests/test_models.py @@ -7,7 +7,7 @@ from odoo import fields, models, api class LeadTest(models.Model): _name = "base.automation.lead.test" - _description = "Action Rule Test" + _description = "Automated Rule Test" name = fields.Char(string='Subject', required=True, index=True) user_id = fields.Many2one('res.users', string='Responsible') @@ -34,7 +34,7 @@ class LeadTest(models.Model): class LineTest(models.Model): _name = "base.automation.line.test" - _description = "Action Rule Line Test" + _description = "Automated Rule Line Test" name = fields.Char() lead_id = fields.Many2one('base.automation.lead.test', ondelete='cascade') diff --git a/addons/bus/models/bus.py b/addons/bus/models/bus.py index 8bb882608d5..72f1b7a8e07 100644 --- a/addons/bus/models/bus.py +++ b/addons/bus/models/bus.py @@ -32,6 +32,7 @@ def hashable(key): class ImBus(models.Model): _name = 'bus.bus' + _description = 'Communication Bus' channel = fields.Char('Channel') message = fields.Char('Message') diff --git a/addons/calendar/models/calendar.py b/addons/calendar/models/calendar.py index b31989e311b..cc074cec5c0 100644 --- a/addons/calendar/models/calendar.py +++ b/addons/calendar/models/calendar.py @@ -92,6 +92,7 @@ def sort_remap(f): class Contacts(models.Model): _name = 'calendar.contacts' + _description = 'Calendar Contacts' user_id = fields.Many2one('res.users', 'Me', required=True, default=lambda self: self.env.user) partner_id = fields.Many2one('res.partner', 'Employee', required=True) @@ -111,7 +112,7 @@ class Attendee(models.Model): _name = 'calendar.attendee' _rec_name = 'common_name' - _description = 'Calendar Registration' + _description = 'Calendar Attendee Information' def _default_access_token(self): return uuid.uuid4().hex @@ -240,6 +241,7 @@ class Attendee(models.Model): class AlarmManager(models.AbstractModel): _name = 'calendar.alarm_manager' + _description = 'Event Alarm Manager' def get_next_potential_limit_alarm(self, alarm_type, seconds=None, partner_id=None): result = {} @@ -471,7 +473,7 @@ class AlarmManager(models.AbstractModel): class Alarm(models.Model): _name = 'calendar.alarm' - _description = 'Event alarm' + _description = 'Event Alarm' @api.depends('interval', 'duration') def _compute_duration_minutes(self): @@ -527,7 +529,7 @@ class Alarm(models.Model): class MeetingType(models.Model): _name = 'calendar.event.type' - _description = 'Meeting Type' + _description = 'Event Meeting Type' name = fields.Char('Name', required=True) diff --git a/addons/decimal_precision/models/decimal_precision.py b/addons/decimal_precision/models/decimal_precision.py index eaf0f362bd9..35312a2ab54 100644 --- a/addons/decimal_precision/models/decimal_precision.py +++ b/addons/decimal_precision/models/decimal_precision.py @@ -5,6 +5,7 @@ from odoo import api, fields, models, tools class DecimalPrecision(models.Model): _name = 'decimal.precision' + _description = 'Decimal Precision' name = fields.Char('Usage', index=True, required=True) digits = fields.Integer('Digits', required=True, default=2) @@ -61,6 +62,7 @@ class DecimalPrecisionFloat(models.AbstractModel): class DecimalPrecisionTestModel(models.Model): _name = 'decimal.precision.test' + _description = 'Decimal Precision Test' float = fields.Float() float_2 = fields.Float(digits=(16, 2)) diff --git a/addons/fetchmail/models/fetchmail.py b/addons/fetchmail/models/fetchmail.py index 270bff7730e..f869afc8b7a 100644 --- a/addons/fetchmail/models/fetchmail.py +++ b/addons/fetchmail/models/fetchmail.py @@ -22,7 +22,7 @@ class FetchmailServer(models.Model): """Incoming POP/IMAP mail server account""" _name = 'fetchmail.server' - _description = "POP/IMAP Server" + _description = 'Incoming Mail Server' _order = 'priority' name = fields.Char('Name', required=True) diff --git a/addons/google_account/models/google_service.py b/addons/google_account/models/google_service.py index 663c684998f..1797dd66bea 100644 --- a/addons/google_account/models/google_service.py +++ b/addons/google_account/models/google_service.py @@ -25,6 +25,7 @@ GOOGLE_API_BASE_URL = 'https://www.googleapis.com' # FIXME : this needs to become an AbstractModel, to be inhereted by google_calendar_service and google_drive_service class GoogleService(models.TransientModel): _name = 'google.service' + _description = 'Google Service' @api.model def generate_refresh_token(self, service, authorization_code): diff --git a/addons/google_calendar/models/google_calendar.py b/addons/google_calendar/models/google_calendar.py index b02f7586e75..de467649142 100644 --- a/addons/google_calendar/models/google_calendar.py +++ b/addons/google_calendar/models/google_calendar.py @@ -189,6 +189,7 @@ class Exclude(SyncOperation): class GoogleCalendar(models.AbstractModel): STR_SERVICE = 'calendar' _name = 'google.%s' % STR_SERVICE + _description = 'Google Calendar' def generate_data(self, event, isCreating=False): if event.allday: diff --git a/addons/hr_timesheet_attendance/report/hr_timesheet_attendance_report.py b/addons/hr_timesheet_attendance/report/hr_timesheet_attendance_report.py index a0765b0d5cf..0aa0bbaf275 100644 --- a/addons/hr_timesheet_attendance/report/hr_timesheet_attendance_report.py +++ b/addons/hr_timesheet_attendance/report/hr_timesheet_attendance_report.py @@ -7,6 +7,7 @@ from odoo import api, fields, models class TimesheetAttendance(models.Model): _name = 'hr.timesheet.attendance.report' _auto = False + _description = 'Timesheet Attendance Report' user_id = fields.Many2one('res.users') date = fields.Date() diff --git a/addons/iap/models/iap.py b/addons/iap/models/iap.py index d9c0b65413f..64830bfa24e 100644 --- a/addons/iap/models/iap.py +++ b/addons/iap/models/iap.py @@ -137,6 +137,7 @@ def charge(env, key, account_token, credit, description=None, credit_template=No class IapAccount(models.Model): _name = 'iap.account' _rec_name = 'service_name' + _description = 'IAP Account' service_name = fields.Char() account_token = fields.Char(default=lambda s: uuid.uuid4().hex) diff --git a/addons/iot/models/iot.py b/addons/iot/models/iot.py index 4de67bc3209..d0e48869714 100644 --- a/addons/iot/models/iot.py +++ b/addons/iot/models/iot.py @@ -7,6 +7,7 @@ from odoo import api, fields, models, exceptions # ---------------------------------------------------------- class IotBox(models.Model): _name = 'iot.box' + _description = 'IOT Box' name = fields.Char('Name', readonly=True) identifier = fields.Char(string='Identifier (Mac Address)', readonly=True) @@ -17,6 +18,7 @@ class IotBox(models.Model): class IotDevice(models.Model): _name = 'iot.device' + _description = 'IOT Device' iot_id = fields.Many2one('iot.box', string='IoT Box', required = True) name = fields.Char('Name') diff --git a/addons/phone_validation/models/phone_validation_mixin.py b/addons/phone_validation/models/phone_validation_mixin.py index 02e4c6aa82a..0c86bad81bb 100644 --- a/addons/phone_validation/models/phone_validation_mixin.py +++ b/addons/phone_validation/models/phone_validation_mixin.py @@ -7,6 +7,7 @@ from odoo.addons.phone_validation.tools import phone_validation class PhoneValidationMixin(models.AbstractModel): _name = 'phone.validation.mixin' + _description = 'Phone Validation Mixin' def _phone_get_country(self): if 'country_id' in self and self.country_id: diff --git a/addons/portal/models/portal_mixin.py b/addons/portal/models/portal_mixin.py index c1535c62110..541919fc674 100644 --- a/addons/portal/models/portal_mixin.py +++ b/addons/portal/models/portal_mixin.py @@ -9,6 +9,7 @@ from odoo import api, exceptions, fields, models, tools, _ class PortalMixin(models.AbstractModel): _name = "portal.mixin" + _description = 'Portal Mixin' access_url = fields.Char( 'Portal Access URL', compute='_compute_access_url', diff --git a/addons/portal/wizard/portal_share.py b/addons/portal/wizard/portal_share.py index 5a2257a02de..5905df4eed4 100644 --- a/addons/portal/wizard/portal_share.py +++ b/addons/portal/wizard/portal_share.py @@ -5,6 +5,7 @@ from odoo import api, fields, models, _ class PortalShare(models.TransientModel): _name = 'portal.share' + _description = 'Portal Sharing' @api.model def default_get(self, fields): diff --git a/addons/resource/models/resource.py b/addons/resource/models/resource.py index 35d1e2cd9b4..08d6b9e73e9 100644 --- a/addons/resource/models/resource.py +++ b/addons/resource/models/resource.py @@ -143,7 +143,7 @@ class ResourceCalendar(models.Model): (begin_datetime, end_datetime). A list of intervals is therefore a list of tuples, holding several intervals of work or leaves. """ _name = "resource.calendar" - _description = "Resource Calendar" + _description = "Resource Working Time" @api.model def default_get(self, fields): @@ -419,7 +419,7 @@ class ResourceCalendarAttendance(models.Model): class ResourceResource(models.Model): _name = "resource.resource" - _description = "Resource Detail" + _description = "Resources" @api.model def default_get(self, fields): @@ -498,7 +498,7 @@ class ResourceResource(models.Model): class ResourceCalendarLeaves(models.Model): _name = "resource.calendar.leaves" - _description = "Leave Detail" + _description = "Resource Leaves Detail" name = fields.Char('Reason') company_id = fields.Many2one( diff --git a/addons/sms/models/sms_api.py b/addons/sms/models/sms_api.py index 1498ce54d98..f770676d0ca 100644 --- a/addons/sms/models/sms_api.py +++ b/addons/sms/models/sms_api.py @@ -10,6 +10,7 @@ DEFAULT_ENDPOINT = 'https://iap-sms.odoo.com' class SmsApi(models.AbstractModel): _name = 'sms.api' + _description = 'SMS API' @api.model def _send_sms(self, numbers, message): diff --git a/addons/sms/wizard/send_sms.py b/addons/sms/wizard/send_sms.py index 15d284e0879..448d9fcc626 100644 --- a/addons/sms/wizard/send_sms.py +++ b/addons/sms/wizard/send_sms.py @@ -24,6 +24,7 @@ except ImportError: class SendSMS(models.TransientModel): _name = 'sms.send_sms' + _description = 'Send SMS' recipients = fields.Char('Recipients', required=True) message = fields.Text('Message', required=True) diff --git a/addons/snailmail/models/snailmail_letter.py b/addons/snailmail/models/snailmail_letter.py index adbdb1268f5..853eb8ff6b7 100644 --- a/addons/snailmail/models/snailmail_letter.py +++ b/addons/snailmail/models/snailmail_letter.py @@ -16,6 +16,7 @@ PRINT_ENDPOINT = '/iap/snailmail/1/print' class SnailmailLetter(models.Model): _name = 'snailmail.letter' + _description = 'Snailmail Letter' user_id = fields.Many2one('res.users', 'User sending the letter') model = fields.Char('Model', required=True) diff --git a/addons/snailmail_account/wizard/account_invoice_send.py b/addons/snailmail_account/wizard/account_invoice_send.py index ed252b75829..4aa2ee0adaf 100644 --- a/addons/snailmail_account/wizard/account_invoice_send.py +++ b/addons/snailmail_account/wizard/account_invoice_send.py @@ -7,6 +7,7 @@ from odoo import api, fields, models class AccountInvoiceSend(models.TransientModel): _name = 'account.invoice.send' _inherit = 'account.invoice.send' + _description = 'Account Invoice Send' partner_id = fields.Many2one('res.partner', compute='_get_partner', string='Partner') snailmail_is_letter = fields.Boolean('Send by Post', help='Allows to send the document by snail mail (coventional posting delivery service)', default=lambda self: self.env.user.company_id.invoice_is_snailmail) diff --git a/addons/utm/models/utm.py b/addons/utm/models/utm.py index caff437468c..0627177ffd2 100644 --- a/addons/utm/models/utm.py +++ b/addons/utm/models/utm.py @@ -9,7 +9,7 @@ from odoo.tools import pycompat class UtmMedium(models.Model): # OLD crm.case.channel _name = 'utm.medium' - _description = 'Channels' + _description = 'UTM Medium' _order = 'name' name = fields.Char(string='Channel Name', required=True) @@ -19,14 +19,14 @@ class UtmMedium(models.Model): class UtmCampaign(models.Model): # OLD crm.case.resource.type _name = 'utm.campaign' - _description = 'Campaign' + _description = 'UTM Campaign' name = fields.Char(string='Campaign Name', required=True, translate=True) class UtmSource(models.Model): _name = 'utm.source' - _description = 'Source' + _description = 'UTM Source' name = fields.Char(string='Source Name', required=True, translate=True) @@ -35,6 +35,7 @@ class UtmMixin(models.AbstractModel): """Mixin class for objects which can be tracked by marketing. """ _name = 'utm.mixin' + _description = 'UTM Mixin' campaign_id = fields.Many2one('utm.campaign', 'Campaign', help="This is a name that helps you keep track of your different campaign efforts, e.g. Fall_Drive, Christmas_Special") diff --git a/addons/web/models/ir_qweb.py b/addons/web/models/ir_qweb.py index b734c4f193c..058ceb5d87b 100644 --- a/addons/web/models/ir_qweb.py +++ b/addons/web/models/ir_qweb.py @@ -17,6 +17,7 @@ class Image(models.AbstractModel): set as attribute on the generated <img> tag """ _name = 'ir.qweb.field.image' + _description = 'Qweb Field Image' _inherit = 'ir.qweb.field.image' @api.model diff --git a/addons/web/models/report_layout.py b/addons/web/models/report_layout.py index f70129ec89d..a38f25c2033 100644 --- a/addons/web/models/report_layout.py +++ b/addons/web/models/report_layout.py @@ -11,6 +11,7 @@ _logger = logging.getLogger(__name__) class View(models.Model): _name = "report.layout" + _description = 'Report Layout' view_id = fields.Many2one('ir.ui.view', 'Document Template', required=True) image = fields.Char(string="Preview image src") diff --git a/addons/web_editor/models/ir_qweb.py b/addons/web_editor/models/ir_qweb.py index f833607e205..22a923e1854 100644 --- a/addons/web_editor/models/ir_qweb.py +++ b/addons/web_editor/models/ir_qweb.py @@ -93,6 +93,7 @@ class QWeb(models.AbstractModel): class Field(models.AbstractModel): _name = 'ir.qweb.field' + _description = 'Qweb Field' _inherit = 'ir.qweb.field' @api.model @@ -122,6 +123,7 @@ class Field(models.AbstractModel): class Integer(models.AbstractModel): _name = 'ir.qweb.field.integer' + _description = 'Qweb Field Integer' _inherit = 'ir.qweb.field.integer' value_from_string = int @@ -129,6 +131,7 @@ class Integer(models.AbstractModel): class Float(models.AbstractModel): _name = 'ir.qweb.field.float' + _description = 'Qweb Field Float' _inherit = 'ir.qweb.field.float' @api.model @@ -141,6 +144,7 @@ class Float(models.AbstractModel): class ManyToOne(models.AbstractModel): _name = 'ir.qweb.field.many2one' + _description = 'Qweb Field Many to One' _inherit = 'ir.qweb.field.many2one' @api.model @@ -171,6 +175,7 @@ class ManyToOne(models.AbstractModel): class Contact(models.AbstractModel): _name = 'ir.qweb.field.contact' + _description = 'Qweb Field Contact' _inherit = 'ir.qweb.field.contact' @api.model @@ -189,6 +194,7 @@ class Contact(models.AbstractModel): class Date(models.AbstractModel): _name = 'ir.qweb.field.date' + _description = 'Qweb Field Date' _inherit = 'ir.qweb.field.date' @api.model @@ -209,6 +215,7 @@ class Date(models.AbstractModel): class DateTime(models.AbstractModel): _name = 'ir.qweb.field.datetime' + _description = 'Qweb Field Datetime' _inherit = 'ir.qweb.field.datetime' @api.model @@ -255,6 +262,7 @@ class DateTime(models.AbstractModel): class Text(models.AbstractModel): _name = 'ir.qweb.field.text' + _description = 'Qweb Field Text' _inherit = 'ir.qweb.field.text' @api.model @@ -264,6 +272,7 @@ class Text(models.AbstractModel): class Selection(models.AbstractModel): _name = 'ir.qweb.field.selection' + _description = 'Qweb Field Selection' _inherit = 'ir.qweb.field.selection' @api.model @@ -282,6 +291,7 @@ class Selection(models.AbstractModel): class HTML(models.AbstractModel): _name = 'ir.qweb.field.html' + _description = 'Qweb Field HTML' _inherit = 'ir.qweb.field.html' @api.model @@ -302,6 +312,7 @@ class Image(models.AbstractModel): set as attribute on the generated <img> tag """ _name = 'ir.qweb.field.image' + _description = 'Qweb Field Image' _inherit = 'ir.qweb.field.image' local_url_re = re.compile(r'^/(?P<module>[^]]+)/static/(?P<rest>.+)$') @@ -383,6 +394,7 @@ class Image(models.AbstractModel): class Monetary(models.AbstractModel): _name = 'ir.qweb.field.monetary' + _description = 'Qweb Field Monerary' _inherit = 'ir.qweb.field.monetary' @api.model @@ -397,6 +409,7 @@ class Monetary(models.AbstractModel): class Duration(models.AbstractModel): _name = 'ir.qweb.field.duration' + _description = 'Qweb Field Duration' _inherit = 'ir.qweb.field.duration' @api.model @@ -416,6 +429,7 @@ class Duration(models.AbstractModel): class RelativeDatetime(models.AbstractModel): _name = 'ir.qweb.field.relative' + _description = 'Qweb Field Relative' _inherit = 'ir.qweb.field.relative' # get formatting from ir.qweb.field.relative but edition/save from datetime @@ -423,6 +437,7 @@ class RelativeDatetime(models.AbstractModel): class QwebView(models.AbstractModel): _name = 'ir.qweb.field.qweb' + _description = 'Qweb Field qweb' _inherit = 'ir.qweb.field.qweb' diff --git a/addons/web_editor/models/test_models.py b/addons/web_editor/models/test_models.py index c4ac2c748da..f5eb7e86f64 100644 --- a/addons/web_editor/models/test_models.py +++ b/addons/web_editor/models/test_models.py @@ -6,6 +6,7 @@ from odoo import models, fields class ConverterTest(models.Model): _name = 'web_editor.converter.test' + _description = 'Web Editor Converter Test' # disable translation export for those brilliant field labels and values _translate = False @@ -37,5 +38,6 @@ class ConverterTest(models.Model): class ConverterTestSub(models.Model): _name = 'web_editor.converter.test.sub' + _description = 'Web Editor Converter Subtest' name = fields.Char() |
