Purpose of this commit is to send the order and payment details email to user
when they purchase any order from ecommerce or when do the payment from
portal. Currently it was sending quotation mail when the payment is processed.
Now it send an email for quotation, and one email for sale confirmation that
may contain more detailed content if coming from website (eCommerce).
In sale
* create new confirmation template and set the default template in sales
settings;
* when payment enabled in sales settings then display template option to send
default confirmation mail when payment is processed or order signed;
* add tool method to find the right template to use when sending the
quotation / SO by email;
* ensure email is sent everytime SO is confirmed;
In website_sale
* add option in website setting in order, to set the confirmation mail
template;
* ensure email is sent everytime SO is confirmed;
Related to task ID 1873634
Linked to PR #28781
Make the image tools more consistent and easier to maintain by having a single
function handling all the cases, instead of several functions doing more or less
the same thing with obscure differences.
Also introduce a new function to guess the size based on a field name, to be
used in the following commit.
task-1958000
PR: #31811
* = website_partner, website_profile, website_sale, website_slides
Before
======
Since commit: 2e3848b394
The images that are resized have additional borders if the target ratio is
different than the image ratio. Those borders are transparent if the image
format supports it, and are white otherwise.
With that current solution, if the background where the image is displayed is
another color than white, it is looking really bad.
Moreover, most images are stored resized like this, so it is not even possible
to decide if it should have borders or not depending on the context, the
original image and ratio is forever lost.
It is also inconsistent because if the image is already smaller than the target
size then it doesn't include borders. In that case it keeps the original ratio
instead of the target ratio. So it isn't even guaranteed that the target
ratio is going to be respected.
After
=====
This commit will solve all of those problems by always keeping the ratio of the
original image.
This implies the views should be taking care of adding borders when necessary.
task-1958000
PR: #31811
Before this commit:
If the user was GeoIP located and it's pricelist (property_product_pricelist)
was not allowed for it's GeoIP country, that pricelist would still be return.
This issue was detected as a test `test_get_pricelist_available_geoip2` was not
working since forward ported in master (only on theme runbot or local..).
Before master (saas-12.4), `property_product_pricelist` would not be recomputed
once set, so the test was actually not working as expected.
Since master, reading `property_product_pricelist` just after setting it goes
through the compute method, resulting in different value than in previous
versions.
closesodoo/odoo#32961
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
with this commit, we have restructured 'other info' tab with few fields and updated the tooltips
and update the 'XPath' regarding the new restructure
Task ID: 1930087
Purpose: use more email_formatted when possible, clean and simplify
email_from, email_to and partner_to computation.
Next step is to try to extract some common patterns in tools or methods in
order to simplify template creation and customization.
Related to task 1972615
Linked to PR #32872
There was multiple issues with `website_sequence` field, mostly coming from
commits during the last few years (eg 43c544f8a8) that tried to change the
`website_sequence` order to be the same as `sequence` but changing only part of
the code.
Other commits tried to restore that again by changing only some parts.
This commit does:
1. Originally, the `website_sequence` was supposed to be the opposite of
`sequence` field, the greater the first.
This commit ensure this is not the case anymore and it is used as the
regular `sequence` field.
2. `website_sequence` demo data was set between 4 and 1000, no need to use so
big differences. Plus, having a website_sequence set to 4 means the next
product would already have negative value.
3. Add `website_sequence` field in tree view in place of `sequence` for website
product view, and in debug mode on form view.
task-1960777
closesodoo/odoo#32593
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Before this commit, runbot-theme was red somehow for the geoip pricelist test.
Adding post_install seems to fix the issue, anyway it is better to flag the
tests as such as it make no sense to test pricelists during module install.
closesodoo/odoo#32727
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This commit adds facility to showcase product videos on it's
eCommerce page. They can be added to 'product.image' model,
same as extra images, thus allowing user to enter multiple
videos per template and per variant. Also, associated image
will be used as a thumbnail for the video on the product's
website page.
task-1945483
closesodoo/odoo#32298
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
In this commit, we have changed behaviour of SEO dialog. Now when you
keep title and description fields empty, then the page will use default
title and description. We have added default_title and default_description
to render the preview with default values when title and description
fields are empty in SEO dialog.
Task ID:1949636
closesodoo/odoo#32449
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
A tour tooltip was targeting a snippet which is at the bottom of the
page, we now target a snippet which is on top of the list so that the
related tour tooltip is more visible.
task-1942742
closesodoo/odoo#31400
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Before this commit, if none of the pricelist is available for the website
then frontend ecommerce will crash. This issue is arrived from #30675 PR.
The reason behind crash is, if there is no pricelist associated with
the website then the ecommerce will not get the currency and breaks the
frontend shop.
This commit will restrict user from making those changes which breaks the
frontend shop. We will ensure that atleast one pricelist is available for
each website.
task-1966811
Closes: #32534
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Task#1963335
Now that the product configurator has its own module, the tour
"tour_shop_custom_attribute_value" needs to be split in two parts
to handle the optional products.
The "sale_tour" also needed to be adapted to handle the fact that
the product input can also be a product_template input.
The "shop_buy_product" had its 'add_to_cart' step changed to handle
possible optional products window.
closesodoo/odoo#32368
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
- Go to Sales > Configuration > Settings
- Enable "Multiple Sales Prices per Product" and select option "Prices
computed from formulas (discounts, margins, roundings)"
- Go to Sales > Catalog / Pricelists
- Select "Public Pricelist" and set "Discount Policy: Show public price
& discount to the customer"
- Go to the eCommerce, buy "iPad Retina Display" which as a 20 %
discount
In the corresponding SO, the discount appears to be zero, and the
discount is included in the price unit. However, adding the product
directly to the SO in the backend displays the discount as expected.
There should not be a difference in behavior between the eCommerce and
the backend.
Fixes#31337
opw-1943989
closesodoo/odoo#31965
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
website_sale adds a call to sale_get_order to ~every website page (in
order to validate & display the shopping cart).
Before this change, this calls get_pricelist_available() and triggers
two different computations of property_product_pricelist on every page
even for a public user with no cart / SO. This, in turn, generates ~20
queries and adds 20ms (total) / 10ms (sql) to ~every page load.
Fix: early return if the user doesn't have an SO (either in session or
in DB) and we're not in a case where we want to force one.
Loading "/" with just website_sale installed on a new DB,
- before: 53 queries, 31ms ±5 (sql), 75ms ±5 (all)
- after: 32 queries, 21ms ±1 (sql), 53ms ±3 (all)
closesodoo/odoo#32492
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Purpose of the task is when extra fee is activated on the payment acquirer,
the customer is no warned about extra cost when choosing the payment acquirer.
so display the extra fees on payment acquirer when doing the payment.
Related Task ID : 1845815
Closes : #31730
Since 2d970942ba it is possible among other improvments to have a
pricelist on all website if it has a "code" or is "selectable" and has
no specified website.
Following this, the default "Public Pricelist" is not associated to a
website but since it is not selectable and has no code, we would get no
pricelist on the website on default installation without demo data.
With this changeset, the "Public Priclist" is set to selectable when
website_sale is installed.
opw-1961069
closes#32254
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Co-authored-by: Romain Derie <rdedoo@users.noreply.github.com>
- The method `_is_available_on_website` on `product.pricelist` access to
the field `code` which is limited to the group `base.group_user`.
This causes issues when the method is called by a non internal user.
closesodoo/odoo#32123
Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
The method `onChangeVariant` was overridden in 12.2 to fix an issue with the new
web editor and separately overridden in 12.0 to fix an issue with the product
configurator.
After the forward-port, the method was defined twice, and only the second was
taken into account.
This commit fixes it by merging the two methods.
closesodoo/odoo#32041
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Field `auth_msg` never existed, this is an uncaught mistake. This commit
removes its usage and displays the fallback message to avoid runtime
error.
Closes#31903
Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
Co-authored-by: Marius Stedjan <marius@stedjan.com>
With this commit, `description_sale` is now editable in frontend.
We also display a clear placeholder to warn user that anything in this field
will be reflected on backend document (SO/Invoices).
task-1951231
closesodoo/odoo#32206
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>