Issue
- Install eCommerce
- Modify a product image with one which
has more than 1024px width/height to
enable zoom (I used: https://bit.ly/2VETQZS)
- Go on the website preview & hover the image
Depending on the screen size, a part of the
flyout is hidden because of overflow-x
if you want to see it, you should scroll
right width right arrow key.
Cause
The flyout has 100% width and is put
right (position absolute, left: 100%)
Solution
To avoid this error on all screen size,
the solution is to compute the max-width
of the flyout depending on the available
space on the right.
OPW-2283648
closesodoo/odoo#54222
X-original-commit: c89b4c25ed92542f6fd0279cf3a9e4ef1bac9fa5
Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
Issue
- Runbot 13.0
- Website > Contact Form
- Double click on send button
Link dialog opened, ok
- Discard
- Double click on send button
- Click link button
Traceback
Cause
The next double click doesn't work
because in rte.js RTEWidget._onMousedown
we remove the target's contenteditable
attribute and it's never added back.
This is because we break if the element
is not editable.
The traceback is a side effect,
since we can't select the button
anymore, our selection is incorrect
and getLinkInfo use range.create()
try to use it.
Solution
Break only if the target is not
a '<a>' & non-editable element
OPW-2268595
closesodoo/odoo#54221
X-original-commit: 460bc102d0f7503207fb7bd11216c335795dd33b
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
1. set a Sales team and add an alias
2. create a contact (customer) with an email and grant them portal
access (under the action)
3. Odoo creates a portal user
4. use the email of the contact to send an email to the alias set under
the sales team
An opportunity is created but the sales person assign to that
opportunity is the customer.
This will revert user if the user has no access to crm.lead
opw-2288442
closesodoo/odoo#54217
X-original-commit: a3fdff3dd9cc38b432b93a7cd4387cb7c38b8d06
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Purpose
=======
https://github.com/odoo/odoo/pull/52351 already improved the display
by hiding some account properties if it wasn't really neeeded on manual
inventory valuation.
Specification
=============
Keep the Account Properties section visible in any cases. The price
difference account is the only field of the section which is only
used in automated valuation.
closesodoo/odoo#54210
Taskid: 2232026
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
opws: 2269230, 2248760
When a database has a lot of projects with many tasks, and needs
to send a lot of feedback mails, the cron tries to send mails to
all tasks at the same time, thus it times out.
This fix will allow to treat projects one at a time so that when
the cron times out, it will not restart from the beginning.
closesodoo/odoo#53922
X-original-commit: 07c828b48741500573b4286480b23752a28163c7
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
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
closesodoo/odoo#54190
X-original-commit: 0f93240e4979479ab281ca49e8703b325c4b83f0
Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
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
closesodoo/odoo#54202
X-original-commit: ec743deb23f22a823cd0ea56eb4719209a9c4d09
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
- 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
closesodoo/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>
*: 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).
closesodoo/odoo#54162
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
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
closesodoo/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>
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
closesodoo/odoo#54175
X-original-commit: f7d2bdf65901e3ee78e1055cab7cf8d60f798621
Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
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.
closesodoo/odoo#54168
X-original-commit: b0de225c721e54b76dcbe49f9769ac371db39c05
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
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.
closesodoo/odoo#54164
X-original-commit: a6d32ff46558b68ce3f19458f29c311ee5c658fd
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
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.
closesodoo/odoo#54156
X-original-commit: 6d4b5fcd11e96fd170d8df1ed27be2a8cea26e8b
Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
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
closesodoo/odoo#54152
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
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
The mixin was inconsistent: depending on the color, the created rules
were `!important` or not. This causes bugs with new master features.
closesodoo/odoo#54151
X-original-commit: 83d8c8b66bd9e58b08fe0aa66d2be7bab691ce3e
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
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
closesodoo/odoo#53937
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
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'}
```
closesodoo/odoo#54171
X-original-commit: 3fd162db3ab51cc473d99bd90fce6c135f3b4ff3
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
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
closesodoo/odoo#54158
X-original-commit: 27956951eebc7c068a7d57e8bd21c29522f3ff9e
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
*: 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).
closesodoo/odoo#54154
Also: fix some layout issue in the colorpicker widget.
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
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 '=='.
closesodoo/odoo#54149
X-original-commit: 06f9baae968674547cb2592b1c22147bfb2e8ba9
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
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
closesodoo/odoo#54112
X-original-commit: b3452a1863c36290b13e16161e2703d9a3737f0e
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
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
closesodoo/odoo#54128
X-original-commit: 0e7071f249e69c5cca519ec66120530eb0f97153
Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
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}
closesodoo/odoo#54126
X-original-commit: db013a01ca4e10640ac33a59466c9cb5746e3698
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Signed-off-by: Christophe Simonis <chs@odoo.com>
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
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
closesodoo/odoo#54075
X-original-commit: 64e55cb42163643386740fbd23d710f64033b2ae
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
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/53085closesodoo/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>
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
closesodoo/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>
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.
Fixesodoo/odoo#50527closesodoo/odoo#54079
X-original-commit: 47707e1b099195487fd3d3e0ae012e4aed5a9bc5
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
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
This commit extracts the DatePicker widget's input setter to allow
overriding it and preventing from calling the `datetimepicker` lib when
not initialized (like on mobile).
Note: this change will be used on enterprise.
opw-2242880
X-original-commit: c0413868a8728500c52b7e1dd9a0035f90b654fd
Since the refactor of the control panel, support of "widgets" attributes
in the search view archs has been inadvertently dropped.
Now, they are once again supported.
Task 2061795
closesodoo/odoo#54066
X-original-commit: f33b0bc7a93e60bd0ed00b40d7459225ec0b749a
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
We move the IoT Box version file from /home/pi to /var/odoo
so its not overriden after an auto-flash of the IoT Box.
closesodoo/odoo#54063
X-original-commit: ce0700ce401523267b5a8bd5665a368cfea24912
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
Issue
- Install English and French languages
- Create a customer contact and assign french as his language
- Create a product with correct names in both languages.
For example 'French product name' and 'English product name' for easy reference.
- Create an inventory transfer with the french customer as contact
- Add the product that you created
- Print > Delivery Slip
The report will show in the lines:
"""
French product name
English product name
"""
Cause
Getting product description without checking partner language.
Solution
If partner is set, get product description with partner language in context.
opw-2280490
closesodoo/odoo#54061
X-original-commit: cebe2cf57e68e2d1d54cd442aff6ba7d9554d043
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
Improve delivery slip with following features:
1. Group Kit components on the delivery slip
- Split kit components by kit "sections"
2. Print one line per product whatever the tracking
- Combine duplicate product move lines when "Display Lots & Serial Numbers on Delivery Slips" is not activated or no lots/serial numbers are assigned in the picking
3. Group packages on the delivery slip
- Split products up by package "sections"
- Print package info such as "weight"
4. Expiration Dates
- Give option to print lot/serial number expiration dates on delivery slip
Task: 2008609
Description of the issue/feature this PR addresses:
Current behavior before PR:
Desired behavior after PR is merged:
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
closesodoo/odoo#49832
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>