Move tracking=True for res.partner fields to mail_usability
This commit is contained in:
@@ -8,25 +8,9 @@ from odoo import models, fields, api, _
|
|||||||
class ResPartner(models.Model):
|
class ResPartner(models.Model):
|
||||||
_inherit = 'res.partner'
|
_inherit = 'res.partner'
|
||||||
|
|
||||||
# track_visibility is handled in the 'mail' module, and base_usability
|
# tracking=True is handled in the 'mail' module, and base_usability
|
||||||
# doesn't depend on 'mail', but that doesn't hurt, it will just be
|
# doesn't depend on 'mail', so adding tracking on res.partner fields
|
||||||
# ignored if mail is not installed
|
# has been moved to mail_usability
|
||||||
# TODO move to mail module
|
|
||||||
# name = fields.Char(tracking=True)
|
|
||||||
# parent_id = fields.Many2one(tracking=True)
|
|
||||||
# ref = fields.Char(tracking=True)
|
|
||||||
# lang = fields.Selection(tracking=True)
|
|
||||||
# user_id = fields.Many2one(tracking=True)
|
|
||||||
# vat = fields.Char(tracking=True)
|
|
||||||
# street = fields.Char(tracking=True)
|
|
||||||
# street2 = fields.Char(tracking=True)
|
|
||||||
# zip = fields.Char(tracking=True)
|
|
||||||
# city = fields.Char(tracking=True)
|
|
||||||
# state_id = fields.Many2one(tracking=True)
|
|
||||||
# country_id = fields.Many2one(tracking=True)
|
|
||||||
# is_company = fields.Boolean(tracking=True)
|
|
||||||
# active = fields.Boolean(tracking=True)
|
|
||||||
# company_id = fields.Many2one(tracking=True)
|
|
||||||
ref = fields.Char(copy=False)
|
ref = fields.Char(copy=False)
|
||||||
# For reports
|
# For reports
|
||||||
name_title = fields.Char(
|
name_title = fields.Char(
|
||||||
|
|||||||
1
mail_usability/__init__.py
Normal file
1
mail_usability/__init__.py
Normal file
@@ -0,0 +1 @@
|
|||||||
|
from . import models
|
||||||
32
mail_usability/__manifest__.py
Normal file
32
mail_usability/__manifest__.py
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
# Copyright 2016-2021 Akretion France (http://www.akretion.com)
|
||||||
|
# @author Benoît Guillot <benoit.guillot@akretion.com>
|
||||||
|
# @author Alexis de Lattre <alexis.delattre@akretion.com>
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
|
{
|
||||||
|
'name': 'Mail Usability',
|
||||||
|
'version': '14.0.1.0.0',
|
||||||
|
'category': 'Productivity/Discuss',
|
||||||
|
'license': 'AGPL-3',
|
||||||
|
'summary': 'Usability improvements on mails',
|
||||||
|
'description': """
|
||||||
|
Mail Usability
|
||||||
|
==============
|
||||||
|
|
||||||
|
Small usability improvements on mails:
|
||||||
|
|
||||||
|
* remove link in mail footer (TODO mig v14)
|
||||||
|
|
||||||
|
* remove 'sent by' in notification footer (TODO mig v14)
|
||||||
|
""",
|
||||||
|
'author': 'Akretion',
|
||||||
|
'website': 'http://www.akretion.com',
|
||||||
|
'depends': ['mail'],
|
||||||
|
'data': [
|
||||||
|
#'views/mail_view.xml',
|
||||||
|
#'data/mail_data.xml',
|
||||||
|
#'wizard/email_template_preview_view.xml',
|
||||||
|
#'wizard/mail_compose_message_view.xml',
|
||||||
|
],
|
||||||
|
'installable': True,
|
||||||
|
}
|
||||||
2
mail_usability/models/__init__.py
Normal file
2
mail_usability/models/__init__.py
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
from . import res_partner
|
||||||
|
from . import mail_template
|
||||||
11
mail_usability/models/mail_template.py
Normal file
11
mail_usability/models/mail_template.py
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
# Copyright 2018-2021 Akretion France (http://www.akretion.com).
|
||||||
|
# @author Sébastien BEAU <sebastien.beau@akretion.com>
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
|
from odoo import fields, models
|
||||||
|
|
||||||
|
|
||||||
|
class MailTemplate(models.Model):
|
||||||
|
_inherit = 'mail.template'
|
||||||
|
|
||||||
|
auto_delete = fields.Boolean(default=False)
|
||||||
26
mail_usability/models/res_partner.py
Normal file
26
mail_usability/models/res_partner.py
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
# Copyright 2015-2021 Akretion France (http://www.akretion.com/)
|
||||||
|
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
|
from odoo import models, fields
|
||||||
|
|
||||||
|
|
||||||
|
class ResPartner(models.Model):
|
||||||
|
_inherit = 'res.partner'
|
||||||
|
|
||||||
|
# tracking=True is handled in the 'mail' module, so it's better
|
||||||
|
# to have this in mail_usability than in base_usability
|
||||||
|
name = fields.Char(tracking=True)
|
||||||
|
parent_id = fields.Many2one(tracking=True)
|
||||||
|
ref = fields.Char(tracking=True)
|
||||||
|
lang = fields.Selection(tracking=True)
|
||||||
|
vat = fields.Char(tracking=True)
|
||||||
|
street = fields.Char(tracking=True)
|
||||||
|
street2 = fields.Char(tracking=True)
|
||||||
|
zip = fields.Char(tracking=True)
|
||||||
|
city = fields.Char(tracking=True)
|
||||||
|
state_id = fields.Many2one(tracking=True)
|
||||||
|
country_id = fields.Many2one(tracking=True)
|
||||||
|
is_company = fields.Boolean(tracking=True)
|
||||||
|
active = fields.Boolean(tracking=True)
|
||||||
|
company_id = fields.Many2one(tracking=True)
|
||||||
Reference in New Issue
Block a user