Usecase to reproduce:
- Install stock with demo data
- Go on drawer form view.
- The quantity forecasted and the report for forecasted quantity do not
indicate the same quantity
It happens because the quantity on forecast is wrong. It's due to the
part that select the quants. The condition wh IS NOT NULL remove all
the quants. Also using a not null on a table is probably not a good
practice.
Also complete the request is order to take quants in transit
closesodoo/odoo#49941
X-original-commit: 405522de1f97cfb7571d6096f727a4a2d03561d6
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
There are bytecode operations we don't support because we've never
needed them, and there are bytecode operations we don't support
because they're vectors of security issues.
Currently no difference is being made between the two, so when looking
to add a new opcodes it's hard to know whether it's been considered
and rejected or whether it just hasn't been considered (or found
useful) yet.
Add an explicit blacklist, which is explicitly subtracted to all
opcodes lists, to allow motivating the bans of certain
opcodes. Opcodes listed in no lists are the "graylists" of opcodes we
either haven't yet considered or have not had a use for.
Also cleanup the existing lists of opcodes to remove long-gone (or
even never-existing) opcodes, and add a few missing opcodes:
* DUP_TOPX was removed from Python 3, replaced by DUP_TOP_TWO
* STORE_MAP was removed in Python 3.5
* BINARY_DIVIDE and INPLACE_DIVIDE were removed from Python 3 (they
were used to invoke P2's integer division)
* the SLICE+<X> were removed from Python 3, which only uses
BUILD_SLICE
* CALL_FUNCTION_VAR and CALL_FUNCTION_VAR_KW were removed in Python
3.6 and functionally replaced by CALL_FUNCTION_EX (bpo-27213)
* JUMP_IF_FALSE and JUMP_IF_TRUE were removed back in 2.7, replaced by
POP_JUMP_* and JUMP_*_OR_POP (bpo-4715)
* various finally-related bytecode instructions were added to Python
3.8 to improve and speed up the handling of return, break and
continue (bpo-17611).
* INPLACE_REMAINDER, INPLACE_LEFTSHIFT and INPLACE_RIGHTSHIFT were
mentioned in PEP 202 but never actually implemented: INPLACE_
instructions were intended to mirror the BINARY_ instructions, these
mnemonics didn't match the BINARY_ ones, so the actual mnemonics are
INPLACE_MODULO, INPLACE_LSHIFT and INPLACE_RSHIFT
* while at it, BINARY_ and INPLACE_ mnemonics: as noted above they're
mirrors of one another with different prefixes (except for SUBSCR
which doesn't have an INPLACE version), we only supported a fraction
of the INPLACE codes for unknown reason.
Initially looked at simply aligning the BINARY and INPLACE mnemonics
e.g.
'BINARY_POWER', 'BINARY_MULTIPLY', 'BINARY_FLOOR_DIVIDE',
'INPLACE_POWER', 'INPLACE_MULTIPLY', 'INPLACE_FLOOR_DIVIDE',
...
so it would be easier to notice discrepancies, but it seems simpler
and clearer to just move the suffixes to a single list and generate
the BINARY_ and INPLACE_ mnemonics from that
* moved STORE_SUBSCR from EXPR to SAFE, I don't see how `foo[...] = 3`
could be in an expression
* remove pseudo-graylist `_POSSIBLE_OPCODES_P3`, was intended as a
list of new P3 opcodes we might want to add, but the purpose was
hard to understand and a proper blacklist makes way more sense
closesodoo/odoo#41085
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
Before this commit, selecting an unsplash image on website, then going
on a product page and selecting that same image in the media-dialog
would not work, and upon saving, the image would be the image
placeholder.
A previous fix in odoo/odoo#31328 added handling so that you could
choose unsplash images for a product, but it failed to account for
unsplash images that had already been added on a public view (for
example on a website page), which the user can choose in the
media-dialog.
This was caused by the fix only searching for the unsplash attachment on
the current model, and not among public attachments, resulting in an
empty search result.
This commit fixes that by adding that the attachment we are looking for
should either be on the current model, or be a public attachment.
closesodoo/odoo#49937
X-original-commit: 196d6b1630fa443bc1d143f76f62f7a719ca4930
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
PURPOSE
Have a cleaner test_mail addons
SPECIFICATIONS
Keep only mail-related tests, move odoobot in test mail full, send "update
notification" tests in mail (specific to mail). Merge some test files to
lessen number of files, perform light file renaming.
Split test mail models file to prepare some cleaning in those models and tests.
Keep only mail-related tests, move odoobot in test mail full, send "update
notification" tests in mail (specific to mail). Merge some test files to
lessen number of files, perform light file renaming.
Split test mail models file to prepare some cleaning in those models and tests.
LINKS
Prepares Task ID 2238597 (clean notification models)
Prepares Task ID 2083854 (improve mass mailing technical flows)
PR #49891
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
In this commit we order fields more logically to ease reading and prepare
future modifications. We also rename the class and some field strings to
be more user friendly.
LINKS
Prepares Task ID 2238597 (clean notification models)
Prepares Task ID 2083854 (improve mass mailing technical flows)
PR #49891
Co-Authored-By: Rémy Voet <ryv@odoo.com>
Co-Authored-By: Thibault Delavallée <tde@odoo.com>
PURPOSE
Have a cleaner test_mail addons
SPECIFICATIONS
Umbrella -> Container, easier to understand that we target a ticket / project
like model using mail.test.ticket and mail.test.container .
LINKS
Prepares Task ID 2238597 (clean notification models)
Prepares Task ID 2083854 (improve mass mailing technical flows)
PR #49891
PURPOSE
Have a cleaner test_mail addons
SPECIFICATIONS
Keep only mail-related tests, move odoobot in test mail full, send "update
notification" tests in mail (specific to mail). Merge some test files to
lessen number of files, perform light file renaming.
Split test mail models file to prepare some cleaning in those models and tests.
LINKS
Prepares Task ID 2238597 (clean notification models)
Prepares Task ID 2083854 (improve mass mailing technical flows)
PR #49891
The name of the employee and the dates were shown multiple times in the
popover. This commit aims at showing the relevant information only once.
closesodoo/odoo#49845
Taskid: 2227158
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
During the upgrade of some databases to 13.0, the following traceback
was reported:
`psycopg2.errors.AmbiguousColumn: column reference "product_id" is ambiguous`
This commit fixes this issue by prefixing product_id with the table name alias 'm'.
closesodoo/odoo#49927
X-original-commit: 0e3c5d3ee1726db2641cd683a84fe59e867d4319
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
Set the padding on the write for date. Modify the text to be consistent
with the manual and automatic orderpoint. Explains the min, max
and quantity to order mechanism.
closesodoo/odoo#48536
Task: 2161378
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
Allow to set a BoM or a vendor on an orderpoint. In this case it's
passed to the values and will be processed by _run_buy and
_run_manufacture to use them.
Task: 2161378
Technicaly it's anoying to create orderpoint and explicitely
set the product_min and product_max to 0.0. If another value
should be use, it would probably not be forgotten.
Task: 2161378
PURPOSE
Have a cleaner test_mail addons
SPECIFICATIONS
Keep only mail-related tests, move odoobot in test mail full, send "update
notification" tests in mail (specific to mail). Merge some test files to
lessen number of files, perform light file renaming.
Split test mail models file to prepare some cleaning in those models and tests.
LINKS
Prepares Task ID 2238597 (clean notification models)
Prepares Task ID 2083854 (improve mass mailing technical flows)
PR #49891
Usabilty. Move the route button under the route params.
People had issue with route and didn't know that this
report exist. We hope that moving it under the route will
help user to configure their route.
Task: 2161378
Set a default route on orderpoint created by the replenishment report.
First it select the first route on the product if it exists (it's
uselss since it's a preferred route on the report but it's used for
clarity). If the product has no route then it tries to guess it
with vendor pricelist or BoM on the product.
Task: 2161378
New report to easily order missing products in each warehouse.
Orderpoint have a new type: 'manual'. Manual orderpoint are not
trigger by the scheduler but the user could create replenishment
from the report directly. The report use the forecast report in
order to detect missing quantity for today (it does not search
depending the lead time for each product warehouse due to lake
of performance). It compares missing quantity with incoming RFQ
and other ongoing orderpoint. If it still missing a new entry
for replenihsment is created (it's also automaticaly deleted if
the replenihsment has been done another way).
Task: 2161378
_search_rule on procurements search in a specific way in this order:
- First: route passed in the procurement values
- Second: route on product/product category
- Third: route on warehouse
- Fourth: remaining route.
However _get_rule doesn't allow to simulate the first usecase with
the route on procurement. This commit add the functionality.
(Usefull for replenishment report where a route_id could be set
on an orderpoint)
Task: 2161378
Have a list view with an Owl field component (e.g. widget="badge"),
visible. Open the optional field dropdown and make another field
visible.
Before this commit, the '_onToggleOptionalColumn' handler was
executed twice, because two click events where triggered: one on
the label, and one on its associated input (because of the for
attribute, see [1]).
As a consequence, the new field was added, and directly removed
from the view. This could even cause subsequent crashes.
The difference between an Owl component and a legacy widget is
that the Owl component is async (more than a nextTick) as we wait
for the nextAnimationFrame to render. When the rendering is fast
enough (e.g. without Owl components), the click event isn't remap
to the input yet (because we empty the list HTML node), so the
handler is executed only once.
[1] https://developer.mozilla.org/en-US/docs/Web/HTML/Element/label
Issue reported on task 2204306
closesodoo/odoo#49920
X-original-commit: b02d347e8770835ad28a6487071930a904bce101
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
The fields `constr_mandatory` and `constr_error_msg` were removed in some
recent cleaning. They should be available in the survey question form view.
Task ID 2235528
closesodoo/odoo#49919
X-original-commit: 10731089ccd471cb5e70500276061017a1cc6c6a
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Before this commit, It was not possible to copy An employee which is already linked to User due `user_uniq` constraints.
Now we add `copy=False` on `user_id` field, so Employee will be copied without linked User.
closesodoo/odoo#49915
X-original-commit: 2a63df03859166414be338c6655ee8c4052666b7
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Before this commit, There would be an error due to the required field `name` which was not passed in vals when the user creates new Redirects through Manage Pages from Website, while the `name` field is required at the model level.
In this commit, we pass 'name' field in the values of `website.rewrite`
Followup on be8fc2296bclosesodoo/odoo#49748
X-original-commit: a8125ebc1480b5b215bf3737f4e799ead5b34d9d
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
When an element is clicked during the test and a tiemout occurs, message
that appears in Odoo logs is not really clear.
closesodoo/odoo#49907
X-original-commit: 0e1545c52fdca6d311a18533d3d4efed984df329
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
Before this commit, the result of our custom qunit assert
'doesNotHaveClass' was incorrect when it was called with
several classnames.
For instance
assert.doesNotHaveClass(<span class="a"/>, 'a b');
passed, whereas it shouldn't.
closesodoo/odoo#49892
X-original-commit: c40fc67a130ae8e0f061a89d3a21d2507a0f9ae3
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Before this commit, the rainbow man message at the end of tours is fixed
to a hardcoded message.
This commit allows to customize the message within the definition of the
tour, to add the ability to use tailored messages depending on the app
the tour is about. If no custom message is set, the old default will
still be used.
Task ID: 2241549
closesodoo/odoo#49779
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Steps to reproduce the bug:
- Let's consider a consumable product P with an internal note IN
- Create a SO with P and confirm it
- Process the delivery and validate it
- Print the delivery slip
Bug:
The internal note NI was displayed on the delivery slip.
Fine tuning of https://github.com/odoo/odoo/commit/038221f3180a7a8888503553dbb5eb57875ef3a6
opw:2227613
closesodoo/odoo#49860
X-original-commit: 9b6ea1cdbed02c0f2ccd3e2608e4caf12c8c24ac
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
PURPOSE
Several counter fields are performed inefficiently. They use compute methods
using length of 2many fields instead of making use of more efficient ORM
methods like read_group.
SPECIFICATIONS
No functional change, only technical performance improvements. Purpose is
to improve count performances (meeting count, applicant count), ... by using
a read_group and maybe adding missing indexes.
LINKS
Task ID 2196182
PR #44662
Related: odoo/upgrade#973
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
PURPOSE
Several counter fields are performed inefficiently. They use compute methods
using length of 2many fields instead of making use of more efficient ORM
methods like read_group.
SPECIFICATIONS
No functional change, only technical performance improvements. Purpose is to
improve forum.post child_count performance.
LINKS
Task ID 2196182
PR #44662
PURPOSE
Several counter fields are performed inefficiently. They use compute methods
using length of 2many fields instead of making use of more efficient ORM
methods like read_group.
SPECIFICATIONS
There may be a lot of clicks linked to a given link tracker. Compute the count
of clicks in batch with a read_group to improve performance.
Same for utm campaign mailing count performances.
Some missing indexes are added to speedup queries.
LINKS
Task ID 2196182
PR #44662
Co-Authored-By: Victor Feyens <vfe@odoo.com>
Co-Authored-By: Thibault Delavallee <tde@odoo.com>
PURPOSE
Several counter fields are performed inefficiently. They use compute methods
using length of 2many fields instead of making use of more efficient ORM
methods like read_group.
SPECIFICATIONS
No functional change, only technical performance improvements. Purpose is to
improve meeting count performances.
An index on applicant is also added to speedup queries.
LINKS
Task ID 2196182
PR #44662
Co-Authored-By: Victor Feyens <vfe@odoo.com>
Co-Authored-By: Thibault Delavallee <tde@odoo.com>
PURPOSE
Several counter fields are performed inefficiently. They use compute methods
using length of 2many fields instead of making use of more efficient ORM
methods like read_group.
SPECIFICATIONS
No functional change, only technical performance improvements.
Purpose is to improve lead_count performance. Some people claim to gain a lot
of queries: from 90 to 30 SQL queries to read 39 partners. Hard to reproduce.
LINKS
Task ID 2196182
PR odoo/odoo#44662
Co-Authored-By: Fabien Pinckaers <fp@odoo.com>
Co-Authored-By: Victor Feyens <vfe@odoo.com>
Co-Authored-By: Thibault Delavallee <tde@odoo.com>
In v12, the hr module did not have a hard dependency on mail_bot, so the users could uninstall it if they did not want/need its functionality. In v13, mail_bot was added as a dependency to include the notification widget and the odoobot state in the user forms modified by the hr module. However, this also brings potentially unwanted functionality to anyone who installs an hr related application.
This commit removes the dependency on mail_bot by adding the mail_bot_hr bridge module, which has the odoobot state field and includes a dummy notification widget.
Additionally, the automated answers from OdooBot like "Pong" that fill the chatter and annoy many users have been removed.
Task ID 2200878
closesodoo/odoo#48521
Related: odoo/upgrade#1089
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>