Commit Graph
3391 Commits
Author SHA1 Message Date
Mitali Patel 74c5c00aff [IMP] sale, website_sale : improve emails sent on confirmation and payment
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
2019-05-09 14:58:21 +00:00
Rishabh Jadia 1e3310d923 [MOV] website_sale: removed the website_sale_link_tracker module and moved it to the website_sale.
Task Id #1929272
2019-04-30 04:55:20 +00:00
Sébastien Theys ec436c75e4 [IMP] website_sale: center images in cart popup and right panel
If the images are not all square, it looks better if they are centered.

task-1958000
PR: #31811
2019-04-29 13:45:34 +00:00
Sébastien Theys e479138558 [IMP] tools,base: merge all image tools
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
2019-04-29 13:45:03 +00:00
Sébastien Theys d870877967 [IMP] tools,base,web,website_*: keep image ratio on resize
* = 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
2019-04-29 13:45:03 +00:00
Romain Derie 01d1cf35bb [FIX] website_sale: fix pricelist GeoIP
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.

closes odoo/odoo#32961

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-04-26 08:02:07 +00:00
jpr-odoo 3d204d063f [IMP]account, website_sale: improvement into the invoice form view
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
2019-04-12 09:04:26 +00:00
Thibault Delavallée 0b74c9ab6e [FIX][IMP] various: improve recipients computation in mail templates
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
2019-04-23 14:26:50 +00:00
Romain Derie d2ed857608 [FIX] website_sale: fix website_sequence
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

closes odoo/odoo#32593

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-04-16 13:19:32 +00:00
Jigar Patel 8cd6effa7f [IMP] website_sale: add default attributes for 'Create a Customer' form
task-32212
2019-04-19 10:39:21 +00:00
Jeremy Kersten 8d64971e99 [FIX] website_sale: some quick fix related to odoo/odoo@1537b475b0
iframe autoclose failed
bad label for
typo

closes odoo/odoo#32740

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-04-16 15:27:32 +00:00
Romain Derie 0034fd14f1 [FIX] website_sale: flag tests as post_install
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.

closes odoo/odoo#32727

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-04-16 13:52:53 +00:00
Rohan Patel 2869750e0f [IMP] website_sale: add new button for buy now on eCommerce
task-1928466

closes odoo/odoo#32440

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-04-16 13:26:11 +00:00
Dharmraj Jhala 1537b475b0 [IMP] website_sale: showcase product videos on eCommerce
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

closes odoo/odoo#32298

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-04-16 10:34:49 +00:00
Parth Choksi 378d7478b6 [IMP] website: improvements in SEO dialog
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

closes odoo/odoo#32449

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-04-05 11:34:19 +00:00
Priyanka Kakadiya facacc3c19 [IMP] website_sale: make tour tooltip more visible
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

closes odoo/odoo#31400

Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2019-04-16 09:10:32 +00:00
Christophe Simonis 0a09a4d8a8 [MERGE] forward port branch saas-12.3 up to 120359bf0c 2019-04-12 13:37:44 +02:00
Christophe Simonis 3f95b074e9 [MERGE] forward port branch saas-12.2 up to f2be461f09 2019-04-05 18:46:10 +02:00
Christophe Simonis f2be461f09 [MERGE] forward port branch saas-12.1 up to f2d0995362 2019-04-05 10:50:56 +02:00
mgh-odoo b993a2d9c8 [IMP] website_sale: restrict deleting/archiving pricelist for ecommerce
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>
2019-04-10 06:49:37 +00:00
Christophe Simonis d32420397d [MERGE] forward port branch 12.0 up to 251021796c 2019-04-04 11:20:03 +02:00
Christophe Simonis 27ea18a21b [FIX] website_sale: correctly convert currency
Oversight of previous forward-port.
2019-04-03 20:27:50 +02:00
Christophe Simonis f36175dd8f [MERGE] forward port branch saas-11.3 up to b3d4c2d178 2019-04-03 18:46:36 +02:00
Aurélien Warnon eec46c4774 [FIX] (website)_sale: fix p. configurator related tours
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.

closes odoo/odoo#32368

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-04-04 08:47:37 +00:00
Christophe Simonis 1122b62d00 [MERGE] forward port branch 11.0 up to 4df568549a 2019-04-02 16:35:17 +02:00
Nicolas Martinelli 180866fe1e [FIX] website_sale: discount
- 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

closes odoo/odoo#31965

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-04-02 07:43:06 +00:00
Xavier Morel 265926f971 [IMP] website_sale: overhead on every page
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)

closes odoo/odoo#32492

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-04-08 11:40:08 +00:00
Juhil Somaiya 5a9530cdfd [IMP] account, payment, sale, website_sale: added extra fees on payment
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
2019-04-09 06:44:48 +00:00
Odoo Translation Bot 18c735361a [I18N] Update translation terms from Transifex 2019-03-31 06:20:38 +02:00
Christophe Simonis 28cce6ce3a [MERGE] forward port branch saas-12.1 up to c0cf4049b2 2019-03-29 19:47:46 +01:00
Christophe Simonis 2a06f4dcf3 [MERGE] forward port branch 12.0 up to 09fb2469b4 2019-03-29 18:10:57 +01:00
Odoo Translation Bot 48d88b6e6d [I18N] Update translation terms from Transifex 2019-03-31 03:16:57 +02:00
Nicolas LempereurandRomain Derie a4ce56fe56 [FIX] website_sale: pricelist ecommerce 1st install
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>
2019-03-29 14:49:02 +00:00
Martin Trigaux 0f6038e777 [I18N] *: export 12.0 source terms
Some changes were not reflected in 12.0.
Changes made in .pot in previous versions were not forward ported

Closes odoo/odoo#32238
2019-03-29 10:39:17 +00:00
Toufik Ben Jaa a3cdfdc628 [FIX] website_sale: _is_available_on_website access rights issues
- 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.

closes odoo/odoo#32123

Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
2019-03-26 10:15:43 +00:00
Swapnesh Shah ec2b4889f9 [FIX] website_sale: Access one order to generate token
closes odoo/odoo#32032

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-03-22 04:31:49 +00:00
Odoo Translation Bot 1b932b339a [I18N] Update translation terms from Transifex 2019-03-24 06:23:04 +01:00
Sébastien Theys b46cdbbda4 [FIX] website_sale: fix forward-port of product configurator
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.

closes odoo/odoo#32041

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-03-22 11:03:31 +00:00
Christophe Simonis 4eff0af02e [MERGE] forward port branch saas-12.1 up to 6878c9f342 2019-03-21 13:58:37 +01:00
Martin Trigaux 04370bff18 [I18N] export saas-12.2 source terms
closes odoo/odoo#31985

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-03-20 14:59:50 +00:00
Christophe Simonis c50d7d6bc5 [MERGE] forward port branch 12.0 up to 82c4393fd0 2019-03-19 15:14:23 +01:00
Johan Demaret RivarolaandMarius Stedjan 36435b4ad7 [FIX] website_sale: fix authorized message
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>
2019-03-18 09:58:45 +00:00
Christophe Simonis ff1bca32f3 [MERGE] forward port branch 12.0 up to a26496b6e7 2019-03-14 17:43:32 +01:00
Christophe Simonis 9a4e84ae66 [MERGE] forward port branch saas-11.3 up to f5ab04ce50 2019-03-14 14:13:47 +01:00
Christophe Simonis bbedcdb190 [MERGE] forward port branch saas-12.1 up to ff1bca32f3 2019-03-14 19:44:55 +01:00
Christophe Simonis afe8e97800 [MERGE] forward port branch 11.0 up to c23d1186e7 2019-03-13 16:52:40 +01:00
Christophe Simonis c23d1186e7 [MERGE] forward port branch saas-15 up to 21ef0f4f6d 2019-03-13 16:15:34 +01:00
Christophe Simonis 21ef0f4f6d [MERGE] forward port branch saas-14 up to d5a8b238fa 2019-03-13 16:06:34 +01:00
Christophe Simonis d5a8b238fa [MERGE] forward port branch 10.0 up to 49ca43d75c 2019-03-13 13:23:43 +01:00
Juhil Somaiya 6f42b5ed0f [IMP] website_sale: make 'description_sale' editable in frontend
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

closes odoo/odoo#32206

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-04-05 04:50:32 +00:00