diff --git a/addons/bus/models/bus.py b/addons/bus/models/bus.py index cdeee00a313..8bb882608d5 100644 --- a/addons/bus/models/bus.py +++ b/addons/bus/models/bus.py @@ -33,7 +33,6 @@ class ImBus(models.Model): _name = 'bus.bus' - create_date = fields.Datetime('Create date') channel = fields.Char('Channel') message = fields.Char('Message') diff --git a/addons/crm/models/crm_lead.py b/addons/crm/models/crm_lead.py index 972e0e7a15c..d085d7635d6 100644 --- a/addons/crm/models/crm_lead.py +++ b/addons/crm/models/crm_lead.py @@ -76,8 +76,6 @@ class Lead(models.Model): string='Kanban State', compute='_compute_kanban_state') email_cc = fields.Text('Global CC', help="These email addresses will be added to the CC field of all inbound and outbound emails for this record before being sent. Separate multiple email addresses with a comma") description = fields.Text('Notes', track_visibility='onchange', track_sequence=6) - create_date = fields.Datetime('Create Date', readonly=True) - write_date = fields.Datetime('Update Date', readonly=True) tag_ids = fields.Many2many('crm.lead.tag', 'crm_lead_tag_rel', 'lead_id', 'tag_id', string='Tags', help="Classify and analyze your lead/opportunity categories like: Training, Service") contact_name = fields.Char('Contact Name', track_visibility='onchange', track_sequence=3) partner_name = fields.Char("Customer Name", track_visibility='onchange', track_sequence=2, index=True, help='The name of the future partner company that will be created while converting the lead into opportunity') diff --git a/addons/gamification/models/badge.py b/addons/gamification/models/badge.py index 6da94ddf9c1..8aa184d1930 100644 --- a/addons/gamification/models/badge.py +++ b/addons/gamification/models/badge.py @@ -22,8 +22,6 @@ class BadgeUser(models.Model): challenge_id = fields.Many2one('gamification.challenge', string='Challenge originating', help="If this badge was rewarded through a challenge") comment = fields.Text('Comment') badge_name = fields.Char(related='badge_id.name', string="Badge Name") - create_date = fields.Datetime('Created', readonly=True) - create_uid = fields.Many2one('res.users', string='Creator', readonly=True) def _send_badge(self): """Send a notification to a user for receiving a badge diff --git a/addons/hr_recruitment/models/hr_recruitment.py b/addons/hr_recruitment/models/hr_recruitment.py index 6149bc159f7..dc7196abab5 100644 --- a/addons/hr_recruitment/models/hr_recruitment.py +++ b/addons/hr_recruitment/models/hr_recruitment.py @@ -124,7 +124,6 @@ class Applicant(models.Model): probability = fields.Float("Probability") partner_id = fields.Many2one('res.partner', "Contact") create_date = fields.Datetime("Creation Date", readonly=True, index=True) - write_date = fields.Datetime("Update Date", readonly=True) stage_id = fields.Many2one('hr.recruitment.stage', 'Stage', ondelete='restrict', track_visibility='onchange', domain="['|', ('job_id', '=', False), ('job_id', '=', job_id)]", copy=False, index=True, diff --git a/addons/im_livechat/models/mail_channel.py b/addons/im_livechat/models/mail_channel.py index a4200047315..db90ff357e6 100644 --- a/addons/im_livechat/models/mail_channel.py +++ b/addons/im_livechat/models/mail_channel.py @@ -32,7 +32,6 @@ class MailChannel(models.Model): _inherit = ['mail.channel', 'rating.mixin'] anonymous_name = fields.Char('Anonymous Name') - create_date = fields.Datetime('Create Date', required=True) channel_type = fields.Selection(selection_add=[('livechat', 'Livechat Conversation')]) livechat_channel_id = fields.Many2one('im_livechat.channel', 'Channel') diff --git a/addons/mass_mailing/models/mass_mailing.py b/addons/mass_mailing/models/mass_mailing.py index a7ef516f2f5..8738bd6783b 100644 --- a/addons/mass_mailing/models/mass_mailing.py +++ b/addons/mass_mailing/models/mass_mailing.py @@ -96,7 +96,6 @@ class MassMailingList(models.Model): name = fields.Char(string='Mailing List', required=True) active = fields.Boolean(default=True) - create_date = fields.Datetime(string='Creation Date') contact_nbr = fields.Integer(compute="_compute_contact_nbr", string='Number of Contacts') contact_ids = fields.Many2many( 'mail.mass_mailing.contact', 'mail_mass_mailing_contact_list_rel', 'list_id', 'contact_id', @@ -213,7 +212,6 @@ class MassMailingContact(models.Model): title_id = fields.Many2one('res.partner.title', string='Title') email = fields.Char(required=True) is_email_valid = fields.Boolean(compute='_compute_is_email_valid', store=True) - create_date = fields.Datetime(string='Creation Date') list_ids = fields.Many2many( 'mail.mass_mailing.list', 'mail_mass_mailing_contact_list_rel', 'contact_id', 'list_id', string='Mailing Lists') @@ -421,7 +419,6 @@ class MassMailing(models.Model): active = fields.Boolean(default=True) email_from = fields.Char(string='From', required=True, default=lambda self: self.env['mail.message']._get_default_from()) - create_date = fields.Datetime(string='Creation Date') sent_date = fields.Datetime(string='Sent Date', oldname='date', copy=False) schedule_date = fields.Datetime(string='Schedule in the Future') body_html = fields.Html(string='Body', sanitize_attributes=False) diff --git a/addons/point_of_sale/models/pos_order.py b/addons/point_of_sale/models/pos_order.py index 7a8b5f45d90..fea0e10454d 100644 --- a/addons/point_of_sale/models/pos_order.py +++ b/addons/point_of_sale/models/pos_order.py @@ -966,7 +966,6 @@ class PosOrderLine(models.Model): readonly=True, required=True) discount = fields.Float(string='Discount (%)', digits=0, default=0.0) order_id = fields.Many2one('pos.order', string='Order Ref', ondelete='cascade') - create_date = fields.Datetime(string='Creation Date', readonly=True) tax_ids = fields.Many2many('account.tax', string='Taxes', readonly=True) tax_ids_after_fiscal_position = fields.Many2many('account.tax', compute='_get_tax_ids_after_fiscal_position', string='Taxes to Apply') pack_lot_ids = fields.One2many('pos.pack.operation.lot', 'pos_order_line_id', string='Lot/serial Number') diff --git a/addons/project/models/project.py b/addons/project/models/project.py index 18f49389878..b050188cdfd 100644 --- a/addons/project/models/project.py +++ b/addons/project/models/project.py @@ -451,8 +451,8 @@ class Task(models.Model): ('blocked', 'Red')], string='Kanban State', copy=False, default='normal', required=True) kanban_state_label = fields.Char(compute='_compute_kanban_state_label', string='Kanban State Label', track_visibility='onchange') - create_date = fields.Datetime(index=True) - write_date = fields.Datetime(index=True) #not displayed in the view but it might be useful with base_automation module (and it needs to be defined first for that) + create_date = fields.Datetime("Created On", readonly=True, index=True) + write_date = fields.Datetime("Last Updated On", readonly=True, index=True) date_start = fields.Datetime(string='Starting Date', default=fields.Datetime.now, index=True, copy=False) diff --git a/addons/stock/models/stock_production_lot.py b/addons/stock/models/stock_production_lot.py index 1a38273ae03..7011c79d142 100644 --- a/addons/stock/models/stock_production_lot.py +++ b/addons/stock/models/stock_production_lot.py @@ -21,7 +21,6 @@ class ProductionLot(models.Model): 'uom.uom', 'Unit of Measure', related='product_id.uom_id', store=True) quant_ids = fields.One2many('stock.quant', 'lot_id', 'Quants', readonly=True) - create_date = fields.Datetime('Creation Date') product_qty = fields.Float('Quantity', compute='_product_qty') _sql_constraints = [ diff --git a/addons/website_crm_partner_assign/report/crm_lead_report.py b/addons/website_crm_partner_assign/report/crm_lead_report.py index d15057c4272..4ab819746f7 100644 --- a/addons/website_crm_partner_assign/report/crm_lead_report.py +++ b/addons/website_crm_partner_assign/report/crm_lead_report.py @@ -19,7 +19,6 @@ class CrmLeadReportAssign(models.Model): team_id = fields.Many2one('crm.team', 'Sales Team', oldname='section_id', readonly=True) company_id = fields.Many2one('res.company', 'Company', readonly=True) date_assign = fields.Date('Assign Date', readonly=True) - create_date = fields.Datetime('Create Date', readonly=True) delay_open = fields.Float('Delay to Assign', digits=(16, 2), readonly=True, group_operator="avg", help="Number of Days to open the case") delay_close = fields.Float('Delay to Close', digits=(16, 2), readonly=True, group_operator="avg", help="Number of Days to close the case") delay_expected = fields.Float('Overpassed Deadline', digits=(16, 2), readonly=True, group_operator="avg") diff --git a/addons/website_forum/models/forum.py b/addons/website_forum/models/forum.py index 64b37ea3b51..ad0885b9ebb 100644 --- a/addons/website_forum/models/forum.py +++ b/addons/website_forum/models/forum.py @@ -929,7 +929,6 @@ class Tags(models.Model): _inherit = ['mail.thread', 'website.seo.metadata'] name = fields.Char('Name', required=True) - create_uid = fields.Many2one('res.users', string='Created by', readonly=True) forum_id = fields.Many2one('forum.forum', string='Forum', required=True) post_ids = fields.Many2many( 'forum.post', 'forum_tag_rel', 'forum_tag_id', 'forum_id', diff --git a/addons/website_forum/models/res_users.py b/addons/website_forum/models/res_users.py index 77cbcd7d9e5..6e7e5b080f6 100644 --- a/addons/website_forum/models/res_users.py +++ b/addons/website_forum/models/res_users.py @@ -21,7 +21,7 @@ class Users(models.Model): ['country_id', 'city', 'website', 'website_description', 'website_published'])) return init_res - create_date = fields.Datetime('Create Date', readonly=True, copy=False, index=True) + create_date = fields.Datetime('Create Date', readonly=True, index=True) karma = fields.Integer('Karma', default=0) badge_ids = fields.One2many('gamification.badge.user', 'user_id', string='Badges', copy=False) gold_badge = fields.Integer('Gold badges count', compute="_get_user_badge_level") diff --git a/addons/website_sale_wishlist/models/product_wishlist.py b/addons/website_sale_wishlist/models/product_wishlist.py index 4270b9d0225..006473a5ce6 100644 --- a/addons/website_sale_wishlist/models/product_wishlist.py +++ b/addons/website_sale_wishlist/models/product_wishlist.py @@ -18,7 +18,6 @@ class ProductWishlist(models.Model): pricelist_id = fields.Many2one('product.pricelist', string='Pricelist', help='Pricelist when added') price = fields.Monetary(digits=0, currency_field='currency_id', string='Price', help='Price of the product when it has been added in the wishlist') website_id = fields.Many2one('website', required=True) - create_date = fields.Datetime('Added Date', readonly=True, required=True) active = fields.Boolean(default=True, required=True) @api.model diff --git a/odoo/addons/base/models/ir_attachment.py b/odoo/addons/base/models/ir_attachment.py index 94760a13b35..f1501d9aad4 100644 --- a/odoo/addons/base/models/ir_attachment.py +++ b/odoo/addons/base/models/ir_attachment.py @@ -291,8 +291,6 @@ class IrAttachment(models.Model): res_model_name = fields.Char(compute='_compute_res_model_name', store=True, index=True) res_field = fields.Char('Resource Field', readonly=True) res_id = fields.Integer('Resource ID', readonly=True, help="The record id this is attached to.") - create_date = fields.Datetime('Date Created', readonly=True) - create_uid = fields.Many2one('res.users', readonly=True) company_id = fields.Many2one('res.company', string='Company', change_default=True, default=lambda self: self.env['res.company']._company_default_get('ir.attachment')) type = fields.Selection([('url', 'URL'), ('binary', 'File')], diff --git a/odoo/addons/base/models/ir_ui_view.py b/odoo/addons/base/models/ir_ui_view.py index 29dc076ef6e..eef40cc916b 100644 --- a/odoo/addons/base/models/ir_ui_view.py +++ b/odoo/addons/base/models/ir_ui_view.py @@ -209,8 +209,6 @@ class View(models.Model): groups_id = fields.Many2many('res.groups', 'ir_ui_view_group_rel', 'view_id', 'group_id', string='Groups', help="If this field is empty, the view applies to all users. Otherwise, the view applies to the users of those groups only.") model_ids = fields.One2many('ir.model.data', 'res_id', string="Models", domain=[('model', '=', 'ir.ui.view')], auto_join=True) - create_date = fields.Datetime(readonly=True) - write_date = fields.Datetime(string='Last Modification Date', readonly=True) mode = fields.Selection([('primary', "Base view"), ('extension', "Extension View")], string="View inheritance mode", default='primary', required=True, diff --git a/odoo/models.py b/odoo/models.py index e6f69f0d1c2..1187e9eff33 100644 --- a/odoo/models.py +++ b/odoo/models.py @@ -336,10 +336,14 @@ class BaseModel(MetaModel('DummyModel', (object,), {'_register': False})): compute='_compute_display_name')) if self._log_access: - add('create_uid', fields.Many2one('res.users', string='Created by', automatic=True)) - add('create_date', fields.Datetime(string='Created on', automatic=True)) - add('write_uid', fields.Many2one('res.users', string='Last Updated by', automatic=True)) - add('write_date', fields.Datetime(string='Last Updated on', automatic=True)) + add('create_uid', fields.Many2one( + 'res.users', string='Created by', automatic=True, readonly=True)) + add('create_date', fields.Datetime( + string='Created on', automatic=True, readonly=True)) + add('write_uid', fields.Many2one( + 'res.users', string='Last Updated by', automatic=True, readonly=True)) + add('write_date', fields.Datetime( + string='Last Updated on', automatic=True, readonly=True)) last_modified_name = 'compute_concurrency_field_with_access' else: last_modified_name = 'compute_concurrency_field'