[IMP] *: fix typos in field definitions
* account, crm, hr, im_livechat, l10n_ch, l10n_it_edi, mail, mass_mailing, project, stock, base - `String` -> `string`; - `defaut` -> `default`; - `defaults` -> `default`; - `reandonly` -> `readonly`; - removed redundant `placeholder` attribute for `Char` field; - removed redundant `size` attribute for `Float` and `Integer` fields; - changed to use `Selection` instead of `Char` for a field having a defined `selection`. closes odoo/odoo#35356 Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
This commit is contained in:
@@ -96,7 +96,7 @@ class AccountMove(models.Model):
|
||||
('in_refund', 'Vendor Credit Note'),
|
||||
('out_receipt', 'Sales Receipt'),
|
||||
('in_receipt', 'Purchase Receipt'),
|
||||
], String='Type', required=True, store=True, index=True, readonly=True, tracking=True,
|
||||
], string='Type', required=True, store=True, index=True, readonly=True, tracking=True,
|
||||
default="entry")
|
||||
to_check = fields.Boolean(string='To Check', default=False,
|
||||
help='If this checkbox is ticked, it means that the user was not sure of all the related informations at the time of the creation of the move and that the move needs to be checked again.')
|
||||
@@ -2151,9 +2151,9 @@ class AccountMoveLine(models.Model):
|
||||
compute='_amount_residual',
|
||||
help="The residual amount on a journal item expressed in its currency (possibly not the company currency).")
|
||||
full_reconcile_id = fields.Many2one('account.full.reconcile', string="Matching Number", copy=False, index=True)
|
||||
matched_debit_ids = fields.One2many('account.partial.reconcile', 'credit_move_id', String='Matched Debits',
|
||||
matched_debit_ids = fields.One2many('account.partial.reconcile', 'credit_move_id', string='Matched Debits',
|
||||
help='Debit journal items that are matched with this journal item.')
|
||||
matched_credit_ids = fields.One2many('account.partial.reconcile', 'debit_move_id', String='Matched Credits',
|
||||
matched_credit_ids = fields.One2many('account.partial.reconcile', 'debit_move_id', string='Matched Credits',
|
||||
help='Credit journal items that are matched with this journal item.')
|
||||
|
||||
# ==== Analytic fields ====
|
||||
|
||||
@@ -28,7 +28,7 @@ class ActivityReport(models.Model):
|
||||
company_id = fields.Many2one('res.company', 'Company', readonly=True)
|
||||
stage_id = fields.Many2one('crm.stage', 'Stage', readonly=True)
|
||||
partner_id = fields.Many2one('res.partner', 'Customer', readonly=True)
|
||||
lead_type = fields.Char(
|
||||
lead_type = fields.Selection(
|
||||
string='Type',
|
||||
selection=[('lead', 'Lead'), ('opportunity', 'Opportunity')],
|
||||
help="Type is used to separate Leads and Opportunities")
|
||||
|
||||
@@ -87,7 +87,7 @@ class HrEmployeePrivate(models.Model):
|
||||
('master', 'Master'),
|
||||
('other', 'Other'),
|
||||
], 'Certificate Level', default='other', groups="hr.group_hr_user", tracking=True)
|
||||
study_field = fields.Char("Field of Study", placeholder='Computer Science', groups="hr.group_hr_user", tracking=True)
|
||||
study_field = fields.Char("Field of Study", groups="hr.group_hr_user", tracking=True)
|
||||
study_school = fields.Char("School", groups="hr.group_hr_user", tracking=True)
|
||||
emergency_contact = fields.Char("Emergency Contact", groups="hr.group_hr_user", tracking=True)
|
||||
emergency_phone = fields.Char("Emergency Phone", groups="hr.group_hr_user", tracking=True)
|
||||
|
||||
@@ -25,7 +25,7 @@ class ImLivechatReportChannel(models.Model):
|
||||
duration = fields.Float('Average duration', digits=(16, 2), readonly=True, group_operator="avg", help="Duration of the conversation (in seconds)")
|
||||
nbr_speaker = fields.Integer('# of speakers', readonly=True, group_operator="avg", help="Number of different speakers")
|
||||
nbr_message = fields.Integer('Average message', readonly=True, group_operator="avg", help="Number of message in the conversation")
|
||||
is_without_answer = fields.Integer('Session(s) without answer', reandonly=True, group_operator="sum",
|
||||
is_without_answer = fields.Integer('Session(s) without answer', readonly=True, group_operator="sum",
|
||||
help="""A session is without answer if the operator did not answer.
|
||||
If the visitor is also the operator, the session will always be answered.""")
|
||||
days_of_activity = fields.Integer('Days of activity', group_operator="max", readonly=True, help="Number of days since the first session of the operator")
|
||||
|
||||
@@ -25,7 +25,7 @@ class AccountMove(models.Model):
|
||||
|
||||
l10n_ch_isr_valid = fields.Boolean(compute='_compute_l10n_ch_isr_valid', help='Boolean value. True iff all the data required to generate the ISR are present')
|
||||
|
||||
l10n_ch_isr_sent = fields.Boolean(defaut=False, help="Boolean value telling whether or not the ISR corresponding to this invoice has already been printed or sent by mail.")
|
||||
l10n_ch_isr_sent = fields.Boolean(default=False, help="Boolean value telling whether or not the ISR corresponding to this invoice has already been printed or sent by mail.")
|
||||
l10n_ch_currency_name = fields.Char(related='currency_id.name', readonly=True, string="Currency Name", help="The name of this invoice's currency") #This field is used in the "invisible" condition field of the 'Print ISR' button.
|
||||
|
||||
@api.depends('invoice_partner_bank_id.bank_id.l10n_ch_postal_eur', 'invoice_partner_bank_id.bank_id.l10n_ch_postal_chf')
|
||||
|
||||
@@ -39,7 +39,7 @@ class AccountMove(models.Model):
|
||||
could not be delivered to the addressee') # ok we must do nothing
|
||||
], default='to_send', copy=False)
|
||||
|
||||
l10n_it_stamp_duty = fields.Float(default=0, string="Dati Bollo", size=15, readonly=True, states={'draft': [('readonly', False)]})
|
||||
l10n_it_stamp_duty = fields.Float(default=0, string="Dati Bollo", readonly=True, states={'draft': [('readonly', False)]})
|
||||
|
||||
l10n_it_ddt_id = fields.Many2one('l10n_it.ddt', string='DDT', readonly=True, states={'draft': [('readonly', False)]}, copy=False)
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ class ResCompany(models.Model):
|
||||
l10n_it_eco_index_number = fields.Char(string="Number in register of companies", size=20,
|
||||
help="This field must contain the number under which the\
|
||||
seller/provider is listed on the register of companies.")
|
||||
l10n_it_eco_index_share_capital = fields.Float(default="0.0", size=15, string="Share capital actually paid up",
|
||||
l10n_it_eco_index_share_capital = fields.Float(default=0.0, string="Share capital actually paid up",
|
||||
help="Mandatory if the seller/provider is a company with share\
|
||||
capital (SpA, SApA, Srl), this field must contain the amount\
|
||||
of share capital actually paid up as resulting from the last\
|
||||
|
||||
@@ -39,7 +39,7 @@ class Alias(models.Model):
|
||||
# hack to only allow selecting mail_thread models (we might
|
||||
# (have a few false positives, though)
|
||||
domain="[('field_id.name', '=', 'message_ids')]")
|
||||
alias_user_id = fields.Many2one('res.users', 'Owner', defaults=lambda self: self.env.user,
|
||||
alias_user_id = fields.Many2one('res.users', 'Owner', default=lambda self: self.env.user,
|
||||
help="The owner of records created upon receiving emails on this alias. "
|
||||
"If this field is not set the system will attempt to find the right owner "
|
||||
"based on the sender (From) address, or will use the Administrator account "
|
||||
|
||||
@@ -268,7 +268,7 @@ class MassMailing(models.Model):
|
||||
received_ratio = fields.Integer(compute="_compute_statistics", string='Received Ratio')
|
||||
opened_ratio = fields.Integer(compute="_compute_statistics", string='Opened Ratio')
|
||||
replied_ratio = fields.Integer(compute="_compute_statistics", string='Replied Ratio')
|
||||
bounced_ratio = fields.Integer(compute="_compute_statistics", String='Bounced Ratio')
|
||||
bounced_ratio = fields.Integer(compute="_compute_statistics", string='Bounced Ratio')
|
||||
next_departure = fields.Datetime(compute="_compute_next_departure", string='Scheduled date')
|
||||
|
||||
def _compute_total(self):
|
||||
|
||||
@@ -29,7 +29,7 @@ class ReportProjectTaskUser(models.Model):
|
||||
('0', 'Low'),
|
||||
('1', 'Normal'),
|
||||
('2', 'High')
|
||||
], size=1, readonly=True, string="Priority")
|
||||
], readonly=True, string="Priority")
|
||||
state = fields.Selection([
|
||||
('normal', 'In Progress'),
|
||||
('blocked', 'Blocked'),
|
||||
|
||||
@@ -309,7 +309,7 @@ class InventoryLine(models.Model):
|
||||
inventory_date = fields.Datetime('Inventory Date', readonly=True,
|
||||
default=fields.Datetime.now,
|
||||
help="Last date at which the On Hand Quantity has been computed.")
|
||||
outdated = fields.Boolean(String='Quantity oudated',
|
||||
outdated = fields.Boolean(string='Quantity outdated',
|
||||
compute='_compute_outdated', search='_search_outdated')
|
||||
product_tracking = fields.Selection('Tracking', related='product_id.tracking', readonly=True)
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ class ProductReplenish(models.TransientModel):
|
||||
_description = 'Product Replenish'
|
||||
|
||||
product_id = fields.Many2one('product.product', string='Product', required=True)
|
||||
product_tmpl_id = fields.Many2one('product.template', String='Product Template', required=True)
|
||||
product_tmpl_id = fields.Many2one('product.template', string='Product Template', required=True)
|
||||
product_has_variants = fields.Boolean('Has variants', default=False, required=True)
|
||||
product_uom_category_id = fields.Many2one('uom.category', related='product_id.uom_id.category_id', readonly=True, required=True)
|
||||
product_uom_id = fields.Many2one('uom.uom', string='Unity of measure', required=True)
|
||||
|
||||
@@ -9,7 +9,7 @@ class StockRulesReport(models.TransientModel):
|
||||
_description = 'Stock Rules report'
|
||||
|
||||
product_id = fields.Many2one('product.product', string='Product', required=True)
|
||||
product_tmpl_id = fields.Many2one('product.template', String='Product Template', required=True)
|
||||
product_tmpl_id = fields.Many2one('product.template', string='Product Template', required=True)
|
||||
warehouse_ids = fields.Many2many('stock.warehouse', string='Warehouses', required=True,
|
||||
help="Show the routes that apply on selected warehouses.")
|
||||
product_has_variants = fields.Boolean('Has variants', default=False, required=True)
|
||||
|
||||
@@ -144,7 +144,7 @@ class IrMailServer(models.Model):
|
||||
|
||||
name = fields.Char(string='Description', required=True, index=True)
|
||||
smtp_host = fields.Char(string='SMTP Server', required=True, help="Hostname or IP of SMTP server")
|
||||
smtp_port = fields.Integer(string='SMTP Port', size=5, required=True, default=25, help="SMTP Port. Usually 465 for SSL, and 25 or 587 for other cases.")
|
||||
smtp_port = fields.Integer(string='SMTP Port', required=True, default=25, help="SMTP Port. Usually 465 for SSL, and 25 or 587 for other cases.")
|
||||
smtp_user = fields.Char(string='Username', help="Optional username for SMTP authentication", groups='base.group_system')
|
||||
smtp_pass = fields.Char(string='Password', help="Optional password for SMTP authentication", groups='base.group_system')
|
||||
smtp_encryption = fields.Selection([('none', 'None'),
|
||||
|
||||
Reference in New Issue
Block a user