- Mar 31, 2021
-
-
Julien Mougenot authored
Conversion of all modules to the new manifest assets declaration. Part of task: 2352566 Co-authored-by:
Julien Mougenot <jum@odoo.com> Co-authored-by:
Simon Genin <ges@odoo.com>
-
Julien Mougenot authored
This commit changes the way assets are declared in Odoo modules. Before: assets were declared in template files. Template bundles were generated from primary templates, so technically any qweb template could have been called as an asset bundle, with the 't-call-assets' directive. Being standard qweb templates, they had access to standard HTML tags (script, link, with or without raw scripts or style definition), qweb directives (t-call, t-raw, etc.) and could be inherited by other templates. Now: assets are defined in the module's manifest and generated by the 't-call-assets' directive. More information on the new system can be found on the updated user documentation (see the "JavaScript Reference" section). Task: 2352566 Co-authored-by:
Bruno Boi <boi@odoo.com> Co-authored-by:
Julien Mougenot <jum@odoo.com> Co-authored-by:
Lucas Perais <lpe@odoo.com> Co-authored-by:
Mathieu Duckerts-Antoine <dam@odoo.com> Co-authored-by:
Raphael Collet <rco@odoo.com> Co-authored-by:
Simon Genin <ges@odoo.com>
-
Simon Genin (ges) authored
This commit removes a template file that was does not exist anymore in the account module. Part of task: 2352566 Co-authored-by:
Julien Mougenot <jum@odoo.com> Co-authored-by:
Simon Genin <ges@odoo.com>
-
Simon Genin (ges) authored
This commit removes a needless priority attribute on a portal template. This has been done to improve consistency in asset bundles declarations by reducing them to the simplest possible templates. Part of task: 2352566 Co-authored-by:
Julien Mougenot <jum@odoo.com> Co-authored-by:
Simon Genin <ges@odoo.com>
-
Julien Mougenot authored
This commit handles 2 things: - The line odoo._modules = <t t-raw="get_modules_order()"/>; used to be in assets_backend but is now directly added to the web.bootsrap (the odoo index template). Since pos has its own index, we add it there. - An "id" attribute has been removed from a link tag which was used to indentify said link as an xpath target. The xpath has been adapted to target the href instead. This has been done to improve consistency in asset bundles declarations by reducing them to the simplest possible templates. Part of task: 2352566 Co-authored-by:
Julien Mougenot <jum@odoo.com> Co-authored-by:
Simon Genin <ges@odoo.com>
-
Julien Mougenot authored
Before this commit, the recaptcha widget got the database public key from a qweb "t-set" directive fetching directly the key from the database when rendering the template. Now, it is loaded beforehand and given to the session_info instead. This has been done to improve consistency in asset bundles declarations by reducing them to the simplest possible templates. Part of task: 2352566 Co-authored-by:
Julien Mougenot <jum@odoo.com> Co-authored-by:
Simon Genin <ges@odoo.com>
-
Julien Mougenot authored
This commit handles 2 things: - Clarifies why some inline style has to remain inline instead of being moved to a separate file. - Moves an inline modification to field_html for testing purpose to a dedicated file. This has been done to improve consistency in asset bundles declarations by reducing them to the simplest possible templates. Part of task: 2352566 Co-authored-by:
Julien Mougenot <jum@odoo.com> Co-authored-by:
Simon Genin <ges@odoo.com>
-
Julien Mougenot authored
This commit handles 2 things: - Moves snippets used to call the summernte library inside several new dedicated files. - Removes a raw script declaration to move it to a dedicated file. Also the calls to the lib files have been changed from a qweb loop to an explicit list of script tags. This has been done to improve consistency in asset bundles declarations by reducing them to the simplest possible templates. Part of task: 2352566 Co-authored-by:
Julien Mougenot <jum@odoo.com> Co-authored-by:
Simon Genin <ges@odoo.com>
-
Julien Mougenot authored
Before this commit, the asset bundle "_assets_helpers" was the only bundle using a "t-raw" directive to insert assets in between other asset calls. Now _assets_helpers only contains the assets called before the t-raw directive, and the second part (1 file actually) has been added after every call of the bundle. This has been done to improve consistency in asset bundles declarations by reducing them to the simplest possible templates. Part of task: 2352566 Co-authored-by:
Julien Mougenot <jum@odoo.com> Co-authored-by:
Simon Genin <ges@odoo.com>
-
Julien Mougenot authored
This commit changes the way tours are automatically disabled when in demo data. Previously, an override of the assets_common template was applied by a file loaded in the web_tour demo data, ensuring that the tours are disabled when demo data are loaded in the database. Now, a "tour_disable" boolean will be given to the session_info object to determine whether the tour manager must be disabled, meaning that it will automatically consume all registered tours. This has been done to improve consistency in asset bundles declarations by reducing them to the simplest possible templates. Part of task: 2352566 Co-authored-by:
Julien Mougenot <jum@odoo.com> Co-authored-by:
Simon Genin <ges@odoo.com>
-
Daniel Blanco authored
[FIX] l10n_cl: restore missing l10n_latam_document_number from cl tree view (this was present in 13.0 and was lost during forward) closes odoo/odoo#68576 X-original-commit: edefeef7 Signed-off-by:
Josse Colpaert <jco@openerp.com>
-
Jérémy Hennecart authored
Fix naming issue as "ttype" was replaced by "alarm_type" Linked COM PR: odoo/odoo#68443 closes odoo/odoo#68572 Signed-off-by:
Thibault Delavallee (tde) <tde@openerp.com>
-
Nicolas Lempereur authored
Override in enterprise web_studio of _saveView on error never rejected promises. But now it does so the XML editor interface is not blocked after error. But we were already showing the correct error in web_studio use case, so we don't want another one and this change allow that by only showing an error if we received rejection value. opw-2460081 closes odoo/odoo#68569 X-original-commit: 43184af8 Related: odoo/enterprise#17395 Signed-off-by:
Nicolas Lempereur (nle) <nle@odoo.com>
-
- Mar 30, 2021
-
-
Olivier Dony authored
Calling write() on a record will touch it and update its `write_date`, even if all the field values are identical to the current values. Let's not touch the mail template unless we have a reason to. closes odoo/odoo#68562 X-original-commit: ecd0253d1cc231c8695183e1688835b969864362 Signed-off-by:
Olivier Dony (odo) <odo@openerp.com>
-
- Mar 31, 2021
-
-
Romain Derie authored
ValueError is raised when image resolution is too big (over 45e6[1]). [1]: https://github.com/odoo/odoo/blame/4c91e895a98642f10bd1d2d46819705edc38f638/odoo/tools/image.py#L47 Part of https://github.com/odoo/odoo/pull/65828 task-2345082 closes odoo/odoo#65828 Signed-off-by:
Quentin Smetz (qsm) <qsm@odoo.com>
-
Romain Derie authored
We only support .gif, .jpe, .jpeg, .jpg, .png, .svg This commit won't let the code go though if we know the image format is not suported. Part of https://github.com/odoo/odoo/pull/65828 task-2345082
-
Romain Derie authored
*: web, web_unsplash Without this commit, the user had no hint to know something was actually being performed. It would be worst when uploading multiple image at once, eg in image wall, as it could take some times for the images to be processed and uploaded. The user now has a visual hint about the upload progress through a toaster and some progress bars. For unsplash, note that as the actual image download is performed S2S, the progress bar will automatically jump to 100%, then will wait for the RPC success once the server is done to show a success progress bar. Part of https://github.com/odoo/odoo/pull/65828 task-2345082
-
Romain Derie authored
Only allow URL ending with extension of supported image formats. Don't let anything else goes though, so we remove the magic behavior that was uploading a non-image url as a document. Part of https://github.com/odoo/odoo/pull/65828 task-2345082
-
Romain Derie authored
Part of https://github.com/odoo/odoo/pull/65828 task-2345082
-
Rémy Voet (ryv) authored
closes odoo/odoo#63516 Related: odoo/upgrade#2040 Related: odoo/enterprise#15363 Signed-off-by:
William Henrotin <Whenrow@users.noreply.github.com>
-
yhu-odoo authored
We introduced new Smart Putaway Rules. Locations now can have a storage category, on each storage category, we can specify the amount of products/packages(with certian package type) that can be stored in the location. On putaway rules, we can also set a storage category. Now when apply a putaway rule, we will find a suitable child location of the out location according to quantity/weight setting on the storage category. Task 2341820 PR #63516 ENT PR odoo/enterprise#15363 UPG PR odoo/upgrade#2040
-
yhu-odoo authored
Currently, delivery packaging and product packaging share the same model product.packaging. In this commit, we make delivery packaging a new model stock.package.type. The code is also moved to stock instead of delivery for compatibility reasons. Task 2341820 PR #63516 ENT PR odoo/enterprise#15363 UPG PR odoo/upgrade#2040
-
yhu-odoo authored
Let's say we have location A, B, and C. A is the parent of B, B is the parent of C. And we have a putaway rule to move product from A to B. Now receive product at C, because currently when we can't find a putaway rule at one location, we will loop to check its parent locations. So the puteaway rule A -> B will be found, and product received at C will in the end be stored at B. After this commit, we don't check the parent locations when we can't find a putaway rule. Task 2341820 PR #63516 ENT PR odoo/enterprise#15363 UPG PR odoo/upgrade#2040
-
Odoo's Mergebot authored
This PR is two-fold. First, it removes a cause non-deterministic failing builds. The cause was the setTimeout for the quick edit event in FormController which waits at least 1 tick even if timeout = 0 like in those tests. Now, if this timeout is 0 then we bypass the setTimeout. Second, we ensure that the delay is patched to 0 for every tests, and allow to set it to a specific value is wanted in a given test. Indeed, before this PR, a patch done in a module was never unpatched, and some tests executed after passed in the whole suite, but failed when executed alone, because they also needed the patch. closes odoo/odoo#68578 Signed-off-by:
Aaron Bohy (aab) <aab@odoo.com>
-
Aaron Bohy authored
A lot of tests in different QUnit modules need this delay to be patched to 0. Some of them (e.g. the 'ActionManager > Misc' module) didn't patch it correctly. It worked before because a patch was done in a previous test, and wasn't unpatch. The previous commit ensures the patch is removed, so now we have at least 2 tests of the above mentionned module that fail. This commit ensures that the delay is patched in every tests, and allows to specify a custom delay if necessary.
-
Aaron Bohy authored
For testing purpose, the multi-click timeout delay of the quick edit is patched. However, in this specific test, it is patched twice (once to set it to 0 in beforeEach, and once to set it to 50 in the test itself). A single call to unpatch removes the second patch (50) but keeps the first one, for the remaining of the test suite. This could lead to weird situations where the whole suite passes, but a single test executed on its own fails. Issue spotted in the assets revamp PR, as it alters the test order.
-
Michael Mattiello (mcm) authored
Before this commit, quick edit tests could crash in an undetermined way. It was due to the setTimeout for the quick edit event in FormController which waits at least 1 tick even if timeout = 0 like in those tests. Now, if this timeout is 0 then we bypass the setTimeout.
-
- Mar 30, 2021
-
-
Yannick Tivisse authored
This reverts commit 825b533ec964fd8a9923dd4d2091f122b92d8759. For the following reasons: - This is a behavior change on a stable release. See our stable policy: https://github.com/odoo/odoo/wiki/Contributing#what-does-stable-mean - If a contract end date is set, it's erased when moving the contract afterward. - There is a cron which is moving the expired contracts automatically, this will rewrite the end date on it, which is not a big deal, but this is useless. - Modifying the contract end date also unlink all the work entries that are outside of the new contract period. If there is an open payslip, it also recomputes the worked days lines, and the payslip lines. That way, it's possible to recompute a payslip by introducing unpaid time off inside of it. If the payroll officers are checking the payslips at that time, and don't notice it (already checked, etc...), then at the validation, this could lead to some more serious issues (wrong net salary paid to the employee, wrong accounting entries, wrong declaration to the state, etc). If the contract end date is badly configured, this is normal that the reporting is wrong. No need to add some magic that people don't understand, that could lead to wrong behaviors later on the process. closes odoo/odoo#68541 X-original-commit: c34b6bc3d0d25e8b8b1bcb6684331627b823f57d Signed-off-by:
Yannick Tivisse (yti) <yti@odoo.com>
-
Yannick Tivisse authored
closes odoo/odoo#68536 X-original-commit: 62a01fa6ff2f1f078b333f5d8bb16d73d0921bdb Related: odoo/enterprise#17371 Signed-off-by:
Yannick Tivisse (yti) <yti@odoo.com>
-
Rémy Voet (ryv) authored
This method is useless and it bypass the computation of some fields (qty_available, virtual_available, incoming_qty, outgoing_qty). Then this method is not cache-friendly, and we should use `read` instead. task-2439019 closes odoo/odoo#66621 Related: odoo/enterprise#16584 Signed-off-by:
Arnold Moyaux <amoyaux@users.noreply.github.com>
-
Rémy Voet (ryv) authored
To avoid multiple search of the get_warehouse for the same location and extra SQL request (it happens a lot for complicate flow, e.g. mrp_mps, replenishment report). Translate it into a standard compute to use the cache of the ORM for no-store compute field (`warehouse_id`) and put some depends to be always correct (even if `warehouse_id` shouldn't change in the same request). task-2439019
-
Rémy Voet (ryv) authored
Some usage of `_bom_find` are performance bottleneck (one request by product). By example, when the mrp is installed, search products with fields compute by `_compute_quantities` (e.g. 'Negative forecasted quantity'). it is due to the override of `_compute_quantities` in mrp which will make (in the worst case) a `_bom_find` for each product in the DB. To avoid this situation the `_bom_find` method become batched which can handle several products in once. The signature of the method has changed and uniformize in all module. Example performance Gain: ------------------------ In a DB with 7000 products (type 'product'), 500 locations, 1800 BoM, 9000 Stock moves, etc. Search in the tree view with filter "Negative forecasted quantity": Before: 10879 (nb SQL request) 12.67 +- 0.11 sec (Total RPC Time) After: 159 (nb SQL request) 1.82 +- 0.03 sec (Total RPC Time) task-2439019
-
Rémy Voet (ryv) authored
The compute of `product_variant_count` was highly inefficient in batch. It is due to `with_prefetch` which remove the prefetch (reset _prefetch_ids = _ids) of the for loop. It was added by 05a00fa9 which fixed performance issue for the 11.0 about `sales_count`. But with the new ORM (13.0) compute fields are lazy. Performance improvements: For the search_read of the kanban view (Menu: Sale/Products/Products) with the default pagination (80 items): Before: 347 SQL request and 0.31 +- 0.2 sec (Python and SQL time) After: 110 SQL request and 0.14 +- 0.2 sec (Python and SQL time) task-2439019
-
Khalid El Haji authored
closes odoo/odoo#68558 X-original-commit: 610e1cea Signed-off-by:
Martin Trigaux (mat) <mat@odoo.com>
-
Jérémy Hennecart authored
The purpose is to allow the user to have the opportunity to manage what is going to be send as reminders. He can now access to the template or create a new one when the type of reminder is email or sms. In case of a simple notification, a new text field is added to add custom content. Task ID-2191254 COM PR odoo/odoo#68443 UPG PR odoo/upgrade#2313 Signed-off-by:
Thibault Delavallee (tde) <tde@openerp.com>
-
Jérémy Hennecart authored
Purpose of this commit is to ease sending mail to attendees using template by using a template record instead of an xml id. Indeed this allow having flows using a configurable template instead of an hardcoded one. Code in calendar_sms is split into main models to ease future improvements related to SMS. Taks ID-2191254 COM PR odoo/odoo#68443
-
- Mar 25, 2021
-
-
Qiuyu (QHO) authored
Before the commit, `_action_unfollow()` can be called by `_message_receive_bounce()` and then multiple leave notifications can be sent even if the partner has been removed from the channel, when the partner is a follower of the channel and without a valid email address. Unfollow action should also remove the partner from the followers, and only be processed if the partner is still a member of the channel. Task id: 2456233 closes odoo/odoo#68314 X-original-commit: 5cf22425eb68f15d94a8b283c50198561bbc240a Signed-off-by:
Thibault Delavallee (tde) <tde@openerp.com> Signed-off-by:
Sébastien Theys (seb) <seb@odoo.com>
-
- Mar 30, 2021
-
-
Benoit Socias authored
Before this commit the Dexter effect did span its darkening area beyond the cover image. After this commit the darkening area it aligned with the cover image. https://github.com/odoo/odoo/pull/68529 closes odoo/odoo#68529 Signed-off-by:
Jérémy Kersten (jke) <jke@openerp.com>
-
Benoit Socias authored
Before this commit both Google Map and Map snippets were always available in the block list. After this commit: - if the Google Maps API key is specified: only the Google Map snippet is available - if the Google Maps API key is not specified: only the Map snippet is available - if debug mode is activated: both snippets are available https://github.com/odoo/odoo/pull/68529
-
Benoit Socias authored
Before this commit filter selection on the dynamic snippet did trigger the rendering of a preview. This sometimes caused a blocking loader to appear when the filter selection triggered the replacement of the list of available templates. After this commit selecting a filter does not trigger a preview rendering anymore. Also the condition for making the warning message appear is now about the selected template being in the list of available templates. https://github.com/odoo/odoo/pull/68529
-