Replacing 'in page' message for the "RVP" and the
countdown snippets so that we avoid to display some element that won't
be there on the saved page.
task-2261649
closesodoo/odoo#51632
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
- Activate debug mode
- Go to Settings > Technical > Templates
- Duplicate "Invoice: Send by email" and edit the copy (Name & Content)
- Go to Accounting > Customers > Invoices and create an Invoice
- Post it
- Send & Print
- In the wizard, select the duplicated template (the content will be updated)
- Uncheck "Email" option, the re-check it
The selected template is still the duplicated one, but the content is the one from the default template.
opw-2345200
closesodoo/odoo#59628
X-original-commit: cd6c54b15ce328b58888a4f33a64ae61c7744a90
Signed-off-by: Anh Thao PHAM <kitan191@users.noreply.github.com>
Before this commit, the option to open dropdown on hover did not work
with mega menu.
task-2312878
closesodoo/odoo#59625
X-original-commit: 9b3b1c623867d3618220d8bd8a729701ae46448b
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
The `_error_checking()` context manager is used to perform validation
and cleanup after changes on work entries, and is implemented using a
try/finally clause.
This mechanism fails to take into account that the alteration operation
can fail due to a concurrent update (in another transaction). In such a
situation the db cursor becomes instantly invalid, and any attempt to
use it will fail with:
`psycopg2.InternalError: current transaction is aborted`.
This exception will be raised in the `finally` block, and will therefore
discard the original TransactionRollbackException.
The result: instead of being silently retried as expected,
the transaction fails and the user receives a cryptic error message.
Steps to repro: repeatedly click on the button to validate a leave
Solution: specifically handle PostgreSQL `OperationalError` exceptions
and do not attempt to use the cursor when they occur - just let the
exception bubble up.
closesodoo/odoo#59612
X-original-commit: 7ba47e7215df69b6556a848532e4f33ef4243e83
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
- don't reset `stringifiedDomain` when changing thread (this led to the
control panel displaying obsolete filters)
- refresh non-main cache that are currently displayed when there is a known
change of messages in the same thread's main cache
- refresh non-main-cache on displaying them, to fetch potentially new messages
- fix discuss "select all" conditions
task-2171873
task-2282374
closesodoo/odoo#59644
X-original-commit: b89dc5f949b3ad062fc4197a4152066c207e1bf9
Related: odoo/enterprise#13962
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Current behavior before PR:
It is possible to create a BOM that has a BOM line that reference the
same product as the BOM itself. This is undesirable as when we create a
manufacturing order for this product we will have an error.
It is a regression bug that was introduced in commit
575353e251a0cce3bbff759edaeb56b5718beb11 between v12 and v13.
Behavior after PR is merged:
When saving a BOM it will validate that no product line references the
same product, or the same product variant, as the BOM itself. Note that
it is allowed to have a BOM for a product variant that references
another variant of the same product.
opw-2347941
closesodoo/odoo#59633
X-original-commit: 917e4c67b4aa14ca71ec6cba4bc6d20a86459f42
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Same issue than for commit 203bb4d9c11 but for dropship rules instead of
missing dropship types.
closesodoo/odoo#59629
X-original-commit: 1372cc427e9946b3f6ba81b4e895b145468092a2
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
If no bank journal with no account set can be found, we should return False
instead of an empty record.
closesodoo/odoo#59609
X-original-commit: ececa74b96accd86bf9e9448d18526a905fed4c9
Signed-off-by: Alex Tuyls <alt-odoo@users.noreply.github.com>
Purpose of this commit is to add a bridge between sales and sms, notably to
add capability to edit sale order SMS templates for sales managers.
Task ID-2319841
PR odoo/odoo#56297
Upgrade PR odoo/upgrade#1829
Closes#55432
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
- Create companies A & B
- Switch to company B
- Open a POS session in company B, but do not close it
- Switch to company A
- Set a Lock Date for Non-Advisers
The error message 'Please close all the point of sale sessions...' is
raised.
The message shouldn't be raised since the session is not in the company
we are setting a lock date.
We filter the session based on the company.
opw-2351930
closesodoo/odoo#59529
X-original-commit: a1445bf45fadf21a4af5dd2791efda4a4450a825
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
If records are grouped by date, the avg aggregation
makes a more meanignful value
closesodoo/odoo#59577
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Issue
-----
Automatic assignation assign leads mostly based on country.
So far the country need to be set manually on the lead.
Solution
--------
Since we have the information on the website vistor
works, set the country on the lead from the visitor
website. Unless the visitor is link to a partner
with a country. In that case setting a country
will cancel the address sync from the partner to the lead.
closesodoo/odoo#59575
X-original-commit: eff2b357db179e6e62f3db58ca2d90cc61c3748f
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Since 3d65424708d, if the homepage does not exists (no page with '/' as URL,
no page set as homepage), it would loop between / controller and _serve_page.
task-2250381
closesodoo/odoo#59548
X-original-commit: 07b701c581bd960bed42fcf97fae0dfed0332656
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
Bug
===
In the user profile view, we can see the certifications of the current user.
If we click on the share button, we are redirected to the course instead
of opening the share modal.
Technical
=========
Since 1f52435966 we use an on-lick event to
redirect the user when he click on the card. We use the JS event instead
of an standard anchor because nested anchors are forbidden in HTML.
That cause an issue if we click on a child anchor and if we stay on the
same page (which is the case when we open a bootstrap modal) because the
on-click event will be triggered.
We can not just stop the click propagation otherwise the modal won't be
opened.
Also, as the bootstrap modal element (`website_slides.slide_share_modal`)
is inside the element with the on-click event, so, if we click anywhere
on the modal, we will be redirected...
So, the solution is to open manually the modal, to stop the click
propagation and to move the modal element.
Task-2337693
closesodoo/odoo#59545
X-original-commit: 2a63f98bd359907169d14539feaa99a1d83263f0
Signed-off-by: awa-odoo <awa-odoo@users.noreply.github.com>
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
When searching in the order management screen, we only include
results from orders saved in the server, which excludes the
orders currently saved locally. In this commit, we allow the
search to include those locally-saved orders.
closesodoo/odoo#59539
X-original-commit: 0fd87bca3041e680deb628e1952e995e4a2dba54
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Create few validated orders. Then create other orders such that the
validated orders will be found at page 3. Search for an order
from the validated orders. BUG: You will see these searched orders
in page 3.
This commit fixes this issue by putting the search results in
page 1.
X-original-commit: 0a400313136ff7a7359d6105200522e859ce865d
We are using term "Vendor" on all views.
closesodoo/odoo#58873
X-original-commit: 9998babd59c3ae1858a857033dcf2ce7f4c53ca2
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
In case we have an account type which is allowed it is not needed to check the account allowed as it would fail although the account type is allowed before, so we need to do the check correctly as it was done in previous versions.
closesodoo/odoo#59547
X-original-commit: 220a1ffe69ddd9e4b45f31bf2911f1b6c3bfdfd7
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Activate Delivery Packages option in the settings, and check "Move
Entire Packages".
Create a product, and update the quantity on hand (e.g. product X with 5
quantity in package Y in location shelf 1)
Then,create an internal transfer (e.g. package Y from shelf 1 to shelf
2), check a first time the 'done' box and save.
Finally, edit, uncheck and check again the 'done' box in the same
operation and save.
You will see (tracking message in the chatter) that the initial quantity
is wrongly updated (doubled apparently).
After saving, the 'done' box will be unchecked and the transfer cannot
be validated with the following error message :
"You cannot move the same package content more than once in the same
transfer or split the same package into two location."
This occur because on uncheck and recheck done checkbox the quantity is
added again to the related move.
opw-2350335
closesodoo/odoo#59494
X-original-commit: 2dbb8ef133bb49356ff1f7dacb2be8e7ed934697
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
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>