[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
This commit is contained in:
Nimesh Jethva
2018-09-21 11:45:15 +02:00
committed by Yannick Tivisse
parent e13efbd8b4
commit 2c1549cc59
25 changed files with 53 additions and 12 deletions
@@ -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)
+2
View File
@@ -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'
+2 -2
View File
@@ -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')
+1
View File
@@ -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')
+5 -3
View File
@@ -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)
@@ -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))
+1 -1
View File
@@ -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)
@@ -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):
@@ -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:
@@ -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()
+1
View File
@@ -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)
+2
View File
@@ -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')
@@ -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:
+1
View File
@@ -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',
+1
View File
@@ -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):
+3 -3
View File
@@ -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(
+1
View File
@@ -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):
+1
View File
@@ -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)
@@ -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)
@@ -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)
+4 -3
View File
@@ -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")
+1
View File
@@ -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
+1
View File
@@ -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")
+15
View File
@@ -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'
+2
View File
@@ -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()