diff options
| author | Mahendra barad <mba@openerp.com> | 2017-05-23 16:59:40 +0530 |
|---|---|---|
| committer | Yannick Tivisse <yti@odoo.com> | 2017-09-06 15:21:25 +0200 |
| commit | e38e2515882dacc73ab7d87fa76da3c5a395c6a6 (patch) | |
| tree | a6660f6737604f71fb3c1938cbd321e09614d91d /addons | |
| parent | c0ceae2f93df5d08e5c4a99812dd5629f2d433bf (diff) | |
[IMP] website: Clean and simplify res_config view
Purpose
=======
- Settings are too complex: too long + too many options that shouldn't be suggested with checkboxes
e.g. twitter roller is now suggested as a new snippet to install from website editor
google maps, slides, forum, etc. should show up in the apps store
- When saving the page I expect to stay in the settings -> no redirection to homepage anymore!
Specification
=============
See task 33620
Diffstat (limited to 'addons')
19 files changed, 375 insertions, 462 deletions
diff --git a/addons/mass_mailing/__manifest__.py b/addons/mass_mailing/__manifest__.py index c1b19e12238..81bc743ae52 100644 --- a/addons/mass_mailing/__manifest__.py +++ b/addons/mass_mailing/__manifest__.py @@ -32,6 +32,7 @@ 'views/themes_templates.xml', 'views/snippets_themes.xml', 'views/snippets_themes_options.xml', + 'views/res_company_views.xml', ], 'demo': [ 'data/mass_mailing_demo.xml', diff --git a/addons/mass_mailing/data/mass_mailing_demo.xml b/addons/mass_mailing/data/mass_mailing_demo.xml index fce4f239fe4..0afa9973dd0 100644 --- a/addons/mass_mailing/data/mass_mailing_demo.xml +++ b/addons/mass_mailing/data/mass_mailing_demo.xml @@ -115,5 +115,12 @@ <field name="bounced" eval="(DateTime.today() - relativedelta(days=3)).strftime('%Y-%m-%d %H:%M:%S')"/> </record> + <record id="base.main_company" model="res.company"> + <field name="social_twitter">https://twitter.com/Odoo</field> + <field name="social_facebook">https://www.facebook.com/Odoo</field> + <field name="social_googleplus">https://plus.google.com/+Odooapps</field> + <field name="social_linkedin">https://www.linkedin.com/company/odoo</field> + </record> + </data> </odoo> diff --git a/addons/mass_mailing/models/__init__.py b/addons/mass_mailing/models/__init__.py index 6afa7a98d09..d5ba2d6d240 100644 --- a/addons/mass_mailing/models/__init__.py +++ b/addons/mass_mailing/models/__init__.py @@ -8,3 +8,4 @@ from . import mail_thread from . import res_config_settings from . import mass_mailing_report from . import link_tracker +from . import res_company diff --git a/addons/mass_mailing/models/res_company.py b/addons/mass_mailing/models/res_company.py new file mode 100644 index 00000000000..4cb66e485d4 --- /dev/null +++ b/addons/mass_mailing/models/res_company.py @@ -0,0 +1,15 @@ +# -*- coding: utf-8 -*- +# Part of Odoo. See LICENSE file for full copyright and licensing details. + +from odoo import fields, models + +class Company(models.Model): + _inherit = "res.company" + + # NB: Also defined in website + social_twitter = fields.Char('Twitter Account') + social_facebook = fields.Char('Facebook Account') + social_github = fields.Char('GitHub Account') + social_linkedin = fields.Char('LinkedIn Account') + social_youtube = fields.Char('Youtube Account') + social_googleplus = fields.Char('Google+ Account') diff --git a/addons/mass_mailing/views/res_company_views.xml b/addons/mass_mailing/views/res_company_views.xml new file mode 100644 index 00000000000..bc638c5814c --- /dev/null +++ b/addons/mass_mailing/views/res_company_views.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> + + <record id="view_company_form_inherit_mass_mailing" model="ir.ui.view"> + <field name="name">res.company.form.inherit.mass.mail</field> + <field name="model">res.company</field> + <field name="inherit_id" ref="base.view_company_form"/> + <field name="arch" type="xml"> + <xpath expr="//group[@name='social_media']" position="replace"> + <group string="Social Media" name="social_media"> + <field name="social_twitter"/> + <field name="social_facebook"/> + <field name="social_github"/> + <field name="social_linkedin"/> + <field name="social_youtube"/> + <field name="social_googleplus"/> + </group> + </xpath> + </field> + </record> + +</odoo> diff --git a/addons/website/__manifest__.py b/addons/website/__manifest__.py index b84896b5f63..3d5f45347a3 100644 --- a/addons/website/__manifest__.py +++ b/addons/website/__manifest__.py @@ -21,6 +21,7 @@ 'views/website_views.xml', 'views/res_config_settings_views.xml', 'views/ir_actions_views.xml', + 'views/res_company_views.xml', 'wizard/base_language_install_views.xml', 'data/web_planner_data.xml', ], diff --git a/addons/website/data/website_demo.xml b/addons/website/data/website_demo.xml index bba48e06735..a58ff42a725 100644 --- a/addons/website/data/website_demo.xml +++ b/addons/website/data/website_demo.xml @@ -2,7 +2,7 @@ <odoo> <data> - <record id="default_website" model="website"> + <record id="base.main_company" model="res.company"> <field name="social_twitter">https://twitter.com/Odoo</field> <field name="social_facebook">https://www.facebook.com/Odoo</field> <field name="social_googleplus">https://plus.google.com/+Odooapps</field> @@ -129,10 +129,6 @@ response = request.render("website.template_partner_comment", { <record id="website2" model="website"> <field name="name">Website 0.0.0.0</field> <field name="domain">0.0.0.0</field> - <field name="social_twitter">https://twitter.com/Odoo</field> - <field name="social_facebook">https://www.facebook.com/Odoo</field> - <field name="social_googleplus">https://plus.google.com/+Odooapps</field> - <field name="social_linkedin">https://www.linkedin.com/company/odoo</field> </record> <record id="website2_homepage" model="ir.ui.view"> diff --git a/addons/website/models/res_company.py b/addons/website/models/res_company.py index 441694608b9..7043c4f661c 100644 --- a/addons/website/models/res_company.py +++ b/addons/website/models/res_company.py @@ -1,13 +1,20 @@ # -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. -from odoo import api, models +from odoo import api, fields, models class Company(models.Model): - _inherit = "res.company" + # NB: Also defined in mass_mailing + social_twitter = fields.Char('Twitter Account') + social_facebook = fields.Char('Facebook Account') + social_github = fields.Char('GitHub Account') + social_linkedin = fields.Char('LinkedIn Account') + social_youtube = fields.Char('Youtube Account') + social_googleplus = fields.Char('Google+ Account') + @api.multi def google_map_img(self, zoom=8, width=298, height=298): partner = self.sudo().partner_id diff --git a/addons/website/models/res_config_settings.py b/addons/website/models/res_config_settings.py index 052ab83d080..3ec8a20c090 100644 --- a/addons/website/models/res_config_settings.py +++ b/addons/website/models/res_config_settings.py @@ -21,29 +21,10 @@ class ResConfigSettings(models.TransientModel): google_management_client_id = fields.Char('Google Client ID', related='website_id.google_management_client_id') google_management_client_secret = fields.Char('Google Client Secret', related='website_id.google_management_client_secret') - social_twitter = fields.Char("Twitter", related='website_id.social_twitter') - social_facebook = fields.Char("Facebook", related='website_id.social_facebook') - social_github = fields.Char("GitHub", related='website_id.social_github') - social_linkedin = fields.Char("LinkedIn", related='website_id.social_linkedin') - social_youtube = fields.Char("Youtube", related='website_id.social_youtube') - social_googleplus = fields.Char("Google+", related='website_id.social_googleplus') - cdn_activated = fields.Boolean('Use a Content Delivery Network (CDN)', related='website_id.cdn_activated') cdn_url = fields.Char(related='website_id.cdn_url') cdn_filters = fields.Text(related='website_id.cdn_filters') - - module_website_form_editor = fields.Boolean("Custom Forms") module_website_version = fields.Boolean("A/B Testing") - module_website_twitter = fields.Boolean("Twitter Roller") - module_website_blog = fields.Boolean("Blogs") - module_website_livechat = fields.Boolean("Live Chat") - module_website_forum = fields.Boolean("Forum") - module_website_crm = fields.Boolean("Contact Form") - module_website_slides = fields.Boolean("Slides") - module_website_hr_recruitment = fields.Boolean("Jobs") - module_website_sale = fields.Boolean("eCommerce") - module_sale_subscription = fields.Boolean("Subscriptions") - module_website_event_sale = fields.Boolean("Event Tickets") favicon = fields.Binary('Favicon', related='website_id.favicon') # Set as global config parameter since methods using it are not website-aware. To be changed diff --git a/addons/website/models/website.py b/addons/website/models/website.py index c7fe89edf21..8208140b015 100644 --- a/addons/website/models/website.py +++ b/addons/website/models/website.py @@ -49,12 +49,13 @@ class Website(models.Model): default_lang_id = fields.Many2one('res.lang', string="Default Language", default=_default_language, required=True) default_lang_code = fields.Char(related='default_lang_id.code', string="Default language code", store=True) - social_twitter = fields.Char('Twitter Account') - social_facebook = fields.Char('Facebook Account') - social_github = fields.Char('GitHub Account') - social_linkedin = fields.Char('LinkedIn Account') - social_youtube = fields.Char('Youtube Account') - social_googleplus = fields.Char('Google+ Account') + social_twitter = fields.Char(related="company_id.social_twitter") + social_facebook = fields.Char(related="company_id.social_facebook") + social_github = fields.Char(related="company_id.social_github") + social_linkedin = fields.Char(related="company_id.social_linkedin") + social_youtube = fields.Char(related="company_id.social_youtube") + social_googleplus = fields.Char(related="company_id.social_googleplus") + google_analytics_key = fields.Char('Google Analytics Key') google_management_client_id = fields.Char('Google Client ID') google_management_client_secret = fields.Char('Google Client Secret') diff --git a/addons/website/views/res_company_views.xml b/addons/website/views/res_company_views.xml new file mode 100644 index 00000000000..4b3d95770ce --- /dev/null +++ b/addons/website/views/res_company_views.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> + + <record id="view_company_form_inherit_website" model="ir.ui.view"> + <field name="name">res.company.form.inherit.website</field> + <field name="model">res.company</field> + <field name="inherit_id" ref="base.view_company_form"/> + <field name="arch" type="xml"> + <xpath expr="//group[@name='social_media']" position="replace"> + <group string="Social Media" name="social_media"> + <field name="social_twitter"/> + <field name="social_facebook"/> + <field name="social_github"/> + <field name="social_linkedin"/> + <field name="social_youtube"/> + <field name="social_googleplus"/> + </group> + </xpath> + </field> + </record> + +</odoo> diff --git a/addons/website/views/res_config_settings_views.xml b/addons/website/views/res_config_settings_views.xml index b5942f60d2c..5557c0155f5 100644 --- a/addons/website/views/res_config_settings_views.xml +++ b/addons/website/views/res_config_settings_views.xml @@ -14,7 +14,6 @@ <h2>Website</h2> <div class="row mt16 o_settings_container" id="webmaster_settings"> <div class="col-xs-12 col-md-6 o_setting_box" id="domain_setting"> - <div class="o_setting_left_pane" /> <div class="o_setting_right_pane"> <label string="Website Title"/> <div class="text-muted"> @@ -22,7 +21,7 @@ </div> <div class="content-group"> <div class="row mt16"> - <label class="col-md-3 o_light_label" for="website_name"/> + <label class="col-md-3 o_light_label" string="Name"/> <field name="website_name"/> </div> <div class="row"> @@ -32,22 +31,19 @@ </div> </div> </div> - <div class="col-xs-12 col-md-6 o_setting_box" id="languages_setting"> - <div class="o_setting_left_pane"/> <div class="o_setting_right_pane"> <label for="language_ids"/> <div class="text-muted"> Languages available on your website </div> <div class="content-group"> - <div class="row mt16"> - <label class="col-md-3 o_light_label" for="language_ids"/> + <div class="mt16"> <field name="language_ids" widget="many2many_tags" options="{'no_create': True, 'no_open': True}"/> </div> <field name="language_count" invisible="1"/> - <div class="row" attrs="{'invisible':[('language_count', '<', 2)]}"> - <label class="col-md-3 o_light_label" string="Default" for="default_lang_id"/> + <div class="mt8" attrs="{'invisible':[('language_count', '<', 2)]}"> + <label class="o_light_label mr8" string="Default" for="default_lang_id"/> <field name="default_lang_id" widget="selection"/> </div> </div> @@ -56,7 +52,6 @@ </div> </div> </div> - <div class="col-xs-12 col-md-6 o_setting_box" id="google_analytics_setting"> <div class="o_setting_left_pane"> <field name="has_google_analytics"/> @@ -81,12 +76,11 @@ </div> </div> </div> - - <div class="col-xs-12 col-md-6 o_setting_box" id="google_analytics_dashboard_setting"> - <div class="o_setting_left_pane" attrs="{'invisible': [('has_google_analytics', '=', False)]}"> + <div class="col-xs-12 col-md-6 o_setting_box" id="google_analytics_dashboard_setting" attrs="{'invisible': [('has_google_analytics', '=', False)]}"> + <div class="o_setting_left_pane"> <field name="has_google_analytics_dashboard"/> </div> - <div class="o_setting_right_pane" attrs="{'invisible': [('has_google_analytics', '=', False)]}"> + <div class="o_setting_right_pane"> <label for="has_google_analytics_dashboard"/> <div class="text-muted"> See Google Analytics data on your Website Dashboard @@ -109,7 +103,6 @@ </div> </div> </div> - <div class="col-xs-12 col-md-6 o_setting_box" id="google_maps_setting"> <div class="o_setting_left_pane"> <field name="has_google_maps"/> @@ -117,7 +110,7 @@ <div class="o_setting_right_pane"> <label for="has_google_maps"/> <div class="text-muted"> - Show a map in the <a href="/page/contactus">Contact Us</a> page + Show your address on a map in the <a href="/page/contactus">Contact Us</a> page </div> <div class="content-group" attrs="{'invisible': [('has_google_maps', '=', False)]}"> <div class="row mt16"> @@ -157,199 +150,7 @@ </div> </div> </div> - </div> - - <h2>Social Media</h2> - <div class="row mt16 o_settings_container" id="social_media_settings"> - <div class="col-xs-12 col-md-6 o_setting_box" id="social_media_links_setting"> - <div class="o_setting_left_pane" /> - <div class="o_setting_right_pane"> - <label string="Social Media Links"/> - <div class="text-muted"> - Social media links in your website footer - </div> - <div class="content-group"> - <div name="social_facebook" class="row mt16"> - <label class="col-md-3 o_light_label" for="social_facebook"/> - <field name="social_facebook" placeholder="https://www.facebook.com/Odoo"/> - </div> - <div name="social_twitter" class="row"> - <label class="col-md-3 o_light_label" for="social_twitter"/> - <field name="social_twitter" placeholder="https://twitter.com/Odoo" /> - </div> - <div name="social_youtube" class="row"> - <label class="col-md-3 o_light_label" for="social_youtube"/> - <field name="social_youtube" placeholder="https://www.youtube.com/user/OpenERPonline"/> - </div> - <div name="social_googleplus" class="row"> - <label class="col-md-3 o_light_label" for="social_googleplus"/> - <field name="social_googleplus" placeholder="https://plus.google.com/+Odooapps"/> - </div> - <div name="social_linkedin" class="row"> - <label class="col-md-3 o_light_label" for="social_linkedin"/> - <field name="social_linkedin" placeholder="https://www.linkedin.com/company/odoo"/> - </div> - <div name="social_github" class="row"> - <label class="col-md-3 o_light_label" for="social_github"/> - <field name="social_github" placeholder="https://youraccount.github.io"/> - </div> - </div> - </div> - </div> - - <div class="col-xs-12 col-md-6 o_setting_box" id="twitter_roller_install_setting"> - <div class="o_setting_left_pane"> - <field name="module_website_twitter"/> - </div> - <div class="o_setting_right_pane"> - <label for="module_website_twitter"/> - <div class="text-muted"> - Display a Twitter wall on your website - </div> - <div class="content-group" id="msg_twitter_roller_install_setting" attrs="{'invisible': [('module_website_twitter', '=', False)]}"> - <div class="text-warning mt16">Save this page and come back here to set up the feature.</div> - </div> - </div> - </div> - </div> - - <h2>Features</h2> - <div class="row mt16 o_settings_container" id="features_settings"> - <div class="col-xs-12 col-md-6 o_setting_box" id="ecommerce_install_setting"> - <div class="o_setting_left_pane"> - <field name="module_website_sale"/> - </div> - <div class="o_setting_right_pane"> - <label for="module_website_sale"/> - <div class="text-muted"> - Boost your online sales with sleek product pages - </div> - </div> - </div> - <div class="col-xs-12 col-md-6 o_setting_box" id="jobs_install_setting"> - <div class="o_setting_left_pane"> - <field name="module_website_hr_recruitment"/> - </div> - <div class="o_setting_right_pane"> - <label for="module_website_hr_recruitment"/> - <div class="text-muted"> - Promote your job announces and attract new talents - </div> - </div> - </div> - <div class="col-xs-12 col-md-6 o_setting_box" id="blog_install_setting"> - <div class="o_setting_left_pane"> - <field name="module_website_blog"/> - </div> - <div class="o_setting_right_pane"> - <label for="module_website_blog"/> - <div class="text-muted"> - Build up a community with an efficient content strategy - </div> - </div> - </div> - <div class="col-xs-12 col-md-6 o_setting_box" id="slides_install_setting"> - <div class="o_setting_left_pane"> - <field name="module_website_slides"/> - </div> - <div class="o_setting_right_pane"> - <label for="module_website_slides"/> - <div class="text-muted"> - Share videos, presentations and documents - </div> - <div class="content-group" id="msg_slides_install_setting" groups="base.group_no_one" attrs="{'invisible': [('module_website_slides', '=', False)]}"> - <div class="text-warning mt16">Save this page and come back here to set up the feature.</div> - </div> - </div> - </div> - <div class="col-xs-12 col-md-6 o_setting_box" id="subscriptions_install_setting"> - <div class="o_setting_left_pane"> - <field name="module_sale_subscription" widget="upgrade_boolean"/> - </div> - <div class="o_setting_right_pane"> - <label for="module_sale_subscription"/> - <div class="text-muted"> - Sell recurring services with automated billing and payments - </div> - <div class="content-group"></div> - </div> - </div> - <div class="col-xs-12 col-md-6 o_setting_box" id="event_ticket_install_setting"> - <div class="o_setting_left_pane"> - <field name="module_website_event_sale"/> - </div> - <div class="o_setting_right_pane"> - <label for="module_website_event_sale"/> - <div class="text-muted"> - Organize events and sell tickets online - </div> - </div> - </div> - </div> - - <h2>Communication</h2> - - <div class="row mt16 o_settings_container" id="communication_settings"> - <div class="col-xs-12 col-md-6 o_setting_box" id="contact_form_install_setting" title="New incoming messages are managed as leads or opportunities in your CRM app."> - <div class="o_setting_left_pane"> - <field name="module_website_crm"/> - </div> - <div class="o_setting_right_pane"> - <label for="module_website_crm"/> - <div class="text-muted" id="msg_contact_form_install_setting"> - Add a contact form in the <a href="/page/website.contactus">Contact Us</a> page - </div> - </div> - </div> - <div class="col-xs-12 col-md-6 o_setting_box" id="live_chat_install_setting"> - <div> - <div class="o_setting_left_pane"> - <field name="module_website_livechat"/> - </div> - <div class="o_setting_right_pane"> - <label for="module_website_livechat"/> - <div class="text-muted"> - Chat with your visitors in real time - </div> - <div class="content-group" id="msg_module_website_livechat" attrs="{'invisible': [('module_website_livechat', '=', False)]}"> - <div class="text-warning mt16">Save this page and come back here to set up the feature.</div> - </div> - </div> - </div> - </div> - <div class="col-xs-12 col-md-6 o_setting_box" id="forum_install_setting"> - <div> - <div class="o_setting_left_pane"> - <field name="module_website_forum"/> - </div> - <div class="o_setting_right_pane"> - <label for="module_website_forum"/> - <div class="text-muted"> - Reduce resources spent on support with a website forum - </div> - </div> - </div> - </div> - <div class="col-xs-12 col-md-6 o_setting_box" id="custom_forms_install_setting" groups="base.group_no_one"> - <div title="Build up your own forms and get requests as emails, leads or issues. -You can also edit the fields of the Extra Step page in eCommerce checkout."> - <div class="o_setting_left_pane"> - <field name="module_website_form_editor" widget="upgrade_boolean"/> - </div> - <div class="o_setting_right_pane"> - <label string="Custom Forms" for="module_website_form_editor"/> - <div class="text-muted"> - Build up customized forms on your website - </div> - </div> - </div> - </div> - </div> - - <h2 groups="base.group_no_one">Performance Optimization</h2> - - <div class="row mt16 o_settings_container" id="performance_settings" groups="base.group_no_one"> - <div class="col-xs-12 col-md-6 o_setting_box" id="cdn_setting" title="A CDN helps you serve your website’s content with high availability and high performance to any visitor wherever they are located."> + <div class="col-xs-12 col-md-6 o_setting_box" id="cdn_setting" title="A CDN helps you serve your website’s content with high availability and high performance to any visitor wherever they are located." groups="base.group_no_one"> <div class="o_setting_left_pane"> <field name="cdn_activated"/> </div> diff --git a/addons/website_crm/views/res_config_settings_views.xml b/addons/website_crm/views/res_config_settings_views.xml index 1256859a53c..fd0c6da4fc1 100644 --- a/addons/website_crm/views/res_config_settings_views.xml +++ b/addons/website_crm/views/res_config_settings_views.xml @@ -5,15 +5,24 @@ <field name="model">res.config.settings</field> <field name="inherit_id" ref="website.res_config_settings_view_form"/> <field name="arch" type="xml"> - <div id="msg_contact_form_install_setting" position="after"> - <div class="content-group mt16" attrs="{'invisible': [('module_website_crm', '=', False)]}"> - <div class="row"> - <label class="col-md-3 o_light_label" string="Sales Channel" for="crm_default_team_id"/> - <field name="crm_default_team_id" class="oe_inline"/> - </div> - <div class="row"> - <label class="col-md-3 o_light_label" string="Salesperson" for="crm_default_user_id"/> - <field name="crm_default_user_id" class="oe_inline"/> + <div id="webmaster_settings" position="after"> + <h2>Communication</h2> + <div class="row mt16 o_settings_container" id="communication_settings"> + <div class="col-xs-12 col-md-6 o_setting_box" id="contact_form_install_setting" title="New messages are managed as leads or opportunities in your CRM app."> + <div class="o_setting_right_pane"> + <label for="id" string="Contact Form"/> + <div class="text-muted" id="msg_contact_form_install_setting"> + Add a contact form in the <a href="/page/website.contactus">Contact Us</a> page + </div> + <div class="row"> + <label class="col-md-3 o_light_label" string="Sales Channel" for="crm_default_team_id"/> + <field name="crm_default_team_id" class="oe_inline"/> + </div> + <div class="row"> + <label class="col-md-3 o_light_label" string="Salesperson" for="crm_default_user_id"/> + <field name="crm_default_user_id" class="oe_inline"/> + </div> + </div> </div> </div> </div> diff --git a/addons/website_livechat/views/res_config_settings_views.xml b/addons/website_livechat/views/res_config_settings_views.xml index 1e012a9ec73..1921a8d4d8d 100644 --- a/addons/website_livechat/views/res_config_settings_views.xml +++ b/addons/website_livechat/views/res_config_settings_views.xml @@ -6,11 +6,19 @@ <field name="model">res.config.settings</field> <field name="inherit_id" ref="website.res_config_settings_view_form"/> <field name="arch" type="xml"> - <div id="msg_module_website_livechat" position="replace"> - <div class="content-group mt16" attrs="{'invisible': [('module_website_livechat', '=', False)]}"> - <div class="row"> - <label class="col-md-3 o_light_label" string="Channel" for="channel_id"/> - <field name="channel_id" class="oe_inline"/> + <div id="languages_setting" position="after"> + <div class="col-xs-12 col-md-6 o_setting_box" id="live_chat_install_setting"> + <div class="o_setting_right_pane"> + <label string="Live Chat"/> + <div class="text-muted"> + Live chat channel of your website + </div> + <div class="content-group mt16"> + <div class="row"> + <label class="col-md-3 o_light_label" string="Channel" for="channel_id"/> + <field name="channel_id" class="oe_inline"/> + </div> + </div> </div> </div> </div> diff --git a/addons/website_sale/models/res_config_settings.py b/addons/website_sale/models/res_config_settings.py index 5400cef2ac0..0fdeee6b88b 100644 --- a/addons/website_sale/models/res_config_settings.py +++ b/addons/website_sale/models/res_config_settings.py @@ -22,19 +22,16 @@ class ResConfigSettings(models.TransientModel): ('website', "Delivery methods are selectable on the website: the customer pays for shipping costs"), ], string="Shipping Management") - module_sale_ebay = fields.Boolean("eBay connector") - group_website_multiimage = fields.Boolean(string='Multi-Images', implied_group='website_sale.group_website_multi_image', group='base.group_portal,base.group_user,base.group_public') group_delivery_invoice_address = fields.Boolean(string="Shipping Address", implied_group='sale.group_delivery_invoice_address') - module_website_sale_options = fields.Boolean("Optional Products", help='Installs *e-Commerce Optional Products*') + module_website_sale_options = fields.Boolean("Optional Products") module_website_sale_digital = fields.Boolean("Digital Content") - module_website_sale_wishlist = fields.Boolean("Wishlists", help='Installs *e-Commerce Wishlist*') - module_website_sale_comparison = fields.Boolean("Product Comparator", help='Installs *e-Commerce Comparator*') + module_website_sale_wishlist = fields.Boolean("Wishlists") + module_website_sale_comparison = fields.Boolean("Product Comparator") module_website_sale_stock = fields.Boolean("Inventory", help='Installs *e-Commerce Inventory*') module_account_invoicing = fields.Boolean("Invoicing") - module_sale_stock = fields.Boolean("Delivery Orders") order_mail_template = fields.Many2one('mail.template', string='Order Confirmation Email', default=_default_order_mail_template, domain="[('model', '=', 'sale.order')]", @@ -42,6 +39,8 @@ class ResConfigSettings(models.TransientModel): automatic_invoice = fields.Boolean("Automatic Invoice") + module_l10n_eu_service = fields.Boolean(string="EU Digital Goods VAT") + @api.model def get_values(self): res = super(ResConfigSettings, self).get_values() diff --git a/addons/website_sale/views/res_config_settings_views.xml b/addons/website_sale/views/res_config_settings_views.xml index f58705df882..1f0c12551a8 100644 --- a/addons/website_sale/views/res_config_settings_views.xml +++ b/addons/website_sale/views/res_config_settings_views.xml @@ -6,96 +6,7 @@ <field name="model">res.config.settings</field> <field name="inherit_id" ref="website.res_config_settings_view_form"/> <field name="arch" type="xml"> - <div id="features_settings" position="after"> - <h2>Pricing</h2> - <div class="row mt16 o_settings_container" id="sale_pricing_settings"> - <div class="col-xs-12 col-md-6 o_setting_box" id="tax_inclusion_setting"> - <div class="o_setting_left_pane"/> - <div class="o_setting_right_pane"> - <label string="Product Prices" for="sale_show_tax"/> - <div class="text-muted"> - Product prices displaying in web catalog - </div> - <div class="content-group"> - <div class="mt16"> - <field name="sale_show_tax" class="o_light_label" widget="radio"/> - <field name="group_show_price_total" invisible="1"/> - <field name="group_show_price_subtotal" invisible="1"/> - </div> - </div> - </div> - </div> - <div class="col-xs-12 col-md-6 o_setting_box" title="Boost your sales with two kinds of discount programs: promotions and coupon codes. Specific conditions can be set (products, customers, minimum purchase amount, period). Rewards can be discounts (% or amount) or free products."> - <div class="o_setting_left_pane"> - <field name="module_sale_coupon" widget="upgrade_boolean"/> - </div> - <div class="o_setting_right_pane"> - <label for="module_sale_coupon"/> - <div class="text-muted"> - Manage promotion & coupon programs - </div> - <div class="content-group"> - <div class="text-warning mt16" id="sale_coupon" attrs="{'invisible': [('module_sale_coupon','=',False)]}"> - Save this page and come back here to set up the feature. - </div> - </div> - </div> - </div> - <div class="col-xs-12 col-md-6 o_setting_box" id="pricelists_setting" title="There are two ways to manage pricelists: - Multiple prices per product: must be set in the Sales tab of the product detail form. - Price computed from formulas: must be set in the pricelist form."> - <div class="o_setting_left_pane"> - <field name="multi_sales_price"/> - </div> - <div class="o_setting_right_pane"> - <field name="sale_pricelist_setting" invisible="1"/> - <label for="multi_sales_price"/> - <div class="text-muted"> - Apply specific prices per country, discounts, etc. - </div> - <div class="mt16" attrs="{'invisible': [('multi_sales_price', '=', False)]}"> - <field name="group_sale_pricelist" invisible="1"/> - <field name="group_pricelist_item" invisible="1"/> - <field name="group_product_pricelist" invisible="1"/> - <field name="multi_sales_price_method" class="o_light_label" widget="radio"/> - </div> - <div attrs="{'invisible': [('multi_sales_price', '=', False)]}"> - <button type="action" name="%(product.product_pricelist_action2)d" string="Pricelists" class="btn-link" icon="fa-arrow-right"/> - </div> - </div> - </div> - <div class="col-xs-12 col-md-6 o_setting_box" id="discount_setting" title="Once activated, discounted prices can be applied from Pricelists setup form (Discount policy field)."> - <div class="o_setting_left_pane"> - <field name="group_discount_per_so_line"/> - </div> - <div class="o_setting_right_pane"> - <label for="group_discount_per_so_line"/> - <div class="text-muted"> - Display crossed-out public prices - </div> - </div> - </div> - <div class="col-xs-12 col-md-6 o_setting_box" id="multicurrencies_setting" title="This adds the choice of a currency on pricelists."> - <div class="o_setting_left_pane"> - <field name="group_multi_currency"/> - </div> - <div class="o_setting_right_pane"> - <label for="group_multi_currency"/> - <div class="text-muted"> - Sell in several currencies - </div> - <div class="content-group" attrs="{'invisible': [('group_multi_currency', '=', False)]}"> - <div class="mt16"> - <button type="action" name="%(base.action_currency_all_form)d" string="Activate Other Currencies" class="btn-link" icon="fa-arrow-right"/> - </div> - <div> - <button type="action" name="%(account.action_account_config)d" string="Apply Automatic Rates Update" class="btn-link" icon="fa-arrow-right"/> - </div> - </div> - </div> - </div> - </div> - + <div id="webmaster_settings" position="after"> <h2>Product Catalog</h2> <div class="row mt16 o_settings_container" id="sale_product_catalog_settings"> <div class="col-xs-12 col-md-6 o_setting_box" id="product_attributes_setting"> @@ -125,17 +36,6 @@ </div> </div> </div> - <div class="col-xs-12 col-md-6 o_setting_box" id="sale_option_setting"> - <div class="o_setting_left_pane"> - <field name="module_website_sale_options"/> - </div> - <div class="o_setting_right_pane"> - <label for="module_website_sale_options"/> - <div class="text-muted"> - Suggest optional products when adding to cart - </div> - </div> - </div> <div class="col-xs-12 col-md-6 o_setting_box" id="digital_content_setting" title="Provide customers with product-specific links or downloadable content in the confirmation page of the checkout process if the payment gets through. To do so, attach some files to a product using the new Files button and publish them."> <div class="o_setting_left_pane"> <field name="module_website_sale_digital"/> @@ -143,10 +43,14 @@ <div class="o_setting_right_pane"> <label for="module_website_sale_digital"/> <div class="text-muted"> - Provide customers with links or content to download + Sell content to download or URL links </div> </div> </div> + </div> + + <h2>Customer Experience</h2> + <div class="row mt16 o_settings_container" id="sale_customer_experience_settings"> <div class="col-xs-12 col-md-6 o_setting_box" id="whishlist_option_setting"> <div class="o_setting_left_pane"> <field name="module_website_sale_wishlist"/> @@ -169,6 +73,17 @@ </div> </div> </div> + <div class="col-xs-12 col-md-6 o_setting_box" id="sale_option_setting" title="Select optional products from the configuration form of your main products (in Sales tab)."> + <div class="o_setting_left_pane"> + <field name="module_website_sale_options"/> + </div> + <div class="o_setting_right_pane"> + <label for="module_website_sale_options"/> + <div class="text-muted"> + Suggest optional products when adding to cart + </div> + </div> + </div> <div class="col-xs-12 col-md-6 o_setting_box" id="product_availability_setting"> <div class="o_setting_left_pane"> <field name="module_website_sale_stock"/> @@ -182,94 +97,136 @@ </div> </div> - <h2>Checkout Process</h2> - <div class="row mt16 o_settings_container" id="sale_checkout_settings"> - <div class="col-xs-12 col-md-6 o_setting_box" id="shipping_address_setting"> - <div class="o_setting_left_pane"> - <field name="group_delivery_invoice_address"/> - </div> + <h2>Taxes</h2> + <field name="company_id" invisible="1"/> + <div class="row mt16 o_settings_container" id="website_taxes_settings"> + <div class="col-xs-12 col-md-6 o_setting_box" title="This tax is applied to any new product created in the catalog."> <div class="o_setting_right_pane"> - <label for="group_delivery_invoice_address"/> + <label string='Default Sales Tax'/> <div class="text-muted"> - Let the customer enter a shipping address + Default sales tax applied to local transactions + </div> + <div class="content-group"> + <div class="mt16"> + <field name="default_sale_tax_id" domain="[('type_tax_use', 'in', ('sale', 'all')), ('company_id', '=', company_id)]"/> + </div> + <div> + <button type="action" name="%(account.action_tax_form)d" string="Taxes" class="btn-link" icon="fa-arrow-right"/> + </div> </div> </div> </div> - <div class="col-xs-12 col-md-6 o_setting_box" id="checkout_mail_setting"> - <div class="o_setting_left_pane"/> + <div class="col-xs-12 col-md-6 o_setting_box" id="website_tax_inclusion_setting"> <div class="o_setting_right_pane"> - <label string="Confirmation Email"/> + <label string="Product Prices" for="sale_show_tax"/> <div class="text-muted"> - Email sent to the customer + Product prices displaying in web catalog </div> <div class="content-group"> - <div class="row mt16"> - <label for="order_mail_template" string="Email Template" class="col-md-3 o_light_label"/> - <field name="order_mail_template" class="oe_inline"/> + <div class="mt16"> + <field name="sale_show_tax" class="o_light_label" widget="radio"/> + <field name="group_show_price_total" invisible="1"/> + <field name="group_show_price_subtotal" invisible="1"/> </div> </div> </div> </div> - <div class="col-xs-12 col-md-6 o_setting_box" id="checkout_assignation_setting"> - <div class="o_setting_left_pane"/> + <div class="col-xs-12 col-md-6 o_setting_box" id="website_rounding_method" title="A rounding per line is advised if your prices are tax-included. That way, the sum of line subtotals equals the total with taxes."> <div class="o_setting_right_pane"> - <label string="Assignation"/> + <label string="Rounding Method"/> <div class="text-muted"> - Assignation of online orders + How total tax amount is computed in orders and invoices </div> - <div class="content-group"> - <div class="row mt16"> - <label class="o_light_label col-md-3" string="Sales Channel" for="salesteam_id"/> - <field name="salesteam_id" context="{'default_team_type': 'website'}"/> - </div> - <div class="row"> - <label class="o_light_label col-md-3" for="salesperson_id"/> - <field name="salesperson_id"/> - </div> + <div class="content-group"> + <field name="tax_calculation_rounding_method" class="o_light_label mt16" widget="radio"/> + </div> + </div> + </div> + <div class="col-xs-12 col-md-6 o_setting_box" id="website_eu_service" title="If you're selling digital goods to customers in the EU, you must charge VAT based on your customers' locations. This rule applies regardless of you are located. Digital goods are defined in the legislation as broadcasting, telecommunications, and services that are electronically supplied instead of shipped. Gift cards sent online are not included in the definition."> + <div class="o_setting_left_pane"> + <field name="module_l10n_eu_service"/> + </div> + <div class="o_setting_right_pane" name="l10n_eu_service_right_pane"> + <label for="module_l10n_eu_service"/> + <div class="text-muted"> + Apply right VAT rates for digital products sold in EU </div> </div> </div> </div> - <h2>Invoicing</h2> - <div class="row mt16 o_settings_container" id="sale_invoicing_settings"> - <div class="col-xs-12 col-md-6 o_setting_box" id="invoicing_policy_setting" title="Choose the automatic mode if you use to issue an invoice whenever an order is placed. The manual mode allows you to invoice based on what is really delivered. That way you can invoice in several steps, etc. The mode selected here applies to any new product created but not to products already existing. If you want to invoice delivered quantities, you must update the invoicing policy of those products."> + + <h2>Pricing</h2> + <div class="row mt16 o_settings_container" id="sale_pricing_settings"> + <div class="col-xs-12 col-md-6 o_setting_box" id="pricelists_setting" title="With the first mode you can set several prices in the product config form (from Sales tab). With the second one, you set prices and computation rules from Pricelists."> <div class="o_setting_left_pane"> - <field name="module_account_invoicing" nolabel="1"/> + <field name="multi_sales_price"/> </div> <div class="o_setting_right_pane"> - <label for="module_account_invoicing"/> + <label for="multi_sales_price"/> <div class="text-muted"> - Issue invoices to customers + Apply specific prices per country, discounts, etc. </div> - <div class="content-group" attrs="{'invisible': [('module_account_invoicing', '=', False)]}"> + <div class="content-group mt16" attrs="{'invisible': [('multi_sales_price', '=', False)]}"> + <field name="group_sale_pricelist" invisible="1"/> + <field name="group_pricelist_item" invisible="1"/> + <field name="group_product_pricelist" invisible="1"/> + <field name="multi_sales_price_method" class="o_light_label" widget="radio"/> + </div> + <div attrs="{'invisible': [('multi_sales_price', '=', False)]}"> + <button type="action" name="%(product.product_pricelist_action2)d" string="Pricelists" class="btn-link" icon="fa-arrow-right"/> + </div> + </div> + </div> + <div class="col-xs-12 col-md-6 o_setting_box" id="discount_setting" title="Once activated, discounted prices can be applied from Pricelists setup form (Discount policy field)."> + <div class="o_setting_left_pane"> + <field name="group_discount_per_so_line"/> + </div> + <div class="o_setting_right_pane"> + <label for="group_discount_per_so_line"/> + <div class="text-muted"> + Display crossed-out public prices + </div> + </div> + </div> + <div class="col-xs-12 col-md-6 o_setting_box" id="multicurrencies_setting" title="This adds the choice of a currency on pricelists."> + <div class="o_setting_left_pane"> + <field name="group_multi_currency"/> + </div> + <div class="o_setting_right_pane"> + <label for="group_multi_currency"/> + <div class="text-muted"> + Sell in several currencies + </div> + <div class="content-group" attrs="{'invisible': [('group_multi_currency', '=', False)]}"> <div class="mt16"> - <field name="default_invoice_policy" class="o_light_label" widget="radio"/> + <button type="action" name="%(base.action_currency_form)d" string="Currencies" class="btn-link" icon="fa-arrow-right"/> </div> </div> </div> </div> - <div class="col-xs-12 col-md-6 o_setting_box" attrs="{'invisible': ['|', ('default_invoice_policy', '=', 'delivery'), ('module_account_invoicing', '=', False)]}"> + <div class="col-xs-12 col-md-6 o_setting_box" title="Boost your sales with two kinds of discount programs: promotions and coupon codes. Specific conditions can be set (products, customers, minimum purchase amount, period). Rewards can be discounts (% or amount) or free products."> <div class="o_setting_left_pane"> - <field name="automatic_invoice" nolabel="1"/> + <field name="module_sale_coupon" widget="upgrade_boolean"/> </div> <div class="o_setting_right_pane"> - <label for="automatic_invoice"/> - <div class="text-muted"> - Issue the invoice automatically at the order confirmation + <label for="module_sale_coupon"/> + <div class="text-muted" id="sale_coupon"> + Manage promotion & coupon programs </div> </div> </div> </div> + <h2>Shipping</h2> <div class="row mt16 o_settings_container" id="sale_shipping_settings"> - <div class="col-xs-12 col-md-6 o_setting_box" id="delivery_order_setting" title="Send delivery orders to your warehouse and get delivered quantities updated in sales orders accordingly."> + <div class="col-xs-12 col-md-6 o_setting_box" id="shipping_address_setting"> <div class="o_setting_left_pane"> - <field name="module_sale_stock"/> + <field name="group_delivery_invoice_address"/> </div> <div class="o_setting_right_pane"> - <label for="module_sale_stock"/> + <label for="group_delivery_invoice_address"/> <div class="text-muted"> - Manage picking and deliveries + Let the customer enter a shipping address </div> </div> </div> @@ -279,25 +236,19 @@ </div> <div class="o_setting_right_pane"> <label string="Shipping Costs" for="module_website_sale_delivery"/> - <div class="text-muted"> + <div class="text-muted" id="msg_delivery_method_setting"> Apply shipping costs on orders </div> - <div class="content-group" id="msg_delivery_method_setting" attrs="{'invisible': [('module_website_sale_delivery', '=', False)]}"> - <div class="text-warning mt16">Save this page and come back here to set up the feature.</div> - </div> </div> </div> - </div> - <h2>Shipping Connectors</h2> - <div class="row mt16 o_settings_container" id="shipping_connectors_settings" title="Shipping connectors allow to compute accurate shipping costs, print shipping labels and request carrier picking at your warehouse to ship to the customer.Apply shipping connector from delivery methods."> <div class="col-xs-12 col-md-6 o_setting_box" id="ups_provider_setting"> <div class="o_setting_left_pane"> <field name="module_delivery_ups" widget="upgrade_boolean"/> </div> <div class="o_setting_right_pane"> <label string="UPS" for="module_delivery_ups"/> - <div class="text-muted"> - Ship with UPS + <div class="text-muted" id="website_delivery_ups"> + Compute shipping costs and ship with UPS </div> </div> </div> @@ -307,8 +258,8 @@ </div> <div class="o_setting_right_pane"> <label string="DHL" for="module_delivery_dhl"/> - <div class="text-muted"> - Ship with DHL + <div class="text-muted" id="website_delivery_dhl"> + Compute shipping costs and ship with DHL </div> </div> </div> @@ -318,8 +269,8 @@ </div> <div class="o_setting_right_pane"> <label string="FedEx" for="module_delivery_fedex"/> - <div class="text-muted"> - Ship with FedEx + <div class="text-muted" id="website_delivery_fedex"> + Compute shipping costs and ship with FedEx </div> </div> </div> @@ -329,8 +280,8 @@ </div> <div class="o_setting_right_pane"> <label string="USPS" for="module_delivery_usps"/> - <div class="text-muted"> - Ship with USPS + <div class="text-muted" id="website_delivery_usps"> + Compute shipping costs and ship with USPS </div> </div> </div> @@ -340,25 +291,74 @@ </div> <div class="o_setting_right_pane"> <label string="bpost" for="module_delivery_bpost"/> - <div class="text-muted"> - Ship with bpost + <div class="text-muted" id="website_delivery_bpost"> + Compute shipping costs and ship with bpost </div> </div> </div> </div> - <h2>eCommerce Integrations</h2> - <div class="row mt16 o_settings_container" id="sale_integration_settings"> - <div class="col-xs-12 col-md-6 o_setting_box" id="ebay_install_setting"> + + <h2>Invoicing</h2> + <div class="row mt16 o_settings_container" id="sale_invoicing_settings"> + <div class="col-xs-12 col-md-6 o_setting_box" id="invoicing_policy_setting" title="The mode selected here applies as invoicing policy of any new product created but not of products already existing."> + <div class="o_setting_left_pane"> + <field name="module_account_invoicing" nolabel="1"/> + </div> + <div class="o_setting_right_pane"> + <label for="module_account_invoicing"/> + <div class="text-muted"> + Issue invoices to customers + </div> + <div class="content-group" attrs="{'invisible': [('module_account_invoicing', '=', False)]}"> + <div class="mt16"> + <field name="default_invoice_policy" class="o_light_label" widget="radio"/> + </div> + </div> + </div> + </div> + <div class="col-xs-12 col-md-6 o_setting_box" attrs="{'invisible': ['|', ('default_invoice_policy', '=', 'delivery'), ('module_account_invoicing', '=', False)]}"> <div class="o_setting_left_pane"> - <field name="module_sale_ebay" widget="upgrade_boolean"/> + <field name="automatic_invoice" nolabel="1"/> </div> <div class="o_setting_right_pane"> - <label string="eBay" for="module_sale_ebay"/> + <label for="automatic_invoice"/> + <div class="text-muted"> + Generate the invoice automatically when the order is confirmed + </div> + </div> + </div> + </div> + + <h2>Orders</h2> + <div class="row mt16 o_settings_container" id="sale_checkout_settings"> + <div class="col-xs-12 col-md-6 o_setting_box" id="checkout_mail_setting"> + <div class="o_setting_right_pane"> + <label string="Confirmation Email"/> + <div class="text-muted"> + Email sent to the customer after the checkout + </div> + <div class="content-group"> + <div class="mt16"> + <field name="order_mail_template" class="oe_inline"/> + </div> + </div> + </div> + </div> + <div class="col-xs-12 col-md-6 o_setting_box" id="checkout_assignation_setting" groups="base.group_no_one"> + <div class="o_setting_right_pane"> + <label string="Assignation"/> <div class="text-muted"> - Sell your products on eBay + Assignation of online orders </div> - <div class="content-group" id="msg_ebay_install_setting" attrs="{'invisible': [('module_sale_ebay', '=', False)]}"> - <div class="text-warning mt16">Go to the Sales module settings page to configure eBay.</div> + <div class="content-group"> + <div class="row mt16"> + <label class="o_light_label col-md-3" string="Sales Channel" for="salesteam_id"/> + <field name="salesteam_id" context="{'default_team_type': 'website'}"/> + </div> + <div class="row"> + <label class="o_light_label col-md-3" for="salesperson_id"/> + <field name="salesperson_id"/> + </div> </div> </div> </div> diff --git a/addons/website_sale_delivery/views/res_config_settings_views.xml b/addons/website_sale_delivery/views/res_config_settings_views.xml index 16c14d66973..e62ff3f714d 100644 --- a/addons/website_sale_delivery/views/res_config_settings_views.xml +++ b/addons/website_sale_delivery/views/res_config_settings_views.xml @@ -5,13 +5,41 @@ <field name="model">res.config.settings</field> <field name="inherit_id" ref="website_sale.res_config_settings_view_form"/> <field name="arch" type="xml"> - <div id="msg_delivery_method_setting" position="replace"> + <div id="msg_delivery_method_setting" position="after"> <div class="content-group" attrs="{'invisible': [('module_website_sale_delivery', '=', False)]}"> <div class="mt16"> <button type="action" name="%(delivery.action_delivery_carrier_form)d" string="Delivery Methods" class="btn-link" icon="fa-arrow-right"/> </div> </div> </div> + <div id="website_delivery_dhl" position="after"> + <div class="content-group"> + <div class="mt16" attrs="{'invisible': [('module_delivery_dhl', '=', False)]}"> + <button name="%(delivery.action_delivery_carrier_form)d" icon="fa-arrow-right" type="action" string="DHL Delivery Methods" class="btn-link" context="{'search_default_delivery_type': 'dhl'}"/> + </div> + </div> + </div> + <div id="website_delivery_fedex" position="after"> + <div class="content-group"> + <div class="mt16" attrs="{'invisible': [('module_delivery_fedex', '=', False)]}"> + <button name="%(delivery.action_delivery_carrier_form)d" icon="fa-arrow-right" type="action" string="FedEx Delivery Methods" class="btn-link" context="{'search_default_delivery_type': 'fedex'}"/> + </div> + </div> + </div> + <div id="website_delivery_usps" position="after"> + <div class="content-group"> + <div class="mt16" attrs="{'invisible': [('module_delivery_usps', '=', False)]}"> + <button name="%(delivery.action_delivery_carrier_form)d" icon="fa-arrow-right" type="action" string="USPS Delivery Methods" class="btn-link" context="{'search_default_delivery_type': 'usps'}"/> + </div> + </div> + </div> + <div id="website_delivery_bpost" position="after"> + <div class="content-group"> + <div class="mt16" attrs="{'invisible': [('module_delivery_bpost', '=', False)]}"> + <button name="%(delivery.action_delivery_carrier_form)d" icon="fa-arrow-right" type="action" string="bpost Delivery Methods" class="btn-link" context="{'search_default_delivery_type': 'bpost'}"/> + </div> + </div> + </div> </field> </record> </odoo> diff --git a/addons/website_slides/views/res_config_settings_views.xml b/addons/website_slides/views/res_config_settings_views.xml index 5ff3e5ff8fc..597795e2354 100644 --- a/addons/website_slides/views/res_config_settings_views.xml +++ b/addons/website_slides/views/res_config_settings_views.xml @@ -5,17 +5,25 @@ <field name="model">res.config.settings</field> <field name="inherit_id" ref="website.res_config_settings_view_form"/> <field name="arch" type="xml"> - <div id="msg_slides_install_setting" position="replace"> - <div class="content-group" groups="base.group_no_one" attrs="{'invisible': [('module_website_slides', '=', False)]}"> - <div class="row mt16"> - <label class="col-md-3 o_light_label" for="website_slide_google_app_key"/> - <field name="website_slide_google_app_key" class="oe_inline"/> - </div> - <div class="oe_link"> - <span class="fa fa-arrow-right"/> - <a href="https://console.developers.google.com/flows/enableapi?apiid=drive,youtube"> - Create a Google Project and Get a Key - </a> + <div id="languages_setting" position="after"> + <div class="col-xs-12 col-md-6 o_setting_box" id="slides_install_setting"> + <div class="o_setting_right_pane"> + <label string="Slides"/> + <div class="text-muted"> + Google Drive API Key + </div> + <div class="content-group"> + <div class="row mt16"> + <label class="col-md-3 o_light_label" string="API Key"/> + <field name="website_slide_google_app_key" class="oe_inline"/> + </div> + <div class="oe_link"> + <span class="fa fa-arrow-right"/> + <a href="https://console.developers.google.com/flows/enableapi?apiid=drive,youtube"> + Create a Google Project and Get a Key + </a> + </div> + </div> </div> </div> </div> diff --git a/addons/website_twitter/views/res_config_settings_views.xml b/addons/website_twitter/views/res_config_settings_views.xml index 5d195470256..dec01e34420 100644 --- a/addons/website_twitter/views/res_config_settings_views.xml +++ b/addons/website_twitter/views/res_config_settings_views.xml @@ -5,25 +5,31 @@ <field name="model">res.config.settings</field> <field name="inherit_id" ref="website.res_config_settings_view_form"/> <field name="arch" type="xml"> - <div id="msg_twitter_roller_install_setting" position="replace"> - <div class="content-group" attrs="{'invisible': [('module_website_twitter', '=', False)]}"> - <div class="mt16"> - <div class="row"> - <label class="col-md-3 o_light_label" string="API Key" for="twitter_api_key"/> - <field name="twitter_api_key" class="oe_inline"/> + <div id="languages_setting" position="after"> + <div class="col-xs-12 col-md-6 o_setting_box" id="twitter_roller_install_setting"> + <div class="o_setting_right_pane"> + <label string="Twitter Roller"/> + <div class="text-muted"> + Twitter API Credentials </div> - <div class="row"> - <label class="col-md-3 o_light_label" string="API secret" for="twitter_api_secret"/> - <field name="twitter_api_secret" class="oe_inline"/> - </div> - <div class="row"> - <label class="col-md-3 o_light_label" string="Favorites From" for="twitter_screen_name"/> - <field name="twitter_screen_name" class="oe_inline"/> - </div> - <div> - <a class="oe_link" href="https://www.odoo.com/documentation/user/11.0/discuss/mail_twitter.html" target="_blank"> - <i class="fa fa-arrow-right"/> Tutorial - </a> + <div class="content-group"> + <div class="row mt16"> + <label class="col-md-3 o_light_label" string="API Key" for="twitter_api_key"/> + <field name="twitter_api_key" class="oe_inline"/> + </div> + <div class="row"> + <label class="col-md-3 o_light_label" string="API secret" for="twitter_api_secret"/> + <field name="twitter_api_secret" class="oe_inline"/> + </div> + <div class="row"> + <label class="col-md-3 o_light_label" string="Favorites From" for="twitter_screen_name"/> + <field name="twitter_screen_name" class="oe_inline"/> + </div> + <div> + <a data-toggle="modal" class="oe_link fa fa-arrow-right" href="#" data-target="#twitter_tutorial"> + Tutorial + </a> + </div> </div> </div> </div> |
