- Jul 07, 2020
-
-
jvm-odoo authored
Issue - Create a content in a course with type "web page" - Access it frontend and add a "text - image" block, edit the image as a video - save - The video is displayed correctly - Go into full-screen The video is not displayed at all. Cause The content is added after the page and page widgets are started Solution Trigger the widgets start method OPW-2290233 closes odoo/odoo#54190 X-original-commit: 0f93240e Signed-off-by:
Jason Van Malder (jvm) <jvm@odoo.com>
-
Loan (lse) authored
The idea is to avoid useless SQL request as the searching process is heavy (have to look the word in several field and can be in translation tables). As we at some point fetch all the searched product we do it at the beginning and use its information to gain performance on other queries. Execution time in e-shop for "test" on client database (160 000 product with 4500 published): - Before: ~ 7 sec - After: ~ 2 sec OPW-2256662 closes odoo/odoo#54202 X-original-commit: ec743deb Signed-off-by:
Jérémy Kersten (jke) <jke@openerp.com>
-
Xavier Dubuc authored
- Remove no more used ThreadViewer prop : messageListInitialScrollTop - Remove no more used ChatWindow prop : threadInitialScrollTop - Rename ThreadViewer field threadCacheInitialPosition to threadCacheInitialScrollPosition - Use the scroll position to set message list scroll on mounted - Fix old test which was not simulating correctly home menu show - Add tests to check that scroll position is correctly saved even if ChatWindow is folded - Fix traceback when showing/hiding home menu with a folded chat window task-2285691 closes odoo/odoo#54198 X-original-commit: 31123a94c156424b3962fe4aebc3cc60a7a89223 Signed-off-by:
Alexandre Kühn (aku) <aku@odoo.com> Signed-off-by:
Sébastien Theys (seb) <seb@odoo.com>
-
qsm-odoo authored
*: website Update the visibility (from dependencies and _computeWidgetVisibility function) for all widgets, including the ones which are children of main widgets (e.g. new ability to hide some choices from a select depending on other options). closes odoo/odoo#54162 Signed-off-by:
Quentin Smetz (qsm) <qsm@odoo.com>
-
Aaron Bohy authored
Before this commit, in a grouped kanban view with sample data (e.g. crm.lead), one could toggle the 'settings' dropdown menu of a group, and then drag&drop the group by clicking on the muted "Fold" item in the dropdown. After this commit, dragging a column is only possible by clicking on the column title (but not on the 'config' or '+' icons, nor the config dropdown). Task 2290197 closes odoo/odoo#54179 X-original-commit: 58c38a024c96eba3469c142a8422b7bd0ab54ea4 Signed-off-by:
Mathieu Duckerts-Antoine <Polymorphe57@users.noreply.github.com> Signed-off-by:
Aaron Bohy (aab) <aab@odoo.com>
-
jvm-odoo authored
Issue Chrome - Sales > Product - Select a file - Change something in the file - Re-select it Nothing changed Cause Chrome doesn't trigger change on input if the file is the same Solution Clear the input value after the parse_preview so we can load a new file even if the preview failed. OPW-2288191 closes odoo/odoo#54175 X-original-commit: f7d2bdf6 Signed-off-by:
Jason Van Malder (jvm) <jvm@odoo.com>
-
qsm-odoo authored
The 'inset' checkbox of the shadow option was still displayed for no reason. A "display: none" inline style was added on it but as inline style is not considered for editor widgets I don't know how it could have ever worked. closes odoo/odoo#54168 X-original-commit: b0de225c721e54b76dcbe49f9769ac371db39c05 Signed-off-by:
Quentin Smetz (qsm) <qsm@odoo.com>
-
Julien Mougenot authored
Before this commit, there were a few tests in the "sample server" suite that asserted that every group resulting of a "read_group" would contain at least one record, while there was actually a slight chance of it not happening. Now, the sample server used in the tests has been rendered deterministic and these kind of issues are completely avoided. closes odoo/odoo#54164 X-original-commit: a6d32ff46558b68ce3f19458f29c311ee5c658fd Signed-off-by:
Aaron Bohy (aab) <aab@odoo.com> Signed-off-by:
Julien Mougenot (jum) <jum@odoo.com>
-
- Jul 06, 2020
-
-
Olivier Dony authored
The CDN implementation for resources works by matching well-know attributes (`href`, `src`, `action`) that hold URLs matching the CDN filters and injects the CDN prefix. However 13.0 introduced lazy loading for assets in #32181, so the attributes are now prefixed with `data-` and replaced at runtime. This PR updates the tag matching in order to cover both variants of attribute names. closes odoo/odoo#54156 X-original-commit: 6d4b5fcd Signed-off-by:
Toufik Benjaa (tbe) <tbe@odoo.com>
-
- Jul 07, 2020
-
-
Jeremy Kersten authored
Now, slug uses seo_name if field exists before to fallback on display_name. It allow to have a custom url without change the product name already used in backend e.g. or just because you want add some keywords for seo. task-2291676 closes odoo/odoo#54152 Signed-off-by:
Jérémy Kersten (jke) <jke@openerp.com>
-
Jeremy Kersten authored
Now, slug uses seo_name if field exists before to fallback on display_name. It allow to have a custom url without change the product name already used in backend e.g. or just because you want add some keywords for seo. task-2291676
-
- Jul 06, 2020
-
-
qsm-odoo authored
The mixin was inconsistent: depending on the color, the created rules were `!important` or not. This causes bugs with new master features. closes odoo/odoo#54151 X-original-commit: 83d8c8b66bd9e58b08fe0aa66d2be7bab691ce3e Signed-off-by:
Quentin Smetz (qsm) <qsm@odoo.com>
-
- Jul 07, 2020
-
-
Hardik Prajapati authored
Before this commit, boolean fields (without widget="boolean") in kanban views were displayed as [Object object], because when no widget is specified, we display the (textual) formatted value of the field. However, the boolean formatter returns by default a string encoding an html checkbox. This commit passes the correct option to force a string formatting, so it now displays "True" or "False". Moreover, this commit uniformizes formatter options for that purpose, as another option had been recently introduced for monetary field. Note that those options should not be necessary, as formatters should always return text values (no html). But this is a larger change, that we might do in the future. Task 2280394 closes odoo/odoo#53937 Signed-off-by:
Aaron Bohy (aab) <aab@odoo.com>
-
Denis Ledoux authored
Use case: - `./odoo-bin -d mydb -i website` - `./odoo-bin -d mydb -i base_automation` - `./odoo-bin -d mydb -u website,base_automation` ``` odoo.addons.base.models.ir_model: Deleting 2652@ir.model.fields (base_automation.field_base_automation__website_published) odoo.addons.base.models.ir_model: Deleting 2651@ir.model.fields (base_automation.field_base_automation__website_url) odoo.addons.base.models.ir_model: Deleting 2650@ir.model.fields (base_automation.field_base_automation__website_path) ``` The issue comes from the fact: - `website` adds multiple website related fields on `ir.actions.server` https://github.com/odoo/odoo/blob/30e94d305f9cffa816ddc213e0b9329c0263c145/addons/website/models/ir_actions.py#L16-L18 - `base.automation` inherits by delegation of the `ir.actions.server` fields thanks to `delegate=True` on its field `action_server_id` https://github.com/odoo/odoo/blob/30e94d305f9cffa816ddc213e0b9329c0263c145/addons/base_automation/models/base_automation.py#L37 - when `base_automation` is installed after `website` when `_reflect_model` is called, the website related fields on `ir.actions.server` are well in the `_fields` of the `base.automation` model, and there an xmlid for these fields is created e.g. `field_base_automation__website_published` https://github.com/odoo/odoo/blob/30e94d305f9cffa816ddc213e0b9329c0263c145/odoo/addons/base/models/ir_model.py#L881-L882 - during the `-u website,base_automation`, `_reflect_model` on `base.automation` is called before the website related fields coming from its inherits on `ir.actions.server` are added in its `_fields`, and is not recalled after they are added, when the `website` module is loaded and these website related fields are added on `ir.actions.server`. Because of this, at the end of the upgrade, in the `ir.model.data` `_process_end`, as the xmlids of these fields have not been loaded, they are being deleted, because the ORM considers these fields were dropped from the source code because their xmlids have not been loaded during the upgrade. Adding the model `base.automation` in the `inherits_children` of `ir.actions.server` when the delegate field `action_server_id` is added make sure `_reflect_model` is called on `base.automation` after the website related field are loaded on the model `ir.actions.server`, and therefore ensure the xmlids are properly loaded, therefore preventing the fields deletion. Additionaly, `delegate` and `inherits` are supposed to be equivalent, it's just two ways to do the same thing. Before this revision, when using `delegate`, `base.automation` is not in the `inherits_children` of `ir.actions.server`: ``` In [1]: env['ir.actions.server']._inherits_children Out[1]: set() ``` while, by converting the `delegate` to an `inherits`: ```diff diff --git a/addons/base_automation/models/base_automation.py b/addons/base_automation/models/base_automation.py index 196ebe9965f..c073150386a 100644 --- a/addons/base_automation/models/base_automation.py +++ b/addons/base_automation/models/base_automation.py @@ -30,11 +30,12 @@ class BaseAutomation(models.Model): _name = 'base.automation' _description = 'Automated Action' _order = 'sequence' + _inherits = {'ir.actions.server': 'action_server_id'} action_server_id = fields.Many2one( 'ir.actions.server', 'Server Actions', domain="[('model_id', '=', model_id)]", - delegate=True, required=True, ondelete='restrict') + required=True, ondelete='restrict') active = fields.Boolean(default=True, help="When unchecked, the rule is hidden and will not be executed.") trigger = fields.Selection([ ('on_create', 'On Creation'), ``` it is: ``` In [1]: env['ir.actions.server']._inherits_children Out[1]: {'base.automation'} ``` closes odoo/odoo#54171 X-original-commit: 3fd162db Signed-off-by:
Denis Ledoux (dle) <dle@odoo.com>
-
- Jul 06, 2020
-
-
Xavier Dubuc authored
Before this commit, when clicking on reply in inbox would send a message whatever the subtype of message the reply is linked to. This commit makes sure that if the message which we want to reply to is a note (resp. comment), then the reply will be a note (resp. comment) task-2282363 closes odoo/odoo#54158 X-original-commit: 27956951eebc7c068a7d57e8bd21c29522f3ff9e Signed-off-by:
Alexandre Kühn (aku) <aku@odoo.com>
-
Xavier Dubuc authored
task-2280151 closes odoo/odoo#54157 X-original-commit: 83f2a0605ad80cb8b544651b47b7d27e11b332cb Signed-off-by:
Alexandre Kühn (aku) <aku@odoo.com>
-
qsm-odoo authored
*: website The style to achieve the chess-like bg result was duplicated at many places. The 'web' app was also actually using an image from the 'web_editor' app (we can live with it in stable as web_editor always comes with web in auto_install but this was still a mistake). closes odoo/odoo#54154 Also: fix some layout issue in the colorpicker widget. Signed-off-by:
Quentin Smetz (qsm) <qsm@odoo.com>
-
lejeune quentin authored
When we upgrade the IoT we wait that the version of box match with the last version of IoT Box before to refresh. We make a request to '/hw_proxy/get_version' to get the actual version. In Jinja this response give a float. We compare this value with a string using '===' who want that the format match. So we doesn't compare the format of values but only the value by putting only '=='. closes odoo/odoo#54149 X-original-commit: 06f9baae Signed-off-by:
Quentin Lejeune (qle) <qle@odoo.com>
-
Xavier Dubuc authored
See also odoo/enterprise#11684 task-2282273 closes odoo/odoo#54141 Signed-off-by:
Sébastien Theys (seb) <seb@odoo.com>
-
Xavier ALT authored
In case a field is limited to specific groups on the model, those fields are discarded from `fields_view_get()` but can still be referenced by some filters on the search view causing a traceback (see #53797) Model: ```python class MyModel(models.Model): my_field = fields.Char(groups='base.group_system') ``` Search views: ```xml <search string="My Model"> <filter name="group_myfield" context="{'group_by': 'my_field'}"/> </search> ``` This commit ensure those filter are correctly discarded. OPW-2284621 closes odoo/odoo#54112 X-original-commit: b3452a1863c36290b13e16161e2703d9a3737f0e Signed-off-by:
Aaron Bohy (aab) <aab@odoo.com>
-
Victor Feyens authored
-> 1 less translation -> the first part of the message didn't add anything useful closes odoo/odoo#54118 Related: odoo/enterprise#11676 Signed-off-by:
Martin Trigaux (mat) <mat@odoo.com>
-
Victor Feyens authored
* Less translations * Translations more precise and adapted to the context
-
Victor Feyens authored
Do not translate all route types when only one route type translation is needed.
-
jvm-odoo authored
Issue - Go to Accounting / Customers / Invoices - Pick any invoice not paid - Action: Generate a Payment Link - Open the link - Refresh the page having Javascript disabled - Click the Pay Now button Traceback Cause If JS is not loaded, the values in the form fields are not bound as expected. It can also happen with slow connections and fast click on the button at the loading. Before the JS is entirely loaded (as it is lazy-loaded). Solution Button disabled by default, wait the page to be loaded and then activate the button OPW-2255760 closes odoo/odoo#54128 X-original-commit: 0e7071f2 Signed-off-by:
Jason Van Malder (jvm) <jvm@odoo.com>
-
Christophe Simonis authored
These field combinations [1] are actually secondary keys. They are unique and represent the record identity. Marking them as modified had a nasty side-effect: on some models, there is a m2o to an ir.model and a stored related to ir.model/model that will be recomputed at each model reflection. This can take some time on big tables. Moreover, some other stored fields may depend on those ir.model/model related store, which adds useless time lost at recomputing unchanged values. [1] ir.model/model, ir.model.fields/{model,name} and ir.model.selection/{field_id,name} closes odoo/odoo#54126 X-original-commit: db013a01ca4e10640ac33a59466c9cb5746e3698 Signed-off-by:
Raphael Collet (rco) <rco@openerp.com> Signed-off-by:
Christophe Simonis <chs@odoo.com>
-
Daniel Dico authored
HST 14% tax was replaced with 15% tax in October 2016 as per GST/HST provincial rates table [1]. [1] https://www.canada.ca/en/revenue-agency/services/tax/businesses/topics/gst-hst-businesses/charge-collect-which-rate/calculator.html#rt ) opw-2290216 closes odoo/odoo#54110 Signed-off-by:
Nicolas Martinelli (nim) <nim@odoo.com>
-
- Jul 03, 2020
-
-
Laurent Smet authored
closes odoo/odoo#54067 X-original-commit: 07b07c7c359a31203fc2e4e4e09b909ad315453a Related: odoo/enterprise#11653 Signed-off-by:
Laurent Smet <smetl@users.noreply.github.com> Signed-off-by:
bfr-o <bfr-o@users.noreply.github.com>
-
bfr-o authored
' X-original-commit: 10c14c63094870346143a42f5df39e1db3f0dc5c
-
bfr-o authored
When the model is loaded, the value of 'check_amount_in_words' is computed for each existing payment. It could lead to a traceback if the second condition is reached referencing an xml_id that is not yet loaded. Indeed, data are loaded after the models. X-original-commit: a9234e7581f267c64c4bf19d93e7b6844fe4d0b4
-
Laurent Smet authored
X-original-commit: 7d6e4917b7871628c7a385be61b73a01c5e79f3a
-
Laurent Smet authored
X-original-commit: bbf8f9c6b30cb5c0978057efe5f78b5c1492435e
-
Aaron Bohy authored
Some widgets allow the edition in readonly (e.g. boolean_toggle, priority...). In this case, the changed value is saved directly. Before this commit, this didn't work in (main) list views: the widget was updated with the new value, but it wasn't saved in db, so the change was lost at reload. This was due to the list controller not being correctly aware of its mode ('edit' or 'readonly'), on which the basic controller relies to determine whether a change must be saved directly or not. With this commit, a list is always in 'readonly', except when a row is being edited, in which case it is in 'edit'. Issue reported on task 2288963 closes odoo/odoo#54075 X-original-commit: 64e55cb42163643386740fbd23d710f64033b2ae Signed-off-by:
Julien Mougenot (jum) <jum@odoo.com> Signed-off-by:
Aaron Bohy (aab) <aab@odoo.com>
-
- Jul 04, 2020
-
-
oco-odoo authored
[FIX] account: fix bad forward port of https://github.com/odoo/odoo/commit/bbbb11f3fd10bbb0f1086920f291aa9c7c2052be closes odoo/odoo#54083 X-original-commit: 253dd0eef7f4ae64b6311d72fe41a08897370d89 Related: odoo/enterprise#11659 Signed-off-by:
Laurent Smet <smetl@users.noreply.github.com> Signed-off-by:
oco-odoo <oco-odoo@users.noreply.github.com>
-
- Jul 03, 2020
-
-
oco-odoo authored
Before that, since https://github.com/odoo/odoo/commit/71ee252dc43fd0e2b86ba8079c31915544e528eb , negative invoice lines were not supported by thoses taxes. Nor were miscellaneous entries. To make them work, we change the way tags are assigned to cash basis taxes : instead of copying them from the invoice, sign included, we now change their sign when appropriate, so that the resulting cash basis move can be treated like any regular miscellaneous operation by the tax report (so, always applying a factor of 1 to its lines' balance). Doing that also allows us to re-simplify the code used in the tax report and tax audit computation to manage cash basis entries, and makes the cash basis entry more standard. This is also a usability improvement: now the user does not have to search for the original invoice to understand how the CABA entries are going to impact the report: it's always managed like a misc. operation, so he can just trust the signs of the tags. v13 version of https://github.com/odoo/odoo/pull/53085 closes odoo/odoo#54058 X-original-commit: 20850301f5025ffd1a05e0594f6d26d2a61759ef Related: odoo/enterprise#11652 Signed-off-by:
Laurent Smet <smetl@users.noreply.github.com> Signed-off-by:
oco-odoo <oco-odoo@users.noreply.github.com>
-
Laurent Smet authored
- Fix discount indicator with 100.0% discount. - Fix reported tax amount with group of taxes. - Fix reported tax_base_amount with foreign currency. - Fix invoice summary according the facturx xsd. closes odoo/odoo#54080 X-original-commit: e97333f6d80eaa5807467a863a9c8f5850e1d644 Related: odoo/enterprise#11657 Signed-off-by:
Quentin De Paoli (qdp) <qdp@openerp.com> Signed-off-by:
Laurent Smet <smetl@users.noreply.github.com>
-
Laurent Smet authored
X-original-commit: a9a1d8e5348010eca7de15199faae1f2469d96ff
-
Laurent Smet authored
X-original-commit: 955db1203599516bdbefeedee37de6b8ad69bf12
-
Odoo's Mergebot authored
During TempusDominus autobinding to fields matching its default classes (like `.datetimepicker-input` used by our DatePicker widget) and no config was previously provided to the library (like when we disable it on mobile), an unsafe access to the config's `_options` property results into an error as the config is `undefined`. This PR fixes it by first checking for config existence before attempting to access its property. It also extracts the DatePicker widget's input setter to allow overriding it and preventing from calling the `datetimepicker` lib when not initialized (like on mobile). opw-2242880 closes odoo/odoo#54068 Forward-port-of: odoo/odoo#54039 Forward-port-of: odoo/odoo#54005 Related: odoo/enterprise#11654 Signed-off-by:
Adrien Dieudonné (adr) <adr@odoo.com> Signed-off-by:
Pierre Paridans <pparidans@users.noreply.github.com>
-
Martin Trigaux authored
The time to display the check in/check out time was hardcoded to HH:mm:ss while other locales may use different formats. Use the appropriate time utils to retrieve the right format that uses the time format from the res.lang record. Fixes odoo/odoo#50527 closes odoo/odoo#54079 X-original-commit: 47707e1b Signed-off-by:
Martin Trigaux (mat) <mat@odoo.com>
-
Pierre Paridans authored
During TempusDominus autobinding to fields matching its default classes (like `.datetimepicker-input` used by our DatePicker widget) and no config was previously provided to the library (like when we disable it on mobile), an unsafe access to the config's `_options` property results into an error as the config is `undefined`. This commit fixes it by first checking for config existence before attempting to access its property. Note: as this is a fix inside a library, a comment is added to make clear. Also similar fixes where already done in the same file. opw-2242880 X-original-commit: fe1f7c3e361bbd249b4025a464c546f478b6e989
-