[IMP] project: improve generic UX of project
In this commit made following changes: - added copy writing content in project form view for access_instruction_message field. task-3067151 Part-of: odoo/odoo#106233
This commit is contained in:
@@ -137,9 +137,9 @@ class Project(models.Model):
|
||||
"with Tasks (or optionally Issues if the Issue Tracker module is installed).")
|
||||
alias_value = fields.Char(string='Alias email', compute='_compute_alias_value')
|
||||
privacy_visibility = fields.Selection([
|
||||
('followers', 'Invited internal users'),
|
||||
('followers', 'Invited internal users (private)'),
|
||||
('employees', 'All internal users'),
|
||||
('portal', 'Invited portal users and all internal users'),
|
||||
('portal', 'Invited portal users and all internal users (public)'),
|
||||
],
|
||||
string='Visibility', required=True,
|
||||
default='portal',
|
||||
@@ -339,9 +339,9 @@ class Project(models.Model):
|
||||
def _compute_access_instruction_message(self):
|
||||
for project in self:
|
||||
if project.privacy_visibility == 'portal':
|
||||
project.access_instruction_message = _('Grant portal users access to your project or tasks by adding them as followers.')
|
||||
project.access_instruction_message = _('Grant portal users access to your project or tasks by adding them as followers. Customers automatically get access to their tasks in their portal.')
|
||||
elif project.privacy_visibility == 'followers':
|
||||
project.access_instruction_message = _('Grant employees access to your project or tasks by adding them as followers.')
|
||||
project.access_instruction_message = _('Grant employees access to your project or tasks by adding them as followers. Employees automatically get access to the tasks they are assigned to.')
|
||||
else:
|
||||
project.access_instruction_message = ''
|
||||
|
||||
|
||||
@@ -86,10 +86,10 @@
|
||||
<group>
|
||||
<field name="analytic_account_id" domain="['|', ('company_id', '=', company_id), ('company_id', '=', False)]" context="{'default_partner_id': partner_id}" groups="analytic.group_analytic_accounting"/>
|
||||
<field name="privacy_visibility" widget="radio"/>
|
||||
<span colspan="2" class="text-muted" attrs="{'invisible':[('access_instruction_message', '=', '')]}">
|
||||
<span colspan="2" class="text-muted o_row ps-1" attrs="{'invisible':[('access_instruction_message', '=', '')]}">
|
||||
<i class="fa fa-lightbulb-o"/>&nbsp;<field class="d-inline" name="access_instruction_message" nolabel="1"/>
|
||||
</span>
|
||||
<span colspan="2" class="text-muted" attrs="{'invisible':[('privacy_visibility_warning', '=', '')]}">
|
||||
<span colspan="2" class="text-muted o_row ps-1" attrs="{'invisible':[('privacy_visibility_warning', '=', '')]}">
|
||||
<i class="fa fa-warning"/>&nbsp;<field class="d-inline" name="privacy_visibility_warning" nolabel="1"/>
|
||||
</span>
|
||||
</group>
|
||||
|
||||
Reference in New Issue
Block a user