ab809baca1b5b15aba6043f2ab5c58c2ddba493c
This commit allows to take domain into account for custom activity groups in the systray. Steps ===== In debug mode: - Install module mass_mailing_sms - Add an activity for a mailing.mailing record with mailing_type set to 'sms' (i.e. a record visible in the SMS Marketing app). - Add an activity for a mailing.mailing record with mailing_type != 'sms' (i.e. a record visible in the Email Marketing app). - Open the activity menu Not in debug mode: - Do the same step as above - Click on the category "SMS Marketing" in the activity menu Issue ===== - In debug mode: a traceback will pop up when the activity menu is opened with an error message similar to `Got duplicate key in t-foreach: 1182`. - Not in debug mode: when clicking on the SMS Marketing category in the activity menu, all records of model mailing.mailing with activities set will be displayed and not only the one with mailing_type set to 'sms'. Cause ===== - In the method systray_get_activities, the id of each model is used to create groups of activities. In mass_mailing_sms, the same logic is used but two groups are created for the model mailing.mailing, thus with the same id. This create a traceback in debug mode when displaying the activity menu are the id of the groups are used as key for a foreach in the view template. - The methods openActivityGroup and onClickAction called when the user click on an activity group (or on the activity icon next to it) do not take the domain of the group into account correctly. Fix === - The id key of activity groups is renamed in sequence - The value of sequence is only used to sort activity groups on the client side - group_index is used as t-key value in the template of the activity menu - The domain of each group (if any) is combined with the domains used in openActivityGroup and onClickAction closes odoo/odoo#132402 X-original-commit: 1f154b4ba21e34c9021f07c5e62d8de460eb824e Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
…
…
…
Odoo
Odoo is a suite of web based open source business apps.
The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...
Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.
Getting started with Odoo
For a standard installation please follow the Setup instructions from the documentation.
To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%