Commit Graph
780 Commits
Author SHA1 Message Date
Andrea Grazioso (agr-odoo) 69aae687fc [FIX] website_sale: send confirmation email when no amount
As user access the ecommerce and add to cart a free product (0$ total)
Checkout and Confirm
No email will be sent for confirmation

This occur because the confirmation email is normally sent in the
transaction callback, which is not created when the amount is 0

opw-2440335

closes odoo/odoo#65235

X-original-commit: ed3e69df1564eca3becdc57181608bc0211ca4c5
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2021-01-28 17:33:23 +00:00
Goffin Simon 1bbd346e00 [FIX] website_sale: Payment terms in multi companies
Steps to reproduce the bug:

- Let's consider two companies C1, C2 and a website W1 in C1
- Set C2 on the payment term Immediate payment
- Go to the shop
- Add a product in the cart

Bug:

A traceback was raised because Immediate was not in company C1

opw:2431705

closes odoo/odoo#65066

X-original-commit: 48ec6f2e4f91e4d1317b246b7017f78746161450
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2021-01-26 13:36:51 +00:00
Andrea Grazioso (agr-odoo) 2af6d498e7 [FIX] website_sale: Check last sale order ship address before use
1. Create a shipping address
2. Place a SO through backend, and choose that specific delivery
address.
3. Archive that address
4. Place an Order through the website

It is defaulting to the previously archived address, and not to the active one.

opw-2411438

closes odoo/odoo#63668

X-original-commit: 3963e5f6d133eb367e5b24976aa4aff1bdd5d066
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
2020-12-21 18:33:53 +00:00
root 91f57b09dc [FIX] website_sale: compare id with id instead of record
Before this commit Odoo tries to compare an 'account.fiscal.position' id with an 'account.fiscal.position' record.
This causes a 'Comparing apples and oranges' warning in the logs and is not the right way to do this.
This is a fix for d89fa970e8e5b07f1b9a396e6ee02db7fdd136e4 where this issue was introduced

closes odoo/odoo#63029

X-original-commit: d9a1b28144523ece2c6fa4329f3ae4b7ff4a38ec
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-12-08 14:03:53 +00:00
Jeremy Kersten 0f29655481 [FIX] website: add missing rec_name
Override name_get to remove html from name

this commit clsoes #60204

closes odoo/odoo#62694

X-original-commit: f70f017a04c4d0e2aaf378cce9541b01b42ed0a7
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-12-01 15:11:33 +00:00
Benoit Socias 190eebca44 [FIX] website_sale: use image from first available variant if no default
Before this commit if a product template has no image, no image was
displayed in the website shop for the product

After this commit if a product template has no image, the image of the
first variant is displayed in the website shop

https://github.com/odoo/odoo/issues/52463

closes odoo/odoo#62440

X-original-commit: 643c8a9dce9455fe614f73ed97a793856e3608e7
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-11-26 16:14:21 +00:00
Swapnesh Shah 5e4e4836ed FIX] website_sale: prevent website with no pricelist in multi company
Followup on 911ada2d02b24778435fd9174441a6834da2effa

When modifying the company_id of a pricelist, the check to ensure a website
has a pricelist available wasn't triggered.

This commits ensures the Each website has Valid Pricelist with Correct or
Empty company.

Fixes #50707

closes odoo/odoo#62359

X-original-commit: f196430baa8c5e2ce403808adc26d90fe84665fa
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
2020-11-25 19:15:32 +00:00
Anh Thao Pham (pta) adf087f203 [FIX] website_sale: restrict types for displayable extra fields
- Install eCommerce
- Enable debug mode
- Go to Website > Configuration > Websites
- Configure Website by adding a Selection field in "Product Page Extra Fields" (i.e. Product Type)
- Go to Website and from Shop, open a Product
- In Customize menu, enable "Show Extra Fields" options
A KeyError is raised with "selection" key.

By using "selection" widget, the value is processed by SelectionConverter, which tries
to retrieve the text linked to the value by accessing missing "selection" dict in options.

As the feature was originally designed to support "char" and "binary" types, the selection
of extra fields displayable on eCommerce Product page will be restricted to these 2 types.

opw-2378753

closes odoo/odoo#62151

X-original-commit: 87ea687169c9a0047b41b11ab143544142c82aae
Signed-off-by: Anh Thao PHAM <kitan191@users.noreply.github.com>
2020-11-23 09:55:10 +00:00
Benoit Socias a5fc632682 [FIX] website_sale: find abandoned cart using specific delay per website
Before this commit the search for abandoned carts was always using a delay of
one hour if no ebsite in the context.

After this commit the search for abandoned carts uses the specific cart
abandoned delay configured for each website and the related public partner_id.

This commit closes #59709, #54932

closes odoo/odoo#61671

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-11-17 12:49:47 +00:00
Anh Thao Pham (pta) ae095de366 [FIX] website_sale: fix AccessError when checking fiscal position
An AccessError can be raised when checking Fiscal Position of user's last order
if connected user belongs to a different company than the company of the order.

opw-2370903

closes odoo/odoo#61022

X-original-commit: 1b602c1fef0f2d05c94a9547e203ae8ecd24e87b
Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
Signed-off-by: Anh Thao PHAM <kitan191@users.noreply.github.com>
2020-10-30 08:08:03 +00:00
Anh Thao Pham (pta) 06ca464458 [FIX] website_sale: fix fiscal position update in eCommerce cart
- Install website_sale
- Go to Website > Products > Products and create a Product with "Tax 15.00%" (i.e. Product X)
- Publish the Product on Website
- Go to Invoicing > Configuration > Fiscal Positions
- Create a first Fiscal Position:
  * Fiscal Position (Name): Fiscal Position A
  * Tax Mapping: Tax 15.00% => Tax 15.00%
- Create a second Fiscal Position:
  * Fiscal Position (Name): Fiscal Position B
  * Tax Mapping: Tax 15.00% => Tax 0.00%
- Create a Portal User (i.e. User X)
- Go to Contacts and edit User X to set his Fiscal Position to Fiscal Position A
- Connect with User X
- Go to online Shop and add Product X in the cart
- Open "My Cart" => Taxes are displayed correctly
- Process checkout and enter an address, but do not pay
- Disconnect
- Change Fiscal Position of User X to Fiscal Position B
- Reconnect with User X and open "My cart"
- Open "My Cart" => Taxes are displayed as if the Fiscal Position has not been changed
The prices and taxes in the cart are still based on the previous fiscale position.

To fix that, fiscale position of SO will be compared to fiscale position of user,
even if user has not changed.
Howerver, as it is a specific use case, it will only be done if "sale_order_id" is not
in session anymore.
Also the cart from user's last visit will not be reloaded, but a new one will be created,
as it is done when used pricelist is not available anymore.

opw-2300330

closes odoo/odoo#60587

X-original-commit: bd77d0ca35a0ab724d235aca989b9c2357a25caf
Signed-off-by: Anh Thao PHAM <kitan191@users.noreply.github.com>
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-10-23 07:48:09 +00:00
Laurent Stukkens (LTU) b5e611ba3d [IMP] website: add image widget support for urls char fields
* Prior to this commit, images were only managed when being an image
  field. No widget were used either.

* After this commit, image stored in model as url (as res.country.image_url)
  can be used when specifying ':image' after the field name. The fields are
  now rendered using their corresponding default widget. If there is a need
  to force another widget and if the developer is sure that it is compatible,
  he/she can specify it using the notation: 'field_name:widget_name'.

closes odoo/odoo#57645

X-original-commit: 18d4e3327c7152b4c3a86ba377e3357f213b703c
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-09-14 12:17:27 +00:00
Jeremy Kersten cbf8d3b304 [IMP] website: perf - cache public page
closes odoo/odoo#56331

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-08-21 17:50:00 +00:00
Raphael Collet a0d075955c [FIX] product: _compute_website_url 2020-08-20 13:39:04 +00:00
Martin Trigaux 6156f98288 [FIX] *: adapt action content retrieval
Use _for_xml_id to replace all the self.env.ref().read()[0]
This has the advantage of having a single point of control and to add
the fields filtering and model verification.

Add sudo for other operations on ir.actions.*
2020-08-17 09:09:02 +00:00
Victor Feyens fdb23e282b [IMP] *: wrong any() usage
Replace wrong usages of any(list|recordset), by any(generator)
to speed up computations, avoiding list creations and/or looping twice on a recordset
for nothing.

any([generator]) => any(generator)
any(filtered) => any(generator)

closes odoo/odoo#55768

Related: odoo/enterprise#12360
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-08-14 09:56:10 +00:00
Jeremy Kersten 09cb4533c2 [IMP] website_sale: allow to show extra field on product page
You can in website's settings, add some extra fields to be shown on the product
page.

E.G. if you want to have the internal code, the barcode, or even a custom field
In case of a binary field, 'Technical documentation' or 'Catalog', you will
have a dowload link.

closes odoo/odoo#55872

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-08-13 13:04:44 +00:00
Loan (lse) cfc066c323 [FIX] website_sale: Wrong terms and conditions in created SO
To reproduce (V12) using a fresh database with demo data:
 1. Install eCommerce and Sales
 2. Change Mitchell Admin settings so that he can see the 3 companies
 3. Go into Settings and set a distinct "Terms and Conditions" text for each companies
 4. Go the Website > Configuration, set "My website" to "Company_1" and save
 5. Go to the website shop and buy any items
 6. Find its corresponding Sale order (should be on Company_1)
=> "Terms and Conditions" used in the SO is the one of "YourCompany"

Analysis:
The terms and conditions are not specified in the SO creation,
so it runs the default value code to determine its value.
However the default code just ask to use the OdooBot company "Terms and Conditions".
https://github.com/odoo/odoo/blob/b6bf91d26b8fb45997b266c16be620d834a97cc7/addons/sale/models/sale.py#L121

OPW-2297114

closes odoo/odoo#55424

X-original-commit: 60565b5cd42da080e36fee5a94bcf8eafd15934d
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-08-04 16:32:08 +00:00
Rémi Rahir 4cddc49760 [FIX] website_sale: Fetch pricelist with proper rights
When a user with access to company A tried to make a purchase on the
website of company B, he would face a traceback upon calling `_get_pricelist_available`.
This happens because we eventually try to access to the current company
(B) while forcing environment of the user (in company A), thus
forfeiting the superuser privileges, which triggers
an access error.

closes odoo/odoo#54891

X-original-commit: 0c38d7f55a48175938803012907a66d394f6c5b3
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2020-07-24 10:29:18 +00:00
Jeremy Kersten 01c17707bd [IMP] website_[blog/shop/forum]: rename routes to remove 'useless' part
Url for a product become:
/shop/productname-id instead of /shop/product/productname-id

Url for a blog post become:
/blog/blogname-1/blogpost-1 instead of /blog/blogname-1/post/blogpost-1

Url for a question on forum become:
/forum/forumname-1/title-1 instead of /forum/forumname-1/question/title-1

task-2295016
2020-07-22 06:53:37 +00:00
Christophe Simonis 6d6250050f [FIX] website_sale: browse fiscal position in sudo
The tax mapping is only readable by internal users. As the calling
method can be used by portal routes, we should browse the fiscal position
in sudo mode.

closes odoo/odoo#54524

X-original-commit: 46e9a9683967600c55bf43895740fff1d61eb49b
Signed-off-by: Christophe Simonis <chs@odoo.com>
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-07-15 14:26:50 +00:00
Martin Trigaux ba244cef01 [IMP] *: replace to new _() syntax
Using a few regex like
\((_\(.*%s.*)(\) % )([\w\[\]][\w .\[\]\(\)'"]*)\)
($1, $3))

Old syntax is still compatible but starts the migration to the new
syntax that catches error.
2020-06-18 13:03:34 +02:00
Samuel Degueldre c058f19bfa [IMP] website_sale: let users create and edit custom product ribbons
Previously, there was only one static "Sale" ribbon. Users might want to
have many types of ribbons, for different levels of sales, or to
indicate that a product is sold out. This commit lets the user create
custom ribbons and use them on prodcuts on the shop page. Additionally,
setting a ribbon on a product used to require a reload, this is no
longer the case. All ribbon modifications are stored in a cache and the
RPCs to put them into effect are only done on save.

task-1981170
Part of odoo/odoo#47574

Related: odoo/upgrade#1079
Related: odoo/design-themes#219
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-06-10 11:44:33 +00:00
Thibault Delavallée 99c2c2ee1e [REF] digest: move template to QWeb
PURPOSE

Make digest email and tips more appealing. The goals of these tips are

  * to encourage the adoption of other apps (Did you know ?);
  * to make Odoo look more fun (Fun tips and tricks, young and dynamic style);
  * to show social proof and increase trust (emphasis on already existing
    projects / customers to);

SPECIFICATIONS

Digest now use qweb views instead of a standard mail.template record for
rendering as

  * template is very custom;
  * probability of breaking it while edition the mail template is high;
    it is easier to maintain and extend in qweb;
  * only body was really used, other mail-related fields were not used;

We therefore remove the mail template data and the field used for it on
the digest model. Template is now forced to a Qweb view.

We can also remove the template_id field. Indeed we think that having
different templates for digests is a really advanced use case we do not
want to support.

Finally kpis and action computation is rewritten. It now returns an unique
structure containing all information in a more neutral way, holding values
for 3 columns. Purpose is to be less date-oriented in data construct and
allow people to use digest qweb template to display a 3-columns KPIs content
even if not related to yesterday / last 7 days / last 30 days.

LINKS

Task ID 2197417
Community PR odoo/odoo#51619
Upgrade PR odoo/upgrade#1256
2020-06-04 15:20:08 +00:00
Andrea Grazioso (agr-odoo) 747aca10c1 [FIX] website_sale: wrong pricelist assign with geoip
1. Install eCommerce
2. Enable Pricelist settings
3. Choose a product P and enable it in the ecommerce view
4. Create 2 pricelists, for P with:
    - PL1: One with "Benelux" as country group with a price of X
    - PL2: One with a price of Y
5. Assign PL2 to the portal user (Joel Wilis) through "Website > Customer"
6. Connect as the portal user
7. Go into the ecommerce page of the product P

The pricelist PL1 is used instead of PL2, this occur because
geoIp localisation take priority over customer assigned pricelists.
Fixing filter by allowing pricelist with no country defined to be used

opw-2242152

closes odoo/odoo#51115

X-original-commit: aab3c03b2bdab97796e678d3f876ff64d5ecc4d9
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2020-05-12 15:43:31 +00:00
Andrea Grazioso (agr-odoo) 889b525178 [FIX] website_sale: prevent same sequence on duplicate
1) Have a [DEMO] product available on website.
2) Duplicate [DEMO] into several products.
3) Open the website ecommerce page
4) Go in edit mode
5) Click on one of the middle duplicates and go to
Customize -> Promote -> Push up

Item will not raise by one position but will be shifted randomly because
when duplicating the sequence number is copies so it will be the same
and this wil not work with the current resequencing algorithm which just
swap the sequence number to invert the positions.

Forcing copy=False on the attribute solve the issue

opw-2227976

closes odoo/odoo#50603

closes odoo/odoo#51039

X-original-commit: 2a3704ac56d1625d8b35df80202473ffee03beb2
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-05-11 13:11:56 +00:00
Jeremy Kersten 2344198765 [FIX] website: compute_url should depend of the lang
With this fix, record.with_context(lang='fr').compute_url will have the url
with the slug in french.

Before, it was ignoring the lang since the field was not translatable.
The first compute was stored in cache, and next call just ignore the lang in
the context.

```py
for lang in ['en_US', 'fr_FR']:
    print(record.with_context(lang=lang).website_url)

> "/my-name-1"
> "/my-name-1"
```

now

```py
for lang in ['en_US', 'fr_FR']:
    print(record.with_context(lang=lang).website_url)

> "/my-name-1"
> "/mon-nom-1"
```

closes odoo/odoo#50951

X-original-commit: 43822adef4ee4c44d10786f28af46df4be260cf5
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-05-08 15:55:08 +00:00
Jeremy Kersten 541205fbcb [FIX] website: _compute_pricelist_id compute on correct website
Before this fix, in case you try to compute the pricelist_id with another
context, the computed value is set to the website with the new context,
and so another cache.

Now with compute for the env from self, and assign the computed value with the
website with ot without another context.

Before this commit, you was unable to add fields pricelist_id or currency_id in
a tree view.

opw-2233122

closes odoo/odoo#50705

X-original-commit: 2f83c5bad94775a8f85e65c129afdcf503995ecb
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-05-05 18:47:13 +00:00
Victor Feyens e28b9ce4ca [FIX] website_sale: pricelist multi company
When modifying the company_id of a pricelist, the check to ensure
a website has a pricelist available wasn't triggered.

This commit ensures the check is done in this case, to avoid
the absence of any pricelist for a given website (which breaks /shop).

Fixes #50707

closes odoo/odoo#50760

X-original-commit: 911ada2d02b24778435fd9174441a6834da2effa
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-05-06 13:22:11 +00:00
Swapnesh Shah d64c8fa304 [FIX] website_sale: display validation properly
Before this commit, This validation message was not displayed properly. (See https://nimb.ws/OwfLsH )

Now we are displaying Validation error Properly. (See https://nimb.ws/ji3N2h )

closes odoo/odoo#50704

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-05-05 18:46:18 +00:00
DramixDw 9b9829416b [IMP] website: simplify website menu
Some apps, once installed, automatically create a menuitem in website.
What complexify the UI and create useless menu withtout plusvalue.

It is not because you install livechat to make support online, that you want
a link in your menu to show stats e.g.

Now we remove the default menu created, and help user to find it when he create
a link. The autocomplete suggest most of the main App's controllers

task-2189613

closes odoo/odoo#49081

Related: odoo/enterprise#9733
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-05-01 07:59:07 +00:00
Victor Feyens 6fd2d9b898 [FIX] product,website_sale: partner pricelist fallback
When no pricelist property is defined for a customer, we use a search as
fallback, without considering the current companies.

This means you can see the pricelist of company B as pricelist for a
partner, even with company A as main current company (if both company
are enabled in the multi-company widget).

Forward-Port of #46429

X-original-commit: 68040c92c8e09218641d823d690e0ce36dcdef30
2020-04-16 11:48:56 +00:00
Nicolas Lempereur dbb0222d63 [FIX] {website_,}sale: no salesperson better than customer
Before 13.0, when there is no salesperson on the customer or company or
website, when a ecommerce sale order is done we get the OdooBot as
salesperson because we update partner on sale order in superuser.

In 13.0, since superuser doesn't change UID, the salesperson will be
assigned to "Public User" or the customer that create this order.

opw-2232201
closes #49141

closes odoo/odoo#49161

X-original-commit: 0b6a2569920b6584652c39b3465998649fe305b4
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2020-04-07 14:51:40 +00:00
fja-odoo 388c222c6c [IMP] base, *: allow html fields not to sanitize forms
* = event, website_event_track, website_sale, website_hr_recruitment,
website_livechat, website_sale, website_slides

The option to sanitize or not the forms was not available, this will
allow better flexibility on whether forms should be sanitized or not on
an HTML field.
Also we use this new param to allow forms to be added on some already
existing html fields where forms where sanitized out.

task-2209554

closes odoo/odoo#47318

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-03-31 14:22:43 +00:00
fja-odoo 25025a886c [IMP] website_sale: add default sequence to category
New categories will now we added at the end by default.
The sequence field is hidden in the form view.
It's still possible to order them from the list view.

Part of task-2002125

Closes #25535

Co-authored-by fja-odoo <fja@odoo.com>
Co-authored-by Sébastien Theys <seb@odoo.com>

closes odoo/odoo#46600

Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
2020-02-28 16:20:15 +00:00
Nicolas Martinelli faac525e62 [FIX] website_sale: get correct fiscal position
Make sure `force_company` context key is set on the SO in all cases.
Indeed, when the context key is not properly set, an incorrect fiscal
position can be retrieved in:

https://github.com/odoo/odoo/blob/cc557f1e4de88466d0d159c5edf1a606a0c0bc6f/addons/account/models/partner.py#L99-L100

This is for example the case when we go through the route
`/shop/confirm_order`.

opw-2186682

closes odoo/odoo#44451

closes odoo/odoo#44933

Original-signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
X-original-commit: 5691e733e2d860baa012140fc35d3f39ddf747c8
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-02-10 09:00:15 +00:00
Jorge Pinna Puissant 271a4b79a3 [FIX] sale, website_sale: salesperson emails from assignation of online so
- install e-commerce;
- In the website settings, orders followup, set a salesperson;
- By something as a public user;
- Pay the order.

Before this commit:
- 2 emails where create to assign the salesperson to the SO, but these
    emails didn't have a from and the salesperson didn't receive the
    emails.
- 1 email was also create to assign the salesperson to the contact, this
    mail is not necessary.

Now, only one email that assigns the salesperson to the SO is sent,
with a correct from address.

opw-2189683

closes odoo/odoo#44861

X-original-commit: 7c08eb158858b9573d3d84a0b54df0bfca754105
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2020-02-07 13:19:27 +00:00
Hiral Bhavsar 07d4bbb35b [FIX] sale_product_configurator, website_sale(_wishlist): fix multicompany issue
Currently, we are allowing to select the other company's product as
an alternative product or accessory products on the product.

For example,
	website: W1, W2
	company: C1, C2

	W1-> C1
	W2-> C2

	Product: P1
	===========
		company: C1

	Product: P2
	===========
		company: C2
		alternative product: P1

And this will give a traceback because we are going to use another company's
products. And this is obviously a wrong behavior.

That's why put a specific domain on the alternative, accessory and optional
product fields to fix this multi-company issues.

Now product wishlist will be also a company-specific.

task-2070522

closes odoo/odoo#44011

X-original-commit: 800abfc7baa8461f6b7b5ece95fa7700d3cd872a
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
2020-01-27 14:26:00 +00:00
Goffin Simon ffde4c8f89 [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>
2020-01-15 15:26:59 +00:00
nje-odoo 087131fe54 [FIX] sale_timesheet, website_sale: fix UI and tooltip typos
task-2121584

closes odoo/odoo#41339

X-original-commit: 565f42cb0ac32185cfaed1454a0fda2a54b3bec2
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2019-12-04 10:36:19 +00:00
Nicolas Lempereur aff4b58c1f [FIX] website_sale: delete child category on parent
In the case of deletion with `ondelete="set null"`, return_path of
children of deleted record will not have return_path updated.

So remove the children recursively.

Another fix was done in 13.0 to avoid most issue in 6d5cd8b1d19.

opw-2148046
closes #41075

closes odoo/odoo#41178

X-original-commit: 6d5cd8b1d194fb173c486355c89d2ce503fd0ba4
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-12-02 14:29:21 +00:00
Thibault Delavallée 5649fc88e8 [REF] {website_}mail: move and replace published field of mail.message to is_internal
PURPOSE

Clean posting process and improve mail.message definition and comprehension.

SPECIFICATIONS

Website mail defines a website_published field allowing to publish / unpublish
comments on the frontend of some modules. This field has several drawbacks :

  * it is used only for front-end people (portal, public) and has no real
    effect in chatter / classic discussions;
  * it is used only in some advanced front-end module and is not available
    in portal by default;
  * its naming is not really correct as it is not linked to fields coming
    from the website_published mixin and its behavior is not really
    the same;
  * its use is a bit duplicated with internal flag coming from subtype
    allowing to hide messages related to an internal subtype;
  * there are overrides of standard mail.message methods just to handle
    this flag;

In this commit we change that field by an is_internal flag directly on
mail.message model itself. It tells if share people (customers, share users)
are allowed to read the message. This field can be given through posting
API or set manually using widgets. It is also used in access rights custom
methods and managed like the internal flag of subtypes.

Mailgateway was already using an internal flag for internal note replies. It
is renamed to is_internal and propagated as it is now a standard field. It
also eases code understanding.

Portal is updated to allow managing the flag directly. It means customer portal
now natively allows to moderate customer comments without any need of website
modules.

Rating is updated accordingly. An is_internal field is added, replacing the
related on website published.

LINKS

Task ID 2071556
PR #38692
2019-12-02 15:18:44 +00:00
Xavier Morel de52631795 [REM] website_sale: dynamic domain
closes odoo/odoo#40962

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-11-27 13:41:49 +00:00
Goffin Simon c1c4404131 [FIX] website_sale: Wrong price_unit in the cart
Steps to reproduce the bug:
- Let's consider two companies C1 and C2
- Let's consider website W
- Activate multi-company
- Disable common contact book and common catalog
- Switch the superuser in company C2
- Activate pricelist
- Create a public pricelist PL for C1 and available on W
- Set up a pricelist with compute price = formula and  based on = cost
- Go Sales > Configuration > tick Multiple Sales Prices per Product and tick Prices computed from formulas
- Create a portal user PU and set PL on him
- Create a product P with cost = 10$ and publish it on W
- Set up the product valuation as: automated
- Log as PU and go on the shop
- Put P on your cart

Bug:

The price of P was 0$ instead of 10$

opw:2092695

closes odoo/odoo#40981

X-original-commit: 40d3fa50e3d9a0e1cc0077cc8dcbe052ffa9820f
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-11-28 10:10:16 +00:00
Victor Feyens 600d0707ae [IMP] *: use get_fiscal_position and not property_account_position_id.
And adapt to get_fiscal_position changes

closes odoo/odoo#40336

Related: odoo/enterprise#6840
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2019-11-20 14:42:07 +00:00
Victor Feyens 81245528d1 [IMP] account: get_fiscal_position returns a recordset 2019-11-20 14:42:07 +00:00
Victor Feyens 9215e73fa2 [IMP] * : replace with_context(force_company=c) by with_company(c) 2019-11-18 12:25:05 +00:00
Goffin Simon 6bc1de5276 [FIX] website_sale: Wrong price_unit in the cart
Steps to reproduce the bug:
- Let's consider two companies C1 and C2
- Let's consider website W
- Activate multi-company
- Disable common contact book and common catalog
- Switch the superuser in company C2
- Activate pricelist
- Create a public pricelist PL for C1 and available on W
- Set up a pricelist with compute price = formula and  based on = cost
- Go Sales > Configuration > tick Multiple Sales Prices per Product and tick Prices computed from formulas
- Create a portal user PU and set PL on him
- Create a product P with cost = 10$ and publish it on W
- Set up the product valuation as: automated
- Log as PU and go on the shop
- Put P on your cart

Bug:

The price of P was 0$ instead of 10$

opw:2092695

closes odoo/odoo#39638

X-original-commit: b49bf15040748200ad68b557ccdc96eed46c3464
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-10-31 11:35:22 +00:00
jvm-odoo c22b5a7f4d [FIX] website_sale: fix ecommerce product variant image
On the e-commerce app, you can add product variants.
Those variants can have extra-image.

Before this commit:

    - The variants extra image are displayed on every product of the
      same type and they are duplicated on the product variant.

After this commit:

    - They are displayed only on the concerned product variant,
      without duplication.

OPW-2088261

closes odoo/odoo#39502

X-original-commit: 8efaa086db271cde792da77bca7a95a0d593df4d
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2019-10-29 10:55:17 +00:00
Nans Lefebvre da76c7c47b [FIX] website_sale, website_sale_product_configurator: fix cart update
Commits df2ea31ff6 and 55ed70f405 moved things around,
"without any functional change".
They made it so that if you add twice a product to the cart,
they are added in different lines instead of merged.

There are two issues:
- the `if line_id: return lines` made sense when the post-filtering
was in the same function, since it could readily be avoided
- conversely the post-filtering was avoided in the function that was added with
the only goal to do it, except in the case where it was useless
(the case where lines is an empty recordset).

opw 2083729

closes odoo/odoo#38938

X-original-commit: c9c0a0c322f02974bc6395410ca3d7213899c7e0
Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-10-17 10:58:24 +00:00