summaryrefslogtreecommitdiff
path: root/addons/web/static/src/xml/base.xml
diff options
context:
space:
mode:
authorYannick Tivisse <yti@odoo.com>2017-06-19 17:38:19 +0200
committerYannick Tivisse <yti@odoo.com>2017-06-19 17:38:19 +0200
commitc8601f4384e0c95abc92d1f0b3092cfe2cb2a79d (patch)
tree222345ceeb3ffb82f7a21406c6e5cafa6052d6cb /addons/web/static/src/xml/base.xml
parent0bd189d28059d50b073ca2be72b97c3031f52dfc (diff)
parente54f70d3cc45546bb52f0f89d1c8bad6a6b426c3 (diff)
[MERGE] base/res_config: Clean model and behavior of configuration forms
Purpose: ======== The res.config.settings are quite a mess. The API is not well know and the general usage in the common modules is bad. Specifications ============== Clean use of ir.values in models ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - clean use of ir.values -> those should be only real default values for existing fields in other models. - Use ir.config_parameter or something else if conversion is required reset values when option is disabled ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ propagate checkboxes in settings. Ex: "use <my feature> opens <feature_value> configuration". Code should handle both <my_feature> and <feature_value>. Unactivating a feature should disable it really. SALES default terms & conditions WEBSITE Google Analytics Google Analytics in dashboard INVENTORY Security Lead Time for Sales -> reset to 0 Security Lead Time for Purchase -> reset to 0 No Rescheduling Propagation -> reset to 1 MANUFACTURING Security Lead Time -> reset to 0 clean alias congiguration ~~~~~~~~~~~~~~~~~~~~~~~~~ crm, project: remove unnecessary and unused generate_sales_team/project_alias, conf is done on sales team / project crm: generate_lead_from_alias cleaned hr_expense: correctly take into account "Use Mailgateway" settings, reset alias if not set pos: mutli sales price settings cleaned sales: multi sales price settings cleaned, default deposit product cleaned website: has_google_analytics, has_google_analytics_dashboard, has_google_maps settings cleaned website_sale: multi sales prices settings cleaned print: default_provider_id Ease google analytic settings ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ it's hard to get all the google analytics working. Setup steps are still confusing. And if you set up analytics API first (before creating an account), you get a traceback in the dashboard... review google analytics id wizard - How to get my Tracking ID - How to get my API Client ID - open those links in new tabs make sure any traceback pops up if the user enter a client ID without a Tracking ID. It is the case for now. One way is to block the user with a warning: Please enter your Tracking ID. as soon as an ID is set, activate related features and populate fields in website settings + some changes in labels only display Google Analytics in Dashboard in website settings if Google Analytics is checked + blocking warning if the user enters a Client ID without any Tracking ID Reorganise files according to the guidelines ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Declare models in camel case, place python files in models, xml views in views... Remove some useless/unused code ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Some chunck of code are never called or are useless. Clean ir.actions.todo models ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Remove some useless fields: - type: Historically we used ir.actions.todo to make complex things. Now we only use them to redirect to a specific action when a module is installed. All our ir.actions.todo type is `automatic` - Note: Useless - Group_id: All our ir.actions.todo are launched by the administrator. No need to specify groups on it. Prevent to be redirected everywhere on update ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Prevent to have more than one open ir.actions.todo. This avoid this use case: - Install ecommerce, be redirect to the theme selection - Install note, be redirected to /shop. We just take the last defined ir.actions.todo into account. Stay on a config setting form by pressing apply ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ If we click on Apply, we want to stay on the config page to see the new fields coming from the module you just installed Keep the current behavior when installing a module from the App menuitem, which is either jumping to the app switcher or jumping to a specific action if defined on this module Clean default method to get/set the values on a config form ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Currently there are 4 types on fields on res_config: - `default_`: These fields should use ir.values and they have been cleaned in a previous section of this commit message - `group_`: They define security groups - `module_`: They allow to install/uninstall modules - Other fields: They are the other fields that are implemented in a quite messy way. Currently all the methods beginning by `get_default` are used to fetch their default values, usually by looking in the ir.config_parameter table. Currently all the methods beginning by `set_` are used to set their values, usually in the ir.config_parameter table. This section purpose is to replace all the occurences of `get_default_foo` and `set_foo`. As these methods won't be called anymore, a warning is logged to notice its deprecation. They are replaced by the generic methods `get_values` and `set_values` that should be overridden to define the behavior of the added fields. Add a test on res_config on page loading and saving ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Try to create and execute all res_config models. Target settings that can't be loaded or saved and avoid remaining methods get_default_foo` or `set_foo` that won't be executed.
Diffstat (limited to 'addons/web/static/src/xml/base.xml')
0 files changed, 0 insertions, 0 deletions