Steps to reproduce:
- Configure incoming mail server and set it to create X record
on incoming mails (X can be any model with a chatter)
- Create a CSV file and set the encoding to UTF-16
- Send the CSV file through Gmail to the Odoo instance
- Go to model X and open the created record
- In the chatter, click/download the CSV file
- Open the downloaded file with Geany (or any file editor that can
show the file encoding)
Issue:
The file encoding is not the same as the original file (utf-8 instead
of utf-16).
Working with Outlook.
Cause:
The difference between Outlook and Gmail is that Gmail provides the
charset of the file.
The content of the mail is retrieved using `email` python lib.
The lib will try to retrieve the charset of the file and fallback
on `ASCII` if not available, then return the decode content.
```python
def get_text_content(msg, errors='replace'):
content = msg.get_payload(decode=True)
charset = msg.get_param('charset', 'ASCII')
return content.decode(charset, errors=errors)
```
Example:
content = b'd\x00a\x00,\x00,\x00,\......'
Outlook:
charset = 'ASCII'
return => 'd\x00a\x00,\x00,\x00...'
Gmail:
charset = 'UTF-16LE'
return => 'da,,,,,\n,,,,,\....'
In the post process of the attachment, the content is encoded in
'utf-8' (to then encoded in base64) before creating the attachment
record.
Content encoded to 'utf-8':
Outlook: b'd\x00a\x00,\x00,\x00...'
Gmail: b'da,,,,,\n,,,,,\n....'
Therefore, when writing the file on the disk, the encoding is based
on the binary content.
Solution:
When parsing the mail, add the encoding charset to the `info` variable.
Then, when creating the attachment, use the charset in `info` (or
fallback on 'utf'8' if no charset set) to encode the content.
opw-3089009
closesodoo/odoo#118694
X-original-commit: 2d1b13e68d8bb204ecfe12a9d3db519c4264592c
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Nasreddin Boulif (bon) <bon@odoo.com>
This PR adds a banner on archived channels in detailed view
It also adds a banner on archived channels in kaban view, and
reduces the space available for description in case of banner.
Task-2494469
closesodoo/odoo#117619
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
The current profiler will add default value in the user session
using disk space without valid reason.
This commit makes those parameters optional in the session.
closesodoo/odoo#118762
X-original-commit: eb3bf03b119105f56806d7460fccd4c0133deaab
Signed-off-by: Jérémy Kersten <jke@odoo.com>
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
Steps to reproduce
==================
- With the Chrome devtools, add a network delay of 1 second
- Go to Purchase
- Create RFQ
- Add vendor
- Add products and navigate by using the 'TAB' key
- Add another product line
- Repeat process quickly
`this.list.editedRecord is null`
Cause of the issue
==================
Order of events:
- First tab pressed
- onchange_1 triggered
- Second tab pressed
- onchange_2 triggered
- onchange_1 resolves
- The editedRecord is switched to readonly
- onchange_2 resolves
- There is no more editedRecord
opw-3115650
closesodoo/odoo#118760
X-original-commit: af5cedf078b439710e8801374ace524de54f3b66
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Co-authored-by: FrancoisGe <fge@odoo.com>
Before this commit, im status in community was blue instead
of green.
This commit makes im status green in all version, as it should.
closesodoo/odoo#118744
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
To reproduce the issue:
1. In Settings, enable:
- Multi-Step Routes
- Storage Categories
- Packages
2. Create a Storage Category SC:
- Allow New Product: same
- Max Weight: 100 kg
- Capacity by Package:
- 2 x Pallet
3. Create two locations L1, L2:
- Parent: WH/Stock
- Type: Internal
- Storage Category: SC
4. Create a putaway rule:
- When in: WH/Stock
- Package type: Pallet
- Store to: WH/Stock
- Having Category: SC
5. Edit the warehouse:
- Incoming Shipments: 2 steps
6. Create a product P:
- Type: Storable
- Weight: 1 kg
7. Update L1:
- There is 1 x P in a pallet
8. Create a planned receipt R:
- To: WH/Input
- Operations:
- 2 x P
9. Mark R as Todo
10. Create two packages:
- 1 x P in PK01 (! PK01 must be a Pallet)
- 1 x P in PK02 (! PK02 must be a Pallet)
11. Validate R
12. Open the related internal transfer T
Error: Both packages are redirected to L2 but one of them should be
redirected to L1
When checking L1, we ensure that the policy 'all same products' is
respected. To do so, we compare the products of the quants of L1
with the given product. Here is the issue: when moving a package, we
don't provide any `product` value to the methods used in the putaway
rules process.
Note: There was also another issue with the 'all same products'
policy. Suppose L1 is empty, and we move a pallet with two different
products, the move line is redirected to L1, which breaks the 'all
same products' condition.
OPW-3204924
closesodoo/odoo#118708
X-original-commit: 3a6d82de77e0ab477b3f22985f6d41995e25f652
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
Current behaviour:
When duplicating a project, new milestones are copied for the new
project, but none of them are assigned to the copied tasks like in
the original project.
Expected behaviour:
The new tasks in the new project should have the corresponding copy
of the milestone that were assigned in the original project.
Steps to reproduce:
- Install Project
- Duplicate "Office Design" (it has milestones)
- Observe that the tasks in the new project don't have milestones
assigned to them, like in the original project.
Reason for the problem:
When we copy the tasks, they have the milestones of the original
project correctly assigned to them, but since the project of the
milestone is different from the project of the task (former
references the original project, while the latter references the
copied project), so in `_compute_milestone_id`, the milestone of the
task is set to False.
Fix:
Remove `copy=True` from `milestone_ids` on the project, and copy the
milestone by hand. This allows us to use an overwrite of `copy()`
for `project.milestone`, and we create a mapping between the old
milestones and the new ones in the context, similar to how we did
with `task_mapping`. With this we can assign the newly created
milestones on the copied tasks correctly (while preserving the
mapping like in the original project).
Affected versions:
- 16.0
- saas-16.1
- saas-16.2
- master
opw-3254868
closesodoo/odoo#118487
X-original-commit: aad60a2c8a887f3ea226af99be9b162673c33ec8
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Signed-off-by: Piryns Victor (pivi) <pivi@odoo.com>
This commit includes the ongoing day in the current period filters.
Now the start date (time) of each period filter is the start of next day,
and the end date (time) is the end of today.
task 3267525
closesodoo/odoo#118326
Related: odoo/enterprise#39641
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
Steps to reproduce
==================
- Register two events listener on the same target
- Unregister them
Only the first one is unregistered
Cause of the issue
==================
`cbs` is used instead of `listeners`. This means that after any `.off`
call, the target is removed from the Map and it is not possible anymore
to unregister any events for it
closesodoo/odoo#118739
X-original-commit: 345dd30fdc627ada212a8eaa6f9817bbdaf5d3a3
Signed-off-by: Samuel Degueldre <sad@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Step to reproduce :
- create a service product with 'create project & task'
- set the invoice policy on either 'invoice on TS', 'invoice on
milestone', 'prepaid'
- create a new SO with the product and confirm.
- update the price of the sol (e.a. from 10 to 20)
- go to project_updates
The project profitability panel is still showing 10 instead of the
updated price of 20
After this fix, the project profitability is correctly showing 20
task-3236240
closesodoo/odoo#118728
X-original-commit: 847313c3bccc31449bc441d21304b71648a7f429
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Since odoo/odoo@04e972660b
The session `modified` flag has been renamed `is_dirty`.
However, it has not been renamed correctly in these
three different places.
The goal to set `modified` at this three places
is to force the session to be saved,
for instance because a mutable (a list or a dict)
contained in the session was modified,
but not the dict of the session itself,
therefore `modified` is not flagged automatically.
As the flag `modified` has not been renamed to `is_dirty`,
a key/value `modified: True` was actually assigned to the
session dict, and saved in file. The behavior
to save the session in these three places was kept,
as one key/value of the session has been changed,
but by the way to assign a new value in the session file,
which is not ideal.
It's better to assign the correct flag to avoid
setting a new key/value in the session for no reason.
closesodoo/odoo#118719
X-original-commit: b6f4a27f2d95d5bc5510f4da50132ab66d8c86aa
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
## Issues
- `error_msg` is not set when the template cannot find any record to use as example (16.2)
- `resource_ref` is only initialized in default_get. If the preview generates a report, the commit from that action invalidates the cache and that value disappears. (14.0, real issue since 16.2 as it was previously handled another way)
- html data using empty nodes `<t></t>` are incorrectly converted to 'self-closing' tags `<t/>` which becomes <t> thanks to standard html parsing. (14.0, real issue in 16.0 then 16.2)*
This last one was not an issue because jquery used to fix these invalid tags for us, until a recent update here: 9c41ee5091ac06ac3ca71aeac607195c70061e4a
## Fixes
- Simply add a default value and set that at the end of the compute method
- make resource_ref a write-able computed field to keep the same functionality while allowing the ORM to recompute it
- use the `method` argument of `lxml.etree.tostring` to tell lxml to print the content of the nodes as valid HTML in the data converter
See sub commits for more details.
Task-3162320
closesodoo/odoo#118710
Forward-port-of: odoo/odoo#114632
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Templates could previously be created for abstract models.
The methods are not written with that in mind and most useful ones will
raise an exception when calling them on that template.
task-3162320
X-original-commit: 0d4b473ee54d2376f4f71efd864aa0e16822d4ba
Part-of: odoo/odoo#118710
Prior to this change the convert tool did could mangle
the value of html fields when importing static data.
This is because html does not support 'self-closing'
except for HTML5 where it is allowed on void elements (such as img).
Browsers will assume that they are opening tags, left unclosed.
<span/> becomes <span>
They will then try to repair them with variying degrees of success.
Example where it fails:
`<t><t/></t><t><t/></t>`
should become
`<t><t></t></t><t><t></t></t>`
but it becomes
`<t><t></t><t><t></t></t>`
i.e. instead of closing the 'self-closing' tag immediately,
it puts everything inside a single t node
More concretely:
```
<t t-if>
<t t-out />
</t>
<t t-else>
<t t-out/>
</t>
```
becomes
```
<t t-if>
<t t-out></t>
<t t-else>
<t t-out></t>
</t>
</t>
```
which is invalid
-------------------------
The fix is simply to tell lxml that we want to print the xml nodes
as HTML nodes. This will make sure the output is compliant with
the standard and keep the semantic clear for the browser.
The issue does not appear before 16.2, as jquery used to fix it
for us until an update here 9c41ee5091ac06ac3ca71aeac607195c70061e4a
task-3162320
X-original-commit: 8ff2e1018264972107f19755ecda352d78dfa829
Part-of: odoo/odoo#118710
Before this, the resource_ref field is computed once in the default_get.
This means if the cache is invalidated, its value is unrecoverable.
Notably, the cache is invalidated when an attachment is generated
(triggering a commit).
So calling _generate_template could invalidate resource_ref,
which we use as a key to retrieve its result.
This results in a traceback for the user when trying to preview
a template where the first record hasn't yet generated its attachment.
As an example, trying to preview `Sales: Send Quotation`
on fresh installs.
task-3162320
X-original-commit: b4bd93c9b61736a7f41d70afe5db977a6e4b35e0
Part-of: odoo/odoo#118710
If the preview wizard was used to preview a template on a model that
has no record, error_msg would not be set.
This means the field is never set in that case and creating the wizard
results in a cache miss on that field.
The fix is to simply set it, and we add a test to cover that flow of
the wizard.
task-3162320
X-original-commit: 0976ce53e0a97a1f49dc2a262cf66355242fde25
Part-of: odoo/odoo#118710
If applied, this commit will solve the external id issue of the base admin user.
Before this commit:
==========================
When we delete the admin user (base.admin_user) and try to login with a new user
or try to write in a new user, this error will come.
After this commit:
===========================
The issue will be resolved after this commit and authorize new users without
any errors.
sentry - 3973828005
see - https://tinyurl.com/2jm772jmclosesodoo/odoo#118681
X-original-commit: 567027b4d4e3efdbbabab3a7a3c5e090df51dbf8
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Before this commit when choosing the program rule type "Buy X get Y"
an error occured: after adding rewards and trying to save the record
the rewards were reset to the default value for program rules
of type "discount".
This ocurred because the program type was not being sent to the
`default_get` method of the `loyalty.reward` record.
After this commit rewards are correctly preserved.
opw - 3240558
closesodoo/odoo#118679
X-original-commit: 44b9eab482a219e6c260ef29512b8d6a595300ac
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Section "Electronic Data Interchange" should not be displayed for
account_edi_ubl_cii since it's empty. In addition, only display the
section in account_edi if some EDI are compatibles.
closesodoo/odoo#117901
Related: odoo/upgrade#4525
Signed-off-by: Laurent Smet <las@odoo.com>
When replacing an image by a pictogram inside columns, the pictogram
right-alignment is neutralised by the fact that the section of the card
inside the column spans over 100% width.
This commit makes pictograms in those sections rely on their auto width
instead - thus letting the right-alignment happen as expected.
Steps to reproduce:
- Drop a "Columns" block.
- Replace an image by a pictogram.
- Select the pictogram.
- Click on the "Float Right" icon in the toolbar.
=> Pictogram remained aligned to the left.
task-2841127
closesodoo/odoo#118684
X-original-commit: c3eae07259cb38656aa910ad98d0da04f4fc7edb
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
Align images to the right by using an auto left margin.
Steps to reproduce:
- Drop a "Columns" block.
- Select an image.
- Resize image to 50%.
- Align image to the right.
=> Image did not get aligned to the right.
task-2841127
X-original-commit: d2364278371828fa353c17d53fd266350aa2446b
Part-of: odoo/odoo#118684
Install only the “purchase” module and run the test, it’ll always fail
since the product type is added in the stock module
Bug introduced in: https://github.com/odoo/odoo/pull/117956
Solution:
Use the consumable type instead
closesodoo/odoo#118672
X-original-commit: e155d91a906fabff02c0d34af51f874daebef909
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
from april 3, the transifex has changed domain
from www.transifex.com to app.transifex.com
after this commit, the transifex project url
in the system parameter will be updated to
the new domain
closesodoo/odoo#118664
X-original-commit: c79164f6fad26f9838fee753436eb8fb763947ab
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
This issue occurs when the user changes the Journal 'journal_id' in this
'report.pos.order' model then traceback will be generated.
Step to Produce:-
- In POS, Click on Reporting Menu > Order.
- Click on graph > Open any One record.
- Try To Change the Journal('journal_id').
- Trace-back will be generated.
sentry:- 3929247828
closesodoo/odoo#118660
X-original-commit: 87ed00e65ecaa22c559a43452c87d4f16e598f3f
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Error:'UniqueViolation duplicate key value violates unique constraint
account_journal_code_company_uniq.'
When we install the 'point_of_sale' module it tries to create account journals
with existing id's due to which we face the above error.
This commit removes the portion of code that creates the account journal
with already existing id's.
sentry - 4062359900
closesodoo/odoo#118618
X-original-commit: 3c209e5c91e374dc7738df01f48e630a7fba5caf
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
*: mass_mailing, website_blog, website_event, website_mail_group,
website_mass_mailing, website_payment, website_sale, website_twitter
The names of snippet blocks are not translatable because their name is
obtained from a their template name which is not a translatable item.
For markets that use a non-latin alphabet this is a no go.
This commit makes it possible to specify a `string` attribute in the
`t-snippet` blocks that makes their name inventoried by the translation
process.
closesodoo/odoo#118530
X-original-commit: a501d226d8674ed0c9b183c69a9e754c79682237
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
There were a few issues:
* we didn't always take the last statement as a reference: if we had
two statement the same day, we needed to take the last one. Adding the
`id` in the ORDER BY actually also improves the performances (4s to
2.5s on the test database for all journals)
* If there is no statement, we didn't display the balance at all because
`statement.first_line_index` is NULL, therefore the `>=` operator
returned NULL and the condition was falsy
opw-3268956
opw-3269493
opw-3268950
opw-3270450
opw-3270143
and many more...
closesodoo/odoo#118368
X-original-commit: 5c4fb4cd15a371c0648ae4aee160f9f858b89445
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: William André (wan) <wan@odoo.com>
Behaviour before PR:
In kanban view, the cards UI is broken when there are too long words
without spaces or breaks in the bottom half of the cards.
Desired behaviour after PR:
The words are broken so it fits in the cards without breaking the UI.
closesodoo/odoo#118659
Task: 3083665
X-original-commit: f7696bb31d7a15596892e16cc64e1ab3d6438aa4
Signed-off-by: Géry Debongnie <ged@odoo.com>
This notification makes sense when we know this message. If we don't
know it yet, then we should just ignore and receive data of link
preview when fetching the message.
closesodoo/odoo#118647
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this commit, some behaviors of the forms after being submitted
were problematic:
- with the `On Success` option set on `Redirect`, when going back to a
form after submitting it (with the browser arrows), the fields were
still filled.
- with the `Show Message` option selected, when going in edit mode when
the message was displayed, the submit button was still "loading", even
after saving.
This commit solves this issues by properly resetting the form at each
start and restoring the submit button loading effect when the message is
displayed.
task-2798576
closesodoo/odoo#118645
X-original-commit: ecb3bda77fab512a9790daf58447058f250f49e6
Signed-off-by: Vray Benjamin (bvr) <bvr@odoo.com>
Signed-off-by: Bojabza Soukéina (sobo) <sobo@odoo.com>
This commit consists of a full rework of the quick create form in the calendar
view, so that it shows more options to the user rather than only the name of
the event. To accomplish this, we added a new attribute on the calendar view
with the id of the quick create form view to be used. This allows us to have
a custom view to be shown on quick create.
task-3129030
closesodoo/odoo#114827
Signed-off-by: Leonardo Pavan Rocha <lpr@odoo.com>
Create a Field Service Task
Assing a customer, in Timesheet tab add a line with Hours Spent 00:20
Mark as Done
Sale Order will be created with a sale order line
Total of the line and Total of the order will not match
This occurs because the sale order line has been created with an
unrounded quantity of 0.333333
opw-3184468
closesodoo/odoo#118628
X-original-commit: ca72697042687e205fb288a97ec4717a97c89664
Related: odoo/enterprise#39799
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
Disable performance tests from both tef and tcf.
Too many PR are blocked due to broken assertQueryCount, either there are
too many queries, either there are too few.
It is too much work to run all tests three times only to update a comment
with the final count (module alone + community + enterprise).
It is too hard to keep track of the hundreds queries to determine those
that moved, those that are missing and those that are new between two
branches. We have to apply tons of string-replace and sorts just to help
some diff tools (e.g. meld) into showing what changed.
Basically, except a few people, nobody care to do the investigation work
and just increase the query count (without changing the comments).
We tried for one year, now it is time to let those test go.
closesodoo/odoo#118614
X-original-commit: 353074fa1f362560737bb2905270ef4ae35e177e
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
before this commit, the 'service_upsell_threshold' field input was too wide.
In this commit, add scss for widget percentage to reduce the width of the
field.
task-3128541
closesodoo/odoo#118589
X-original-commit: 14dddaba34a463d81bf8120fba034ce5f022ad0c
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Before this commit button in notification are not aligned with
other content of notification reason it is not aligned because
all buttons have padding in their surrounding and because of
starting padding on button it is not align with others.
This commit add ps-0 to remove starting padding and align
notification button with other content.
task-3117332
closesodoo/odoo#118145
Related: odoo/enterprise#36540
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
**Before this commit**
Since 394f85c954f anytime this hook opens a popover, a traceback occurs.
It is due to the fact this hook passes a callback as a
getter-only property to the usePopover hook options.
The traceback occur because the usePopover
hook has to reassign this option (onClose callback).
**After this commit**
Fixed and tested.
closesodoo/odoo#118580
Signed-off-by: Michaël Mattiello <mcm@odoo.com>
Commit [1], [2] and [3] added `Properties` type fields on (respectively)
project.task, helpdesk.ticket and crm.lead. Unfortunately, those fields
are not currently supported by the Website Form snippet. Selecting the
"Properties" field while editing a form related to one of these model
will lead to a crash as no definition for how the field is supposed to
render is present in the current code base.
(Note that no logic for how options should behave if such field is
selected is present either.)
Therefore, this commit removes this specific type of field from being
present in the "Existing Fields" section of the Website Form Field
editor.
Steps to reproduce:
- Install website and project
- Go to Website and start edit mode
- Drop a form snippet
- Click on the form snippet and select "Create a task" as an Action
- Click on an existing field or add one
- Select "Properties" as the field type
=> Traceback (QWeb render error)
[1]: https://github.com/odoo/odoo/commit/2f244769cbb1512875ae197aa8adc3efd34fd54b
[2]: https://github.com/odoo/odoo/commit/8de9f4c4777481142063f75d4cd3cef47948714b
[3]: https://github.com/odoo/odoo/commit/4722cc4b1fb027b7b9d731c3b206656588071360
opw-3240395
closesodoo/odoo#118597
X-original-commit: 078f879444e5c2655f80ee572156ac663c0e4abb
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Bug:
Currently, creating an intra-community bill and reconciling it with an
early payment can break the tax report.
Steps to reproduce:
1. install the Austrian localization (l10n_at)
2. set `Cash Discount Tax Reduction` to `On early payment`
3. create a €1000 intra-community bill (you can just use the tax called
`IGE 20%`)
4. set the payment term to`2/7 Net 30` and confirm
5. reconcile the bill with a payment within the discount period
(2% discount: €980).
6. check the Tax Report: line 5.4 of the report should be €196. If you
reconciled the bill with a back statement directly, sections
`Innergemeinschaftliche Erwerb` and `Bemessungsgrundlage` will be
wrong as well.
Cause:
Since the intra-community applies here, the bill will produce two tax
lines. And because `Cash Discount Tax Reduction` is set to `On early
payment`, those two tax lines will be reduced when an early payment is
made.
However, because of the way the `is_refund` property of
`account.move.line` field is computed on moves of type `entry`, one of
those *tax reduction line* will be considered a refund and the other
will not. Furthermore, the computed tags are correct only because the taxes
are recomputed again when creating the payment.
After removing this extra taxes computation, both tax_tag_ids/tax_tag_invert
are invalid.
So the solution is to fix the method computing the taxes for cash discount lines.
Note: This commit also fixes the cash discount engine not working with multiple tax repartition lines since:
https://github.com/odoo/odoo/commit/9c134ec379819053e3fdd1e252e3a7ae8a949f42
opw-3112197
Enterprise PR: odoo/enterprise#39181closesodoo/odoo#118588
X-original-commit: de0db2429f7c47d52c1bad37b9d35d425c8d5b74
Related: odoo/enterprise#39775
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Nshimiyimana Serge Séna (sesn) <sesn@odoo.com>
Co-authored-by: Laurent Smet <las@odoo.com>
This commit adds the loading="lazy" attribute to every img tags compiled
by the kanban compiler and modifies some kanban archs in order to use
img tags instead of divs with background-image style to load images
(this allows again the loading="lazy" attribute to work).
The purpose is to avoid loading images that are outside the user viewport
at all time in order to reduce the load on the network when new images are
loaded.
Steps to test: find all views that are using the o_kanban_image or o_kanban_image_fill_left
class and ensure all the images in these views appear in the network tab of devtools
when they enter the user viewport. Example: res.partners, hr.employee, ...
task-3102207
closesodoo/odoo#117049
Related: odoo/enterprise#39560
Signed-off-by: Géry Debongnie <ged@odoo.com>
Since [1], the way the message unread counter is computed has changed.
The patch of the `im_livechat` module is not adapted properly. This
commit fixes this issue.
[1]: 6ebe033b00774ed8824d05f0adf9dae5f3654261
closesodoo/odoo#118581
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This commit patches the font awesome library to add an icon for the
TikTok social network. Users are now able to add these icons with the
media dialog. Now, the TikTok icon works like all other font awesome
icons, with the new class introduced by this commit: `fa-tiktok`.
Moreover, the social media block in the website application can detect a
tiktok link and automatically integrate its icon with its color.
Technical note:
In order to add this new icon, a new font that contains only the TikTok
logo has been created.
task-3235451
closesodoo/odoo#118542
X-original-commit: dc926d56a286eebd3e7c10343824a6e2c1a76adc
Signed-off-by: Vray Benjamin (bvr) <bvr@odoo.com>
The content of the override of `can_be_merged_with` should only be executed when we're
in France.
The previous implementation resulted in breaking the `test_05_tip_screen` when this module
was installed with pos_restaurant.
closesodoo/odoo#118573
X-original-commit: 0d0a5e9ddc838f34bfbc469f9a8fceaeeadaa24d
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
account, purchase, sale
before this commit, opening a record from
portal(sale, purchase, invoice, project)
shows the window title as Invoice Portal Template,
Purchase Order Portal Template and
Sales Order Portal Template etc
* navigate to portal
* click sales order
* click and open any sales order
* see the window title
after this commit, better title will be
displayed to the portal users.
Invoice Portal Template --> Invoice/Bill
Purchase Order Portal Template --> Purchase Order
Sales Order Portal Template --> Sales Order
closesodoo/odoo#118567
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
[1] refactored the Media Dialog using owl and the backend Dialog
component.
Doing so, the width of the dialog was reduced (using the standard
.modal-xl class). With that change, the "load more" button was not
always visible for the user.
It is acknowledged that the current Media Dialog needs a deeper UI
review. In the meantime, it was decided to scroll to the bottom after a
search/click on the load more button.
This commit implements that solution with a ref on the "load more" div.
It is used in a scrollToLoadMoreButton, that is called each time after
loading a new attachment/illustration/unsplash record. As we do not want
a jump in the UI each time an image is loaded, the function is
debounced.
It is simpler to use a debounced function that we call each time an
element is loaded, than keeping track of each loaded element to call
the function only once, when they are loaded.
[1]: https://github.com/odoo/odoo/commit/31cc10b91dc7762e23b4bde9b945be0c4ce3fe3b
task-3060679
X-original-commit: 4921442690e6f5b587441a653f73c3368155422e
Part-of: odoo/odoo#118556
Before this commit, clicking on the 'load more' button of the media
dialog after a search (with no filter set) would load more
attachments/illustrations/unsplash records.
As illustrations are considered less relevant than attachments/unsplash
records, it was decided to load more of them only when the filter is set
to "illustrations".
When the filter is not set, the 'load more' button will be visible only
if there are more attachments or more unsplash images to load (and not
visible otherwise, even if there are more illustrations to load).
Also, the loadMore override will only perform the query to load more
illustrations if the filter is set.
A deeper review of the Media Dialog UI will be conducted later. For now,
this commit avoids loading too many illustrations, for users that are
most of the time more interested in the unsplash results.
task-3060679
X-original-commit: 6aaca71a4b2a11ffa80578904bc7c79c1fa0339d
Part-of: odoo/odoo#118556
Before this commit, typing a query in the search input of the media
dialog would output a lot of undraw images (15), making some noise and
making the unsplash results (that are fetched 10 by 10) less visible.
First, the number of fetched attachments was reduced from 30 to 10 when
converted to owl in [1], for no valid reason. This commit adds a new
NUMBER_OF_RECORDS_TO_DISPLAY value for better control over the loaded
images, and reverts it to 30.
Then, the /web_editor/media_library_search endpoint does not take any
limit param. Therefore, it was loaded with all the results as they were
returned. Now, a new NUMBER_OF_MEDIA_TO_DISPLAY variable is introduced
to load the 10 first results instead of all of them.
This way, the search results are organised as following:
- NUMBER_OF_ATTACHMENTS_TO_DISPLAY (30 for now) attachments,
- NUMBER_OF_MEDIA_TO_DISPLAY (10 for now) media (undraw, ...),
- NUMBER_OF_RECORDS_TO_DISPLAY (30 for now) unsplash images.
These values can be changed to adjust the search (it may be better to
have more unsplash images than undraw images).
[1]: https://github.com/odoo/odoo/commit/31cc10b91dc7762e23b4bde9b945be0c4ce3fe3b
task-3060679
X-original-commit: bc4fe60bcebd3e47f206c911526784a88fd520d9
Part-of: odoo/odoo#118556