[IMP]base_*: 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:
committed by
Yannick Tivisse
parent
71820dbc20
commit
7eea263f36
@@ -85,6 +85,7 @@ class ImportMapping(models.Model):
|
||||
time.
|
||||
"""
|
||||
_name = 'base_import.mapping'
|
||||
_description = 'Base Import Mapping'
|
||||
|
||||
res_model = fields.Char(index=True)
|
||||
column_name = fields.Char()
|
||||
@@ -107,6 +108,7 @@ class ResUsers(models.Model):
|
||||
class Import(models.TransientModel):
|
||||
|
||||
_name = 'base_import.import'
|
||||
_description = 'Base Import'
|
||||
|
||||
# allow imports to survive for 12h in case user is slow
|
||||
_transient_max_hours = 12.0
|
||||
|
||||
@@ -8,68 +8,80 @@ def name(suffix_name):
|
||||
|
||||
class Char(models.Model):
|
||||
_name = name('char')
|
||||
_description = 'Tests : Base Import Model, Character'
|
||||
|
||||
value = fields.Char()
|
||||
|
||||
class CharRequired(models.Model):
|
||||
_name = name('char.required')
|
||||
_description = 'Tests : Base Import Model, Character required'
|
||||
|
||||
value = fields.Char(required=True)
|
||||
|
||||
class CharReadonly(models.Model):
|
||||
_name = name('char.readonly')
|
||||
_description = 'Tests : Base Import Model, Character readonly'
|
||||
|
||||
value = fields.Char(readonly=True)
|
||||
|
||||
class CharStates(models.Model):
|
||||
_name = name('char.states')
|
||||
_description = 'Tests : Base Import Model, Character states'
|
||||
|
||||
value = fields.Char(readonly=True, states={'draft': [('readonly', False)]})
|
||||
|
||||
class CharNoreadonly(models.Model):
|
||||
_name = name('char.noreadonly')
|
||||
_description = 'Tests : Base Import Model, Character No readonly'
|
||||
|
||||
value = fields.Char(readonly=True, states={'draft': [('invisible', True)]})
|
||||
|
||||
class CharStillreadonly(models.Model):
|
||||
_name = name('char.stillreadonly')
|
||||
_description = 'Tests : Base Import Model, Character still readonly'
|
||||
|
||||
value = fields.Char(readonly=True, states={'draft': [('readonly', True)]})
|
||||
|
||||
# TODO: complex field (m2m, o2m, m2o)
|
||||
class M2o(models.Model):
|
||||
_name = name('m2o')
|
||||
_description = 'Tests : Base Import Model, Many to One'
|
||||
|
||||
value = fields.Many2one(name('m2o.related'))
|
||||
|
||||
class M2oRelated(models.Model):
|
||||
_name = name('m2o.related')
|
||||
_description = 'Tests : Base Import Model, Many to One related'
|
||||
|
||||
value = fields.Integer(default=42)
|
||||
|
||||
class M2oRequired(models.Model):
|
||||
_name = name('m2o.required')
|
||||
_description = 'Tests : Base Import Model, Many to One required'
|
||||
|
||||
value = fields.Many2one(name('m2o.required.related'), required=True)
|
||||
|
||||
class M2oRequiredRelated(models.Model):
|
||||
_name = name('m2o.required.related')
|
||||
_description = 'Tests : Base Import Model, Many to One required related'
|
||||
|
||||
value = fields.Integer(default=42)
|
||||
|
||||
class O2m(models.Model):
|
||||
_name = name('o2m')
|
||||
_description = 'Tests : Base Import Model, One to Many'
|
||||
|
||||
value = fields.One2many(name('o2m.child'), 'parent_id')
|
||||
|
||||
class O2mChild(models.Model):
|
||||
_name = name('o2m.child')
|
||||
_description = 'Tests : Base Import Model, One to Many child'
|
||||
|
||||
parent_id = fields.Many2one(name('o2m'))
|
||||
value = fields.Integer()
|
||||
|
||||
class PreviewModel(models.Model):
|
||||
_name = name('preview')
|
||||
_description = 'Tests : Base Import Model Preview'
|
||||
|
||||
name = fields.Char('Name')
|
||||
somevalue = fields.Integer(string='Some Value', required=True)
|
||||
|
||||
@@ -52,6 +52,7 @@ class IrModelFields(models.Model):
|
||||
|
||||
class TestSparse(models.TransientModel):
|
||||
_name = 'sparse_fields.test'
|
||||
_description = 'Sparse fields Test'
|
||||
|
||||
data = fields.Serialized()
|
||||
boolean = fields.Boolean(sparse='data')
|
||||
|
||||
@@ -31,6 +31,7 @@ dateutil = wrap_module(dateutil, mods | attribs)
|
||||
|
||||
class IrActions(models.Model):
|
||||
_name = 'ir.actions.actions'
|
||||
_description = 'Actions'
|
||||
_table = 'ir_actions'
|
||||
_order = 'name'
|
||||
|
||||
@@ -126,6 +127,7 @@ class IrActions(models.Model):
|
||||
|
||||
class IrActionsActWindow(models.Model):
|
||||
_name = 'ir.actions.act_window'
|
||||
_description = 'Action Window'
|
||||
_table = 'ir_act_window'
|
||||
_inherit = 'ir.actions.actions'
|
||||
_sequence = 'ir_actions_id_seq'
|
||||
@@ -269,6 +271,7 @@ VIEW_TYPES = [
|
||||
|
||||
class IrActionsActWindowView(models.Model):
|
||||
_name = 'ir.actions.act_window.view'
|
||||
_description = 'Action Window View'
|
||||
_table = 'ir_act_window_view'
|
||||
_rec_name = 'view_id'
|
||||
_order = 'sequence,id'
|
||||
@@ -289,6 +292,7 @@ class IrActionsActWindowView(models.Model):
|
||||
|
||||
class IrActionsActWindowclose(models.Model):
|
||||
_name = 'ir.actions.act_window_close'
|
||||
_description = 'Action Window Close'
|
||||
_inherit = 'ir.actions.actions'
|
||||
_table = 'ir_actions'
|
||||
|
||||
@@ -297,6 +301,7 @@ class IrActionsActWindowclose(models.Model):
|
||||
|
||||
class IrActionsActUrl(models.Model):
|
||||
_name = 'ir.actions.act_url'
|
||||
_description = 'Action URL'
|
||||
_table = 'ir_act_url'
|
||||
_inherit = 'ir.actions.actions'
|
||||
_sequence = 'ir_actions_id_seq'
|
||||
@@ -741,6 +746,7 @@ class IrActionsTodo(models.Model):
|
||||
|
||||
class IrActionsActClient(models.Model):
|
||||
_name = 'ir.actions.client'
|
||||
_description = 'Client Action'
|
||||
_inherit = 'ir.actions.actions'
|
||||
_table = 'ir_act_client'
|
||||
_sequence = 'ir_actions_id_seq'
|
||||
|
||||
@@ -72,6 +72,7 @@ else:
|
||||
|
||||
class IrActionsReport(models.Model):
|
||||
_name = 'ir.actions.report'
|
||||
_description = 'Report Action'
|
||||
_inherit = 'ir.actions.actions'
|
||||
_table = 'ir_act_report_xml'
|
||||
_sequence = 'ir_actions_id_seq'
|
||||
|
||||
@@ -36,6 +36,7 @@ class IrAttachment(models.Model):
|
||||
on the local filesystem using name based on their sha1 hash
|
||||
"""
|
||||
_name = 'ir.attachment'
|
||||
_description = 'Attachment'
|
||||
_order = 'id desc'
|
||||
|
||||
@api.depends('res_model', 'res_id')
|
||||
|
||||
@@ -12,6 +12,7 @@ _logger = logging.getLogger(__name__)
|
||||
class AutoVacuum(models.AbstractModel):
|
||||
""" Expose the vacuum method to the cron jobs mechanism. """
|
||||
_name = 'ir.autovacuum'
|
||||
_description = 'Automatic Vacuum'
|
||||
|
||||
@api.model
|
||||
def _gc_transient_models(self):
|
||||
|
||||
@@ -28,6 +28,7 @@ _default_parameters = {
|
||||
class IrConfigParameter(models.Model):
|
||||
"""Per-database storage of configuration key-value pairs."""
|
||||
_name = 'ir.config_parameter'
|
||||
_description = 'System Parameter'
|
||||
_rec_name = 'key'
|
||||
_order = 'key'
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ from odoo.exceptions import ValidationError
|
||||
class IrDefault(models.Model):
|
||||
""" User-defined default values for fields. """
|
||||
_name = 'ir.default'
|
||||
_description = 'Default Values'
|
||||
_rec_name = 'field_id'
|
||||
|
||||
field_id = fields.Many2one('ir.model.fields', string="Field", required=True,
|
||||
|
||||
@@ -5,6 +5,7 @@ from odoo.modules.loading import force_demo
|
||||
class IrDemo(models.TransientModel):
|
||||
|
||||
_name = 'ir.demo'
|
||||
_description = 'Demo'
|
||||
|
||||
def install_demo(self):
|
||||
force_demo(self.env.cr)
|
||||
|
||||
@@ -5,6 +5,7 @@ class DemoFailure(models.TransientModel):
|
||||
""" Stores modules for which we could not install demo data
|
||||
"""
|
||||
_name = 'ir.demo_failure'
|
||||
_description = 'Demo failure'
|
||||
|
||||
module_id = fields.Many2one('ir.module.module', required=True, string="Module")
|
||||
error = fields.Char(string="Error")
|
||||
@@ -12,6 +13,7 @@ class DemoFailure(models.TransientModel):
|
||||
|
||||
class DemoFailureWizard(models.TransientModel):
|
||||
_name = 'ir.demo_failure.wizard'
|
||||
_description = 'Demo Failure wizard'
|
||||
|
||||
failure_ids = fields.One2many(
|
||||
'ir.demo_failure', 'wizard_id', readonly=True,
|
||||
|
||||
@@ -6,6 +6,7 @@ from odoo import fields, models
|
||||
|
||||
class IrExports(models.Model):
|
||||
_name = "ir.exports"
|
||||
_description = 'Exports'
|
||||
_order = 'name'
|
||||
|
||||
name = fields.Char(string='Export Name')
|
||||
@@ -15,6 +16,7 @@ class IrExports(models.Model):
|
||||
|
||||
class IrExportsLine(models.Model):
|
||||
_name = 'ir.exports.line'
|
||||
_description = 'Exports Line'
|
||||
_order = 'id'
|
||||
|
||||
name = fields.Char(string='Field Name')
|
||||
|
||||
@@ -34,6 +34,7 @@ class ConversionNotFound(ValueError):
|
||||
|
||||
class IrFieldsConverter(models.AbstractModel):
|
||||
_name = 'ir.fields.converter'
|
||||
_description = 'Fields Converter'
|
||||
|
||||
@api.model
|
||||
def _format_import_error(self, error_type, error_msg, error_params=(), error_args=None):
|
||||
|
||||
@@ -74,7 +74,7 @@ class SignedIntConverter(werkzeug.routing.NumberConverter):
|
||||
|
||||
class IrHttp(models.AbstractModel):
|
||||
_name = 'ir.http'
|
||||
_description = "HTTP routing"
|
||||
_description = "HTTP Routing"
|
||||
|
||||
@classmethod
|
||||
def _get_converters(cls):
|
||||
|
||||
@@ -4,6 +4,7 @@ from odoo import fields, models
|
||||
|
||||
class IrLogging(models.Model):
|
||||
_name = 'ir.logging'
|
||||
_description = 'Logging'
|
||||
_order = 'id DESC'
|
||||
|
||||
create_date = fields.Datetime(readonly=True)
|
||||
|
||||
@@ -128,6 +128,7 @@ def encode_rfc2822_address_header(header_text):
|
||||
class IrMailServer(models.Model):
|
||||
"""Represents an SMTP server, able to send outgoing emails, with SSL and TLS capabilities."""
|
||||
_name = "ir.mail_server"
|
||||
_description = 'Mail Server'
|
||||
|
||||
NO_VALID_RECIPIENT = ("At least one valid recipient address should be "
|
||||
"specified for outgoing emails (To/Cc/Bcc)")
|
||||
|
||||
@@ -60,6 +60,7 @@ def query_update(cr, table, values, selectors):
|
||||
class Base(models.AbstractModel):
|
||||
""" The base model, which is implicitly inherited by all models. """
|
||||
_name = 'base'
|
||||
_description = 'Base'
|
||||
|
||||
|
||||
class Unknown(models.AbstractModel):
|
||||
@@ -68,6 +69,7 @@ class Unknown(models.AbstractModel):
|
||||
comodel.
|
||||
"""
|
||||
_name = '_unknown'
|
||||
_description = 'Unknown'
|
||||
|
||||
|
||||
class IrModel(models.Model):
|
||||
@@ -928,6 +930,7 @@ class IrModelConstraint(models.Model):
|
||||
models.
|
||||
"""
|
||||
_name = 'ir.model.constraint'
|
||||
_description = 'Model Constraint'
|
||||
|
||||
name = fields.Char(string='Constraint', required=True, index=True,
|
||||
help="PostgreSQL constraint or foreign key name.")
|
||||
@@ -1049,6 +1052,7 @@ class IrModelRelation(models.Model):
|
||||
relations.
|
||||
"""
|
||||
_name = 'ir.model.relation'
|
||||
_description = 'Relation Model'
|
||||
|
||||
name = fields.Char(string='Relation Name', required=True, index=True,
|
||||
help="PostgreSQL table name implementing a many2many relation.")
|
||||
@@ -1106,6 +1110,7 @@ class IrModelRelation(models.Model):
|
||||
|
||||
class IrModelAccess(models.Model):
|
||||
_name = 'ir.model.access'
|
||||
_description = 'Model Access'
|
||||
|
||||
name = fields.Char(required=True, index=True)
|
||||
active = fields.Boolean(default=True, help='If you uncheck the active field, it will disable the ACL without deleting it (if you delete a native ACL, it will be re-created when you reload the module).')
|
||||
@@ -1278,6 +1283,7 @@ class IrModelData(models.Model):
|
||||
update them seamlessly.
|
||||
"""
|
||||
_name = 'ir.model.data'
|
||||
_description = 'Model Data'
|
||||
_order = 'module, model, name'
|
||||
|
||||
name = fields.Char(string='External Identifier', required=True,
|
||||
@@ -1634,6 +1640,7 @@ class IrModelData(models.Model):
|
||||
|
||||
class WizardModelMenu(models.TransientModel):
|
||||
_name = 'wizard.ir.model.menu.create'
|
||||
_description = 'Create Menu Wizard'
|
||||
|
||||
menu_id = fields.Many2one('ir.ui.menu', string='Parent Menu', required=True, ondelete='cascade')
|
||||
name = fields.Char(string='Menu Name', required=True)
|
||||
|
||||
@@ -21,6 +21,7 @@ TYPE2FIELD = {
|
||||
|
||||
class Property(models.Model):
|
||||
_name = 'ir.property'
|
||||
_description = 'Company Property'
|
||||
|
||||
name = fields.Char(index=True)
|
||||
res_id = fields.Char(string='Resource', index=True, help="If not set, acts as a default value for new resources",)
|
||||
|
||||
@@ -34,6 +34,7 @@ class IrQWeb(models.AbstractModel, QWeb):
|
||||
"""
|
||||
|
||||
_name = 'ir.qweb'
|
||||
_descriptiob = 'Qweb'
|
||||
|
||||
@api.model
|
||||
def render(self, id_or_xml_id, values=None, **options):
|
||||
|
||||
@@ -140,6 +140,7 @@ class FieldConverter(models.AbstractModel):
|
||||
|
||||
class IntegerConverter(models.AbstractModel):
|
||||
_name = 'ir.qweb.field.integer'
|
||||
_description = 'Qweb Field Integer'
|
||||
_inherit = 'ir.qweb.field'
|
||||
|
||||
@api.model
|
||||
@@ -149,6 +150,7 @@ class IntegerConverter(models.AbstractModel):
|
||||
|
||||
class FloatConverter(models.AbstractModel):
|
||||
_name = 'ir.qweb.field.float'
|
||||
_description = 'Qweb Field Float'
|
||||
_inherit = 'ir.qweb.field'
|
||||
|
||||
@api.model
|
||||
@@ -193,6 +195,7 @@ class FloatConverter(models.AbstractModel):
|
||||
|
||||
class DateConverter(models.AbstractModel):
|
||||
_name = 'ir.qweb.field.date'
|
||||
_description = 'Qweb Field Date'
|
||||
_inherit = 'ir.qweb.field'
|
||||
|
||||
@api.model
|
||||
@@ -210,6 +213,7 @@ class DateConverter(models.AbstractModel):
|
||||
|
||||
class DateTimeConverter(models.AbstractModel):
|
||||
_name = 'ir.qweb.field.datetime'
|
||||
_description = 'Qweb Field Datetime'
|
||||
_inherit = 'ir.qweb.field'
|
||||
|
||||
@api.model
|
||||
@@ -252,6 +256,7 @@ class DateTimeConverter(models.AbstractModel):
|
||||
|
||||
class TextConverter(models.AbstractModel):
|
||||
_name = 'ir.qweb.field.text'
|
||||
_description = 'Qweb Field Text'
|
||||
_inherit = 'ir.qweb.field'
|
||||
|
||||
@api.model
|
||||
@@ -264,6 +269,7 @@ class TextConverter(models.AbstractModel):
|
||||
|
||||
class SelectionConverter(models.AbstractModel):
|
||||
_name = 'ir.qweb.field.selection'
|
||||
_description = 'Qweb Field Selection'
|
||||
_inherit = 'ir.qweb.field'
|
||||
|
||||
@api.model
|
||||
@@ -289,6 +295,7 @@ class SelectionConverter(models.AbstractModel):
|
||||
|
||||
class ManyToOneConverter(models.AbstractModel):
|
||||
_name = 'ir.qweb.field.many2one'
|
||||
_description = 'Qweb Field Many to One'
|
||||
_inherit = 'ir.qweb.field'
|
||||
|
||||
@api.model
|
||||
@@ -303,6 +310,7 @@ class ManyToOneConverter(models.AbstractModel):
|
||||
|
||||
class ManyToManyConverter(models.AbstractModel):
|
||||
_name = 'ir.qweb.field.many2many'
|
||||
_description = 'Qweb field many2many'
|
||||
_inherit = 'ir.qweb.field'
|
||||
|
||||
@api.model
|
||||
@@ -315,6 +323,7 @@ class ManyToManyConverter(models.AbstractModel):
|
||||
|
||||
class HTMLConverter(models.AbstractModel):
|
||||
_name = 'ir.qweb.field.html'
|
||||
_description = 'Qweb Field HTML'
|
||||
_inherit = 'ir.qweb.field'
|
||||
|
||||
@api.model
|
||||
@@ -342,6 +351,7 @@ class ImageConverter(models.AbstractModel):
|
||||
needs website-aware
|
||||
"""
|
||||
_name = 'ir.qweb.field.image'
|
||||
_description = 'Qweb Field Image'
|
||||
_inherit = 'ir.qweb.field'
|
||||
|
||||
@api.model
|
||||
@@ -372,6 +382,7 @@ class MonetaryConverter(models.AbstractModel):
|
||||
It's set under the ``_values`` key.
|
||||
"""
|
||||
_name = 'ir.qweb.field.monetary'
|
||||
_description = 'Qweb Field Monerary'
|
||||
_inherit = 'ir.qweb.field'
|
||||
|
||||
@api.model
|
||||
@@ -460,6 +471,7 @@ class FloatTimeConverter(models.AbstractModel):
|
||||
Can be used on any numerical field.
|
||||
"""
|
||||
_name = 'ir.qweb.field.float_time'
|
||||
_description = 'Qweb Field Float Time'
|
||||
_inherit = 'ir.qweb.field'
|
||||
|
||||
@api.model
|
||||
@@ -486,6 +498,7 @@ class DurationConverter(models.AbstractModel):
|
||||
Sub-second values will be ignored.
|
||||
"""
|
||||
_name = 'ir.qweb.field.duration'
|
||||
_description = 'Qweb Field Duration'
|
||||
_inherit = 'ir.qweb.field'
|
||||
|
||||
@api.model
|
||||
@@ -543,6 +556,7 @@ class DurationConverter(models.AbstractModel):
|
||||
|
||||
class RelativeDatetimeConverter(models.AbstractModel):
|
||||
_name = 'ir.qweb.field.relative'
|
||||
_description = 'Qweb Field Relative'
|
||||
_inherit = 'ir.qweb.field'
|
||||
|
||||
@api.model
|
||||
@@ -578,6 +592,7 @@ class BarcodeConverter(models.AbstractModel):
|
||||
instead.
|
||||
"""
|
||||
_name = 'ir.qweb.field.barcode'
|
||||
_description = 'Qweb Field Barcode'
|
||||
_inherit = 'ir.qweb.field'
|
||||
|
||||
@api.model
|
||||
@@ -603,6 +618,7 @@ class BarcodeConverter(models.AbstractModel):
|
||||
|
||||
class Contact(models.AbstractModel):
|
||||
_name = 'ir.qweb.field.contact'
|
||||
_description = 'Qweb Field Contact'
|
||||
_inherit = 'ir.qweb.field.many2one'
|
||||
|
||||
@api.model
|
||||
@@ -646,6 +662,7 @@ class Contact(models.AbstractModel):
|
||||
|
||||
class QwebView(models.AbstractModel):
|
||||
_name = 'ir.qweb.field.qweb'
|
||||
_description = 'Qweb Field qweb'
|
||||
_inherit = 'ir.qweb.field.many2one'
|
||||
|
||||
@api.model
|
||||
|
||||
@@ -12,6 +12,7 @@ from odoo.tools.safe_eval import safe_eval
|
||||
|
||||
class IrRule(models.Model):
|
||||
_name = 'ir.rule'
|
||||
_description = 'Record Rule'
|
||||
_order = 'model_id DESC'
|
||||
_MODES = ['read', 'write', 'create', 'unlink']
|
||||
|
||||
|
||||
@@ -82,6 +82,7 @@ class IrSequence(models.Model):
|
||||
|
||||
"""
|
||||
_name = 'ir.sequence'
|
||||
_description = 'Sequence'
|
||||
_order = 'name'
|
||||
|
||||
def _get_number_next_actual(self):
|
||||
@@ -311,6 +312,7 @@ class IrSequence(models.Model):
|
||||
|
||||
class IrSequenceDateRange(models.Model):
|
||||
_name = 'ir.sequence.date_range'
|
||||
_description = 'Sequence Date Range'
|
||||
_rec_name = "sequence_id"
|
||||
|
||||
def _get_number_next_actual(self):
|
||||
|
||||
@@ -187,6 +187,7 @@ class IrTranslationImport(object):
|
||||
|
||||
class IrTranslation(models.Model):
|
||||
_name = "ir.translation"
|
||||
_description = 'Translation'
|
||||
_log_access = False
|
||||
|
||||
name = fields.Char(string='Translated field', required=True)
|
||||
|
||||
@@ -17,6 +17,7 @@ NUMBER_PARENS = re.compile(r"\(([0-9]+)\)")
|
||||
|
||||
class IrUiMenu(models.Model):
|
||||
_name = 'ir.ui.menu'
|
||||
_description = 'Menu'
|
||||
_order = "sequence,id"
|
||||
_parent_store = True
|
||||
|
||||
|
||||
@@ -82,6 +82,7 @@ def keep_query(*keep_params, **additional_params):
|
||||
|
||||
class ViewCustom(models.Model):
|
||||
_name = 'ir.ui.view.custom'
|
||||
_description = 'Custom View'
|
||||
_order = 'create_date desc' # search(limit=1) should return the last customization
|
||||
|
||||
ref_id = fields.Many2one('ir.ui.view', string='Original View', index=True, required=True, ondelete='cascade')
|
||||
@@ -179,6 +180,7 @@ READONLY = re.compile(r"\breadonly\b")
|
||||
|
||||
class View(models.Model):
|
||||
_name = 'ir.ui.view'
|
||||
_description = 'View'
|
||||
_order = "priority,name,id"
|
||||
|
||||
name = fields.Char(string='View Name', required=True)
|
||||
|
||||
@@ -165,7 +165,7 @@ PAPER_SIZES = [
|
||||
|
||||
class report_paperformat(models.Model):
|
||||
_name = "report.paperformat"
|
||||
_description = "Allows customization of a report."
|
||||
_description = "Paper Format Config"
|
||||
|
||||
name = fields.Char('Name', required=True)
|
||||
default = fields.Boolean('Default paper format ?')
|
||||
|
||||
@@ -51,6 +51,7 @@ class ResConfigConfigurable(models.TransientModel):
|
||||
their view inherit from the related res_config_view_base view.
|
||||
'''
|
||||
_name = 'res.config'
|
||||
_description = 'Config'
|
||||
|
||||
@api.multi
|
||||
def start(self):
|
||||
@@ -228,6 +229,7 @@ class ResConfigInstaller(models.TransientModel, ResConfigModuleInstallationMixin
|
||||
"""
|
||||
_name = 'res.config.installer'
|
||||
_inherit = 'res.config'
|
||||
_description = 'Config Installer'
|
||||
|
||||
_install_if = {}
|
||||
|
||||
@@ -379,6 +381,7 @@ class ResConfigSettings(models.TransientModel, ResConfigModuleInstallationMixin)
|
||||
such methods can be defined to provide current values for other fields.
|
||||
"""
|
||||
_name = 'res.config.settings'
|
||||
_description = 'Config Settings'
|
||||
|
||||
@api.multi
|
||||
def copy(self, values):
|
||||
|
||||
@@ -43,6 +43,7 @@ def _tz_get(self):
|
||||
|
||||
class FormatAddressMixin(models.AbstractModel):
|
||||
_name = "format.address.mixin"
|
||||
_description = 'Fomat Address'
|
||||
|
||||
def _fields_view_get_address(self, arch):
|
||||
# consider the country of the user, not the country of the partner we want to display
|
||||
@@ -121,6 +122,7 @@ class PartnerCategory(models.Model):
|
||||
class PartnerTitle(models.Model):
|
||||
_name = 'res.partner.title'
|
||||
_order = 'name'
|
||||
_description = 'Partner Title'
|
||||
|
||||
name = fields.Char(string='Title', required=True, translate=True)
|
||||
shortcut = fields.Char(string='Abbreviation', translate=True)
|
||||
|
||||
@@ -179,6 +179,7 @@ class Groups(models.Model):
|
||||
class ResUsersLog(models.Model):
|
||||
_name = 'res.users.log'
|
||||
_order = 'id desc'
|
||||
_description = 'Users Log'
|
||||
# Currenly only uses the magical fields: create_uid, create_date,
|
||||
# for recording logins. To be extended for other uses (chat presence, etc.)
|
||||
|
||||
@@ -1227,7 +1228,7 @@ class ChangePasswordWizard(models.TransientModel):
|
||||
class ChangePasswordUser(models.TransientModel):
|
||||
""" A model to configure users in the change password wizard. """
|
||||
_name = 'change.password.user'
|
||||
_description = 'Change Password Wizard User'
|
||||
_description = 'User, Change Password Wizard'
|
||||
|
||||
wizard_id = fields.Many2one('change.password.wizard', string='Wizard', required=True, ondelete='cascade')
|
||||
user_id = fields.Many2one('res.users', string='User', required=True, ondelete='cascade')
|
||||
|
||||
@@ -6,6 +6,7 @@ from odoo import api, models
|
||||
|
||||
class IrModelReferenceReport(models.AbstractModel):
|
||||
_name = 'report.base.report_irmodulereference'
|
||||
_description = 'Module Reference Report (base)'
|
||||
|
||||
@api.model
|
||||
def _object_find(self, module):
|
||||
|
||||
@@ -11,6 +11,7 @@ NEW_LANG_KEY = '__new__'
|
||||
|
||||
class BaseLanguageExport(models.TransientModel):
|
||||
_name = "base.language.export"
|
||||
_description = 'Language Export'
|
||||
|
||||
@api.model
|
||||
def _get_languages(self):
|
||||
|
||||
@@ -6,7 +6,7 @@ from odoo import api, fields, models
|
||||
|
||||
class BaseModuleUninstall(models.TransientModel):
|
||||
_name = "base.module.uninstall"
|
||||
_description = "Module Uninstallation"
|
||||
_description = "Module Uninstall"
|
||||
|
||||
show_all = fields.Boolean()
|
||||
module_id = fields.Many2one(
|
||||
|
||||
@@ -8,7 +8,7 @@ from odoo.exceptions import UserError
|
||||
|
||||
class BaseModuleUpgrade(models.TransientModel):
|
||||
_name = "base.module.upgrade"
|
||||
_description = "Module Upgrade"
|
||||
_description = "Upgrade Module"
|
||||
|
||||
@api.model
|
||||
@api.returns('ir.module.module')
|
||||
|
||||
@@ -17,6 +17,7 @@ _logger = logging.getLogger('base.partner.merge')
|
||||
class MergePartnerLine(models.TransientModel):
|
||||
|
||||
_name = 'base.partner.merge.line'
|
||||
_description = 'Merge Partner Line'
|
||||
_order = 'min_id asc'
|
||||
|
||||
wizard_id = fields.Many2one('base.partner.merge.automatic.wizard', 'Wizard')
|
||||
@@ -32,6 +33,7 @@ class MergePartnerAutomatic(models.TransientModel):
|
||||
"""
|
||||
|
||||
_name = 'base.partner.merge.automatic.wizard'
|
||||
_description = 'Merge Partner Wizard'
|
||||
|
||||
@api.model
|
||||
def default_get(self, fields):
|
||||
|
||||
@@ -9,6 +9,7 @@ from odoo.exceptions import UserError
|
||||
|
||||
class BaseUpdateTranslations(models.TransientModel):
|
||||
_name = 'base.update.translations'
|
||||
_description = 'Update Translations'
|
||||
|
||||
@api.model
|
||||
def _get_languages(self):
|
||||
|
||||
Reference in New Issue
Block a user