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 <p><br></p>) 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
4.0 KiB
4.0 KiB
| 1 | id | name | model_id:id | group_id:id | perm_read | perm_write | perm_create | perm_unlink |
|---|---|---|---|---|---|---|---|---|
| 2 | access_crm_lead_manager | crm.lead.manager | model_crm_lead | sales_team.group_sale_manager | 1 | 1 | 1 | 1 |
| 3 | access_crm_lead | crm.lead | model_crm_lead | sales_team.group_sale_salesman | 1 | 1 | 1 | 0 |
| 4 | access_crm_stage | crm.stage | model_crm_stage | base.group_user | 1 | 0 | 0 | 0 |
| 5 | access_crm_stage_manager | crm.stage | model_crm_stage | sales_team.group_sale_manager | 1 | 1 | 1 | 1 |
| 6 | access_res_partner_manager | res.partner.crm.manager | base.model_res_partner | sales_team.group_sale_manager | 1 | 0 | 0 | 0 |
| 7 | access_res_partner_category_manager | res.partner.category.crm.manager | base.model_res_partner_category | sales_team.group_sale_manager | 1 | 0 | 0 | 0 |
| 8 | access_res_partner | res.partner.crm.user | base.model_res_partner | sales_team.group_sale_salesman | 1 | 1 | 1 | 0 |
| 9 | access_res_partner_category | res.partner.category.crm.user | base.model_res_partner_category | sales_team.group_sale_salesman | 1 | 1 | 1 | 0 |
| 10 | access_crm_lost_reason_manager | crm.lost.reason.manager | model_crm_lost_reason | sales_team.group_sale_manager | 1 | 1 | 1 | 1 |
| 11 | access_crm_lost_reason_salesman | crm.lost.reason.salesman | model_crm_lost_reason | sales_team.group_sale_salesman | 1 | 0 | 0 | 0 |
| 12 | access_crm_lost_reason_user | crm.lost.reason.user | model_crm_lost_reason | base.group_user | 1 | 0 | 0 | 0 |
| 13 | access_crm_activity_report_user | crm.activity.report.user | model_crm_activity_report | base.group_user | 0 | 0 | 0 | 0 |
| 14 | access_crm_activity_report_salesman | crm.activity.report.salesman | model_crm_activity_report | sales_team.group_sale_salesman | 1 | 0 | 0 | 0 |
| 15 | access_calendar_event_manager | calendar.event.manager | calendar.model_calendar_event | sales_team.group_sale_manager | 1 | 1 | 1 | 1 |
| 16 | access_calendar_event | calendar.event | calendar.model_calendar_event | sales_team.group_sale_salesman | 1 | 1 | 1 | 0 |
| 17 | access_calendar_event_type_sale_manager | calendar.event.type.manager | calendar.model_calendar_event_type | sales_team.group_sale_manager | 1 | 1 | 1 | 0 |
| 18 | access_calendar_event_type_sale_user | calendar.event.type.user | calendar.model_calendar_event_type | base.group_user | 1 | 0 | 0 | 0 |
| 19 | access_calendar_event_type_sale_salesman | calendar.event.type.salesman | calendar.model_calendar_event_type | sales_team.group_sale_salesman | 1 | 0 | 0 | 0 |
| 20 | access_mail_activity_type_sale_manager | mail.activity.type.sale.manager | mail.model_mail_activity_type | sales_team.group_sale_manager | 1 | 1 | 1 | 1 |
| 21 | access_crm_lead_scoring_frequency | access_crm_lead_scoring_frequency | model_crm_lead_scoring_frequency | sales_team.group_sale_salesman | 1 | 0 | 0 | 0 |
| 22 | access_crm_lead_scoring_frequency_system | access_crm_lead_scoring_frequency_system | model_crm_lead_scoring_frequency | base.group_system | 1 | 0 | 0 | 0 |
| 23 | access_crm_lead_scoring_frequency_field | access_crm_lead_scoring_frequency_field | model_crm_lead_scoring_frequency_field | sales_team.group_sale_salesman | 1 | 0 | 0 | 0 |
| 24 | access_crm_lead_scoring_frequency_field_system | access_crm_lead_scoring_frequency_field_system | model_crm_lead_scoring_frequency_field | base.group_system | 1 | 0 | 0 | 0 |
| 25 | access_crm_lead_lost | access.crm.lead.lost | model_crm_lead_lost | sales_team.group_sale_salesman | 1 | 1 | 1 | 0 |
| 26 | access_crm_lead2opportunity_partner | access.crm.lead2opportunity.partner | model_crm_lead2opportunity_partner | sales_team.group_sale_salesman | 1 | 1 | 1 | 0 |
| 27 | access_crm_lead2opportunity_partner_mass | access.crm.lead2opportunity.partner.mass | model_crm_lead2opportunity_partner_mass | sales_team.group_sale_salesman | 1 | 1 | 1 | 0 |
| 28 | access_crm_merge_opportunity | access.crm.merge.opportunity | model_crm_merge_opportunity | sales_team.group_sale_salesman | 1 | 1 | 1 | 0 |
| 29 | crm_recurring_plan_access_manager | crm.recurring.plan.access.manager | model_crm_recurring_plan | sales_team.group_sale_manager | 1 | 1 | 1 | 1 |
| 30 | crm_recurring_plan_access_salesman | crm.recurring.plan.access.salesman | model_crm_recurring_plan | sales_team.group_sale_salesman | 1 | 0 | 0 | 0 |
| 31 | crm_lead_pls_update_access_system | crm.lead.pls.update.access.system | model_crm_lead_pls_update | base.group_erp_manager | 1 | 1 | 1 | 1 |
| 32 | access_mail_activity_plan_sale_manager | mail.activity.plan.sale.manager | mail.model_mail_activity_plan | sales_team.group_sale_manager | 1 | 1 | 1 | 1 |
| 33 | access_mail_activity_plan_template_sale_manager | mail.activity.plan.template.sale.manager | mail.model_mail_activity_plan_template | sales_team.group_sale_manager | 1 | 1 | 1 | 1 |