Florian Charlier 3509ddf3ed [FIX] website_forum: prevent calling vote on multi
This method was supposed to work in multi (see history) but that
behavior was lost somewhere.

Voting for several posts at the same time doesn't mean much in the end
and the function wouldn't work anyway because:

1. Return values wouldn't work in multi
2. It would try to vote n times for each of the n posts in self and
  violate unique constraint.
3. If the last existing vote had opposed value to the new vote,
  the method would create only '0'-valued votes for all the new
  records.

We here then clean it make sure it is not called on several posts.

A test is extended to check votes and records counts.

Task-3267872

closes odoo/odoo#123725

X-original-commit: dc049ce98292e08f5ecf2f20005dc227375dde75
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Florian Charlier (flch) <flch@odoo.com>
2023-06-05 17:51:40 +02:00
…
…

Build Status Tech Doc Help Nightly Builds

Odoo

Odoo is a suite of web based open source business apps.

The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...

Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.

Getting started with Odoo

For a standard installation please follow the Setup instructions from the documentation.

To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials

S
Description
No description provided
Readme LGPL-3.0
3.4 GiB
Languages
Python 49.6%
JavaScript 47.8%
SCSS 2%
CSS 0.3%
HTML 0.2%