[IMP] various: reorganize the general setting
Purpose of the task is, 'general setting' is not easily understandable by the user. The user often gets lost. This is especially damaging through onboarding as some new users like to discover the software by scrolling through the general settings. So in this commit, the general setting is well organized and easily understandable by the user. Related PR: https://github.com/odoo/enterprise/pull/14707 closes odoo/odoo#61645 Taskid: 2374990 Related: odoo/enterprise#14707 Related: odoo/upgrade#1958 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
This commit is contained in:
committed by
Yannick Tivisse
parent
8444643cc6
commit
e109e476e6
@@ -2,6 +2,7 @@
|
||||
<record id="res_config_settings_view_form" model="ir.ui.view">
|
||||
<field name="name">res.config.settings.form.auth_password_policy</field>
|
||||
<field name="model">res.config.settings</field>
|
||||
<field name="priority" eval ="20"/>
|
||||
<field name="inherit_id" ref="base_setup.res_config_settings_view_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<!-- add before the Access Rights section -->
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<field name="model">res.config.settings</field>
|
||||
<field name="inherit_id" ref="base_setup.res_config_settings_view_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[@id='access_rights']" position="after">
|
||||
<xpath expr="//div[@id='access_rights']" position="before">
|
||||
<div class="col-12 col-lg-6 o_setting_box"
|
||||
id="login_documents"
|
||||
title=" To send invitations in B2B mode, open a contact or select several ones in list view and click on 'Portal Access Management' option in the dropdown menu *Action*.">
|
||||
@@ -18,7 +18,7 @@
|
||||
Let your customers log in to see their documents
|
||||
</div>
|
||||
<div class="mt8">
|
||||
<field name="auth_signup_uninvited" class="o_light_label" widget="radio" required="True"/>
|
||||
<field name="auth_signup_uninvited" class="o_light_label" widget="radio" options="{'horizontal': true}" required="True"/>
|
||||
</div>
|
||||
<div class="content-group" attrs="{'invisible': [('auth_signup_uninvited','=','b2b')]}">
|
||||
<div class="mt8">
|
||||
|
||||
@@ -15,7 +15,7 @@ class ResConfigSettings(models.TransientModel):
|
||||
"Default Access Rights",
|
||||
config_parameter='base_setup.default_user_rights')
|
||||
external_email_server_default = fields.Boolean(
|
||||
"External Email Servers",
|
||||
"Custom Email Servers",
|
||||
config_parameter='base_setup.default_external_email_server')
|
||||
module_base_import = fields.Boolean("Allow users to import data from CSV/XLS/XLSX/ODS files")
|
||||
module_google_calendar = fields.Boolean(
|
||||
@@ -39,7 +39,6 @@ class ResConfigSettings(models.TransientModel):
|
||||
group_multi_currency = fields.Boolean(string='Multi-Currencies',
|
||||
implied_group='base.group_multi_currency',
|
||||
help="Allows to work in a multi currency environment")
|
||||
paperformat_id = fields.Many2one(related="company_id.paperformat_id", string='Paper format', readonly=False)
|
||||
external_report_layout_id = fields.Many2one(related="company_id.external_report_layout_id", readonly=False)
|
||||
show_effect = fields.Boolean(string="Show Effect", config_parameter='base_setup.show_effect')
|
||||
company_count = fields.Integer('Number of Companies', compute="_compute_company_count")
|
||||
|
||||
@@ -12,6 +12,11 @@
|
||||
<div id="invite_users">
|
||||
<h2>Users</h2>
|
||||
<div class="row mt16 o_settings_container" name="users_setting_container">
|
||||
<div class="col-12 col-lg-6 o_setting_box" id="invite_users_setting">
|
||||
<div class="o_setting_right_pane">
|
||||
<widget name='res_config_invite_users'/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-lg-6 o_setting_box" id="active_user_setting">
|
||||
<div class="o_setting_right_pane">
|
||||
<span class="fa fa-lg fa-users" aria-label="Number of active users"/>
|
||||
@@ -25,42 +30,6 @@
|
||||
<a href="https://www.odoo.com/documentation/user/14.0/general/odoo_basics/add_user.html" title="Documentation" class="o_doc_link" target="_blank"></a>
|
||||
<br/>
|
||||
<button name="%(base.action_res_users)d" icon="fa-arrow-right" type="action" string="Manage Users" class="btn-link o_web_settings_access_rights"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-lg-6 o_setting_box" id="invite_users_setting">
|
||||
<div class="o_setting_right_pane">
|
||||
<widget name='res_config_invite_users'/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="companies">
|
||||
<h2>Companies</h2>
|
||||
<div class="row mt16 o_settings_container" name="companies_setting_container">
|
||||
<div class="col-12 col-lg-6 o_setting_box" id="company_details_settings">
|
||||
<div class="o_setting_right_pane">
|
||||
<field name="company_name" class="font-weight-bold"/>
|
||||
<br/>
|
||||
<field name="company_informations" class="text-muted" style="width: 90%;"/>
|
||||
<br/>
|
||||
<button name="open_company" icon="fa-arrow-right" type="object" string="Update Info" class="btn-link"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-lg-6 o_setting_box" id="companies_setting">
|
||||
<div class="o_setting_right_pane">
|
||||
<field name='company_count' class="w-auto pl-1 font-weight-bold"/>
|
||||
<span class='o_form_label' attrs="{'invisible':[('company_count', '>', '1')]}">
|
||||
Company
|
||||
</span>
|
||||
<span class='o_form_label' attrs="{'invisible':[('company_count', '<=', '1')]}">
|
||||
Companies
|
||||
</span>
|
||||
<br/>
|
||||
<div class="mt8">
|
||||
<button name="%(base.action_res_company_form)d" icon="fa-arrow-right" type="action" string="Manage Companies" class="btn-link"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -92,25 +61,19 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="business_documents">
|
||||
<h2>Business Documents</h2>
|
||||
<div class="row mt16 o_settings_container" name="business_documents_setting_container">
|
||||
<div class="col-12 col-lg-6 o_setting_box" id="paper_format_setting">
|
||||
<div id="companies">
|
||||
<h2>Companies</h2>
|
||||
<div class="row mt16 o_settings_container" name="companies_setting_container">
|
||||
<div class="col-12 col-lg-6 o_setting_box" id="company_details_settings">
|
||||
<field name="company_id" invisible="1"/>
|
||||
<div class="o_setting_right_pane">
|
||||
<span class="o_form_label">Format</span>
|
||||
<span class="fa fa-lg fa-building-o" title="Values set here are company-specific." aria-label="Values set here are company-specific." groups="base.group_multi_company" role="img"/>
|
||||
<div class="text-muted">
|
||||
Set the paper format of printed documents
|
||||
</div>
|
||||
<div class="content-group">
|
||||
<div class="mt16 row">
|
||||
<label for="paperformat_id" string="Format" class="col-3 col-lg-3 o_light_label"/>
|
||||
<field name="paperformat_id" class="oe_inline" required="1"/>
|
||||
</div>
|
||||
</div>
|
||||
<field name="company_name" class="font-weight-bold"/>
|
||||
<br/>
|
||||
<field name="company_informations" class="text-muted" style="width: 90%;"/>
|
||||
<br/>
|
||||
<button name="open_company" icon="fa-arrow-right" type="object" string="Update Info" class="btn-link"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-lg-6 o_setting_box" id="document_layout_setting">
|
||||
<br/>
|
||||
<div class="o_setting_right_pane">
|
||||
<span class="o_form_label">Document Layout</span>
|
||||
<span class="fa fa-lg fa-building-o" title="Values set here are company-specific." aria-label="Values set here are company-specific." groups="base.group_multi_company" role="img"/>
|
||||
@@ -128,10 +91,43 @@
|
||||
<button name="%(web.action_report_externalpreview)d" string="Preview Document" type="action" class="oe_link" groups="base.group_no_one"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-lg-6 o_setting_box" id="companies_setting">
|
||||
<div class="o_setting_right_pane">
|
||||
<field name='company_count' class="w-auto pl-1 font-weight-bold"/>
|
||||
<span class='o_form_label' attrs="{'invisible':[('company_count', '>', '1')]}">
|
||||
Company
|
||||
</span>
|
||||
<span class='o_form_label' attrs="{'invisible':[('company_count', '<=', '1')]}">
|
||||
Companies
|
||||
</span>
|
||||
<br/>
|
||||
<div class="mt8">
|
||||
<button name="%(base.action_res_company_form)d" icon="fa-arrow-right" type="action" string="Manage Companies" class="btn-link"/>
|
||||
</div>
|
||||
</div>
|
||||
<br/>
|
||||
<div id="inter_company" groups="base.group_multi_company" title="Configure company rules to automatically create SO/PO when one of your company sells/buys to another of your company.">
|
||||
<field name="company_id" invisible="1"/>
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="module_account_inter_company_rules" widget="upgrade_boolean"/>
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label string="Inter-Company Transactions" for="module_account_inter_company_rules"/>
|
||||
<span class="fa fa-lg fa-building-o" title="Values set here are company-specific." aria-label="Values set here are company-specific." groups="base.group_multi_company" role="img"/>
|
||||
<div class="text-muted">
|
||||
Automatically generate counterpart documents for orders/invoices between companies
|
||||
</div>
|
||||
<div class="content-group" attrs="{'invisible': [('module_account_inter_company_rules','=',False)]}" id="inter_companies_rules">
|
||||
<div class="mt16 text-warning"><strong>Save</strong> this page and come back here to set up the feature.</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="emails"/>
|
||||
|
||||
<div id="contacts_settings">
|
||||
<h2>Contacts</h2>
|
||||
@@ -161,7 +157,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="emails"/>
|
||||
|
||||
<h2>Permissions</h2>
|
||||
<div class="row mt16 o_settings_container" id="user_default_rights">
|
||||
<div class="col-12 col-lg-6 o_setting_box" title="By default, new users get highest access rights for all installed apps." id="access_rights">
|
||||
@@ -211,27 +207,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="multi_company" groups="base.group_multi_company">
|
||||
<field name="company_id" invisible="1"/>
|
||||
<h2>Multi-Company</h2>
|
||||
<div class="row mt16 o_settings_container" name="multicompany_setting_container">
|
||||
<div class="col-12 col-lg-6 o_setting_box" title="Configure company rules to automatically create SO/PO when one of your company sells/buys to another of your company." id="inter_company">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="module_account_inter_company_rules" widget="upgrade_boolean"/>
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label string="Inter-Company Transactions" for="module_account_inter_company_rules"/>
|
||||
<span class="fa fa-lg fa-building-o" title="Values set here are company-specific." aria-label="Values set here are company-specific." groups="base.group_multi_company" role="img"/>
|
||||
<div class="text-muted">
|
||||
Automatically generate counterpart documents for orders/invoices between companies
|
||||
</div>
|
||||
<div class="content-group" attrs="{'invisible': [('module_account_inter_company_rules','=',False)]}" id="inter_companies_rules">
|
||||
<div class="mt16 text-warning"><strong>Save</strong> this page and come back here to set up the feature.</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h2>Integrations</h2>
|
||||
<div class="row mt16 o_settings_container" name="integration">
|
||||
<div class="col-12 col-lg-6 o_setting_box" id="external_pads_setting">
|
||||
|
||||
@@ -6,6 +6,7 @@ var Widget = require('web.Widget');
|
||||
|
||||
var core = require('web.core');
|
||||
var rpc = require('web.rpc');
|
||||
const utils = require('web.utils');
|
||||
|
||||
var QWeb = core.qweb;
|
||||
|
||||
@@ -21,17 +22,20 @@ var IAPBuyMoreCreditsWidget = Widget.extend({
|
||||
init: function (parent, data, options) {
|
||||
this._super.apply(this, arguments);
|
||||
this.service_name = options.attrs.service_name;
|
||||
this.hideService = utils.toBoolElse(options.attrs.hide_service || '', false);
|
||||
},
|
||||
|
||||
/**
|
||||
* @override
|
||||
*/
|
||||
start: function () {
|
||||
this.$widget = $(QWeb.render('iap.buy_more_credits'));
|
||||
this.$widget = $(QWeb.render('iap.buy_more_credits', {'hideService': this.hideService}));
|
||||
this.$buyLink = this.$widget.find('.buy_credits');
|
||||
this.$widget.appendTo(this.$el);
|
||||
this.$buyLink.click(this._getLink.bind(this));
|
||||
this.el.querySelector('.o_iap_view_my_services').addEventListener('click', this._getMyServices.bind(this));
|
||||
if (!this.hideService) {
|
||||
this.el.querySelector('.o_iap_view_my_services').addEventListener('click', this._getMyServices.bind(this));
|
||||
}
|
||||
},
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<div t-name="iap.buy_more_credits" class="mt-2 row">
|
||||
<div class="col-sm">
|
||||
<button class="btn btn-link buy_credits px-0"><i class="fa fa-arrow-right"/> Buy credits</button><br/>
|
||||
<button class="btn btn-link o_iap_view_my_services px-0"><i class="fa fa-arrow-right mr-1"/>View My Services</button>
|
||||
<button t-if="!hideService" class="btn btn-link o_iap_view_my_services px-0"><i class="fa fa-arrow-right mr-1"/>View My Services</button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -16,9 +16,8 @@ if records:
|
||||
<field name="model">res.config.settings</field>
|
||||
<field name="inherit_id" ref="base_setup.res_config_settings_view_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[@id='multi_company']" position="before">
|
||||
<xpath expr="//div[@id='contacts_settings']" position="inside">
|
||||
<div id="iap_portal">
|
||||
<h2>In-App Purchases</h2>
|
||||
<div class='row mt16 o_settings_container iap_portal' name="iap_purchases_setting_container">
|
||||
<div class="col-12 col-lg-6 o_setting_box" id="iap_credits_setting">
|
||||
<div class='o_setting_right_pane'>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<field name="inherit_id" ref="base_setup.res_config_settings_view_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<div id="partner_autocomplete_settings" position="inside">
|
||||
<widget name="iap_buy_more_credits" service_name="partner_autocomplete"/>
|
||||
<widget name="iap_buy_more_credits" service_name="partner_autocomplete" hide_service="1"/>
|
||||
</div>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -5,33 +5,33 @@
|
||||
<field name="model">res.config.settings</field>
|
||||
<field name="inherit_id" ref="base_setup.res_config_settings_view_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[@id='multi_company']" position="before">
|
||||
<xpath expr="//div[@id='companies']" position="after">
|
||||
<h2>Units of Measure</h2>
|
||||
<div class="row mt16 o_settings_container" id="product_general_settings">
|
||||
<div class="col-12 col-lg-6 o_setting_box" id="weight_uom_setting">
|
||||
<div class="o_setting_left_pane">
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label for="product_weight_in_lbs" string="Weight UoM"/>
|
||||
<label for="product_weight_in_lbs" string="Weight"/>
|
||||
<div class="text-muted">
|
||||
Define your weight unit of measure
|
||||
</div>
|
||||
<div class="content-group">
|
||||
<div class="mt16">
|
||||
<field name="product_weight_in_lbs" class="o_light_label" widget="radio"/>
|
||||
<field name="product_weight_in_lbs" class="o_light_label" widget="radio" options="{'horizontal': true}"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-lg-6 o_setting_box" id="manage_volume_uom_setting">
|
||||
<div class="o_setting_right_pane">
|
||||
<label for="product_volume_volume_in_cubic_feet" string="Volume UoM "/>
|
||||
<label for="product_volume_volume_in_cubic_feet" string="Volume"/>
|
||||
<div class="text-muted">
|
||||
Define your volume unit of measure
|
||||
</div>
|
||||
<div class="content-group">
|
||||
<div class="mt16">
|
||||
<field name="product_volume_volume_in_cubic_feet" class="o_light_label" widget="radio"/>
|
||||
<field name="product_volume_volume_in_cubic_feet" class="o_light_label" widget="radio" options="{'horizontal': true}"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -153,7 +153,7 @@
|
||||
Let your customers log in to see their documents
|
||||
</div>
|
||||
<div class="mt8">
|
||||
<field name="auth_signup_uninvited" class="o_light_label" widget="radio" required="True"/>
|
||||
<field name="auth_signup_uninvited" class="o_light_label" widget="radio" options="{'horizontal': true}" required="True"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<field name="inherit_id" ref="base_setup.res_config_settings_view_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<div id="sms_settings" position="inside">
|
||||
<widget name="iap_buy_more_credits" service_name="sms"/>
|
||||
<widget name="iap_buy_more_credits" service_name="sms" hide_service="1"/>
|
||||
</div>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -261,7 +261,7 @@
|
||||
Let your customers log in to see their documents
|
||||
</div>
|
||||
<div class="mt8">
|
||||
<field name="auth_signup_uninvited" class="o_light_label" widget="radio" required="True"/>
|
||||
<field name="auth_signup_uninvited" class="o_light_label" widget="radio" options="{'horizontal': true}" required="True"/>
|
||||
</div>
|
||||
<div class="mt8 content-group">
|
||||
<button type="object" name="open_template_user" string="Default Access Rights" icon="fa-arrow-right" class="btn-link"/>
|
||||
|
||||
Reference in New Issue
Block a user