After commit 06a8c5264eb6e87c29ad1d23a14e12dd45aa281c it is no longer
possible to pass bare modules to `safe_eval`'s context, however during
the aforementioned commit only the wrapped datetime and dateutil modules
were updated in ir_model's SAFE_EVAL_BASE context, thus the bare `time`
module was still being passed (and this triggered a traceback whenever a
custom computed field that used the time module was computed).
The fix is simple: pass the wrapped time module to the `safe_eval`
context instead of the bare one.
This commit also introduces a regression test to verify that the passed
modules actually work in custom fields.
opw-2347711
closesodoo/odoo#59560
X-original-commit: 02e816877ec12471a1446ba894b5cfca309979da
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
Signed-off-by: Adrian Torres (adt) <adt@odoo.com>
Steps to reproduce the bug:
- Let's consider two pricelist PL1 and PL2 with discount_policy = 'without_discount'
- Let's consider a product P
- PL1 has 10% on P and PL2 has 20% discount on P
- Create a quotation Q with PL1
- Add P on Q (the 10% discount is correctly applied)
- Change PL1 to PL2 and click on Update pricelist
Bug:
The 20% discount on P was not applied.
opw:2352577
closesodoo/odoo#59541
X-original-commit: 9f1280e275fd851fce17bf82c603fdc50a8ef94e
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Side effect of this change: dependencies are not longer triggered when replace
is not actually doing anything.
task-2270780
closesodoo/odoo#59515
X-original-commit: 75a44675873d65fdf17f2205772b05a0f59bb42c
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Some graph view attributes are no longer supported.
We clean the graph_view.rng file and adapt few xml files.
closesodoo/odoo#59513
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Steps to reproduce the bug:
- Open a customer invoice I
- Click on the partner P set on I
- Change the contact name of P
- Go to the list view of customer invoice
Bug:
The name of P was not updated.
opw:2354492
closesodoo/odoo#59507
X-original-commit: be5d72974ad89c985e413f0eb84352a00a6cd043
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
The URL to the mail extension module documentation in the settings view is
currently wrong.
It only works temporarily because of a redirect we setup on our website.
This commit updates the URL to the proper location of the documentation.
When we later support Gmail, the view will have to be updated to contain two
documentation links: one to Outlook and one to Gmail.
Task 2356910
closesodoo/odoo#59503
X-original-commit: 3968cfebfabcf34f800203d880c4a719c0f1174c
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Before this commit:
While creating new templates it will give a traceback
After this commit:
While creating new templates it will not give a traceback
LINKS
Task-2334852
closesodoo/odoo#59502
X-original-commit: d04a1b869ef73c302dcd9a1cb04f6d952b0a3db3
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Behavior before the fix:
Uploading a grayscale image with transparency in the company logo field
of the document layout causes a crash:
```
File "/data/build/odoo/addons/web/models/base_document_layout.py", line 89, in _compute_logo_colors
wizard.logo_primary_color, wizard.logo_secondary_color = wizard_for_image._parse_logo_colors()
File "/data/build/odoo/addons/web/models/base_document_layout.py", line 191, in _parse_logo_colors
color[1][2] > white_threshold) and color[1][3] > 0:
Exception
...
IndexError: tuple index out of range
```
To reproduce, use the `logo_ci.png` image included in the unit test
data and load it in the document layout (under General Settings).
The system does not detect that the image does not have color
information and attempts to read the R,G,B values (but the image only
has 2 values per pixel: the grayscale value and the alpha)
Versions affected: 13, 14
Behavior after the fix:
The image is loaded correctly (arguably, there is not a lot of interest
in detecting the primary color of a grayscale image, but the script
still returns a (gray) value which is preferrable to a traceback)
opw-2352394
closesodoo/odoo#59498
X-original-commit: 6d6e48f34f850fa533ce00532ada0e3464c8144b
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Signed-off-by: Nicolas Galler <nicocrm@users.noreply.github.com>
On a fresh Linux Mint installation, the libraries used by Pillow and
psycopg2 are not installed. This update the list of dependencies so
users don't have to dig through Pillow/psycopg2 documentations in
order to find and install the missing dependencies.
closesodoo/odoo#59497
X-original-commit: 7ba29d237f9bead3f6d67e25d1343a0a3d126b9f
Signed-off-by: Antoine Vandevenne (anv) <AntoineVDV@users.noreply.github.com>
Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com>
message_seen_indicator model doesn't have a field threadId, it use channelId.
channelId is required since it's use inside the _createRecordLocalId function
closesodoo/odoo#59493
X-original-commit: f82396cba884604603eea38e291422faebea2f58
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Issue
- Install "Point of sale"
- Create a new one.
- Activate the "Is a Bar/Restaurant" feature and save
- Activate the "Bill Printing" feature then save
- Start a new session
- Add a product A
- Click on "Bill" then "Print"
- Then click on "Ok" to go back to order
- Add a product B
Error is raised ("Cannot read property 'add_product' of null").
Cause
Trying to add a product to an order who is destroyed
if the bill has been printed.
Solution
If the bill is printed (and not the receipt), set '_printed' of
the current order to 'false', therefore it will add the product
to the current order.
opw-2341115
closesodoo/odoo#59465
X-original-commit: 6683a9929d68be956854000fa9b3e9f99ceecdfb
Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
Since e1a5ed51db, missing ir_model_access are warned at the end of an install.
Unfortunately, it is still possible that a module add a model and another module add the corresponding ir_model_access.
Since runbot install all module at once, this won't be spot until a single module build is ran when each module is
installed independently.
This commit proposes to move the check at the end of each module.
This commit also format the log in orther to ease copy/paste of proposed rules in case of multiple new models
and add module to xmlids.
Note that the log may be repeated multiple times if multiple modules redefine this model.
Linked to #59193closesodoo/odoo#59213
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
For those templates, the transparent option was broken at some point:
we have to detect the hamburger is opened so that it is not transparent
anymore when opened.
Part of https://github.com/odoo/odoo/pull/59349
task-2327741
closesodoo/odoo#59471
X-original-commit: c3524b1cdc63eae0d30d8f435e8bb9a541c88f06
Related: odoo/design-themes#396
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Hide the add images button of the gallery snippet when not in edit
mode.
task-2312878
closesodoo/odoo#59470
X-original-commit: abc61b9e50f7006805dfd038d937464eeb5d424a
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Before this commit:
When trying to create a record in the live chat it shows traceback.
because the record.id is an object but it requires an integer value.
After this commit:
No traceback while clicking on the create button.
Explanation:
Following commit 488e334fc8
`onchange` methods must handle being called on new record.
Task-2347091
opw-2350463
closesodoo/odoo#59462
X-original-commit: 96d0627a966bfa0e71e5350277d306c0e08cc131
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Since 13.0, the website menu can contain text and buttons through
mega menus, which created inconsistencies on the way the "navbar font"
configuration works. Indeed, when setting the "button font", navbar
buttons were updated too... except if that "button font" was equal to
the "text font", in that case those buttons used the "navbar font", so
not logical at all.
This commit solves the problem by only using the navbar font to
style bootstrap nav links, which is the common content of mega menu
snippets anyway but this has a side-effect: text-in-navbar font
may change from navbar font to text font which is acceptable as the 14.0
was released very recently. Sorry for the inconvenience if any, but it
felt important to fix the problem that way for the new static content
of header templates.
closesodoo/odoo#59459
X-original-commit: 31bfb5075063070d24a607ed47da6bdd8207aa5a
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
The Duration Per Unit should be averaged, not summed.
opw-2353041
closesodoo/odoo#59446
X-original-commit: 54b40f1eb096ea9531f1f9b0478937536c8292fc
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
`http.py` had been modified so the file could be patched correctly with
the previous version of the `http.py.iotpatch` file
closesodoo/odoo#59439
X-original-commit: 1cde9f5fde19f8dba3a9720bc9eb71b7a74c4d72
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
We sometimes encountered IoT Boxes crashing because the remount failed.
As this isn't a big issue, we won't check the return value of the call
to `mount`.
closesodoo/odoo#59438
X-original-commit: 5f9874da0f5f5b27c546cd248d08299f0e65544b
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
Signed-off-by: Antoine Prieëls <aprieels@users.noreply.github.com>
This commit makes sure we do not try to update the quantity on a
finished stock move (during record production or confirming the produce
wizard) if there is no finished move available.
Closes#57227closesodoo/odoo#59430
X-original-commit: 141df3b398aee2bac10e3ce94e15bb4bd14d17af
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
Commit 59eee6ba5f introduced a cleanup
mechanism for external data modules being uninstalled from a database,
this meant deleting the ir.module.module entry created when first
installing the aforementioned external module.
However, the above patch has one small oversight: the access of the
`imported` field introduced by the `base_import_module` module is done
after the `super().module_uninstall()` call which, in the case of the
uninstall of the `base_import_module` module, will delete the `imported`
column and the following call to filtered will fail because the column
has already been deleted and the registry hasn't been reloaded yet.
The solution to this, as explained in the code comment, is to simply
compute the `modules_to_delete` before the call to `module_uninstall()`.
closesodoo/odoo#59418
X-original-commit: c0226087b82ffda3971bb953d8d00b8c5e67642c
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Signed-off-by: Adrian Torres (adt) <adt@odoo.com>
Calling write in a compute won't works (and shouldn't) if there is any
automated action in the model. fix this issue in the
compute of `_compute_qty_received`.
task-2351175
closesodoo/odoo#59421
X-original-commit: b7cc3b068f685d1339f9fe7e47d0c564de1708e7
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
Previously, rainy 05 and wavy 06 had a bottom color with a hard edge.
This means that in order to not have a harsh color transition in the
section, the user would have to match the bottom color to the background
color of the section or vice versa. This commit makes it so that this
color is transparent by default instead. This means that the user can
now simply choose the background color and have the same result, without
having to configure two separate colors.
Part of: odoo/odoo#58333closesodoo/odoo#59420
X-original-commit: 8e6728f7fa486e264737ce068f637c8a76fdb7d9
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This commit fixes a number of shapes, usually the problems were with
imperfect joints between connecting shapes, shapes being cut not close
enough to the edge, or shapes using embedded PNGs for shadows instead of
using SVG filters.
Part of: odoo/odoo#58333
X-original-commit: ac82407b259eab929486bf0a333a48bc507efa60
Before this commit the clickable zone of a checkbox in the editor was
all the width of the panel.
After this commit, the clickable zone is only the label width + the
checkbox width. Also, the active and hover states of the label have been
removed to not confuse the user.
task-2312878
closesodoo/odoo#59406
X-original-commit: 61ffe97d03deae0aee72568311c453d1cd3470c8
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This will prevent various flicker when using previous/next.
task-2243518
closesodoo/odoo#59411
X-original-commit: 415683c575c1b6ce3e0591a65df20d687790dd18
Related: odoo/enterprise#13885
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Disable the link on the vendor delay report graph view, as it leads us
to a undesired list view.
Task 2346121
closesodoo/odoo#59410
X-original-commit: 29e7e70e9452f354247f98412d925d1f17e5f86b
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
When a Purchase Order is created by the replenishment report, doesn't
pass the origin ("Manual Replenishment" or "Replenishment Report").
task-2328830
closesodoo/odoo#59398
X-original-commit: 170729ee58b199041d7545e7789ac9474e86f998
Related: odoo/enterprise#13876
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
In the replenishment view, the popover widget allows to open the product
forecasted report.
Before this commit, it opened only the forecasted report graph.
Now it opens the new forecasted report (graph + operations table).
Also, moves the widget next to the forecast qty field.
task-2328830
X-original-commit: 36af5e95eddaa18886c9584865e5620494c93e16
Before this commit, when copy a workorder, the real duration was copied
too, which is unwanted.
task-2328830
X-original-commit: 6063bf7576a0abf975c2668ebacb6ad68c24315e
Optional hide on `bom_product_template_attribute_value_ids` ("Apply on
Variants") BOM's component lines list.
Optional hide on `lot_ids` field in MO's component lines list.
task-2328830
X-original-commit: 48710bf6f50514aa0c95104989eb44450ce59529
Hides the `picking_type_id` field when creating a new transfer if it is
set by default.
As this field is automatically set when coming from a list of a specific
transfer type or when asking to create directly a specific transfer type
this field is superfluous in these cases.
task-2328830
X-original-commit: c26ec70c61f51e6dc30c460c1b60f0d9ff3286a8
Add a `default_product_tmpl_ids` in the context on the BOM operations
field. The purpose is to have the product set by default when creating a
new operation's step.
Used by 91e53397812e707611d2f430c7d534e215f8fd4f (enterprise)
task-2328830
X-original-commit: 7fe3ce4a1b2c43188b907fdec0553cf995e57bab
Before this commit, there was some bugs with MO by-product moves:
- When creating a new MO, if user deletes the byproduct move(s) then
save, the byproduct moves will be come back.
- With a newly created MO, in edit mode, increase the qty. to produce:
-> Creates a new byproduct move with updated quantity to produce
instead of update the existing one.
These issues was due to the fact when computing the byproduct moves on a
virtual record, the original move in `move_finished_ids` and its
counterpart computed in `move_byproduct_ids` have different virtual id
and so aren't considered as the same move.
X-original-commit: c1768d00e8eb76af32ead10f75ce3d09a5aefac9
* mail,calendar,note
Before this commit:
When accessing activities from the systray, any existing breadcrumb-item should
be clearer.
After this commit:
Clear breadcrumb-item when access activities from the systray.
Task-2342246
closesodoo/odoo#59396
X-original-commit: 6dd181c789d22f99073fcd0a9b0fa2edccdfe0fc
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
It's needed only on using skipTest in SavepointCase.setUpClass.
From docs https://docs.python.org/3/library/unittest.html#unittest-skipping:
> Skipped classes will not have setUpClass() or tearDownClass() run.
This may lead to running out of available sql connections. It mostly happens in
odoo.sh, which has max connections set to 16, while default value is 64
Fixes#56636
opw-2345762
closesodoo/odoo#59388
X-original-commit: b7f922050217634cdf85d15cae62b78fa3ce1834
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
"Print Return Label" button on a Transfer is showed when `is_return_picking` field is True.
But `is_return_picking` is True for any picking that is a return of another picking, making
the button visible for the return of a return, when it should not as it is an outgoing picking.
opw-2312425
closesodoo/odoo#59387
X-original-commit: f54f485cc6b0eb6c25a2753ca2c764a32eb18f66
Signed-off-by: Anh Thao PHAM <kitan191@users.noreply.github.com>
Previously, when compute on-time delivery, we compare the date_planned
on PO line with the date on stock.move. Since they are both datetime,
the product that delivered on the scheduled date may be considered delay
because of the 'time' part is late, which is normally not what we want.
In this commit, we only compare the date part of them to decide whether
it's late or not.
Task 2346121
PR #58653closesodoo/odoo#59386
X-original-commit: 86af7c647fe56f776c6cebc22dd5856577878980
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Previously, when no on-time delivery data, we should 100%. Now we show
"No data" to make it more clear.
Task 2346121
PR #58653
X-original-commit: 8179dd974f23d8bb8c15e0ab72072fffb0866b38
Purpose
=======
There's one special case for the participant count update.
When we leave a room, if we are the last participant, we directly
update the participant count without waiting for the cool down (because
the participant might change the page and so the JS might not be loaded
anymore).
But, Jitsi made a change and now, when we hanging up the room, when
the event "videoConferenceLeft" is called, we are the only participant
in the list even if they're still other people in the room. So every
time someone hanging up the room, he will send the "zero participant"
update.
As we can not properly fix it (and be sure it will be "future proof"),
we dropped this update.
So now, some empty rooms might be marked as having one participant,
but no room will be marked as having zero participant if they are not
empty (and we prefer this behavior than the opposite).
Task-2350117
closesodoo/odoo#59378
X-original-commit: 84575078b80a7bf865ed52d1682548af3346ec14
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Do not round the unit price when calculating the company currency price
used to calculate the tax. This avoids rounding errors when the company
currency amount has been calculated based on a converted (and rounded) unit
price.
Corrects a regression bug introduced in 13.0. The behavior has been
corrected in 14.0 by a more extensive rework of the accounting module
(commit id 419d4bbee0 among others).
This fix seeks to correct the bug with minimal impact.
In version 12.0, the tax amount was calculated strictly based on the
total amount, which avoided compounding the rounding issue but had some
other problems (see https://github.com/odoo/odoo/issues/35358).
In version 14.0, the problem does not exist. This commit only includes
the unit test.
Current behavior before PR:
For example: 20000 @ 2.82 with a rate of 1.1726 gives a
tax amount in foreign currency of 11844, which is 10100 in company
currency. But if the company currency amount is calculated
based on a unit price of 2.4 (rounded converted amount of 2.82), the
calculated tax amount will only be 10080 in company currency.
Desired behavior after PR is merged:
Tax amount is calculated based on the total amount in the foreign
currency, not the amount based on the rounded unit price.
opw-2340933
closesodoo/odoo#59365
X-original-commit: 14c86a020429dfc6b545b65b89cbc7e3828dc557
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Signed-off-by: Nicolas Galler <nicocrm@users.noreply.github.com>
Before this commit, Label *Unit Cost* was displayed in the footer for *BoM Structure* report which is not displaying any cost Information.
With this commit we hide *Unit Cost* on *BoM Structure* report.
closesodoo/odoo#59356
X-original-commit: 9ec465e7d3937450bad795cdb69eae52b540b994
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>