[IMP] website*: Improve the settings form view
This commit is contained in:
committed by
Yannick Tivisse
parent
d8afc7e833
commit
65a7531c8b
@@ -1,7 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from odoo import fields, models
|
||||
from odoo import api, fields, models
|
||||
|
||||
|
||||
class WebsiteConfigSettings(models.TransientModel):
|
||||
@@ -14,39 +14,67 @@ class WebsiteConfigSettings(models.TransientModel):
|
||||
|
||||
website_id = fields.Many2one('website', string="website", default=_default_website, required=True)
|
||||
website_name = fields.Char('Website Name', related='website_id.name')
|
||||
|
||||
language_ids = fields.Many2many(related='website_id.language_ids', relation='res.lang')
|
||||
default_lang_id = fields.Many2one(related='website_id.default_lang_id', relation='res.lang', required=True)
|
||||
language_count = fields.Integer(string='Number of languages', compute='_compute_language_count', readonly=True)
|
||||
default_lang_id = fields.Many2one(string='Default language', related='website_id.default_lang_id', relation='res.lang', required=True)
|
||||
default_lang_code = fields.Char('Default language code', related='website_id.default_lang_code')
|
||||
google_analytics_key = fields.Char('Google Analytics Key', related='website_id.google_analytics_key')
|
||||
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')
|
||||
|
||||
social_twitter = fields.Char(related='website_id.social_twitter')
|
||||
social_facebook = fields.Char(related='website_id.social_facebook')
|
||||
social_github = fields.Char(related='website_id.social_github')
|
||||
social_linkedin = fields.Char(related='website_id.social_linkedin')
|
||||
social_youtube = fields.Char(related='website_id.social_youtube')
|
||||
social_googleplus = fields.Char(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.Selection([
|
||||
(0, 'Use standard forms'),
|
||||
(1, 'Create and customize forms to generate emails, leads, issues and extra information in the checkout process (new snippet available)')
|
||||
], "Form Builder")
|
||||
module_website_version = fields.Selection([
|
||||
(0, 'No version management and A/B testing (easy)'),
|
||||
(1, 'Allow multiple versions of the same page (advanced)')
|
||||
], "A/B Testing")
|
||||
favicon = fields.Binary('Favicon', related='website_id.favicon')
|
||||
|
||||
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_website_contract = 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
|
||||
# when multi-website is implemented
|
||||
google_maps_api_key = fields.Char(string='Google Maps API Key')
|
||||
has_google_analytics = fields.Boolean("Google Analytics")
|
||||
has_google_analytics_dashboard = fields.Boolean("Google Analytics in Dashboard")
|
||||
has_google_maps = fields.Boolean("Google Maps")
|
||||
|
||||
def get_default_google_maps_api_key(self, fields):
|
||||
google_maps_api_key = self.env['ir.config_parameter'].get_param('google_maps_api_key', default='')
|
||||
return dict(google_maps_api_key=google_maps_api_key)
|
||||
|
||||
def set_google_maps_api_key(self):
|
||||
self.env['ir.config_parameter'].set_param(
|
||||
'google_maps_api_key', (self.google_maps_api_key or '').strip(), groups=['base.group_system'])
|
||||
|
||||
def get_default_google_maps_api_key(self, fields):
|
||||
google_maps_api_key = self.env['ir.config_parameter'].get_param('google_maps_api_key', default='')
|
||||
return dict(google_maps_api_key=google_maps_api_key)
|
||||
@api.depends('language_ids')
|
||||
def _compute_language_count(self):
|
||||
for config in self:
|
||||
config.language_count = len(self.language_ids)
|
||||
|
||||
def set_has_google_analytics(self):
|
||||
return self.env['ir.values'].set_default(
|
||||
'website.config.settings', 'has_google_analytics', self.has_google_analytics)
|
||||
|
||||
def set_has_google_analytics_dashboard(self):
|
||||
return self.env['ir.values'].set_default(
|
||||
'website.config.settings', 'has_google_analytics_dashboard', self.has_google_analytics_dashboard)
|
||||
|
||||
def set_has_google_maps(self):
|
||||
return self.env['ir.values'].set_default(
|
||||
'website.config.settings', 'has_google_maps', self.has_google_maps)
|
||||
|
||||
@@ -174,6 +174,8 @@ class Website(models.Model):
|
||||
social_youtube = fields.Char('Youtube Account')
|
||||
social_googleplus = fields.Char('Google+ Account')
|
||||
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')
|
||||
|
||||
user_id = fields.Many2one('res.users', string='Public User', default=lambda self: self.env.ref('base.public_user').id)
|
||||
compress_html = fields.Boolean('Compress HTML') # TODO: REMOVE ME IN SAAS-14
|
||||
|
||||
@@ -2,139 +2,353 @@
|
||||
<odoo>
|
||||
|
||||
|
||||
<record id="view_website_config_settings" model="ir.ui.view">
|
||||
<field name="name">Website settings</field>
|
||||
<record id="website_config_settings_view_form" model="ir.ui.view">
|
||||
<field name="name">website.config.settings.form</field>
|
||||
<field name="model">website.config.settings</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Configure Website" class="oe_form_configuration">
|
||||
<header>
|
||||
<button string="Apply" type="object" name="execute" class="oe_highlight"/>
|
||||
<button string="Save" type="object" name="execute" class="oe_highlight"/>
|
||||
<button string="Cancel" type="object" name="cancel" class="oe_link"/>
|
||||
</header>
|
||||
<div>
|
||||
<field name="website_id" invisible="1"/>
|
||||
<group name="google_analytics" string="Domain">
|
||||
<field name="website_name"/>
|
||||
<label for="google_analytics_key"/>
|
||||
<div name="google_analytics_key">
|
||||
<div>
|
||||
<div name="google_analytics_key" class="oe_inline">
|
||||
<field name="google_analytics_key" placeholder="UA-XXXXXXXX-Y"/>
|
||||
<sheet>
|
||||
<div>
|
||||
<field name="website_id" invisible="1"/>
|
||||
<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">
|
||||
Name and favicon of your website
|
||||
</div>
|
||||
<div class="content-group">
|
||||
<div class="row mt16">
|
||||
<label class="col-md-3 o_light_label" for="website_name"/>
|
||||
<field name="website_name"/>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-md-3 o_light_label" for="favicon" />
|
||||
<field name="favicon" widget="image"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<label for="id" string="Google Maps"/>
|
||||
<div name="google_maps">
|
||||
<div>
|
||||
Follow <a href="https://console.developers.google.com/flows/enableapi?apiid=maps_backend,static_maps_backend&keyType=CLIENT_SIDE&reusekey=true">the instructions</a> to create your key.
|
||||
</div>
|
||||
<div>
|
||||
<label for="google_maps_api_key" string="API Key"/>
|
||||
<field name="google_maps_api_key" class="oe_inline"/>
|
||||
</div>
|
||||
</div>
|
||||
</group>
|
||||
<group string="Language">
|
||||
<label for="language_ids"/>
|
||||
<div name="language_ids">
|
||||
<div>
|
||||
<div name="language_ids" class="oe_inline">
|
||||
<field name="language_ids" widget="many2many_checkboxes"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<label for="default_lang_id"/>
|
||||
<div name="default_lang_id">
|
||||
<div>
|
||||
<div name="default_lang_id" class="oe_inline">
|
||||
<field name="default_lang_id" widget="selection"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<label for="id" string="New Language"/>
|
||||
<div>
|
||||
<button type="action" name="%(base.action_view_base_language_install)d" string="Install a language" class="oe_link"/>
|
||||
</div>
|
||||
</group>
|
||||
<group name="social" string="Social Media">
|
||||
<label for="social_twitter"/>
|
||||
<div name="social_twitter">
|
||||
<div class="oe_inline">
|
||||
<field name="social_twitter" placeholder="https://twitter.com/Odoo"/>
|
||||
</div>
|
||||
</div>
|
||||
<label for="social_facebook"/>
|
||||
<div name="social_facebook">
|
||||
<div class="oe_inline">
|
||||
<field name="social_facebook" placeholder="https://www.facebook.com/Odoo"/>
|
||||
</div>
|
||||
</div>
|
||||
<label for="social_github"/>
|
||||
<div name="social_github">
|
||||
<div class="oe_inline">
|
||||
<field name="social_github" placeholder="https://youraccount.github.io"/>
|
||||
</div>
|
||||
</div>
|
||||
<label for="social_linkedin"/>
|
||||
<div name="social_linkedin">
|
||||
<div class="oe_inline">
|
||||
<field name="social_linkedin" placeholder="https://www.linkedin.com/company/odoo"/>
|
||||
</div>
|
||||
</div>
|
||||
<label for="social_youtube"/>
|
||||
<div name="social_youtube">
|
||||
<div class="oe_inline">
|
||||
<field name="social_youtube" placeholder="https://www.youtube.com/user/OpenERPonline"/>
|
||||
</div>
|
||||
</div>
|
||||
<label for="social_googleplus"/>
|
||||
<div name="social_googleplus">
|
||||
<div class="oe_inline">
|
||||
<field name="social_googleplus" placeholder="https://plus.google.com/+Odooapps"/>
|
||||
</div>
|
||||
</div>
|
||||
</group>
|
||||
<group>
|
||||
|
||||
</group>
|
||||
<group string="Menu" groups="base.group_no_one">
|
||||
<button type="action"
|
||||
name="%(website.action_website_menu)d"
|
||||
string="Configure website menus" class="oe_link"/>
|
||||
</group>
|
||||
<group string="Advanced" name="advanced">
|
||||
<label for="favicon"/>
|
||||
<div>
|
||||
<field name="favicon" widget="image" class="oe_avatar oe_left"/>
|
||||
</div>
|
||||
<field name="module_website_form_editor" widget="radio"/>
|
||||
<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"/>
|
||||
<field name="language_ids" class="col-md-8" 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"/>
|
||||
<field name="default_lang_id" widget="selection"/>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<button type="action" name="%(base.action_view_base_language_install)d" string="Install new language" class="btn-link" icon="fa-arrow-right"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<label for="module_website_version"/>
|
||||
<div>
|
||||
<field name="module_website_version" widget="upgrade_radio"/>
|
||||
<a href="https://www.odoo.com/slides/slide/how-a-b-testing-can-help-you-optimize-your-website-341" target="_blank"> More Info</a>
|
||||
</div>
|
||||
</group>
|
||||
<group string="Performance Optimization" name="optimization" groups="base.group_no_one">
|
||||
<label for="id" string="Speed"/>
|
||||
<div>
|
||||
<div>
|
||||
<field name="cdn_activated"/>
|
||||
<label for="cdn_activated"/>
|
||||
<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"/>
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label for="has_google_analytics"/>
|
||||
<div class="text-muted">
|
||||
Track visits in Google Analytics
|
||||
</div>
|
||||
<div class="content-group" attrs="{'invisible': [('has_google_analytics', '=', False)]}">
|
||||
<div class="row mt16">
|
||||
<label class="col-md-3 o_light_label" string="Analytics Key" for="google_analytics_key"/>
|
||||
<field name="google_analytics_key" placeholder="UA-XXXXXXXX-Y"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div attrs="{'invisible': [('cdn_activated', '=', False)]}">
|
||||
<label for="cdn_url"/>
|
||||
<field name="cdn_url"
|
||||
attrs="{'required': [('cdn_activated', '=', True)]}"
|
||||
placeholder="//mycompany.mycdn.com/"
|
||||
t-translation="off"/>
|
||||
<label for="cdn_filters"/>
|
||||
<field name="cdn_filters"
|
||||
attrs="{'required': [('cdn_activated', '=', True)]}"/>
|
||||
|
||||
<div class="col-xs-12 col-md-6 o_setting_box" id="google_analytics_dashboard_setting">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="has_google_analytics_dashboard"/>
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label for="has_google_analytics_dashboard"/>
|
||||
<div class="text-muted">
|
||||
See Google Analytics data on your Website Dashboard
|
||||
</div>
|
||||
<div class="content-group" attrs="{'invisible': [('has_google_analytics_dashboard', '=', False)]}">
|
||||
<div class="row mt16">
|
||||
<label class="col-md-3 o_light_label" string="Client ID" for="google_management_client_id"/>
|
||||
<field name="google_management_client_id"/>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-md-3 o_light_label" string="Client Secret" for="google_management_client_secret"/>
|
||||
<field name="google_management_client_secret"/>
|
||||
</div>
|
||||
</div>
|
||||
<div attrs="{'invisible': [('has_google_analytics_dashboard', '=', False)]}">
|
||||
<a href="https://www.odoo.com/documentation/user/9.0/website/google_analytics.html"
|
||||
class="oe_link fa fa-arrow-right" target="_blank">
|
||||
Tutorial
|
||||
</a>
|
||||
</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"/>
|
||||
</div>
|
||||
<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
|
||||
</div>
|
||||
<div class="content-group" attrs="{'invisible': [('has_google_maps', '=', False)]}">
|
||||
<div class="row mt16">
|
||||
<label class="col-md-3 o_light_label" string="API Key" for="google_maps_api_key"/>
|
||||
<field name="google_maps_api_key"/>
|
||||
</div>
|
||||
</div>
|
||||
<div attrs="{'invisible': [('has_google_maps', '=', False)]}">
|
||||
<a class="btn-link fa fa-arrow-right" target="_blank"
|
||||
href="https://console.developers.google.com/flows/enableapi?apiid=maps_backend,static_maps_backend&keyType=CLIENT_SIDE&reusekey=true">
|
||||
Create a Google Project and Get a Key
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</group>
|
||||
</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_website_contract" widget="upgrade_boolean"/>
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label for="module_website_contract"/>
|
||||
<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="o_setting_left_pane">
|
||||
<field name="cdn_activated"/>
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label for="cdn_activated" string="Content Delivery Network (CDN)"/>
|
||||
<div class="text-muted">
|
||||
Use a CDN to optimize the availability of your website's content
|
||||
</div>
|
||||
<div class="content-group" attrs="{'invisible': [('cdn_activated', '=', False)]}">
|
||||
<div class="row mt16">
|
||||
<label class="col-md-3 o_light_label" for="cdn_url"/>
|
||||
<field name="cdn_url"
|
||||
attrs="{'required': [('cdn_activated', '=', True)]}"
|
||||
placeholder="//mycompany.mycdn.com/"
|
||||
t-translation="off"/>
|
||||
</div>
|
||||
<div class="row" >
|
||||
<label class="col-md-3 o_light_label" for="cdn_filters"/>
|
||||
<field name="cdn_filters" class="oe_inline"
|
||||
attrs="{'required': [('cdn_activated', '=', True)]}"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<record id="view_website_config_settings_form_inherit_website_crm" model="ir.ui.view">
|
||||
<field name="name">website.config.settings.form.inherit</field>
|
||||
<record id="website_config_settings_view_form_inherit_website_crm" model="ir.ui.view">
|
||||
<field name="name">website.config.settings.form.inherit.crm</field>
|
||||
<field name="model">website.config.settings</field>
|
||||
<field name="inherit_id" ref="website.view_website_config_settings"/>
|
||||
<field name="inherit_id" ref="website.website_config_settings_view_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<group name="google_analytics" position="after">
|
||||
<group string="CRM" groups="base.group_no_one">
|
||||
<label string="Default Sales Team" for="crm_default_team_id"/>
|
||||
<div class="oe_inline">
|
||||
<field name="crm_default_team_id"/>
|
||||
<div id="msg_contact_form_install_setting" position="after">
|
||||
<div class="content-group mt16">
|
||||
<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>
|
||||
<label string="Default Salesperson" for="crm_default_user_id"/>
|
||||
<div class="oe_inline">
|
||||
<field name="crm_default_user_id"/>
|
||||
<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>
|
||||
</group>
|
||||
</group>
|
||||
</div>
|
||||
</div>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
|
||||
@@ -15,4 +15,4 @@ class WebsiteConfigSettings(models.TransientModel):
|
||||
|
||||
_inherit = 'website.config.settings'
|
||||
|
||||
channel_id = fields.Many2one('im_livechat.channel', string='Website Live Chat Channel', related='website_id.channel_id')
|
||||
channel_id = fields.Many2one('im_livechat.channel', string='Website Live Channel', related='website_id.channel_id')
|
||||
|
||||
@@ -1,22 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<data>
|
||||
|
||||
<record id="view_website_config_settings" model="ir.ui.view">
|
||||
<field name="name">Website livechat settings</field>
|
||||
<record id="website_config_settings_view_form_inherit_website_livechat" model="ir.ui.view">
|
||||
<field name="name">website.config.settings.form.inherit.livechat</field>
|
||||
<field name="model">website.config.settings</field>
|
||||
<field name="inherit_id" ref="website.view_website_config_settings"/>
|
||||
<field name="inherit_id" ref="website.website_config_settings_view_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//group[@name='social']" position="inside">
|
||||
<label for="channel_id"/>
|
||||
<div name="channel_id">
|
||||
<div class="oe_inline">
|
||||
<field name="channel_id"/>
|
||||
<div id="msg_module_website_livechat" position="replace">
|
||||
<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>
|
||||
</xpath>
|
||||
</div>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</odoo>
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
|
||||
from odoo import api, models, fields
|
||||
|
||||
|
||||
class WebsiteConfigSettings(models.TransientModel):
|
||||
_inherit = 'website.config.settings'
|
||||
|
||||
@@ -16,7 +15,7 @@ class WebsiteConfigSettings(models.TransientModel):
|
||||
salesperson_id = fields.Many2one('res.users', related='website_id.salesperson_id', string='Salesperson')
|
||||
salesteam_id = fields.Many2one('crm.team', related='website_id.salesteam_id', string='Sales Team')
|
||||
module_delivery = fields.Boolean("Manage shipping internally")
|
||||
module_website_sale_delivery = fields.Boolean("Add Delivery Costs to Online Sales")
|
||||
module_website_sale_delivery = fields.Boolean("Shipping Costs")
|
||||
# field used to have a nice radio in form view, resuming the 2 fields above
|
||||
sale_delivery_settings = fields.Selection([
|
||||
('none', 'No shipping management on website'),
|
||||
@@ -28,36 +27,50 @@ class WebsiteConfigSettings(models.TransientModel):
|
||||
module_delivery_temando = fields.Boolean("Temando integration")
|
||||
module_delivery_ups = fields.Boolean("UPS integration")
|
||||
module_delivery_usps = fields.Boolean("USPS integration")
|
||||
|
||||
module_sale_ebay = fields.Boolean("eBay connector")
|
||||
group_website_multiimage = fields.Selection([
|
||||
(0, 'One image per product'),
|
||||
(1, 'Several images per product')
|
||||
], string='Multi Images', implied_group='website_sale.group_website_multi_image', group='base.group_portal,base.group_user,base.group_public')
|
||||
module_website_sale_options = fields.Selection([
|
||||
(0, 'One-step "add to cart"'),
|
||||
(1, 'Suggest optional products when adding to cart (e.g. for a computer: warranty, software, etc.)')
|
||||
], "Optional Products", help='Installs *e-Commerce Optional Products*')
|
||||
|
||||
group_website_multiimage = fields.Boolean(string='Multi-Images', implied_group='website_sale.group_website_multi_image')
|
||||
group_discount_per_so_line = fields.Boolean(string="Discounted Prices", implied_group='sale.group_discount_per_so_line')
|
||||
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_digital = fields.Boolean("Digital Content")
|
||||
|
||||
module_sale_stock = fields.Boolean("Delivery Orders")
|
||||
module_account_taxcloud = fields.Boolean("TaxCloud")
|
||||
module_portal = fields.Boolean("Activate the customer portal", help="""Give your customers access to their documents.""")
|
||||
|
||||
# the next 2 fields represent sale_pricelist_setting from sale.config.settings, they are split here for the form view, to improve usability
|
||||
sale_pricelist_setting_split_1 = fields.Selection([
|
||||
(0, 'A single sale price per product'),
|
||||
(1, 'Several prices selectable through a drop-down list or applied automatically via Geo-IP'),
|
||||
], default=0, string="Pricing Strategy")
|
||||
sale_pricelist_setting_split_1 = fields.Boolean(default=0, string="Multiple Prices per Products")
|
||||
sale_pricelist_setting_split_2 = fields.Selection([
|
||||
(0, 'Specific prices per customer segment, currency, etc.'),
|
||||
(1, 'Advanced pricing based on formulas (discounts, margins, rounding)')
|
||||
], default=0, string="Sale Price",
|
||||
help='Specific prices per customer segment, currency, etc.: new pricing table available in product detail form (Sales tab).\n'
|
||||
'Advanced pricing based on formulas (discounts, margins, rounding): apply price rules from a new *Pricelists* menu in Configuration.')
|
||||
(0, 'Multiple prices per product (e.g. customer segments, currencies)'),
|
||||
(1, 'Prices computed from formulas (discounts, margins, roundings)')
|
||||
], default=0, string="Sales Price")
|
||||
group_sale_pricelist = fields.Boolean("Use pricelists to adapt your price per customers",
|
||||
implied_group='product.group_sale_pricelist',
|
||||
help="""Allows to manage different prices based on rules per category of customers.
|
||||
Example: 10% for retailers, promotion of 5 EUR on this product, etc.""")
|
||||
implied_group='product.group_sale_pricelist')
|
||||
|
||||
group_product_variant = fields.Boolean("Attributes and Variants", implied_group='product.group_sale_pricelist')
|
||||
group_pricelist_item = fields.Boolean("Show pricelists to customers",
|
||||
implied_group='product.group_pricelist_item')
|
||||
group_product_pricelist = fields.Boolean("Show pricelists On Products",
|
||||
implied_group='product.group_product_pricelist')
|
||||
order_mail_template = fields.Many2one('mail.template', string='Order Confirmation Email', readonly=True, default=_default_order_mail_template, help="Email sent to customer at the end of the checkout process")
|
||||
|
||||
order_mail_template = fields.Many2one('mail.template', string='Order Confirmation Email', default=_default_order_mail_template, help="Email sent to customer at the end of the checkout process")
|
||||
group_show_price_subtotal = fields.Boolean("Show subtotal", implied_group='sale.group_show_price_subtotal')
|
||||
group_show_price_total = fields.Boolean("Show total", implied_group='sale.group_show_price_total')
|
||||
|
||||
default_invoice_policy = fields.Selection([
|
||||
('order', 'Ordered quantities'),
|
||||
('delivery', 'Delivered quantities or service hours')
|
||||
], 'Invoicing Policy', default='order')
|
||||
|
||||
group_multi_currency = fields.Boolean(string='Multi-Currencies', implied_group='base.group_multi_currency')
|
||||
|
||||
sale_show_tax = fields.Selection([
|
||||
('total', 'Tax-Included Prices'),
|
||||
('subtotal', 'Tax-Excluded Prices')],
|
||||
"Product Prices", default='total')
|
||||
|
||||
@api.model
|
||||
def get_default_sale_delivery_settings(self, fields):
|
||||
@@ -83,6 +96,11 @@ class WebsiteConfigSettings(models.TransientModel):
|
||||
return self.env['ir.values'].sudo().set_default(
|
||||
'sale.config.settings', 'sale_pricelist_setting', sale_pricelist_setting)
|
||||
|
||||
@api.multi
|
||||
def set_sale_tax_defaults(self):
|
||||
return self.env['ir.values'].sudo().set_default(
|
||||
'website.config.settings', 'sale_show_tax', self.sale_show_tax)
|
||||
|
||||
@api.onchange('sale_delivery_settings')
|
||||
def _onchange_sale_delivery_settings(self):
|
||||
if self.sale_delivery_settings == 'none':
|
||||
@@ -101,6 +119,13 @@ class WebsiteConfigSettings(models.TransientModel):
|
||||
'module_website_sale_delivery': True,
|
||||
})
|
||||
|
||||
@api.onchange('group_discount_per_so_line')
|
||||
def _onchange_group_discount_per_so_line(self):
|
||||
if self.group_discount_per_so_line:
|
||||
self.update({
|
||||
'sale_pricelist_setting_split_1': True,
|
||||
})
|
||||
|
||||
@api.onchange('sale_pricelist_setting_split_1', 'sale_pricelist_setting_split_2')
|
||||
def _onchange_sale_pricelist_setting(self):
|
||||
if self.sale_pricelist_setting_split_1 == 0:
|
||||
@@ -122,3 +147,16 @@ class WebsiteConfigSettings(models.TransientModel):
|
||||
'group_sale_pricelist': True,
|
||||
'group_pricelist_item': True,
|
||||
})
|
||||
|
||||
@api.onchange('sale_show_tax')
|
||||
def _onchange_sale_tax(self):
|
||||
if self.sale_show_tax == "subtotal":
|
||||
self.update({
|
||||
'group_show_price_total': False,
|
||||
'group_show_price_subtotal': True,
|
||||
})
|
||||
else:
|
||||
self.update({
|
||||
'group_show_price_total': True,
|
||||
'group_show_price_subtotal': False,
|
||||
})
|
||||
|
||||
@@ -1,58 +1,306 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<record id="website_config_settings_view_form" model="ir.ui.view">
|
||||
<field name="name">website.config.settings.form.inherit</field>
|
||||
|
||||
<record id="website_config_settings_view_form_inherit_website_sale" model="ir.ui.view">
|
||||
<field name="name">website.config.settings.form.inherit.sale</field>
|
||||
<field name="model">website.config.settings</field>
|
||||
<field name="inherit_id" ref="website.view_website_config_settings"/>
|
||||
<field name="inherit_id" ref="website.website_config_settings_view_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<group name="social" position="before">
|
||||
<group name="delivery" string="eCommerce">
|
||||
<field name="group_website_multiimage" widget="radio"/>
|
||||
<field name="module_website_sale_options" widget="radio"/>
|
||||
<field name="group_sale_pricelist" class="oe_inline" invisible="1"/>
|
||||
<field name="group_pricelist_item" class="oe_inline" invisible="1"/>
|
||||
<field name="group_product_pricelist" class="oe_inline" invisible="1"/>
|
||||
<field name="sale_pricelist_setting_split_1" widget="radio"/>
|
||||
<field name="sale_pricelist_setting_split_2" widget="radio" attrs="{'invisible': [('sale_pricelist_setting_split_1', '=', False)]}"/>
|
||||
<field name="module_website_sale_delivery" invisible="1"/>
|
||||
<field name="module_delivery" invisible="1"/>
|
||||
<field name="sale_delivery_settings" widget="radio"/>
|
||||
<label for="module_delivery_ups" string="Shipping Connectors"/>
|
||||
<div>
|
||||
<div>
|
||||
<field name="module_delivery_ups" widget="upgrade_boolean"/>
|
||||
<label for="module_delivery_ups"/>
|
||||
</div><div>
|
||||
<field name="module_delivery_fedex" widget="upgrade_boolean"/>
|
||||
<label for="module_delivery_fedex"/>
|
||||
</div><div>
|
||||
<field name="module_delivery_temando" widget="upgrade_boolean"/>
|
||||
<label for="module_delivery_temando"/>
|
||||
</div><div>
|
||||
<field name="module_delivery_usps" widget="upgrade_boolean"/>
|
||||
<label for="module_delivery_usps"/>
|
||||
</div><div>
|
||||
<field name="module_delivery_dhl" widget="upgrade_boolean"/>
|
||||
<label for="module_delivery_dhl"/>
|
||||
<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>
|
||||
<label for="module_sale_ebay" string="Merchant Connectors"/>
|
||||
<div>
|
||||
<field name="module_sale_ebay" widget="upgrade_boolean"/>
|
||||
<label for="module_sale_ebay"/>
|
||||
<a href="https://www.odoo.com/slides/slide/odoo-integration-with-ebay-216" target="_blank"> More Info</a>
|
||||
<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="sale_pricelist_setting_split_1"/>
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label for="sale_pricelist_setting_split_1"/>
|
||||
<div class="text-muted">
|
||||
Apply specific prices per country, discounts, etc.
|
||||
</div>
|
||||
<div class="mt16" attrs="{'invisible': [('sale_pricelist_setting_split_1', '=', False)]}">
|
||||
<field name="group_sale_pricelist" invisible="1"/>
|
||||
<field name="group_pricelist_item" invisible="1"/>
|
||||
<field name="group_product_pricelist" invisible="1"/>
|
||||
<field name="sale_pricelist_setting_split_2" class="o_light_label" widget="radio"/>
|
||||
</div>
|
||||
<div attrs="{'invisible': [('sale_pricelist_setting_split_1', '=', False)]}">
|
||||
<button type="action" name="%(product.product_pricelist_action2)d" string="Pricelists" class="btn-link" icon="fa-arrow-right"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<label string="Default Sales Team" for="salesteam_id" groups="base.group_no_one"/>
|
||||
<div groups="base.group_no_one" class="oe_inline">
|
||||
<field name="salesteam_id"/>
|
||||
<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>
|
||||
<label string="Default Salesperson" for="salesperson_id" groups="base.group_no_one"/>
|
||||
<div groups="base.group_no_one" class="oe_inline">
|
||||
<field name="salesperson_id"/>
|
||||
<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_form)d" string="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>
|
||||
<field name="order_mail_template"/>
|
||||
</group>
|
||||
</group>
|
||||
</div>
|
||||
|
||||
<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">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="group_product_variant"/>
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label for="group_product_variant"/>
|
||||
<div class="text-muted">
|
||||
Set product attributes (e.g. color, size) to sell variants
|
||||
</div>
|
||||
<div class="content-group" attrs="{'invisible': [('group_product_variant', '=', False)]}">
|
||||
<div class="mt16">
|
||||
<button type="action" name="%(product.attribute_action)d" string="Attributes" class="btn-link" icon="fa-arrow-right"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-6 o_setting_box" id="product_image_setting">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="group_website_multiimage" widget="checkbox"/>
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label for="group_website_multiimage"/>
|
||||
<div class="text-muted">
|
||||
Display an images carousel on product pages
|
||||
</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"/>
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label for="module_website_sale_digital"/>
|
||||
<div class="text-muted">
|
||||
Provide customers with links or content to download
|
||||
</div>
|
||||
</div>
|
||||
</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="checkout_mail_setting">
|
||||
<div class="o_setting_left_pane"/>
|
||||
<div class="o_setting_right_pane">
|
||||
<label string="Confirmation Email"/>
|
||||
<div class="text-muted">
|
||||
Email sent to the customer
|
||||
</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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<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>
|
||||
<div class="o_setting_right_pane">
|
||||
<label for="group_delivery_invoice_address"/>
|
||||
<div class="text-muted">
|
||||
Let the customer enter a shipping address
|
||||
</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_left_pane"/>
|
||||
<div class="o_setting_right_pane">
|
||||
<label string="Assignation"/>
|
||||
<div class="text-muted">
|
||||
Assignation of online orders
|
||||
</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"/>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="o_light_label col-md-3" for="salesperson_id"/>
|
||||
<field name="salesperson_id"/>
|
||||
</div>
|
||||
</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="This default value is applied to any new product created. This can be changed in the product detail form.">
|
||||
<div class="o_setting_left_pane"/>
|
||||
<div class="o_setting_right_pane">
|
||||
<label for="default_invoice_policy"/>
|
||||
<div class="text-muted">
|
||||
Quantities to invoice from sales orders
|
||||
</div>
|
||||
<div class="content-group">
|
||||
<div class="mt16">
|
||||
<field name="default_invoice_policy" class="o_light_label" widget="radio"/>
|
||||
</div>
|
||||
</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="o_setting_left_pane">
|
||||
<field name="module_sale_stock"/>
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label for="module_sale_stock"/>
|
||||
<div class="text-muted">
|
||||
Manage picking and deliveries
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-6 o_setting_box" id="delivery_method_setting">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="module_website_sale_delivery"/>
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label string="Shipping Costs" for="module_website_sale_delivery"/>
|
||||
<div class="text-muted">
|
||||
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>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-6 o_setting_box" id="shipping_provider_dhl_setting">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="module_delivery_dhl" widget="upgrade_boolean"/>
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label string="DHL" for="module_delivery_dhl"/>
|
||||
<div class="text-muted">
|
||||
Ship with DHL
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-6 o_setting_box" id="shipping_provider_fedex_setting">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="module_delivery_fedex" widget="upgrade_boolean"/>
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label string="FedEx" for="module_delivery_fedex"/>
|
||||
<div class="text-muted">
|
||||
Ship with FedEx
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-6 o_setting_box" id="shipping_provider_usps_setting">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="module_delivery_usps" widget="upgrade_boolean"/>
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label string="USPS" for="module_delivery_usps"/>
|
||||
<div class="text-muted">
|
||||
Ship with USPS
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-6 o_setting_box" id="shipping_provider_temando_setting">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="module_delivery_temando" widget="upgrade_boolean"/>
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label string="Temando" for="module_delivery_temando"/>
|
||||
<div class="text-muted">
|
||||
Use Temando to connect with your carrier
|
||||
</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">
|
||||
<div class="o_setting_left_pane">
|
||||
<field name="module_sale_ebay" widget="upgrade_boolean"/>
|
||||
</div>
|
||||
<div class="o_setting_right_pane">
|
||||
<label string="eBay" for="module_sale_ebay"/>
|
||||
<div class="text-muted">
|
||||
Sell your products on eBay
|
||||
</div>
|
||||
<div class="content-group" id="msg_ebay_install_setting" attrs="{'invisible': [('module_sale_ebay', '=', False)]}">
|
||||
<div class="text-warning mt16">Save this page and come back here to set up the feature.</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
|
||||
@@ -12,6 +12,7 @@ Delivery Costs
|
||||
'data': [
|
||||
'views/website_sale_delivery_templates.xml',
|
||||
'views/website_sale_delivery_views.xml',
|
||||
'views/website_config_settings_views.xml',
|
||||
'data/website_sale_delivery_data.xml'
|
||||
],
|
||||
'demo': [
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<record id="website_config_settings_view_form_inherit_sale_delivery" model="ir.ui.view">
|
||||
<field name="name">website.config.settings.form.inherit.delivery</field>
|
||||
<field name="model">website.config.settings</field>
|
||||
<field name="inherit_id" ref="website_sale.website_config_settings_view_form_inherit_website_sale"/>
|
||||
<field name="arch" type="xml">
|
||||
<div id="msg_delivery_method_setting" position="replace">
|
||||
<div class="content-group">
|
||||
<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>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
@@ -1,19 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<data>
|
||||
|
||||
<record id="view_website_config_settings" model="ir.ui.view">
|
||||
<field name="name">Website livechat settings</field>
|
||||
<record id="website_config_settings_view_form_inherit_website_slides" model="ir.ui.view">
|
||||
<field name="name">website.config.settings.form.inherit.slides</field>
|
||||
<field name="model">website.config.settings</field>
|
||||
<field name="inherit_id" ref="website.view_website_config_settings"/>
|
||||
<field name="inherit_id" ref="website.website_config_settings_view_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//group[@name='social']" position="after">
|
||||
<group string="Website Slides">
|
||||
<field name="website_slide_google_app_key" />
|
||||
</group>
|
||||
</xpath>
|
||||
<div id="msg_slides_install_setting" position="replace">
|
||||
<div class="content-group" groups="base.group_no_one">
|
||||
<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>
|
||||
<a href="https://console.developers.google.com/flows/enableapi?apiid=drive,youtube">
|
||||
Create a Google Project and Get a Key
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</odoo>
|
||||
|
||||
@@ -26,16 +26,16 @@ class WebsiteTwitterConfig(models.TransientModel):
|
||||
|
||||
twitter_api_key = fields.Char(
|
||||
related='website_id.twitter_api_key',
|
||||
string='Twitter API Key',
|
||||
string='API Key',
|
||||
help='Twitter API key you can get it from https://apps.twitter.com/app/new')
|
||||
twitter_api_secret = fields.Char(
|
||||
related='website_id.twitter_api_secret',
|
||||
string='Twitter API secret',
|
||||
string='API secret',
|
||||
help='Twitter API secret you can get it from https://apps.twitter.com/app/new')
|
||||
twitter_tutorial = fields.Boolean(string='Show me how to obtain the Twitter API Key and Secret')
|
||||
twitter_screen_name = fields.Char(
|
||||
related='website_id.twitter_screen_name',
|
||||
string='Get favorites from this screen name',
|
||||
string='Favorites From',
|
||||
help='Screen Name of the Twitter Account from which you want to load favorites.'
|
||||
'It does not have to match the API Key/Secret.')
|
||||
|
||||
|
||||
@@ -1,56 +1,69 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<record id="view_website_config_settings" model="ir.ui.view">
|
||||
<field name="name">Twitter settings</field>
|
||||
<field name="model">website.config.settings</field>
|
||||
<field name="inherit_id" ref="website.view_website_config_settings"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[@name='social_twitter']" position="after">
|
||||
<label for="id" string="Twitter API"/>
|
||||
<div>
|
||||
<p>Set your Twitter API access below to be able to use the Twitter Scroller Website snippet.<br/>
|
||||
You can get your API credentials from <a href="https://apps.twitter.com/app/new" target="new">https://apps.twitter.com/app/new</a>
|
||||
</p>
|
||||
<div>
|
||||
<field name="twitter_tutorial" class="oe_inline"/><label for="twitter_tutorial"/>
|
||||
|
||||
<blockquote class="small" attrs="{'invisible':[('twitter_tutorial','=',False)]}">
|
||||
<h2>How to configure the Twitter API access</h2>
|
||||
<ol>
|
||||
<li>Create a new Twitter application on <a href="https://apps.twitter.com/app/new" target="new">https://apps.twitter.com/app/new</a>
|
||||
with the following values:
|
||||
<ul>
|
||||
<li><strong>Name: </strong> Odoo Tweet Scroller</li>
|
||||
<li><strong>Description: </strong> Odoo Tweet Scroller </li>
|
||||
<li><strong>Website: </strong> <tt>https://www.odoo.com</tt></li>
|
||||
<li><strong>Callback URL: </strong> leave it blank</li>
|
||||
<li>Accept terms of use and click on the Create button at the bottom</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Switch to the API Keys tab: <br/>
|
||||
<img src='/website_twitter/static/src/img/api_key.png'/>
|
||||
</li>
|
||||
<li>Copy/Paste API Key and Secret below</li>
|
||||
<li>Enter the screen name from which you want to load favorite Tweets (does not need to be the same as the API keys)</li>
|
||||
</ol>
|
||||
</blockquote>
|
||||
</div>
|
||||
<div>
|
||||
<label for="twitter_api_key"/>
|
||||
<field name="twitter_api_key" class="oe_inline"/>
|
||||
</div>
|
||||
<div>
|
||||
<label for="twitter_api_secret"/>
|
||||
<field name="twitter_api_secret" class="oe_inline"/>
|
||||
</div>
|
||||
<div>
|
||||
<label for="twitter_screen_name"/>
|
||||
<field name="twitter_screen_name" class="oe_inline"/>
|
||||
</div>
|
||||
</div>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="website_config_settings_view_form_inherit_website_twitter" model="ir.ui.view">
|
||||
<field name="name">website.config.settings.form.inherit.twitter</field>
|
||||
<field name="model">website.config.settings</field>
|
||||
<field name="inherit_id" ref="website.website_config_settings_view_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<div id="msg_twitter_roller_install_setting" position="replace">
|
||||
<div class="content-group">
|
||||
<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>
|
||||
<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>
|
||||
<form class="oe_form_configuration">
|
||||
<div id="twitter_tutorial" class="modal fade" role="dialog" tabindex="-1">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<a class="close" data-dismiss="modal" aria-hidden="true">×</a>
|
||||
<h3 class="modal-title">How to configure the Twitter API access</h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<ol>
|
||||
<li>Create a new Twitter application on <a href="https://apps.twitter.com/app/new" target="new">
|
||||
https://apps.twitter.com/app/new
|
||||
</a>
|
||||
with the following values:
|
||||
<ul>
|
||||
<li><strong>Name: </strong> Odoo Tweet Scroller</li>
|
||||
<li><strong>Description: </strong> Odoo Tweet Scroller </li>
|
||||
<li><strong>Website: </strong> <tt>https://www.odoo.com</tt></li>
|
||||
<li><strong>Callback URL: </strong> leave it blank</li>
|
||||
<li>Accept terms of use and click on the Create button at the bottom</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Switch to the API Keys tab: <br/>
|
||||
<img src='/website_twitter/static/src/img/api_key.png'/>
|
||||
</li>
|
||||
<li>Copy/Paste API Key and Secret below</li>
|
||||
<li>Enter the screen name from which you want to load favorite Tweets (does not need to be the same as the API keys)</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<a type="button" class="btn btn-primary" data-dismiss="modal">Close</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
|
||||
Reference in New Issue
Block a user