Files
odoo_source/addons/crm/security/ir.model.access.csv
T
Pierre-Yves Dufays 35d5342887 [IMP] {test_}mail, various: generalize activity plan + activity batch schedule
Generalize the hr.employee activity plan to any model, allowing to create
activity plan that can be launched on any model.

The activity can now be created in batch by selecting multiple record in the
list view and then clicking on a "clock" icon in a row similarly to the batch
records update (selecting multiple records allows to change for example their
name in batch in the list view). We implement also that functionality for the
plan, allowing to launch a plan on multiple records at once.

We also centralize the launching of activity or activity plan through either
the  "Activities" button in the chatter or the "clock" button in the view list.

Scheduling activity is now taken in charge by a wizard that can schedule a
single activity as well as a plan. We add/update tests for checking that the
wizard is launched with the right record selection (on a single record or a
batch) and add tests for checking the wizard itself.

The plan can be defined through an added menu in the technical admin menu but
also through configuration menu added in the module crm, project.

Technical notes:
In the added wizard, to determine that there is a error, we introduce the
has_error field because we cannot use easily the error field for that. Indeed,
to determine that there is no error, we have to compare it to "<p><br></p>"
(more precisely &lt;p&gt;&lt;br&gt;&lt;/p&gt;) which is not handy and may
change in the future. This is because when we write False on field error and
read it after, we get "<p><br></p>". Instead, we centralize this weird
comparison in the model in the compute method of has_error.

The ActivityListPopover still displays the activity of the record on which it
has been triggered but the button to schedule activity will launch a wizard
that create activities in batch for the selected records if more than one was
selected. For that, the ActivityListPopover component receives now an
additional prop: resIds (selected records) on top of the resId prop (record on
which the popup has been triggered). Note that when the line that trigger the
popup is not selected, the batch mode is disabled to avoid confusion.

Test are updated because the wizard is opened instead of the activity form to
schedule a new activity and as the form view is only used to edit already
existing activities, default_res_id and default_res_model are no longer passed.

We defines date_deadline and date_plan_deadline in the schedule wizard because
those date are managed differently (default value, required or not, ...).

Task-3390865

Part-of: odoo/odoo#137969
2023-10-12 16:12:09 +00:00

4.0 KiB

1idnamemodel_id:idgroup_id:idperm_readperm_writeperm_createperm_unlink
2access_crm_lead_managercrm.lead.managermodel_crm_leadsales_team.group_sale_manager1111
3access_crm_leadcrm.leadmodel_crm_leadsales_team.group_sale_salesman1110
4access_crm_stagecrm.stagemodel_crm_stagebase.group_user1000
5access_crm_stage_managercrm.stagemodel_crm_stagesales_team.group_sale_manager1111
6access_res_partner_managerres.partner.crm.managerbase.model_res_partnersales_team.group_sale_manager1000
7access_res_partner_category_managerres.partner.category.crm.managerbase.model_res_partner_categorysales_team.group_sale_manager1000
8access_res_partnerres.partner.crm.userbase.model_res_partnersales_team.group_sale_salesman1110
9access_res_partner_categoryres.partner.category.crm.userbase.model_res_partner_categorysales_team.group_sale_salesman1110
10access_crm_lost_reason_managercrm.lost.reason.managermodel_crm_lost_reasonsales_team.group_sale_manager1111
11access_crm_lost_reason_salesmancrm.lost.reason.salesmanmodel_crm_lost_reasonsales_team.group_sale_salesman1000
12access_crm_lost_reason_usercrm.lost.reason.usermodel_crm_lost_reasonbase.group_user1000
13access_crm_activity_report_usercrm.activity.report.usermodel_crm_activity_reportbase.group_user0000
14access_crm_activity_report_salesmancrm.activity.report.salesmanmodel_crm_activity_reportsales_team.group_sale_salesman1000
15access_calendar_event_managercalendar.event.managercalendar.model_calendar_eventsales_team.group_sale_manager1111
16access_calendar_eventcalendar.eventcalendar.model_calendar_eventsales_team.group_sale_salesman1110
17access_calendar_event_type_sale_managercalendar.event.type.managercalendar.model_calendar_event_typesales_team.group_sale_manager1110
18access_calendar_event_type_sale_usercalendar.event.type.usercalendar.model_calendar_event_typebase.group_user1000
19access_calendar_event_type_sale_salesmancalendar.event.type.salesmancalendar.model_calendar_event_typesales_team.group_sale_salesman1000
20access_mail_activity_type_sale_managermail.activity.type.sale.managermail.model_mail_activity_typesales_team.group_sale_manager1111
21access_crm_lead_scoring_frequencyaccess_crm_lead_scoring_frequencymodel_crm_lead_scoring_frequencysales_team.group_sale_salesman1000
22access_crm_lead_scoring_frequency_systemaccess_crm_lead_scoring_frequency_systemmodel_crm_lead_scoring_frequencybase.group_system1000
23access_crm_lead_scoring_frequency_fieldaccess_crm_lead_scoring_frequency_fieldmodel_crm_lead_scoring_frequency_fieldsales_team.group_sale_salesman1000
24access_crm_lead_scoring_frequency_field_systemaccess_crm_lead_scoring_frequency_field_systemmodel_crm_lead_scoring_frequency_fieldbase.group_system1000
25access_crm_lead_lostaccess.crm.lead.lostmodel_crm_lead_lostsales_team.group_sale_salesman1110
26access_crm_lead2opportunity_partneraccess.crm.lead2opportunity.partnermodel_crm_lead2opportunity_partnersales_team.group_sale_salesman1110
27access_crm_lead2opportunity_partner_massaccess.crm.lead2opportunity.partner.massmodel_crm_lead2opportunity_partner_masssales_team.group_sale_salesman1110
28access_crm_merge_opportunityaccess.crm.merge.opportunitymodel_crm_merge_opportunitysales_team.group_sale_salesman1110
29crm_recurring_plan_access_managercrm.recurring.plan.access.managermodel_crm_recurring_plansales_team.group_sale_manager1111
30crm_recurring_plan_access_salesmancrm.recurring.plan.access.salesmanmodel_crm_recurring_plansales_team.group_sale_salesman1000
31crm_lead_pls_update_access_systemcrm.lead.pls.update.access.systemmodel_crm_lead_pls_updatebase.group_erp_manager1111
32access_mail_activity_plan_sale_managermail.activity.plan.sale.managermail.model_mail_activity_plansales_team.group_sale_manager1111
33access_mail_activity_plan_template_sale_managermail.activity.plan.template.sale.managermail.model_mail_activity_plan_templatesales_team.group_sale_manager1111