Commit Graph
159565 Commits
Author SHA1 Message Date
Tejas Modi efe72ee0ea [IMP] stock: added barcode in reception report
Currently, transfer barcode is not available in reception report.

So in this commit, I have added transfer barcodes. Also, align the barcode and
transfer name according to the report.

TaskID - 3081077

closes odoo/odoo#112773

Signed-off-by: Steve Van Essche <svs@odoo.com>
2023-03-22 14:52:06 +01:00
Guillaume (gdi) a17b386254 [FIX] website: allow edit mode when a wrong iframe is in the page
Before [this other commit], it was possible to add a wrong video on a
page of its website. If the user did this and saved the page, it was no
longer possible for him to enter edit mode. To solve this, two
improvements have been made:
1. We now prevent the user from putting a wrong video on his page when
he goes through the media dialog (see [this other commit]).
2. Since there are probably websites that have a bad video (it was
possible before [this other commit]), this commit allows users to edit
the pages that have these wrong videos.

Steps to reproduce before [this other commit]:
- Edit a page.
- Via the media dialog add a video with the following URL: 'google.com'.
- Save the page.

=> It is no longer possible to enter edit mode.

Note that part 1 was merged from 14.0 but part 2 was merged from 16.0
because the media dialog adds `iframe` without `src` attribute since
[the refactor of the media dialog] and we cannot edit a page containing
this code `<div class="media_iframe_video"><iframe/></div>` since the
merge of the frontend into the backend.

[this other commit]: https://github.com/odoo/odoo/commit/fbab1bffa033638553750d49fcde89a9a2fc5e6c
[the refactor of the media dialog]: https://github.com/odoo/odoo/commit/7fd0698cf765a79959566b51e33cb76bff83d344

opw-3167707

closes odoo/odoo#116128

X-original-commit: 242d6f2e1dc35c3d22314a4c92c2420f69eb9970
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Guillaume-gdi <gdi@odoo.com>
2023-03-22 13:42:54 +01:00
Guillaume (gdi) 4b37b608f2 [FIX] web_editor: prevent saving a non-supported video
Before this commit, error messages appeared when a user tried to put an
unsupported video on a page of his website, but the user could still add
this bad video on his page, which broke it.

Steps to reproduce the bug fixed by this commit:
- On a page of a website in edit mode, double-click on an image.
- Go to the video tab and type an unsupported URL like google.com.

=> An error message appears but the user can still add the media on his
page which will break it.

opw-3167707

X-original-commit: 32cd18895ffcf40e4fec4c5674fa97f6663c7f0d
Part-of: odoo/odoo#116128
2023-03-22 13:42:54 +01:00
Xavier-Do e1c39a1dd1 [FIX] base: speedup generate_assets_nodes
is_transpiled is only needed when generating a asset bundle while
JavascriptAsset can be generated to compute the version hash.

is_transpiled needs to read the content to be defined which is quite
slow. Transforming is_transpiled into a lazy property will speedup the
cold loading of generate_assets_node, especially when attachment already
exists.

Locally:
- /web with all modules in debug=assets goes from ~350 to ~150 ms
- generate_assets_nodes part goes from ~230 to ~55 ms

closes odoo/odoo#116123

X-original-commit: 47b44e1ae61583a881bb2ede06cc02f4b9423cbc
Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2023-03-22 13:42:48 +01:00
hupo-odoo 1b3e98aceb [FIX] account: wrong dashboard amount currency
In the Accounting app, on the Dashboard in the 'Customer Invoices' card, the indicator 'to check' has incorrect amount when multi currency is activated.

Step to reproduce the issue:
 - create an invoice in another currency than the one of the company
 - check the dashboard of Accounting

 Result: the amount displayed is the one on the invoice but we want the converted amount.

 Original feedback: https://www.odoo.com/web#id=3212264&menu_id=4720&cids=1&action=333&active_id=809&model=project.task&view_type=form

 task: 3215921

closes odoo/odoo#116103

X-original-commit: 45fac8ac231cc8f07fd9181045d6432825c8330c
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: hupo-odoo <hupo@odoo.com>
2023-03-22 12:37:04 +01:00
hupo-odoo 1712a00d10 [IMP] account: dashboard tax return task due
By default the reminder for tax report is set to 7 days after period (date is correct). On the Accounting Dashboard, we should therefore not see the reminder on the dashboard of the Miscellaneous journal if the deadline of the tax report is not due.
For example, we are the 16th of March, we do not want to see the reminder for the Tax Report for March. We only want to see it from the 7th of April.

closes odoo/odoo#116051

Task: 3231957
X-original-commit: 66672cf7f63548638ad218d5cae44cde5868b318
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: hupo-odoo <hupo@odoo.com>
2023-03-22 11:06:52 +01:00
Nemael 041e5b3629 [FIX] mail: css improvements on chatter
This commits makes some improvement on the chatter visuals

-Spacing/styling of various elements
-Missing borders around chatter

closes odoo/odoo#116039

Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
2023-03-22 11:06:49 +01:00
Géry Debongnie 70a412f325 [IMP] web: update owl from v2.0.7 to v2.0.9
This update contains the following commits:

[IMP] implement .alike suffix on props
[IMP] release: add version number on App
[IMP] app: add name as a config option
[FIX] runtime, compiler: fix refs getting set or unset incorrectly
[FIX] compiler: call translate function with correct string
[FIX] compiler: properly handle readonly attribute/readOnly property
[REF] blockdom,compiler: implement properties
[REF] tests: move properties tests in own file
[FIX] compiler: dynamic value on inputs doesn't turn 0 into empty string
[FIX] components: do not crash when binding anonymous function

More details at: https://github.com/odoo/owl/releases/tag/v2.0.9

Note that this owl update required a few adaptations in Odoo code. The
main problem was that some code would access references after the
component was unmounted. However, Owl is now stricter and properly
remove the reference.

closes odoo/odoo#115991

X-original-commit: a2952026f23858a8d34dcdab4ec8b467f7fc9bcf
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Géry Debongnie <ged@odoo.com>
2023-03-22 11:06:46 +01:00
Jordan D. (Joda) 35a0cfa09f [FIX] mail: Fix display value of mail in technical
Previously:

The displaying of the technical menu email would be cut
if you had a zoom of > than 100% on your browser

Currently:

It allows to see the whole content of the message without scrolling.

closes odoo/odoo#116124

X-original-commit: 5055b374c3bac0126f441dad61afd7e0b68b1370
Signed-off-by: Dalcq Jordan (joda) <joda@odoo.com>
2023-03-22 09:16:43 +01:00
Eteil Djoumatchoua(etdj) cbeaf6ffd4 [FIX] mrp: Allow to ajust real duration on workorder operation
Steps:
- Enable `Worder orders` in Manufacturing settings
- Create a manufacturing order with a bill of materials and workorder operation set and confirm
- Go to the workorder tab and start, then finish after few seconds
- Update the real duration
- Try to save

Issue:
User Error

Cause:
When writing on a `mrp.production` object we check if the production is still planned and if, it try
to plan all the workorders which are not done or cancelled. But in our case all the workorders are done
so it try to write to an empty object.

opw-3230310

closes odoo/odoo#116122

X-original-commit: 674f37fbbaa4a0d7f34f8d75d16dd11373815932
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Djoumatchoua Eteil Junior (etdj) <etdj@odoo.com>
2023-03-22 09:16:40 +01:00
Nicolas (vin) 8259cf76ce [FIX] hr_expense: search panel categories fix
There is an issue with the search panel categories that has a limit=20;
It means it will only display the categories matching the expense
reports in the view if they are in the 20 first records fetched.

As this search field isn't really useful, it was decided to remove
it completely.

Task id # 3224719

closes odoo/odoo#116074

X-original-commit: 376e6aac2854f291c0b919451c34595b2c2d3060
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
2023-03-22 08:19:00 +01:00
Nicolas (vin) ae835037fc [FIX] account: no default taxes on accounts
So fat, the default sale and purchase taxes were so on the
account.accounts depending on the user type id.
These taxes were meant to be used as default taxes on products
and not accounts, so this is not right.
It also is an issue since the default tax isn't visible
on the COA list until the user add it from the optional fields.

Task id # 3223731

closes odoo/odoo#116111

X-original-commit: f1a9414f3cbe83bfde7e401e90b641668bd0ca14
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
2023-03-22 07:21:10 +01:00
Thanh Dodeur d0657e1757 [FIX] mail: call do not keep the camera stream when switching to display
Before this commit, trying to share screen while using the user video
(webcam) wouldn't work because the old stream was kept instead of
trying to obtain a new one.

This commit fixes this issue, does a small cleanup of `rtc_service.js`
and adds tests related to streams.

closes odoo/odoo#116042

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-03-22 03:39:07 +01:00
Zelong Lin 3a5eb4567f [REF] mail: NavigableList Ref
closes odoo/odoo#116037

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-03-22 01:45:24 +01:00
luvi 73a0817688 [FIX] web: make draggable hook tolerant with mouse movements
Before this commit, when a user moved its mouse from only a few pixels,
a kanban record could not be clicked on it, or an item in a sortable list
couldn't handle the click, since the dragging state was immediatly applied
to the element.

Now, there is a 10 pixels tolerance, meaning that the dragging sequence is
only applied once the user has moved the cursor from at least 10px horizontally,
or vertically from the original point where the mouse button was pressed and
remains down. This reduces frustation when the user didn't intended to move the
kanban card with the mouse moving by mistake.

A test has been added to verify the behavior when dragging an element in a sortable
list, from at least 10 pixels.

Finally, a test had to be modified, since the triggered mousemove didn't had any
clientX value to enable the dragging sequence.

task-3233698

closes odoo/odoo#116113

X-original-commit: 7e7c950f07b6455118902c15f4354e6ff45ce509
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
Signed-off-by: Luca Vitali <luvi@odoo.com>
2023-03-22 00:54:02 +01:00
Romain Derie a7d6de80f3 [FIX] website: don't show @ symbol when in backend iframe
==== Purpose ====

There is an issue with the `/@/` symbol website is using to display a
page in the backend: if someone copy paste a link with `/@/` in it and
send it in an email, some mail client will block those mails.
It was reported by our internal team, after feedback from some sales
persons.
Office 365 was incriminated (not the outlook.com web platform). While we
couldn't reproduce the issue, it was decided by the hierarchy to get rid
of it as it was judged impossible to educate our sales to not send such
links.
It's probably a good decision as:
- `@` in URL are usually used for HTTP Authorization:
  `http://username:password@example.com`
  Link [1] seems to mention that some mail client will not implement
  correctly the URL check to see if the `@` is problematic and will
  simply block mails having links containing `@`.
- The tradeoff of removing it is impacting dev/tech people, not the end
  user (except for F5, see below).

==== Technical ====

Before this commit and since commit [2] the following behaviors were
introduced:
1. a `/@/` prefix was added visually in the URL bar of the browser when
   accessing the website app (previewing your website in the backend) to
   differentiate it from the regular website/frontend URL
2. the possibility to type yourself `/@/` in the URL to access a website
   page in the backend app

It was improving the following pain point:
A. On page refresh (F5 or browser button), the user would land on the
   frontend version of the website instead of remaining in the backend.
B. When the user edited the URL (Like removing `/shop` and typing
   `/jobs` instead, he would land on the frontend version too.
C. Impossible to directly go to the backend version of the website.

This commit is now reverting point 1. while keeping the possibility of
point 2.
It means that while you can still reach directly your page in the
backend, the backend URL part `/@/` won't be kept.
About the mentioned point above:
A. This pain point will be back
B. This one too but workaround possible: need to edit the URL but also
   need to now add the `/@/`
C. This one will still be "fixed" as `/@/` still reachable.

While it seems to be decreasing the UX, it actually is an acceptable
tradeoff as:
- It mostly impacts dev/tech people, lambda end user don't play with
  URLs (low risk)
- It will prevent their mail to be blocked (high value)

--------------

Finally, note that in the meantime commit [3] was introduced which
relied on this `/@/` presence. This had to be adapted.

[1]: https://www.malwarebytes.com/blog/news/2022/05/long-lost-symbol-gets-new-life-obscuring-malicious-urls
[2]: https://github.com/odoo/odoo/commit/030d3cb10ee79aa1f010134578f4bcf65a1cfcde
[3]: https://github.com/odoo/odoo/commit/a0b3499d348d252c3abd48154e1fd8dd545c7504

closes odoo/odoo#116100

X-original-commit: b01337710b5fde995a184e442f48b687cd17967a
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-03-22 00:53:59 +01:00
kais-odoo eeac14d5b4 [FIX] hr_hourly_cost: remove the 'per hour' label next to the hourly …
…cost

Before this commit, the employee form view had a label 'per hour' for field
'hourly cost'.

So in this commit, 'per hour' label is removed from employee form view.

task-3000757

closes odoo/odoo#116063

X-original-commit: c4d0f0993efb8c8c3fd7f322c54bc81c97aaee2b
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-03-22 00:53:57 +01:00
roen-odoo 436331683c [FIX] point_of_sale: create account move for shiplater pos order
Current behavior:
When using FIFO/AVCO and automated valuation, the accounting entries for
PoS orders where not correct if the ship later function was used and the
order was not invoiced. The COGS entries were created with an amount of
0. But when the shipping was done nothing was done to correct the
entries.

Steps to reproduce:
- Make sure you are using anglo saxon accounting
- Create a product with automated valuation and FIFO/AVCO
- Create a PoS order with the product
- Validate the order using the ship later option but do not invoice it
- The accounting entries for the expense are created with an amount of 0
  (wich makes sense because the product is not shipped yet)
- Validate the picking
- The accounting entries is still the same.

opw-3027579

closes odoo/odoo#116045

X-original-commit: 513c32b04aa6c06d58125ec8c4fb1b818f4a52e9
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
2023-03-21 23:49:31 +01:00
Romeo Fragomeli e912cd50ee [FIX] web: sub dropdown item menu when checked in RTL mode
In RTL mode, sub dropdown carret are inverted so when a item menu in a
dropdown is checked, the carret and the check icon are on the same
pseudo-element (e.g. `::befor`).

In this commit, when the carret of a sub dropdown is on the left we set the check
icon on the `::after` pseudo-element to avoid CSS rules collision.

Steps to reproduce:
* Select/configure a RTL language in Odoo for the current user
* Open the Sales app
* Filter by the Create Date and select a sub option
=> BUG the check icon and the carret are on the same pseudo-element `::before`

Task ID: 3234638

closes odoo/odoo#116036

X-original-commit: c96ef2f258a5714d2285042da2f823e50b9b3049
Signed-off-by: Romeo Fragomeli (rfr) <rfr@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-03-21 22:25:52 +01:00
Odoo's Mergebot 22b7d8f81e [MERGE][CLN] website_sale(_*): cleanup(s)
* Correct file & class names
* Code simplification
* Imports cleanup
* privatize method not meant to be called in rpc
* wrong view inheritance target (not containing the targeted hook)
* ...

closes odoo/odoo#116026

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-03-21 22:25:47 +01:00
Victor Feyens 2c4ff85fd4 [CLN] website_sale_digital: cleanups
unused imports
unnecessary module in xml ids
...

Part-of: odoo/odoo#116026
2023-03-21 22:25:46 +01:00
Victor Feyens a7b065b445 [CLN] website_sale_digital: account_invoice.py
* Right file name
* Right class name
* privatize method not meant to be called in rpc

Part-of: odoo/odoo#116026
2023-03-21 22:25:46 +01:00
Victor Feyens a38a87d3a1 [CLN] website_sale_digital: split product.py (2)
Part-of: odoo/odoo#116026
2023-03-21 22:25:46 +01:00
Victor Feyens cd47fd451e [CLN] website_sale_digital: split product.py (1)
Part-of: odoo/odoo#116026
2023-03-21 22:25:45 +01:00
Victor Feyens 868b8c9f5c [CLN] website_sale_loyalty: xml cleanup
Part-of: odoo/odoo#116026
2023-03-21 22:25:45 +01:00
Victor Feyens 59eae1d7d5 [IMP] website_sale: right place for menus definition
Part-of: odoo/odoo#116026
2023-03-21 22:25:45 +01:00
Loan (LSE) dbf12af2fa [FIX] pos_epson_printer: more details on printer errors
Before this commit:
If the ePos printer is reachable but is
configured incorrectly (change of Device ID, etc.)
or have an issue (missing paper, etc.),
a generic error message will be given:
"Please check if the printer has enough paper
and is ready to print."
This is too generic considering the amount of issue
that can happen and the fact that the printer itself
does send to us a `code` which give good indication
on the origin of the issue.
The list of these codes can be seen at:
https://files.support.epson.com/pdf/pos/bulk/server_direct_print_um_en_revk.pdf#page=52

In version 14 this code was given in the error message.
But this feature was lost in the versions above

&

 Trying to print a receipt from the PoS with
 a wrongly configured ePoS printer will just pop
 the confirmation popup:
 'Do you want to print using the web printer?'
 Without giving any details regarding the errors
 causing the issue

After this commit:
A more precise error message is given:
 - Containing the printer error code
 - Giving recommendation on how to search
 online to solve the issue
 - On the specific case of the `Device ID`
 setting changed, give more details on the
 value to use

&

 The error pop-up with the error details
 is displayed first. Then the confirmation one

 opw-3188576
 opw-3071709

closes odoo/odoo#116020

X-original-commit: 1f753d31c925e479e8243a6427a24b3da99bfc31
Signed-off-by: Loan (LSE) <lse@odoo.com>
Signed-off-by: Loan (LSE) <lse@odoo.com>
Signed-off-by: Sens Loan (lse) <lse@odoo.com>
2023-03-21 19:54:34 +01:00
Raúl e3c0e04ac9 [CLA] add new member to CLA Trescloud
closes odoo/odoo#116019

X-original-commit: 794bf239749e03de532e9ad648c66f85073c5176
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-03-21 19:54:29 +01:00
Thibault Libioulle ecc58cb482 [FIX] project: fix tag name search with none project in context
This commit fixes the name_search traceback on project tags when the
`project_id` in context is set to `False`.

Prior to commit odoo/odoo@05855b6b this check was still relevant since
the implementation used the ORM search method. Since this commit,
project_id must be an integer to be used in the SQL query.

Steps to reproduce:
- Open Project menu;
- Go to My Tasks menu;
- Create a new task;
- Open task;
- Click on Tags field.

Current Behavior:
```
  File "/home/src/odoo/odoo/models.py", line 1605, in name_search
    ids = self._name_search(name, args, operator, limit=limit)
  File "/home/src/odoo/addons/project/models/project.py", line 2756, in
  _name_search
    self.env.cr.execute(query, params)
  File "/home/src/odoo/odoo/sql_db.py", line 313, in execute
    res = self._obj.execute(query, params)
psycopg2.errors.UndefinedFunction: operator does not exist: integer =
boolean
LINE 9:                             ON task.project_id = false
                                                       ^
HINT:  No operator matches the given name and argument types. You might
       need to add explicit type casts.
```

Expected Behavior:
- No traceback and standard name_search behavior.

closes odoo/odoo#116006

X-original-commit: f21bd6f47a75f5d6cbd442f30ef7df221e6fec7d
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-03-21 19:54:20 +01:00
Om Rabara a06a58e08b [FIX] mail: prevent timed-out error when quit pop and imap server
OSError: cannot read from timed out object while evaluating a
"model._fetch_mails()", it occurs because when we try to quit a POP server
of incoming mail using the "pop_server.quit()" method, sometimes it is not
able to reach the remote server to quit the pop server, so it throws an OSError.

We added the try block for POP and IMAP.
if it fails then we display the os error.

sentry-3932133536

closes odoo/odoo#116004

X-original-commit: 0c30529cc9256c0b2483c2fcbbc599b87c1f8577
Signed-off-by: Anh Thao PHAM <pta@odoo.com>
2023-03-21 19:54:13 +01:00
luvi 8580049bf1 [FIX] web: fix default_export_compatible fields in Export dialog
This commit fixes the exported fields list used by the export dialog. Since the
list was deducted from the column titles, it was not possible to get the complete
attributes required to filter them. Now we use the real fields fetched from the RPC
in the dialog. It fetches the correct list of exportable fields, and the
defaultExportList props only serves to list fields associated with visible columns.

It is now possible to filter fields correctly, and improve the reliability of the
export feature, to use the data from the RPC instead of using the data deducted from
the visible columns only.

A test has been added to verify the presence of a field that has the defaut_exportable
attribute in the export list by default.

task-3203958

closes odoo/odoo#116003

X-original-commit: 9ea5cf81a2b5ddcb0f19827d4a699193046fafb6
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-03-21 18:56:20 +01:00
David Monnom (moda) a9608cdf1e [IMP] pos_restaurant: swap payment and order button
Previously, the payment button was larger than the others and next to
the numpad. The other buttons were managed by a mixin and arranged
in a predefined order.

Now, the payment button only stays in place when the "order" button is
not present, currently it can only be present if the restaurant module
is installed and a printer configured.

When it is present, it takes the place of the payment button and the
latter is added to the mixins with the other buttons

closes odoo/odoo#115988

X-original-commit: f32c07f28e2fd2830f568757d4700fa77b83ced7
Related: odoo/enterprise#38476
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
2023-03-21 18:56:15 +01:00
althaf shaik 6273ac721c [FIX] stock: getting value from context in inventory
Attribute Error: 'frozendict' object has no attribute 'default_product_id'
trace back that occurs in stock/stock_quant: action_inventory_at_date
was caught by sentry.

steps to produce:-
Install inventory module
Select any product from menuitem/reporting/stock
Click replinish button & from that replinish wizard, select the product again
Then click forecasted stat button and in forecast click On Hand button
Then click Inventory At Date.
At this moment you find a trace back.
Because default_product_id is not getting from context in inventory.

sentry:-3952193922

closes odoo/odoo#115946

X-original-commit: 53445511294b5dfb27d626bf0039eba7e7ad54f2
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-03-21 18:56:12 +01:00
moerradi 87821818ee [REM] account: remove tax_audit field
the tax_audit field was introduced in v13 and it served the purpose of providing users with improved visibility regarding the impact of move lines on report lines. The computation of the sign for each move line when resolving tax grid amounts has now been simplified using the formula (tax_tag_invert * sign of the tag * balance). Consequently, the tax_audit field has become redundant and is no longer required.

closes odoo/odoo#114616

Task-id: 3196711
Related: odoo/upgrade#4442
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
2023-03-21 18:56:01 +01:00
sofiagvaladze 94bbffe46b [IMP] add domain to select current company calendar
Before this commit user was able to select calendars from
differant companies even though user is not allowed to read
that companies record.

This commit add field related to country company and use
it in a domain to restrict user to select on availble
calendars.

task-3078009

closes odoo/odoo#109904

Related: odoo/enterprise#37334
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-03-21 18:55:55 +01:00
std-odoo 603df3c890 [FIX] web: allow to use properties in JS domains
Purpose
=======
Allow to use the following domain in views
```
[('properties', '=', [])]
```

To be able to show / hide elements based on the fact that the
properties is empty or not.

Task-3213639

closes odoo/odoo#115990

X-original-commit: 4c41108df23a1bbce8c5f6918ead80568a72d4ce
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
2023-03-21 14:32:40 +01:00
Joseph Caburnay 8c82bec586 [FIX] web: status bar layout with many items and long names
Several status bar buttons having long names combined with several status
bar field items results to terrible layout.

To make it a little better:

- We wrap the status bar buttons so that each button will have single-line
  label.
- We also prevent the container of the statusbar field items from shrinking
  until a max-width of 50%.
  - In case there is multiple lines of status bar buttons and single line
    of statusbar field items, we keep the vertical alignment of the
    statusbar field items at the top.

This solution is not really very good but it's okayish.
A better solution can be like providing a way to allow dropdown menu for
the "extra" buttons that won't fit in a single line. For the future?

closes odoo/odoo#115987

Task-id: 3215622
X-original-commit: b1d51667b43c6404367b5cdfc8b17e722f39417c
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-03-21 12:39:01 +01:00
John Laterre (jol) 7e21edf89b [FIX] account: fix ir.rule on tax repartition lines
Before this commit, you could search `account.tax.repartition.line`
and get records from all the existing companies,
which is not supposed to happen.

It should only return records of the `active_company_ids`.

That was because there were no `ir.rule` preventing that.
This fixes the issue.

closes odoo/odoo#115973

X-original-commit: 3e850ba9e27ac487d1f300f3ffc4ed2578e76f2f
Related: odoo/enterprise#38472
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Signed-off-by: John Laterre (jol) <jol@odoo.com>
2023-03-21 12:38:56 +01:00
Rahul Prajapati 4d71ae5a13 [FIX] mail: portal users can not join rtc calls
Before this commit:

Portal users are not able to join RTC Calls in Discuss.

After this commit:

Portal users are able to join RTC Calls.

Task-3050534

closes odoo/odoo#115963

X-original-commit: 0bfd2625fb89b93494c9df1aad9b7390723f1aa7
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-03-21 12:38:53 +01:00
Romain Estievenart 6d87d17919 [FIX] web: Scroll position on kanban view when "load more" datas
Steps to reproduce:

- Open a kanban view with enough records for a 'load more' button to be
  displayed
- click on Load more
  => the column remains scrolled all the way down, making the user lose
     track of where they were before clicking on the button => bug

This problem occurs because the foreach using by the xml trigger a full
rerender of the node in owl. To avoid these weird behavior, we now keep
the scrollTop of the scroll item, the column should remain at the same
place the end user was when clicking on the 'load more' button

Task ID: 3196763

closes odoo/odoo#115975

X-original-commit: b6731193004dc2d1a174fc6fc4de9e99db8e247a
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Romain Estievenart (res) <res@odoo.com>
2023-03-21 10:44:56 +01:00
Joseph Caburnay e2a6471e52 [FIX] web: introduce all the clickParams in list view buttons
**ISSUE**

A header button in the list view with "confirm" attribute doesn't
show a confirmation dialog when clicked. This is different to the
header buttons from the form view.

**SOLUTION**

In order to achieve similar behaviour, we reuse the BUTTON_CLICK_PARAMS
which originated from thew view_compiler and make sure that
buttons parsed from the other views also contain the correct set
of clickParams.

closes odoo/odoo#115974

Task-id: 3216357
X-original-commit: d91eac84ddafe1338470e73ba9921ddcbcac0e80
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-03-21 10:44:53 +01:00
Nasreddin Boulif (bon) 6019e26804 [FIX] website_slides: set right text color on sub menu/navbar
Step to reproduce:

  - Install E-learning module
  - Go to any course and set `Display` to `Documentation`
  - Click on `Go to website` and open editor
  - Click on `Theme`, then in `Theme Colors` section, click on the
    palette and select the first custom colors (black-white-gray)

Issue:

  The background of the submenu (just under `Course` tab) is
  transparent (while it should be black, like main menu) and the links
  are not well displayed (white/light text color).
  (Same issue with navbar brand and toggler when reducing screen width)

Cause:

  The background of the submenu is always set to transparent but
  the text color change depending if the top main menu background
  is dark or light.
  Lines that make the issue: https://github.com/odoo/odoo/blob/693092f2c90e36735c6896b6c6e7d795406453e9/addons/website/static/src/scss/website.scss#L240-L252

Solution:

  Set the text color (and the background of the toggler) to
  `light` color if background is dark (determined with
  `has-enough-contrast($body-bg, $dark)`), otherwise use `dark` color.

opw-3086750

closes odoo/odoo#115910

X-original-commit: ee7fe74d6d839eb20b6165e475f49eeed0262fcc
Signed-off-by: Nasreddin Boulif (bon) <bon@odoo.com>
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2023-03-21 10:44:47 +01:00
std-odoo eae1a0a7ab [FIX] mass_mailing: the blank.gif image in the emails always raise a 500 error
Bug
===
Since 6185f14807 we check the <mail.mail>
existence before marking the <mailing.trace> as opened, but since
57ae1b9b8b61f5f4719a8a81e9d0d21fab58cfda we remove the <mail.mail>
automatically when we send them.

The result is that this endpoint always raise a 500 error.

To be: the <mail.mail> existence shouldn't be checked in this endpoint
(the token is valid for the raw integer id).

Task-3234519

closes odoo/odoo#115842

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-03-21 10:44:40 +01:00
Kevin Baptiste 7fbfb36285 [FIX] hr_attendance: show employee's picture
The pictures of the employees were no longer showing in the kiosk mode
as it tried to read on `hr.employee` instead of the `hr.employee.public`
model.

closes odoo/odoo#115950

X-original-commit: 3794bfed7d474f470f6e401d697d8c36ad620820
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-03-21 09:36:15 +01:00
Jurgen (jugj) c8ff1c6899 [IMP] Time-off : Add 5 precision digits to added_value in hr_leave_accrual_plan_level.py
task - 3147639
Adding precision digits and displaying the number without unnecessary trailing zeros using JS

closes odoo/odoo#115944

X-original-commit: b6c715cc5b39e28b4f40803a5f161845f5b407ab
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-03-21 09:36:12 +01:00
Maruan Aguerdouh (magm) cb345ea1e7 [FIX] web: traceback when trying to add favorite filters without name
Steps to reproduce:

- Install Sales, Subscriptions or similar app.
- Go to Sales, and try to save a favorite filter without name.
- It can also be done in the order lines of the Subscriptions, if
we try to add a product and select "search more", inside the new
window try to add a favorite filter without name.

Issue:

We got a traceback that's not user friendly instead of the proper
warning message, this is because inside the `saveFavorite` method we
check if the description is empty, but we can't use `.length` because
when we don't fill any name, the description is `undefined`.

Solution:

Removing the `.length` check, and just checking if the description is
undefined or not.

Forward bot up to master.

opw-3200499

closes odoo/odoo#115204

X-original-commit: c0fe1408da48e43b3e7e55de8e1c1edb09c982d2
Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
2023-03-21 09:36:07 +01:00
Camille Spiritus 055af0b0af [FIX] account/l10n_ch : remove blocking condition on _get_available_qr_methods
Since 16.2, a condition was added to _get_available_qr_methods :
        if self.env.company.country_id.code == 'CH':
            rslt.append(('ch_qr', _("Swiss QR bill"), 10))

This condition was not allowing a multi-company call, and caused another issue.

Once the method was called to check on the eligible QR choices, the ORM would consider the current company to be the US default one.

Hence the condition would never be fulfilled and a stacktrace would appear :

Oh snap!
Wrong value for account.move.qr_code_method: 'ch_qr'

Reverted back to the unconditional behaviour, and will check this occurence with the framework team.

closes odoo/odoo#115952

X-original-commit: cdba8a062985bfbdcbe8d51aa9705e702b4dee61
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Signed-off-by: Camille Spiritus (casp) <casp@odoo.com>
2023-03-21 08:31:11 +01:00
Julien Van Roy 45ae6ad15c [FIX] account_edi_ubl_cii: select the format based on the partner
Add a selection field on the partner to choose the EDI format.
Merge the `cii_` and `ubl_` fields.

Add an `endpoint_value` and `eas_code` on the partner. These values are
read when generating the Bis 3 (or one of its derivatives) to fill the
`EndpointID` and the `@schemeID` in the xml.

We can remove `l10n_nl_oin` and `l10n_nl_kvk` which are only used by
electronic invoicing, and replace every usage of them by the new fields
`endpoint_value` and `eas_code` (since for NL partners, they should
necessarily represent the KVK or OIN number: eas code '0106' or '0190').

We can also remove the `l10n_lu_peppol_id` module which was only there
to allow an arbitrary number to be set on the `EndpointID` (for
instance, for public administration that doesn't have a vat number).

task-3232845

closes odoo/odoo#115934

X-original-commit: 8bef3ac696d387a5b5867bc239d628477278fb1b
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2023-03-21 08:31:06 +01:00
Bruno Boi c9988a7812 [FIX] web: refocus date field in editable list
Before this commit
- an editable list will not refocus a date field after a pick of a date

After this commit
- it will

closes odoo/odoo#115892

Taskid: 3184929
X-original-commit: 6e570bc446295a1d56bd9f171b1f1d328a98127f
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-03-21 08:31:03 +01:00
Bruno Boi 029ed70132 [FIX] web: traceback on opening group config menu
Before this commit
- since [1]
- a traceback occurs when opening a kanban group config menu if the view
  has "records_draggable" and "groups_draggable" attributes set to false

Explanation
- the kanban renderer template do not set a group id on o_kanban_group
  elements when the aforementioned attrs are false
- the kanban renderer then use a selector in order to give the kanban
  groups config menus their container element (used for positioning the
  dropdown).
- as there is no elements that matches that selector: a traceback occur
  later in the usePosition hook positioning logic.

After this commit
- this is fixed by always setting ids on the group elements.

[1]: https://github.com/odoo/odoo/commit/65e43dd88115b46e2d8585cf6dd7af4a89693e68#diff-823da6a5974aafef6ec7d54b4d410ccd8dc54e1892aee57c3bb62ff8a0414826R21

closes odoo/odoo#115891

Taskid: 3231051
X-original-commit: c8e9cf7f691dd208ffa947f110596beaf2f9ae94
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-03-21 08:31:00 +01:00