[IMP] maintenance: improves field type from text to html
Replace text fields to html fields as we have our own 'OdooEditor'. Indeed, it gives more options to users in the way they format their content without weighting too much on the UI (tools appear on demand and not by default). Models -> fields 1) maintenance.request -> description 2) maintenance.equipment -> note 3) maintenance.equipment.category -> note 4) mrp.workcenter -> note 5) mrp.workorder -> operation_notes 6) mrp.routing.workcenter -> note 7) repair.order -> internal_notes 8) repair.order -> quotation_notes Task Id: 2499504 X-original-commit: 0cca26b5358cd9d69a65c6b93cfecb33d7e659c5
This commit is contained in:
committed by
Thibault Delavallée
parent
23483865b1
commit
f247476155
@@ -40,7 +40,7 @@ class MaintenanceEquipmentCategory(models.Model):
|
||||
default=lambda self: self.env.company)
|
||||
technician_user_id = fields.Many2one('res.users', 'Responsible', tracking=True, default=lambda self: self.env.uid)
|
||||
color = fields.Integer('Color Index')
|
||||
note = fields.Text('Comments', translate=True)
|
||||
note = fields.Html('Comments', translate=True)
|
||||
equipment_ids = fields.One2many('maintenance.equipment', 'category_id', string='Equipments', copy=False)
|
||||
equipment_count = fields.Integer(string="Equipment", compute='_compute_equipment_count')
|
||||
maintenance_ids = fields.One2many('maintenance.request', 'category_id', copy=False)
|
||||
@@ -125,7 +125,7 @@ class MaintenanceEquipment(models.Model):
|
||||
assign_date = fields.Date('Assigned Date', tracking=True)
|
||||
effective_date = fields.Date('Effective Date', default=fields.Date.context_today, required=True, help="Date at which the equipment became effective. This date will be used to compute the Mean Time Between Failure.")
|
||||
cost = fields.Float('Cost')
|
||||
note = fields.Text('Note')
|
||||
note = fields.Html('Note')
|
||||
warranty_date = fields.Date('Warranty Expiration Date')
|
||||
color = fields.Integer('Color Index')
|
||||
scrap_date = fields.Date('Scrap Date')
|
||||
@@ -280,7 +280,7 @@ class MaintenanceRequest(models.Model):
|
||||
name = fields.Char('Subjects', required=True)
|
||||
company_id = fields.Many2one('res.company', string='Company',
|
||||
default=lambda self: self.env.company)
|
||||
description = fields.Text('Description')
|
||||
description = fields.Html('Description')
|
||||
request_date = fields.Date('Request Date', tracking=True, default=fields.Date.context_today,
|
||||
help="Date requested for the maintenance to happen")
|
||||
owner_user_id = fields.Many2one('res.users', string='Created by User', default=lambda s: s.env.uid)
|
||||
|
||||
@@ -26,7 +26,7 @@ class MrpRoutingWorkcenter(models.Model):
|
||||
string="Work Sheet", default="text",
|
||||
help="Defines if you want to use a PDF or a Google Slide as work sheet."
|
||||
)
|
||||
note = fields.Text('Description', help="Text worksheet description")
|
||||
note = fields.Html('Description', help="Text worksheet description")
|
||||
worksheet = fields.Binary('PDF')
|
||||
worksheet_google_slide = fields.Char('Google Slide', help="Paste the url of your Google Slide. Make sure the access to the document is public.")
|
||||
time_mode = fields.Selection([
|
||||
|
||||
@@ -26,7 +26,7 @@ class MrpWorkcenter(models.Model):
|
||||
active = fields.Boolean('Active', related='resource_id.active', default=True, store=True, readonly=False)
|
||||
|
||||
code = fields.Char('Code', copy=False)
|
||||
note = fields.Text(
|
||||
note = fields.Html(
|
||||
'Description',
|
||||
help="Description of the Work Center.")
|
||||
capacity = fields.Float(
|
||||
|
||||
@@ -112,7 +112,7 @@ class MrpWorkorder(models.Model):
|
||||
string='Worksheet Type', related='operation_id.worksheet_type', readonly=True)
|
||||
worksheet_google_slide = fields.Char(
|
||||
'Worksheet URL', related='operation_id.worksheet_google_slide', readonly=True)
|
||||
operation_note = fields.Text("Description", related='operation_id.note', readonly=True)
|
||||
operation_note = fields.Html("Description", related='operation_id.note', readonly=True)
|
||||
move_raw_ids = fields.One2many(
|
||||
'stock.move', 'workorder_id', 'Raw Moves',
|
||||
domain=[('raw_material_production_id', '!=', False), ('production_id', '=', False)])
|
||||
|
||||
@@ -100,8 +100,8 @@ class Repair(models.Model):
|
||||
fees_lines = fields.One2many(
|
||||
'repair.fee', 'repair_id', 'Operations',
|
||||
copy=True, readonly=False)
|
||||
internal_notes = fields.Text('Internal Notes')
|
||||
quotation_notes = fields.Text('Quotation Notes')
|
||||
internal_notes = fields.Html('Internal Notes')
|
||||
quotation_notes = fields.Html('Quotation Notes')
|
||||
user_id = fields.Many2one('res.users', string="Responsible", default=lambda self: self.env.user, check_company=True)
|
||||
company_id = fields.Many2one(
|
||||
'res.company', 'Company',
|
||||
|
||||
Reference in New Issue
Block a user