The variants on a product in the ecommerce can appear:
- naturally, not a list, colored square for color, ...
- in a list of radio button.
To have the second kind, we need to enable the "List View of Variants"
customize option.
One part of the code was not the same which cause an issue when saving
the image of the variant, it was saved on the product.template instead.
This commit add an "update_product_image" function which is now called
in both scenario.
first half of:
opw-654279
forward port note: in 9.0 website/image -> web/image
When clicking on button "add_to_cart" for a product with several options,
the user must be redirected to the product page. In this way, the user can
choose the options, he wants to buy with the product before adding the product
in the cart.
opw:653356
Previously, if there was a sale_order_id but it was wrong,
like when the sale order was deleted for example, the function
didn't return a sale order, even with force_create=True.
It used to pass the first 'if' as sale_order_id had a value, so
no new sale order was created. However, as sometimes the id was
referring to a non-existant sale_order, a sale_order.exists() test
was used later, resulting in the function sometimes returning None,
even with force_create = True.
Proposed solution is to test the existence of the browse record with
the given id earlier, instead of testing the existence of the id itself.
To show the website_sale.modal, the product_variant_ids must be in the DOM
because all the prices are computed with the product_variant_ids.
From commit 0ff26cf
opw:650167
When ordering on the ecommerce,
if a payment transaction was found in the session,
this transaction was used as transaction for the current order.
Nevertheless, if the transction is no longer linked to
the current order, we should not use it.
This happened, for example, when the quotation
was deleted while the customer/user didn't close
its browser, and the transaction id was therefore
still in its session.
opw-650417
[FIX] Valuable checkout hooks for website_sale
[FIX] Values might need to be changed for different field mappings
[FIX] Make definition of form fields inheritable within a function
[FIX] Make shipping_info values available for inherited module manipulation
Close#8490
As eCommerce is not complete and could be improved easily and was
not working anyway until
9d0cb024fd
- Use EAN13 instead of internal product id if available
- Add tax to transaction data
- Add shipping costs if available to transaction data
Product pages ulrs can be indexed by searches engines.
The product category can be included in the url.
If the category has been deleted, accessing
this page should still work anyway
opw-648008
f26b94f had as goal to filter the taxes of the product
according to the company when the sale.order
was created/edited as SUPERUSER_ID
(Who ignores the record rules).
Unfortunetaly, to filter the taxes,
it used the company of the customer,
while it's actually the company of the order which
should be used.
Indeed, for instance,
partners can be shared among all companies.
It was way less simple to access the company
of the sale.order, this parameter being
not available in the on_change method signature.
This is the easiest way to solve this issue
without breaking the API / retro-compatibility.
opw-647819
When placing an order in the ecommerce, it's
seems obvious that the partner is a customer.
Nevertheless, It wasn't flagged as such in
its partner from, preventing
to see him in the customers list
Fixes#2422Closes#2881
Firefox keep in cache the value of input.
So, when we delete a product line and call location.reload(), firefox
remember the value and state of this input and don't refresh with the new
value.
Adding True as param (forceReload) fixes the problem since it doesn't
use old value. Another way will be to add autocomplete="off".
ForcedReload (Optional): Is a Boolean flag, which, when it is true, causes the
page to always be reloaded from the server. If it is false or not specified,
the browser may reload the page from its cache.
This closes#7888#3342#7491
Remove terms that should not have been in .pot file.
For most of the terms, it is due to the content of <attribute/> tag and fixed
at rev 4e572e351eb in master
Other terms are in translate=off tag so woll no longer be present a next export.
If the price in a price list line is based on "Supplier Prices on the product form",
the model "product.supplierinfo" and "pricelist.partnerinfo" must be readable by the
public user.
opw:645709
If the variants are displayed by list of attributes, the image of a
product displayed would be updated to the image of the first variant.
But this was not done when using the customizing option "List View of
Variants".
opw-645729
4adb4b8d15
corrected the fact the quotation email
wasn't sent if you did not come back
from the payment provider
(when you closed your browser after
the payment but before coming back
to Odoo).
Before the above revision, the quotation
email was sent for payment methods
not redirecting to payment providers,
like transfers. It was no longer the case
with the above revision.
This revision re-introduces this behavior:
If there is a feedback from a transaction,
but the transaction isn't confirmed,
we send the quotation email without confirming
the sale order, like it was the case before
opw-644670
Not just when coming back from the payment provider to the
payment validation route `/shop/payment/validate`.
Otherwise, if you do not come back from the payment provider
page, that you quit just after having paid but just before
being redirected to Odoo, you do not receive the email.
The change within the `sale` module, while this issue concerns
`website_sale` only, has been accepted because this is a mechanism
that could be used by other modules.
opw-644348