diff --git a/addons/account/views/res_config_settings_views.xml b/addons/account/views/res_config_settings_views.xml
index c793dfa1a8c..b573b0cdfab 100644
--- a/addons/account/views/res_config_settings_views.xml
+++ b/addons/account/views/res_config_settings_views.xml
@@ -39,7 +39,7 @@
-
+
diff --git a/addons/sale/models/res_company.py b/addons/sale/models/res_company.py
index f75a010cb3d..e5f70e2eb98 100644
--- a/addons/sale/models/res_company.py
+++ b/addons/sale/models/res_company.py
@@ -1,8 +1,10 @@
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
+import base64
from odoo import api, fields, models, _
-
+from odoo.modules.module import get_module_resource
+from odoo.modules.module import get_resource_path
class ResCompany(models.Model):
_inherit = "res.company"
@@ -52,9 +54,13 @@ class ResCompany(models.Model):
# take any existing product or create one
product = self.env['product.product'].search([], limit=1)
if len(product) == 0:
+ default_image_path = get_module_resource('product', 'static/img', 'product_product_13-image.png')
product = self.env['product.product'].create({
- 'name': _('Sample Product')
+ 'name': _('Sample Product'),
+ 'active': False,
+ 'image_1920': base64.b64encode(open(default_image_path, 'rb').read())
})
+ product.product_tmpl_id.write({'active': False})
self.env['sale.order.line'].create({
'name': _('Sample Order Line'),
'product_id': product.id,
diff --git a/addons/sale/models/sale.py b/addons/sale/models/sale.py
index 3e90debc941..73708e13e51 100644
--- a/addons/sale/models/sale.py
+++ b/addons/sale/models/sale.py
@@ -309,6 +309,10 @@ class SaleOrder(models.Model):
else:
order.expected_date = False
+ @api.onchange('expected_date')
+ def _onchange_commitment_date(self):
+ self.commitment_date = self.expected_date
+
@api.depends('transaction_ids')
def _compute_authorized_transaction_ids(self):
for trans in self:
diff --git a/addons/sale/static/src/js/tours/sale.js b/addons/sale/static/src/js/tours/sale.js
index f2208799a1e..73f87ad740b 100644
--- a/addons/sale/static/src/js/tours/sale.js
+++ b/addons/sale/static/src/js/tours/sale.js
@@ -24,11 +24,6 @@ tour.register("sale_tour", {
extra_trigger: ".o_sale_order",
content: _t("Start by checking your company's data."),
position: "bottom",
-}, {
- trigger: ".modal-content input.o_field_widget[name='street'], .modal-content input.o_field_widget[name='street_name']",
- content: _t("Let's enter the address."),
- position: "right",
- run: "text Rainbow street"
}, {
trigger: ".modal-content button[name='action_save_onboarding_company_step']",
content: _t("Looks good. Let's continue."),
@@ -117,7 +112,7 @@ tour.register("sale_quote_tour", {
},
...tour.stepUtils.statusbarButtonsSteps("Send by Email", _t("Send the quote to yourself and check what the customer will receive."), ".o_statusbar_buttons button[name='action_quotation_send']"),
{
- trigger: ".modal-content input[name='email']",
+ trigger: ".modal-content div[name='partner_ids']",
content: _t("Write your own email address here in order to test the flow."),
run: "text agrolait@example.com"
},