- Oct 04, 2021
-
-
Xavier Morel authored
51955505 mitigated an issue of being able to try and download files which don't exist yet, make the fix more reliable by clearing out the field completely and hiding the content if the (readonly) field has no value *or the record is not saved yet*. Also clean up the code: * an old-style forward port created a duplicate fixprovement (a8d01cbf) which seems less correct as it applies conditionally * and the code is branchier than necessary, we can make it simpler by judiciously leveraging jquery's API closes odoo/odoo#77603 Signed-off-by:
Xavier Morel (xmo) <xmo@odoo.com>
-
- Jun 16, 2021
-
-
Denis Ledoux authored
`update_db_index` is meant to skip the creation of the index if it fails. It therefore uses `with cr.savepoint()` for that purpose But, before this revision, it surrounds `create_index`, in which the index creation is skipped if it already exists. Meaning, if the index already exists, a savepoint was created for nothing. Creating a savepoint has a cost. Therefore, avoiding to create one when it's not necessary is better for the performances. In addition, during an installation / upgrades, a lot of index are attempted to be created, and the performance of postgresql are degraded when there are more than 64 savepoints within the same transaction, which could easily happen when installing/updating a module, while attempting to create all its indexes (despite they already existed). Moving only the `with cr.savepoint`, without moving the `try..except` will have no impact on the API. It's still the role of the method calling `create_index` to catch the exception if it wants to. Besides, for the methods which are calling `create_index` without a `try..except` block, the transaction will still be rollbacked, as it's the case for any uncatched exception in Odoo. There is therefore no downside to move `cr.savepoint` into `create_index`. closes odoo/odoo#71565 Signed-off-by:
Denis Ledoux (dle) <dle@odoo.com>
-
- May 20, 2021
-
-
Xavier Morel authored
As part of the Python 3 compatibility effort, 01e35141 moved all uses of urllib(2) to werkzeug & requests as the packages were renamed and reorganised between P2 and P3. For `module.py`, it looks like I confused the `urls` local variable for an already imported `werkzeug.urls` and just tried calling `url_parse` on that. Which doesn't work, because `urls` is a dict. Fixes #71076 closes odoo/odoo#71080 Signed-off-by:
Xavier Morel (xmo) <xmo@odoo.com>
-
- May 01, 2021
-
-
Odoo Translation Bot authored
-
- Apr 27, 2021
-
-
Thibault Delavallée authored
closes odoo/odoo#69945 Signed-off-by:
Thibault Delavallee (tde) <tde@openerp.com>
-
Stéphane Debauche authored
A computed field on event may crash if current user is a portal user as it tries to access registrations to know if current user is already participating to the event. We also fix ACL on the registrations as most code already use it as sudo and do not access it directly. Only the event users or admins should access it directly. Task ID-2322411 PR odoo/odoo#68699 Signed-off-by:
Thibault Delavallee (tde) <tde@openerp.com>
-
Stéphane Debauche authored
Purpose ======= When creating an attendee from frontend some fields may be added in parameters, notably through inheritance (questions, ...). We want the defaults values to have the priority on those parameters (e.g. barcode code). Task ID-2322411 PR odoo/odoo#68699
-
- Apr 15, 2021
-
-
Nicolas Lempereur authored
In windows chrome 89 (at least at version 89.0.4389.114 (29 march 2021)) clicking on a select option doesn't trigger jQuery events if they are delegated. For example this happen when selecting a field for custom group or custom filter in the search view and when selecting a field the dropdown closes. This happens because: - chrome now sends MouseEvent.button[^1] with value -1 instead of previousvalue of 0. - jquery in odoo 12 and under is version 1.11.1 and only executes the delegated event if the button value is 0 Reproduction case of the issue [^2]: clicking to choose an option only logs "non-delegated click". So for version 11.0 and 12.0 only, this commit is cherry-picking jquery's commit that is fixing the issue: https://github.com/jquery/jquery/commit/c82a6685bb9 [^1]: https://developer.mozilla.org/docs/Web/API/MouseEvent/button [^2]: http://jsfiddle.net/cox4gzae opw-2497859 opw-2499415 opw-2499305 opw-2466991 opw-2506676 backport of #69274 closes odoo/odoo#69304 Signed-off-by:
Nicolas Lempereur (nle) <nle@odoo.com>
-
- Apr 01, 2021
-
-
Odoo Translation Bot authored
-
- Mar 01, 2021
-
-
Odoo Translation Bot authored
-
- Feb 19, 2021
-
-
Xavier Morel authored
instead of using ad-hoc weirds closes odoo/odoo#66437 Signed-off-by:
Xavier Morel (xmo) <xmo@odoo.com>
-
- Feb 01, 2021
-
-
Odoo Translation Bot authored
-
- Jan 13, 2021
-
-
Moises Lopez authored
The vatnumber is pinned to version 1.2 in the requirements.txt: -https://github.com/odoo/odoo/blob/85f3fe323c9105827931febda04745a55c1f44a4/requirements.txt#L41 but vatnumber does not have a pinned version to stdnum package So, it is installed the last version even if it is not compatible A new version was released of stdnum 1.15 on Jan 11, 2021 - https://pypi.org/project/python-stdnum/1.15/ But it is not compatible with odoo@11.0 anymore because of there is not exists the following attribute: - stdnum.eu.vat._country_codes or stdnum.eu.vat.country_codes Used in the following line: - https://github.com/odoo/odoo/blob/85f3fe323c9105827931febda04745a55c1f44a4/addons/base_vat_autocomplete/models/res_partner.py#L15-L17 So, the following error will raised: 2021-01-12 22:40:39,897 155 CRITICAL DB odoo.modules.module: Couldn't load module base_vat_autocomplete 2021-01-12 22:40:39,897 155 CRITICAL DB odoo.modules.module: module 'stdnum.eu.vat' has no attribute '_country_codes' 2021-01-12 22:40:39,905 155 WARNING DB odoo.modules.loading: Transient module states were reset 2021-01-12 22:40:39,906 155 ERROR DB odoo.modules.registry: Failed to load registry Traceback (most recent call last): File "./modules/registry.py", line 85, in new odoo.modules.load_modules(registry._db, force_demo, status, update_module) File "./modules/loading.py", line 380, in load_modules loaded_modules, update_module, models_to_check) File "./modules/loading.py", line 274, in load_marked_modules perform_checks=perform_checks, models_to_check=models_to_check File "./modules/loading.py", line 137, in load_module_graph load_openerp_module(package.name) File "./modules/module.py", line 368, in load_openerp_module __import__('odoo.addons.' + module_name) File "<frozen importlib._bootstrap>", line 969, in _find_and_load File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 664, in _load_unlocked File "<frozen importlib._bootstrap>", line 634, in _load_backward_compatible File "./modules/module.py", line 82, in load_module exec(open(modfile, 'rb').read(), new_mod.__dict__) File "<string>", line 4, in <module> File "./base_vat_autocomplete/models/__init__.py", line 4, in <module> from . import res_partner File "./base_vat_autocomplete/models/res_partner.py", line 17, in <module> stdnum_vat.country_codes = stdnum_vat._country_codes AttributeError: module 'stdnum.eu.vat' has no attribute '_country_codes' 2021-01-12 22:40:39,907 155 CRITICAL DB odoo.service.server: Failed to initialize database `DB`. Traceback (most recent call last): File "./service/server.py", line 1043, in preload_registries registry = Registry.new(dbname, update_module=update_module) File "./modules/registry.py", line 85, in new odoo.modules.load_modules(registry._db, force_demo, status, update_module) File "./modules/loading.py", line 380, in load_modules loaded_modules, update_module, models_to_check) File "./modules/loading.py", line 274, in load_marked_modules perform_checks=perform_checks, models_to_check=models_to_check File "./modules/loading.py", line 137, in load_module_graph load_openerp_module(package.name) File "./modules/module.py", line 368, in load_openerp_module __import__('odoo.addons.' + module_name) File "<frozen importlib._bootstrap>", line 969, in _find_and_load File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 664, in _load_unlocked File "<frozen importlib._bootstrap>", line 634, in _load_backward_compatible File "./modules/module.py", line 82, in load_module exec(open(modfile, 'rb').read(), new_mod.__dict__) File "<string>", line 4, in <module> File "./base_vat_autocomplete/models/__init__.py", line 4, in <module> from . import res_partner File "./base_vat_autocomplete/models/res_partner.py", line 17, in <module> stdnum_vat.country_codes = stdnum_vat._country_codes AttributeError: module 'stdnum.eu.vat' has no attribute '_country_codes' 2021-01-12 22:40:39,908 155 INFO DB odoo.service.server: Initiating shutdown 2021-01-12 22:40:39,908 155 INFO DB odoo.service.server: Hit CTRL-C again or send a second signal to force the shutdown. Fixed pinning the last version compatible python-stdnum<=1.14 closes odoo/odoo#64447 Signed-off-by:
Christophe Monniez (moc) <moc@odoo.com>
-
- Jan 01, 2021
-
-
Odoo Translation Bot authored
-
- Dec 03, 2020
-
-
root authored
Before this commit there was an option to get an error because there is a space after read. This mistake was introduced by xmo-odoo at 44351700 closes odoo/odoo#62808 Signed-off-by:
Xavier Morel (xmo) <xmo@odoo.com>
-
- Dec 01, 2020
-
-
Odoo Translation Bot authored
-
- Nov 14, 2020
-
-
Martin Trigaux authored
Could import translation on a non-active translation
-
- Nov 18, 2020
-
-
Debauche Stéphane authored
As we do not need all the datetime module, we want to restrict the functions (as we do for dateutil). Also centralise handling of this and apply it by default, no reason for there to be divergences. Task 2179629
-
- Nov 08, 2020
-
-
Xavier Morel authored
Prevent mistakenly adding "portal" to existing internal users through the portal wizard as that can lead to odd behaviors (to the extent that since 12.0 the "user type" uses radio buttons so it's not possible to easily set a user as both internal and portal).
-
- Nov 13, 2020
-
-
Xavier Morel authored
-
- Nov 07, 2020
-
-
Xavier Morel authored
-
- Nov 10, 2020
-
-
Alexandre Kühn authored
When generation the message. add the name of the channel with a placeholder. In some languages like Japanese, the order of words is different and adding the name at the end makes an incorrect sentence, it was not possible to properly translate it.
-
- Nov 14, 2020
-
-
Xavier Morel authored
-
- Nov 15, 2020
-
-
Xavier Morel authored
-
- Nov 07, 2020
-
-
Debauche Stéphane authored
Purpose ======= Before, by default, if a user create a channel, he will not be member of this channel. After, the current user will always be member of the new channel. Task 1963414
-
- Nov 18, 2020
-
-
Xavier Morel authored
-
- Nov 21, 2020
-
-
Martin Trigaux authored
-
- Nov 16, 2020
-
-
Olivier Dony authored
-
- Nov 09, 2020
-
-
Martin Trigaux authored
When copy-pasting text from rich text, the content may contain unwanted formating instructions. Unsure it's escaped to avoid propagating the content.
-
- Nov 13, 2020
-
-
Fanny He authored
The commit 97430bba609882cd734b79f89f903d7894266145 set 2 warnings on Units of Measure and Decimal Accuracy. However this introduced a bug, here are the steps to reproduce: - Install decimal_precision - In debug mode, go to Decimal Accuracy - Create: traceback Based on commit 916df82eba1a98cd5a6c780f2e7ca16356fa640c we move one warning from decimal_precision to product, and modify the translations accordingly. closes odoo/odoo#61704 Signed-off-by:
Raphael Collet (rco) <rco@openerp.com>
-
- Oct 28, 2020
-
-
Daniel Duque authored
Consider some model A that "_inherits" from model B, which itself "_inherits" from model C. Also consider a field F on model C, which is inherited by both models B and A. Now create a record from model A, with a given record for model C, no record for model B, and a default value for field F. This should create a record in A, connected to a new record in B, connected to the given record in C, and the default value should be ignored, as a record from C is given. Before this commit, the given record in C is modified with the default value for F. The default value is considered because no record is given for B, and that value is used to modify the given record in C. The fix consists in discarding default values by considering potential ancestor records when parent records are not given. closes odoo/odoo#60898 Signed-off-by:
Raphael Collet (rco) <rco@openerp.com> Co-authored-by:
Raphael Collet <rco@odoo.com>
-
Daniel Duque authored
-
- Nov 01, 2020
-
-
Odoo Translation Bot authored
-
- Jul 06, 2020
-
-
Andreas Perhab authored
blog.blog has no attribute post_date therefore as a fallback we need to use the write_date of the blog.blog element when no blog.posts are published. this prevents the following error: ``` File "/opt/odoo/custom/src/odoo/odoo/addons/base/ir/ir_qweb/qweb.py", line 353, in _compiled_fn raise QWebException("Error to render compiling AST", e, path, node and etree.tostring(node[0], encoding='unicode'), name) odoo.addons.base.ir.ir_qweb.qweb.QWebException: 'blog.blog' object has no attribute 'post_date' Traceback (most recent call last): File "/opt/odoo/custom/src/odoo/odoo/addons/base/ir/ir_qweb/qweb.py", line 346, in _compiled_fn return compiled(self, append, new, options, log) File "<template>", line 1, in template_1400_458 AttributeError: 'blog.blog' object has no attribute 'post_date' ``` closes odoo/odoo#54116 Signed-off-by:
Jérémy Kersten (jke) <jke@openerp.com>
-
- Oct 25, 2020
-
-
Odoo Translation Bot authored
-
- Oct 18, 2020
-
-
Odoo Translation Bot authored
-
- Oct 13, 2020
-
-
Victor Feyens authored
Revert commit "[FIX] base: clearer message in case of conflict for no_gap sequences" This commit changed the error returned in case of SQL conflict for no_gap sequences, wrongly disabling the automatic retry (service/model.py) in case of such errors. Also adds a comment in the dedicated test to ensure the behavior is explained and the automatic retry isn't broken once again by the same kind of change. closes odoo/odoo#59829 Signed-off-by:
Victor Feyens (vfe) <vfe@odoo.com>
-
- Oct 11, 2020
-
-
Odoo Translation Bot authored
-
- Oct 05, 2020
-
-
SilvioGregorini authored
closes odoo/odoo#58954 Signed-off-by:
Martin Trigaux (mat) <mat@odoo.com>
-
Nicolas Martinelli authored
- Go to the Contacts app - Click on the Azure Interior company, or any other company with multiple associated people - Set the country to Mexico - Edit the VAT field and enter the following string: UAC070620MB3 Traceback will happen after hitting save. It happens because `self` is a recordset in this case. Moreover, while the VAT number starts with `UA`, the country is Mexico so the check is incorrct. opw-2348045 closes odoo/odoo#59010 Signed-off-by:
Nicolas Martinelli (nim) <nim@odoo.com>
-