Whenever the qweb plugin modified the dom for rendering purposes,
the mutations were observed but shouldn't. The reason was that the
reference to the editor was missing in the plugin and therfore it did
not call `observerUnactive` and `observerActive`.
Task-2695658
closesodoo/odoo#80182
X-original-commit: e973526ffe6deba778a613eb4053ba3017f9fb00
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Before this commit, going to a form view using the breadcrumb menu did
not retrieve the record id. The record id was not present in the url.
So, if you reloaded the page, the record was not displayed anymore.
closesodoo/odoo#80174
X-original-commit: 3eeaa6b1c6f54be9a87e67140ab57fe8f3a61407
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Steps to reproduce:
- Create a journal with a custom currency
- Create a statement line
- Create a reconciliation model button putting the residual to a random account
- Reconcile the statement line using the button
=> The amount lands inside the debit/credit instead of amount_currency
Introduced by:
https://github.com/odoo/odoo/commit/5ad660877f485d741a0120e07eb73178f59d2dfc#closesodoo/odoo#80173
X-original-commit: fc9b8dc6611d761f2c8778254dcbad52091404dc
Signed-off-by: Olivier Colson <oco@odoo.com>
Signed-off-by: Laurent Smet <las@openerp.com>
- Use fully qualified column names to avoid ambiguities.
- Remove the useless usage of `row_number()`. The ID of the timeoff can
act as ID. It also allow the removal of the `ORDER BY` clause which
accelerate the query execution
- Correctly compute the timezone. Gettting the timezone of the current
user at build time led to invalid data.
closesodoo/odoo#80172
X-original-commit: fed5b8e4ebafd4002d66d1c748ea4e2b2f650f21
Signed-off-by: Christophe Simonis <chs@odoo.com>
Co-authored-by: Christophe Simonis <chs@odoo.com>
In one week, this test failed about 4 times, seems mainly on nightly
enterprise. Let us update counter accordingly.
closesodoo/odoo#80164
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
On large databases, the `postcommit` hook for Google|Microsoft Calendar
was taking up to 10% of a leave validation even if the user has the sync
disabled.
This commit disables the postcommit hook for new leaves, as the event will
be synced through the cron eventually.
closesodoo/odoo#80160
Taskid: 2693265
X-original-commit: 88884292e105eab2c36b2a334c617ac4978fa79c
Signed-off-by: Arnaud Joset <arj@odoo.com>
Signed-off-by: Kevin Baptiste <kba@odoo.com>
The `ir_import_module` module is used by users to upload custom module
data via a zip file. The zip file can contain xml data, xml views and
static files.
Before this commit, the "import module" feature of this module was
broken since the imported module's manifest was lost after the import
was performed.
Now, 'ir.asset' records are created along with the attachments pointing
to the imported static files.
closesodoo/odoo#80120
X-original-commit: ec77577796e72707fbb2077f05067428cebc3c7f
Signed-off-by: Julien Castiaux <juc@odoo.com>
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
Steps to reproduce the problem:
- Create a storable product tracked by a unique serial number.
- use the product in a delivery
- try to print the "Picking Operations" document
Problem:
Traceback is triggered because we cannot use two fields in a "t-field"
opw-2692226
closesodoo/odoo#80140
X-original-commit: f478c9f48bc4f8adc0f455df1795de9672a40b78
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
Steps to reproduce the bug:
- Create a BOM:
- set the quantity of the finished product and component as more than 1
- save > print > BOM Structure
Problem:
The report generated shows the qty and cost for production of 1 unit of product, regardless of the BOM quantity
opw-2691632
closesodoo/odoo#80145
X-original-commit: d08b0abd56a04a23e155b345bf1796a031321f2f
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
Steps to reproduce the issue:
- Install "eCommerce" module
- Create 2 attributes with 'Variants Creation Mode' is Never and
one of them should have at least 2 values.
- Create a product and add the two attributes as variants and
one of them should have at least one value
- Go to configure variant and select the first attribute and
exclude one or more values from the second variant
- Go to the website and change the variant to a value from the one
you excluded and add to the cart directly (you should be fast).
Issue:
Product with a not possible combination is added to cart.
Cause:
Not checking if the combination is possible before adding to cart.
Solution:
When adding product to cart, if element with class
".js_add_cart_variants" is present and have children,
trigger _getCombinationInfo to retrieve last combination info,
then add it only if the combination is possible.
opw-2569109
closesodoo/odoo#80134
X-original-commit: 7667d4ea32f758d062d0a0820dfc5bd6d0d084b4
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Nasreddin Boulif (bon) <bon@odoo.com>
The fields `employee_type` and `user_id` were not properly replaced in
the view.
closesodoo/odoo#80130
Taskid: 2694143
X-original-commit: 4d4309507911ae2440d4989df364c292ca285652
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Kevin Baptiste <kba@odoo.com>
*: web_editor, website_sale
This commit adds the abibility to get an image thumbnail based on the
video provider URL and to avoid duplicating the regexes. It also
improves those URL regexes.
All the regexes are kept in a python tools file and are called in JS
using an RPC.
task-2154812
closesodoo/odoo#44537
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: ras-odoo <ras@odoo.com>
Co-authored-by: bbh-odoo <bbh@odoo.com>
The use-case that motivated this fix is the deletion of a project task
with many subtasks. The field 'project_id' on tasks is recursively
computed, and some automated action must be executed when its value
corresponds to a given project.
The issue occurs when the domain of automated actions is evaluated by
method search(), because the latter flushes the fields to search on,
which are also the ones being recomputed. Combined with the fact that
recursive fields are not computed in batch, this leads to a huge amount
of recursive calls between the automated action and flush().
The execution of task.unlink() looks like this:
- mark 'project_id' to compute on subtasks
- delete task
- flush()
- recompute 'project_id' on subtask1
- call compute on subtask1
- in action, search([('id', 'in', subtask1.ids), ('project_id', '=', pid)])
- flush(['id', 'project_id'])
- recompute 'project_id' on subtask2
- call compute on subtask2
- in action, search([('id', 'in', subtask2.ids), ('project_id', '=', pid)])
- flush(['id', 'project_id'])
- recompute 'project_id' on subtask3
- call compute on subtask3
- in action, search([('id', 'in', subtask3.ids), ('project_id', '=', pid)])
- flush(['id', 'project_id'])
- recompute 'project_id' on subtask4
...
closesodoo/odoo#80141
X-original-commit: e2788b580ef15ef3083ac919737a46d850143832
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Cash flow tags were supplemented and useless and empty tax_ids removed.
Additionally account 7990 had a wrongly tag which was corrected.
closesodoo/odoo#80135
X-original-commit: b3313905a973758da11f5bb9ea3efc6913491ef5
Signed-off-by: Josse Colpaert <jco@openerp.com>
Before this commit, since the code make a sudo -> unsudo to check the rights,
whatever the previous env, it is no more possible to create a task from an
alias.
This commit check that we are not already in sudo before, or in this case it
doesn't check the access right with an unsudo.
closesodoo/odoo#80131
X-original-commit: 56c625079ac5e4da9c7d9994b4459aa06cbfe727
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Since 5dc4cff60a, we removed the access read on ir.model.*
Before this commit, an employee without admin rights cannot merge partners
because he doesn't have the right to read the model ir.model.fields.
Now with use a sudo to find the reference field and avoid the traceback.
closesodoo/odoo#80119
X-original-commit: 1815b108004b407714705b6f62b65f4cfc38a395
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
For German language and for the langauges that use the same decimal separator
(use of comma "," to separate decimal digits and use of point "." to indicate
thousands, millions etc.) the tips pop up in payment screen was displaying an
erroneous initial value: ex. '0.84' was displayed instead of '0,84'. This was
causing a miscalculation of the intented tipping amount. Thus, the tipping
amount had to be inserted manually in every occasion.
Solved it by taking into consideration the decimalSeparator in the NumberPopup.
task-2695104
opw-2677249
closesodoo/odoo#80110
X-original-commit: 5bedf8b0da1df271634da5d8c0acf48c4280594e
Signed-off-by: Masereel Pierre <pim@odoo.com>
Issue, to reproduce:
- Create a product A tracked by serial
- Reciept one product A with a lot without digit
- validate this receipt, Ok
- Create a other receipt for product A,
- You cannot anymore open the detail wizard to enter a
SN/lot : get 'The lot name must contain at least one digit.'
Fix:
Remove the constraint and fallback by adding "0" at the end.
task-2652292
closesodoo/odoo#80104
X-original-commit: 5f75d5b1c8d5d4f37cbdc34daa79514226a17855
Signed-off-by: Arnold Moyaux <arm@odoo.com>
Signed-off-by: Rémy Voet <ryv@odoo.com>
The packages reservations are not correctly done in case of a backorder
To reproduce the issue:
(Use demo data)
1. In Settings, enable:
- Delivery Packages
- Multi-Step Routes
2. Edit the warehouse:
- Outgoing Shipments: 2 steps
3. In Operations Types > Delivery Order, enable:
- Show Detailed Operations
- Move Entire Packages
4. Create a Pick P:
- 1 x [DESK0004] Desk
- 1 x Large Cabinet
5. Put each product in a separate pack
6. Validate P
7. Create a Delivery Order (Planned Transfer):
- 1 x [DESK0004] Desk
- 1 x Large Cabinet
8. Mark as TODO, Check Availability
9. In Detailed Operations, mark one of the packs as Done
10. Validate the DO, Create a backorder
Error: The not-yet-done pack is still on the delivery order and its
status is "Reserved". This line shouldn't be present anymore. Moreover,
the backorder has a line for this pack, its state is "Draft" (instead of
"Reserved") and the state of the BO is Ready.
When creating the backorder, the packages levels of the not-yet-done
moves are transferred to the new picking (i.e., the backorder) However,
these moves does not have a package level defined (due to
9d758fa2e1). Therefore, when checking the
packs:
https://github.com/odoo/odoo/blob/e7450bee8f018a5334d9628235824f2fc6f32cec/addons/stock/models/stock_picking.py#L822-L832
`package_level_ids` is empty, so a new `stock.package_level` is created
(instead of using the one of the initial delivery order). And
`move_lines_to_pack` is empty too, so the new `stock.package_level`
won't have any move lines and its state will be "Draft"
We should rather transfer the package levels of the moves' lines.
OPW-2659176
closes#77509closesodoo/odoo#80072
X-original-commit: 4fd5cd6f940575090021dedd2159d050b594dd69
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
Co-authored-by: Adrien Widart <awt@odoo.com>
Co-authored-by: Florent de Labarre <florent.mirieu@gmail.com>
The link between time off and allocation didn't check for allocation
state.
TaskId-2695066
closesodoo/odoo#80095
X-original-commit: d84d0b7a8bfbb88c538f4918dc7c226dc69ecc89
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
When using EDI, documents often fail to be submitted to the relevant API. This provides the ability to generate and download the XML
Task-2669041
closesodoo/odoo#80088
X-original-commit: 6eba7935c4d4f0fef5e1e7ad9b1d7726aa3db109
Related: odoo/enterprise#22392
Signed-off-by: Laurent Smet <las@openerp.com>
Signed-off-by: Ayob Habib (ayh) <ayh@odoo.com>
When Print Labels was revamped in odoo/odoo#69690 it was decided that
only product barcodes would be printed. Unfortunately we want SN/Lot
barcodes to be printed instead when they are filled in, so we make this
the case when applicable (i.e. when printing Transfer Quantites + qtys
done).
closesodoo/odoo#80079
Task: 2678336
X-original-commit: 105587e9e411442fd8e6d30efaa35b90b0e09959
Signed-off-by: Arnold Moyaux <arm@odoo.com>
The label wizard is extended from product to stock, so we can print
labels even when stock isn't installed (e.g. only purchase or sales
installed). Therefore we shouldn't reference a field that's introduced
in the stock extension (i.e. label wizard will throw a stack trace when
stock is not installed).
Noticed during task: 2678336
X-original-commit: 9aeba3668e89f14bcfa4ea37861f33ad9add86d8
Part-of: odoo/odoo#80079
Prior to this commit the total_timesheet_time field is used in the kanban
view in order to decide whether or not a menu entry has to be displayed.
This commit introduce a new compute non stored field in order to count
the number of timesheets and use that info in order to decide whether
or not the menu entry has to be displayed.
closesodoo/odoo#80080
X-original-commit: 1dce6aea852b1496bdcfd3b98c4da531d2646ad0
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Before this commit
Calling the rainbow_man effect with a custom component would replace entirely the RainbowMan component instead of passing it a subcomponent to display.
After this commit
It is fixed.
closesodoo/odoo#79962
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
Changing value in monetary fields was not working properly in FF :
The ZeroWidthSpace inserted by the deleteRange function cannot be selected;
trying to do so loses the selection for some reason.
task-2679088
closesodoo/odoo#80071
X-original-commit: 1b36b4e8a6b319de10b6c1144c37533dab0e2f36
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Value changed in monetary fields were not saved correctly.
Zero Width Spaces in the monetary field new value caused
the model to reject the value as the format (numerical) was not compliant.
task-2679088
X-original-commit: a776e55c6fb03861eed9668fad259c0a92b9aff8
Part-of: odoo/odoo#80071
The forced selection of the entire text value was preventing the user
from changing the selection after the initial click inside the monetary field.
task-2679088
X-original-commit: d33d55aad46c9223192d15c01b7516340be77cce
Part-of: odoo/odoo#80071
Current behavior:
When creating a BOM with quantity different than 1 (here 12) with operation duration 1 minute and work center capacity 23
The BoM Structure & Cost report only changes the time for the operation when the quantity is > 276
However, when planning a MO the expected duration changes to 2 minutes when the quantity is > 23
Expected behavior:
Expected duration should be the same in the MO and BoM report
Steps to reproduce:
- BOM with quantity different than 1 (here 12)
- operation duration 1 minute
- work center capacity 23
- go in BoM report
closesodoo/odoo#80048
X-original-commit: cf90943875da25456cde4faf967ce27d886c0851
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Steps to reproduce the bug:
- Connect as Admin and select “My Company (San Francisco)”
- Create a storable product “P1” and select “My Company (San Francisco)” in the `”company”` field
- Go to inventory settings and enable the “Storage Categories” option
- Create a new “Storage Categorie” > select “My Company (San Francisco)” in the `”company”` field > save
BUG1: Edit and try to add the product “P1” > Edit and try to add the product “P1”
> "P1" is not filtered correctly with domain, because the `”company”` field of the `"stock.storage.category.capacity"` model is not set.
As it's a related field, the “default_company_id” should be in the context so that the “company_id” field will be correctly set with this value
BUG2: Add a new line > create and edit a new product > the product type is “consumable” instead of storable, so we should add the type in the context
BUG3: Add multi-company security rule
opw-2689426
closesodoo/odoo#80061
X-original-commit: f5554fa94d41d7eae62c4a1271e41012178c4d8f
Signed-off-by: Arnold Moyaux <arm@odoo.com>
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
In some cases, it is not possible to print the order changes
To reproduce the issue:
(Use demo data)
1. Point of Sale > Configuration > Order Printers, edit Kitchen Printer:
- Printed Product Categories: Food
2. Edit the POS Bar:
- Enable Order Printer
3. Start a session of POS Bar
4. Open table T1
5. Select a Food product and add a note
6. Submit the order to the kitchen
7. Select again the same product without any note
Error: The order button isn't green, it is not possible to sent the
second order line to the kitchen
The issue comes from the logic used in `computeChanges`:
https://github.com/odoo/odoo/blob/75fb0aa6e9c314b61b30d49b5c463fa126dfc835/addons/pos_restaurant/static/src/js/multiprint.js#L215-L222
`old_res` contains the products already sent to the kitchen
As a result, since the line from step 5 and the one from step 7 have the
same product, we consider that the new line (step 7) was already
present. Then, when comparing the quantities, both lines have their
quantity equal to 1, so we consider there isn't any information that
should be sent to the kitchen
OPW-2557518
closesodoo/odoo#80065
X-original-commit: fae786706977db4f9705eee055f4f804064784dd
Signed-off-by: Masereel Pierre <pim@odoo.com>
Before this commit saving an incomplete link dialog triggered the
display of a stacktrace error popup.
After this commit saving is cancelled when an attempt at saving an
incomplete link dialog is done. The incorrect fields already did display
their error status.
task-2675252
closesodoo/odoo#80043
X-original-commit: 47f0596233c2d8a09d91cdfae117aa3f595bb6bf
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
The domain on the allocation leave type was too restrictive for Time Off
Officer and they couldn't create allocations when the "Employee
Requests" of the Time Off Type was set to "no".
This commit allows the Time Off Officer to request those allocations
again.
closesodoo/odoo#80041
Taskid: 2694163
X-original-commit: d79af924a59f32a0b2dee9b10bb7c8cf388892df
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Before this commit the default template for mega menus was the "Multi
Menus" template.
After this commit the default template for mega menus is the "Odoo Menu"
template.
task-2675252
closesodoo/odoo#80040
X-original-commit: a4d686140133ecf59a3d09c8f930a70b91064599
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
A wrong company was used in the Kiosk mode, preventing users to check in
/ out.
closesodoo/odoo#80035
Taskid: 2691031
X-original-commit: ed3003c9d8ce11a8f59966d28371883df5eb9c36
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Prior to this commit, the tasks_analysis information was added to the
panel data dict but never used clientside.
This commit removes this useless call to avoid a Traceback on large
projects, with lots of tasks (MemoryError).
task-2694765
closesodoo/odoo#80030
X-original-commit: 33446939e0cc625832de3b22661709508a01044a
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
When a user was opening the payment_link_wizard and tried to select a
preferred payment acquirer, he was getting an AccessError telling that
he was not allowed to access 'payment.acquirer' records.
Fix PR #69334 (task-2504225)
task-2666881
closesodoo/odoo#80005
X-original-commit: 2ff580c073ac105219582dbf2108a1437645c9b5
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Before this commit, the link could be removed from the DOM
before hiding the query popover. After being removed, the
reference of the popover from the jquery element was lost.
We now keep the reference to the popover to always be able
to hide it.
Task-2684819
closesodoo/odoo#79943
X-original-commit: 72c46aef751ebc0de3873c644e3b159ffa349d1e
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
There is a fix in the editor to fix link selection (see
_fixLinkMutatedElements). Prior to this commit, in mass mailing
the main editable element had the class `o_not_editable`.
This class on the editable disabled the link fix.
Also, it was semantically strange to have the editable being
`o_not_editable`.
Task-2684360
closesodoo/odoo#79934
X-original-commit: 112f3776985fbe8f5291cd4d26424f6c427ff36c
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
When trying to drop a snippet that could not be possibly dropped,
a traceback is shown but shouldn't.
Task-2692492
closesodoo/odoo#79924
X-original-commit: 4408dbaf74aa26272b6ed3ce718a2d915975d4b3
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
On an html field whenever selecting only text that contain an url
and opening the link dialog, the url was not reused.
Task-2580485
closesodoo/odoo#79923
X-original-commit: 8049c7cf937aec02fe0097ee4f233e2e76fb8ae3
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>