diff options
| author | Goffin Simon <sig@odoo.com> | 2020-01-15 12:29:21 +0000 |
|---|---|---|
| committer | Goffin Simon <sig@odoo.com> | 2020-01-15 15:26:59 +0000 |
| commit | ffde4c8f897d992b391be2f223d0fbb53900af5d (patch) | |
| tree | f57f8782a75fae173e027ad984e95588c9f0eb2f | |
| parent | f08204c69c684a6614bbbebc834178355b4aad03 (diff) | |
[FIX] website_sale: Creating an account on the eCommerce
Steps to reproduce the bug:
- Go to Settings > General Settings
- Set "Customer Account" on "Free sign up"
- Go to Website > configuration
- Activate "Digital Content"
- Create a fiscal position FP with a coutry group CG and applied automatically
- Create a service product P with digital content DC at sales price = 0
- Publish P on the website
_ Log out and go to the shop with public user
- Add P in your cart
- Process the your Order in the shop
- When the order is confirmed, click on "Downloads"
- You will be redirected to the login page
- Click on "Don't have an account?"
- Fill in the form and sign up
Bug:
Nothing happened because in function sale_get_order in model 'website'
the partner on the confirmed SO was not the same as the new one and so
update_pricelist was set to True and a call to function _cart_update was
done on a confirmed SO. Inspired from function _cart_update in model
'sale.order'.
opw:2146902
closes odoo/odoo#43362
X-original-commit: 1f6a4e56442ba5531f87269ab032f99218fc45a2
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
| -rw-r--r-- | addons/website_sale/models/website.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/website_sale/models/website.py b/addons/website_sale/models/website.py index 147e024fd61..20926b8c8aa 100644 --- a/addons/website_sale/models/website.py +++ b/addons/website_sale/models/website.py @@ -328,7 +328,8 @@ class Website(models.Model): # check if the fiscal position has changed with the partner_id update recent_fiscal_position = sale_order.fiscal_position_id.id - if flag_pricelist or recent_fiscal_position != fiscal_position: + # when buying a free product with public user and trying to log in, SO state is not draft + if (flag_pricelist or recent_fiscal_position != fiscal_position) and sale_order.state == 'draft': update_pricelist = True if code and code != sale_order.pricelist_id.code: |
