Commit Graph
162195 Commits
Author SHA1 Message Date
yhu-odoo 9955064415 [FIX] purchase_stock: valuation layer wrong when different currency
To reproduce:
1. Create a storable product with ordered quantities policy for purchase and with a category set as FIFO automated
2. Create a purchase order in a different currency and set quantities for partial deliveries
3. Create a partial delivery
4. Fully invoice the purchase order
5. Create the delivery of the complementary units
6. Check the stock valuation layer
The valuation of backorder is wrong.

The value on valuation layer is in company's currency, while the value
on invoice line is in the PO's currency. When create valuation line for
backorder, we didn't convert them to same currency.

opw-3300266

closes odoo/odoo#125206

X-original-commit: c2de679fcba7f153201dde5b3aa989eb3f329910
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: Yuchen Huang (yhu) <yhu@odoo.com>
2023-06-15 19:59:18 +02:00
Julien Castiaux 7d1959febc [FIX] core: reset current_thread.dbname/uid between requests
In [HTTPocalypse] the `odoo/service/wsgi_server.py` file has been
removed and its features has been spread to other files. One of the
feature was reseting those few thread-local variables[^1] before
processing any new request:

    if hasattr(threading.current_thread(), 'uid'):
        del threading.current_thread().uid
    if hasattr(threading.current_thread(), 'dbname'):
        del threading.current_thread().dbname
    if hasattr(threading.current_thread(), 'url'):
        del threading.current_thread().url

In [HTTPocalypse] the `url`[^2] is correctly set at its definitive value
at the beginning of the request so there is no need to delete it before
processing.

On the other hand, `dbname`[^3][^4] and `uid`[^5] are only set when the
request is processed by `_serve_db`, i.e. that the user is connected to
a database already. Those values weren't reset at the begining of the
next request so in case that next request was processed by `_serve_nodb`
or `_serve_static`, the dbname and uid of the previous request would
still be present.

This commit restores both `del uid` and `del dbname` at the beginning of
the http stack, before the request is processed.

[HTTPocalypse]: odoo/odoo#78857
[^1]: https://github.com/odoo/odoo/blob/a1361d6629a829fd622f2a1a1b3e5b025050eaf9/odoo/service/wsgi_server.py#L80-L85
[^2]: https://github.com/odoo/odoo/blob/0e629cd2a1fc3623b579a38ae534fbdfae9b38a3/odoo/http.py#L1987
[^3]: https://github.com/odoo/odoo/blob/0e629cd2a1fc3623b579a38ae534fbdfae9b38a3/odoo/http.py#L1563
[^4]: https://github.com/odoo/odoo/blob/0e629cd2a1fc3623b579a38ae534fbdfae9b38a3/odoo/modules/registry.py#L70
[^5]: https://github.com/odoo/odoo/blob/0e629cd2a1fc3623b579a38ae534fbdfae9b38a3/odoo/http.py#L1582

closes odoo/odoo#125205

X-original-commit: c327c4586243430751100c8980169ae067383b1c
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
2023-06-15 19:59:13 +02:00
Xavier ALT a2d74e14a6 [FIX] website_hr_recruitment: fix filters links after choosing "Other" department
Fix wrongly generated link when "Other" department filter is active
(introduced by odoo/odoo@54f246f9c)

To reproduce (on runbot):
- Log-in as 'admin'
- Go to the website /jobs page
- Edit page and enable both 'Country' and 'Department' search filters
  then save changes
- Choose "Others" in the departments filter
- Choose any country in the countries filter

=> traceback with:
`ValueError: invalid literal for int() with base 10: '233is_other_department=1'`

closes odoo/odoo#125203

X-original-commit: 12085c9b653412b976279495804f672f3307764b
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-06-15 19:59:10 +02:00
Julien Castiaux 3160c376bc [IMP] core: --db_maxconn_gevent
The Gevent worker has specifc needs in term of maximum concurrent
connections to the database and those needs are not compatible with the
default limit that is primerly set for http workers.

This PR makes it possible to supply a configuration dedicated to the
gevent worker.

task-id-3193565
task-id-2146565

closes odoo/odoo#125190

Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
2023-06-15 19:59:08 +02:00
Jurgen (jugj) 62827e29f5 [IMP] web : Display the full text when hovering the search panel
Following an FP-Request, this PR aims to ease the life of the user
by indicating the full name of the elements that are truncated due
to their length as a tooltip.
task-3332648

closes odoo/odoo#125186

X-original-commit: 8512402d803e788347aa5f7012c4380c3dd34fae
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-06-15 19:59:05 +02:00
Merel Geens (mege) 0e2bacfd51 [FIX] stock_account: don't create 0 amount COGS lines
After creating a sales order for a product with cost 0, automatic
inventory valuation and AVCO, and validating the delivery, no account
move is created for the stock move. If an invoice is then created from
the sales order, it will create 0 amount COGS lines. Automatic
reconciliation of the invoice with the corresponding stock account move
will fail because no such entry exists, resulting in unreconciled lines
remaining in the invoices.

This issue can be prevented by either creating a 0 amount journal entry
for the stock move, or preventing the creation of the 0 amount COGS
lines on the invoice. Not creating unnecessary COGS lines is preferable
and this was also the solution used for the same problem with purchase
order invoices: https://github.com/odoo/odoo/pull/106785 .

So this fix does the same for sales order invoices.

opw-3000320

closes odoo/odoo#125185

X-original-commit: 999451e6ea0b2b1591a3644725b5313c6e062b39
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
Signed-off-by: Merel Geens <mege@odoo.com>
2023-06-15 19:59:03 +02:00
Robin Lejeune (role) 6e60016037 [FIX] web_editor: adapt options' icons in RTL
The triangle pointing towards an option in the editor is pointing
right and the symbol └ is used to show a sub option in the editor panel.
In a RTL setting, this does not make sense and should be mirrored.

task-3284274

closes odoo/odoo#125153

X-original-commit: a66ff40b28717617e28387b22bdfe9e468242907
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-06-15 19:58:56 +02:00
arsi 9f5578289a [FIX] account: compute bills to pay sum based on amount_residual_signed
In case the journal currency is set on the company currency, we should
compute the 'Bills to Pay' sum on amount_residual_signed as it is
the residual amount in the company currency.
In the current state, you can have differences between the sum in the
dashboard and the sum showed in the list view from the 'Bills To Pay'
button.

Steps to reproduce (clean db with accounting):
-Set a foreign currency with 2 different rates (significant if you want
 to see the issue clearly).
-Create an invoice in a sale/purchase journal which has no currency set
 (like Vendor Bills), with the foreign currency and with an invoice_date
  corresponding to one of the rate.
-Register a payment for that invoice, with a date corresponding to the
 other rate and having an amount lower (like half) than the invoice, so
 the invoice is partially reconciled.
-> Go to the accounting dashboard, the amount next to 'Bills to Pay' is
different than the amount (the sum of the column 'Amount Due') in the
list view generated after clicking that button.

These two values should be the same.  They are currently different
because the dashboard takes the amount_residual, which is expressed in
the invoice currency, and apply the exchange rate to get the residual in
the journal currency.
But if the target currency is the company currency, the field
amount_residual_signed is already the residual amount in the company
currency. Unfortunately, in case of partial reconciliation, it is not
always equal to amount_residual expressed in the company currency
anymore. Because amount_residual and amount_residual_signed are
substracted by the payment amount, expressed in each currency, using the
payment date exchange rate.

opw-3184567

closes odoo/odoo#125150

X-original-commit: d71d8e90667ccc9c5428cc15b927747b4b3556cd
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Arnaud-Sibille (arsi) <arsi@odoo.com>
2023-06-15 19:58:53 +02:00
Pierre Rousseau 2fa42767c7 [IMP] web, point_of_sale: add reactive helpers
This commit adds a new module in web that contains a few helpers to
make it easier to use reactive in Odoo.

closes odoo/odoo#125136

Related: odoo/enterprise#42588
Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
2023-06-15 18:52:00 +02:00
Alexandre Kühn 5276ed23e6 [FIX] mail: show typing in chat window
closes odoo/odoo#125135

X-original-commit: c9a94488381abef016a28a4bda0b23423e8217ee
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-06-15 18:51:55 +02:00
qsm-odoo c8016d8c80 [FIX] web_editor: properly allow to reset bg/fg text colors
Steps to reproduce:
- Go on a backend HTML field (project task description for instance)
- Write and select some text
- Open the text background color colorpicker
- Hit the "reset" button (the trash icon)
=> The text becomes black (or white in dark mode)

This was because of [1] which indirectly removed the CSS variables
`--black` and `--white`, on which the colorpalette relies.

Note: the test update made by the original commit was lost in the
forward-port because [2] removed the test. It will be restored at some
point thanks to task-3177674.

[1]: https://github.com/odoo/odoo/commit/28444a5792b9929f5250e38f3f864694e22e9370
[2]: https://github.com/odoo/odoo/commit/49297bc7bba75541ca139e6c84e0d3b311765145

closes odoo/odoo#125131

X-original-commit: 907c5b6cc24e0b86c219cda1299a87b7901f4e76
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-06-15 18:51:52 +02:00
qsm-odoo 81b3a37dbf [FIX] web_editor, *: fix wrong color retrieval in website color palettes
*: website

Commit [1] (and [2]) from the "website in backend" refactoring adapted
the colorpalette to read color information on the right document (as
the right document could now be the one of an iframe which is inside the
editor environment). Unfortunately, it did not do that correctly, making
an inconsistent API relying on the fact the colorpalette should receive
an "editable" param... while a jQuery version "$editable" param of the
same thing already existed. Doing so, it forgot to give that important
"editable" param in two cases:
- For editor toolbar colorpickers (text foreground/background edition)
- For colorpickers inside another UserValueWidget (like we-multi).

This commit solves the inconsistency by removing the need of that
"editable" params and relying on the previously existing "$editable". In
the future, this should be refactored anyway.

Steps to see the issue (A):
- Enter edit mode of one of your website page
- Select some text
- Hit the "reset" (trash button) of the text background colorpicker
=> The text becomes black for no apparent reason.

Steps to see the issue (B):
- Enter edit mode of one of your website page
- Choose a new main color for your website via the theme tab
- Select some text
- Open the colorpicker for the foreground color
- Go to the solid tab and input explicitly the main color of the website
=> The color is hardcoded on the selected text instead of using the
   text-o-color-1 class.
=> A test has been added to check this usecase. Making a test for (A)
   is less robust as it also requires the backend color names not being
   the same as the frontend ones to have the bug (otherwise it works by
   chance)... and that will be solved by the next commit of this PR
   (another test will be added by that commit too) **.

Note:
- After this commit, following (A), a bug remains: the text receives a
  strange padding (as a "inherit" background is actually applied).
  Another PR will be made to solve that (see task for more info).
- ** After this commit, (A) done in backend HTML fields instead of a
  website page leads to the same bug still. This is because of another
  problem that the following commit of this PR will solve.

[1]: https://github.com/odoo/odoo/commit/212a8bfdd21269b18054200b9e2585e1c95540d6
[2]: https://github.com/odoo/odoo/commit/03c552690b15cbf2e7d6b7812386ac64042219af

task-3237693

X-original-commit: a30206606423af9e6c8e0313c74fd6200247437e
Part-of: odoo/odoo#125131
2023-06-15 18:51:52 +02:00
Alexandre Kühn af21d99a36 [FIX] mail: pass props to thread actions
Since [1] thread actions are stored in a specific registry.
Some of those actions require props to be passed to their
component.

Those props are not correctly passed as the `componentProps`
key is in fact a function that returns the props but is
treated as the props themselves.

This commit fixes this issue by transforming `componentProps`
into a getter, so that `action` is internally passed to
`componentProps` definition. The templates using thread
actions can still use `t-props="componentProps"` as getter,
as the active action is deduced by transform automatically.

[1]: odoo#123454

closes odoo/odoo#125120

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-06-15 18:51:48 +02:00
Kishan Gajjar 91ba1c211a [FIX] website: properly toggle hoverable dropdown
Steps to reproduce the bug (in 16.0):
- Create a hoverable mega menu
- Drop inline Search snippet inside the menu
- Search for something.
- Hover on the search result and move the cursor outside of the search result.
=> Result Error.

Since [1], is having a fix to the overflows of the page. In that fix
we are triggering hide(), and show() events on a 'dropdown-toggle' element
without checking whether the element is exist in the target or not.
this commit will make sure that element should be present in the target
before triggering the event.

[1]: odoo@5846a05

closes odoo/odoo#125083

Closes: odoo#118803
X-original-commit: 4fba98dbe9a82cf0fec9080bea147f5d4d088b53
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-06-15 18:51:46 +02:00
Alexandre Kühn 57a6a995c9 [FIX] mail: correct seen indicator alignment in squashed message
Before this commit, the seen indicator in squashed messages was
not centered. This is especially noticeable in comparison to
shorten date when hovering on this squashed message in chat window.

This commit centers the sidebar in squashed messages.

closes odoo/odoo#125082

X-original-commit: 1c342c1c5c14add563bba07fe5e5b6e6fbe9fdb3
Signed-off-by: Stockbauer Matthieu (tsm) <tsm@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-06-15 18:51:43 +02:00
Alexandre Kühn da73468c31 [FIX] mail: linkify url with subdomain containing numbers
Before this commit, when posting a message in discuss with some
urls, the url was not linkified.

Example of such linkify not working:
```
https://www.45017478-master-all.runbot134.odoo.com/web

```

The url regexp was changed with [1]
to make punctuation mark the end of url to linkify. The 1st dot
removed in diff was a mistake. This commit reverts this part, so
that url above is correctly linkified while fixing the problem
of [1].

[1] https://github.com/odoo/odoo/pull/122621

closes odoo/odoo#125081

X-original-commit: bbbc85865b45615937a22ed08b6e560a0aa898a0
Signed-off-by: Stockbauer Matthieu (tsm) <tsm@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-06-15 18:51:39 +02:00
Louis (loco) f19f6748f5 [FIX] web_editor: enable to translate invisible blocks
Steps to reproduce the problem:
- Drop a popup snippet in a page.
- On another language, click on translate.
- Problem -> It is impossible to translate the popup.

To resolve this problem, the function `_updateInvisibleDOM` is called
even in translation mode. Thanks to this function, the invisible
snippets are now filled in the edit bar and the user has the opportunity
to display them or to hide them.

task-3098517
opw-3268592
opw-3283140

closes odoo/odoo#125078

X-original-commit: c76ff023b84da65d90b7967c91adde4bd777265b
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-06-15 18:51:36 +02:00
Guillaume (gdi) 23fddc4ec5 [IMP] website: add arabic in iap test
This commit adds arabic in the list of iap languages so that we can test
that the industries are correctly translated in arabic.

related to task-3343616

closes odoo/odoo#125005

Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-06-15 18:51:27 +02:00
Guillaume (gdi) a0d0afb205 [FIX] website: put the correct tags for the iap website test
A test of IAP has been introduced by [this commit]. We want it to be
part of the website nightly tests, so that we can easily check if it
passes.

[this commit]: https://github.com/odoo/odoo/commit/9177076caee4f83590704e3af8e51ec6f7eaa0bc

related to task-3343616

Part-of: odoo/odoo#125005
2023-06-15 18:51:26 +02:00
Zeel Patel 5b6ea19887 [FIX] mrp_account: prevent AttributeError on clicking valuation button
Steps to reproduce

- Create Manufacturing Orders and confirm it.
- Validate the done quantities.
- Click on valuation button. It will raise trackback

Error caused by commit: a080337

closes odoo/odoo#124956

Signed-off-by: Tiffany Chang <tic@odoo.com>
2023-06-15 18:51:21 +02:00
Romain Derie 37cdff405e [IMP] website, test_website: strengthen the perf testing suite
This commit ensure the expected tables are accessed when a page (not
only) is requested.

This is needed because without that, we can only check the query count
number which might be broken without being noticed:
- Commit 1 reduce queries by 2 (no need to access table X anymore)
- Commit 2 later reduce queries by 2 (less access on a table) but
  without noticing it, it also now introduce back the access of table X.

At the end the query count is still fine, but the code is not: it broke
a previous improvement while it was not necessary.

Worst, it could even lower the query count despite still breaking a
previous improvement (-3 queries +2 queries back).

Also, since the query count of a page is not exactly the same inside a
test and in real use cases, an `EXTRA_REQUEST` param is used in those
tests to abstract that change and still use the "real use case" query
count in the test to fit the reality, be human readable and easier to
write/debug.
Indeed, in test mode there is more queries due to the test cursor
rollback and savepoint, but there is one less query (the cache one).

Some commit wrongly reduced that `EXTRA_REQUEST` param making it looks
like there was an improvement while there wasn't.

This commit will help preventing all of that, ensuring the correct
tables are accessed and only those, on top of checking the query count
number (we still need to check the query count in case there is a query
not catched in the SQL table logs).

Some of the PRs/commits where it happened:
- https://github.com/odoo/odoo/commit/aa1c1b0bcb5327894c7b00d0454eebae06eaa005
- https://github.com/odoo/odoo/pull/112000/files#r1160851862

closes odoo/odoo#124939

X-original-commit: 26e1fc3abd54a1baa16cf1c99d75d501a8dc6906
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-06-15 18:51:18 +02:00
Romain Derie 202f79dec0 [IMP] sql_db: allow to track queried table on cursor outside --log-sql
This commit introduced a way to log queried table on cursor without
having to be in `--log-sql` mode.
It will be used in next commit to add complete performances tests which
will ensure the correct tables are accessed when a page is requested.

This is useful as right now those performances tests are only doing a
check against the SQL query number without ensuring the queries are the
correct ones.
As a result, one could introduce an improvement which would reduce the
queries (-2) but break another previous improvement (-2) which would
add back those queries (+2). Since the query count would be the same
(-2+2), it would be undetected, instead of being fixed directly and
keep both improvements (-2-2).

See next commit for concrete example(s) and use of this improvement.

X-original-commit: 8ef6137a34aa35182399a2bd4b20dd57479ab2e7
Part-of: odoo/odoo#124939
2023-06-15 18:51:18 +02:00
Romain Derie 984bad4974 [IMP] sql_db: find and log queried table when the query is multiline
Before this commit, a multiline SQL Query (crafted, as the ORM is one
lining the queries) would not be catched in the `sql_from_log` and
`sql_into_log` variables, despite being shown and counted in the request
queries (unless the `into` or `from` part of the query is on the first
line).
At the end, not only the query was not listed in this table report but
if you sum the table report queries, it would not match the shown query
count.

This is the case for the `website_visitor` UPSERT query:
```sql
WITH visitor AS (
    INSERT INTO website_visitor (...)
    VALUES (
        ..., (
            SELECT id FROM res_country WHERE code = NULL
        )
    )
    ON CONFLICT (access_token)
    DO UPDATE SET
        ...
    RETURNING ...
)
SELECT id, upsert from visitor;
```

This commit is allowing the `into` and `from` part of the select to be
detected even if it's not part of the very first line of the query.
As a result, since a SELECT and an INSERT could be part of a same query,
we exclude the SELECT to be considered as a SELECT query if an INSERT
was already found in this query.

This will allow to have table query count log be in par with the query
count number (except for the `base_registry_signaling`, see note below).
It will also be helpful in next commits which will introduce a way to
access those logged queried table in the testing suite without being in
`--log-sql` mode.

Note: the SQL query on `base_registry_signaling` (which occurs every
      time to check if the cache should be invalidated) is not tracked
      either due to how it is build, it doesn't seems really needed to
      have this one shown in the table logs. See [1].

This commit also remove the `lower()` usage and use the `IGNORECASE`
flag from `RE` instead.

[1]: https://github.com/odoo/odoo/commit/4aeba0c12e0512e537178e6cba0993a11f001ec3

X-original-commit: 255aa168bef5d63480e88b4d34511e3aac910f49
Part-of: odoo/odoo#124939
2023-06-15 18:51:17 +02:00
Alexandre Kühn 8a9bc4c55e [FIX] mail: Send message/log note in chatter style with MILK
- Send button has text "Send" or "Log" depending on composer mode
- When button is active, it has `btn-primary` and composer mode
  buttons use `btn-outline-primary`
- Add hint to use Send keyboard shortcut for fast send in chatter

Other changes:

- Re-introduce missing feature to jump to present when posting
  a new message in a thread.
- In chatter, the topbar and composer are sticky. Whole chatter
  is scrollable rather than just a part of it. As a result,
  `Chatter-scrollable` becomes `Chatter-content`.
- Editing a message in chatter now uses the extended composer

Task-3356271

closes odoo/odoo#124905

X-original-commit: 894ec7e7757d2bb78574e8cd210012b83fad1cf6
Related: odoo/enterprise#42508
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-06-15 18:51:14 +02:00
Rohitkumar (roku) 05079fe8e3 [IMP] sale_(project): remove fields and improve project app
The following changes are made in this PR:

- sort projects by favorite > sequence > name for project
- add the 'tasks' stat button for project form view
- when creating a project on the fly from a task's form view, allow_billable
  should be set to true by default
- Display only the colored dot, hide the status label for project list view
- remove following fields from project
  allow_recurring_tasks

task-3251656

closes odoo/odoo#119154

Related: odoo/upgrade#4569
Related: odoo/enterprise#40050
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-06-15 18:51:08 +02:00
Eteil Djoumatchoua(etdj) 8d0625a95f [FIX] website_sale: add product with extra price to cart
Version: 16.0

Prerequisites:
- "Pricelist" enabled
- "Prevent Sale of Zero Priced Product" enabled

Steps:
- Create a product:
	- Sales Price: 0
	- In the  "Sales" tab set "website" to a website
	- Add Extra Prices (smart button)
		- Public Pricelist (USD)
		- Min. Quantity: 0
		- Price: 100
- Go to the shop, choose the correct pricelist and try to add the product to the cart

Issue:
UserError:  The given product does not have a price therefore it cannot be added to cart.

Cause:
It doesn't compare the good price list considering the context

opw-3339524

closes odoo/odoo#124898

X-original-commit: facd44d0bd4352be3d0eb11a2675e7a518c97e59
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-06-15 17:36:41 +02:00
Salvatore Davide Rapisarda 722d00ff91 [CLA] Corporate signature for Pixora Srl
closes odoo/odoo#124890

X-original-commit: 22ea7f24bcb9e55a4f3dcd3275d5a9c4b984d720
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-06-15 17:36:38 +02:00
aliya f4d7d75835 [FIX] account_peppol: fix account_peppol checkbox
Currently:
Create an invoice and send it using Peppol and make sure the PDF and the XML are well generated but Peppol failed for some reason.
When opening the wizard later, the checkbox is no longer there since the XML is already generated.

Fix:
This commit adds enable_peppol to show the checkbox depending on this field, so that if there is already a ubl XML generated, we can still send an invoice via Peppol.
Also, if the ubl generation is enabled but ubl checkbox is not checked, and the user chooses to send via peppol,
we assume that the ubl xml needs to be generated as well.

task-3358419

closes odoo/odoo#124496

Signed-off-by: Laurent Smet <las@odoo.com>
2023-06-15 17:36:30 +02:00
Khushi Vakil f6ee7d467f [IMP] mrp,purchase_mrp: update demo data
Activated the route in demo data of Table Top, Table Leg and Wood Panel so that
bom overview and MO overview can yield better demo results.

task id: 3357025

closes odoo/odoo#124278

Related: odoo/enterprise#42169
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2023-06-15 17:36:28 +02:00
Renaud Thiry 845111af36 [IMP] crm: remove set_reason toggle field
In odoo/odoo#124103 we stop using this field in the wizard.
It is thus removed from master.

task-3356095

closes odoo/odoo#124049

Related: odoo/upgrade#4743
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-06-15 17:36:20 +02:00
Tommy (tong) 9d0377887c [IMP] l10n_sg: add PayNow QR code payment for invoice
Impacted Version:

- saas-16.4 or above

This commit improve below features:

- Add PayNow QR code payment for invoice based on below github repository
https://github.com/daffodilistic/pyPayNowSg

task-3130633

closes odoo/odoo#122802

Related: odoo/documentation#4565
Related: odoo/upgrade#4727
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
2023-06-15 17:36:15 +02:00
Tommy (tong) 799e0ff84c [IMP] account_qr_code_emv,l10n_hk: code refractoring for reusing
Impacted versions:

- saas-16.4 or above

This commit improve below features:

- Move country_code to account_qr_code_emv
- Add _serialize method to compute the qr_code_vals
- Fix additional data field should return if country_code mismatched
- Merge fields l10n_hk_fps_type to proxy_type
- Merge fields l10n_hk_fps_identifier to proxy_value
- Add include_reference boolean to res.partner.bank

Part-of: odoo/odoo#122802
2023-06-15 17:36:14 +02:00
David Monnom (moda) a3d530c846 [IMP] point_of_sale,pos_hr: add employee manager role
Currently, POS-allowed employees can manage cash:
- at the opening (cash control)
- on cash payment

Now, after adding the mananger role, it is possible for an employee to
open the cash register. In the settings of a `pos_config`, you can add
employees with a "basic" role and with a "manager" role, the latter
grants the same rights as a classic odoo manager user.

closes odoo/odoo#122287

Related: odoo/upgrade#4700
Signed-off-by: Guilliams Adrien (adgu) <adgu@odoo.com>
2023-06-15 17:36:08 +02:00
luve-odoo d387acffb7 [IMP] project : Customer Ratings improvements
- Removal of 'my team's ratings' and the 'my department's ratings'
filters in order to be more consistent with the project.task search view

- UI improvements in the project form ratting settings

TaskId-3251609

closes odoo/odoo#120633

Related: odoo/upgrade#4632
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-06-15 17:36:00 +02:00
John Laterre (jol) 6ba77562c0 [REV] account,l10n_*: remove company currency symbol in reports
This reverts commit d39396c728.

The feature was implemented in a rather rigid way,
and we think something more dynamic would be better.

closes odoo/odoo#115332

Related: odoo/enterprise#38208
Related: odoo/upgrade#4740
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
2023-06-15 17:35:42 +02:00
Kartik Chavda 6175c09724 [IMP] sale_project: hide SOL field
Before this commit SOL field on task visible when user no
sale access and field is set but SOL field is readonly when
user has no sale access there is not point showing readonly
empty field.

This commit hide SOL field when user has no sale access and
field is not set.

task-3186438

closes odoo/odoo#115474

Related: odoo/enterprise#38186
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-06-15 17:35:34 +02:00
Mahdi Cheikh Rouhou (macr) 41ba2c136a [FIX] sale_timesheet : allocate hours to different projects with different templates
When we create a sale order with multiples services which have different projet templates, the projects created will have the sum of all hours which is not true.

Steps to reproduce the error :
1- create at least 2 product with type service and choose create on order : project & task , and create a template for each one on the fly
2- create a sale order with the created services and choose some quantity for each one of them
3- confirm it
4- Click  on the smart button projects
5- you will see that the allocated hours for each project have the sum of all the quantities

The origin of the problem is that we don't check on the template_id when calculating the allocated hours so we sum the allocated hours of  all the services having project & task for each one of them .

opw-3341546

closes odoo/odoo#125071

X-original-commit: 537a0093b0467f80aac6b1de2e93bf04c0298e5b
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Mahdi Cheikh Rouhou (macr) <macr@odoo.com>
2023-06-15 16:02:29 +02:00
Yolann Sabaux a9d56620d2 [FIX] l10n_fr: enable invoice name on each page
Steps to reproduce:
- create an invoice with a certain number of items so that when printed there are multiple pages

Issue:
- the invoice name does not appear on each page
According to the French legislation it is mandatory

See https://entreprendre.service-public.fr/vosdroits/F31808

Solution:
- set a config parameter specifically for l10n_fr in stable
- set it in account directly for Master
To allow the footer of the invoice to contain the name (and therefore the number) of the invoice

opw-3199906

closes odoo/odoo#124989

X-original-commit: 7b071c995f1c9587cf4de56d6d1a632ea39db8ac
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Signed-off-by: Yolann Sabaux (yosa) <yosa@odoo.com>
2023-06-15 16:02:26 +02:00
Touati Djamel (otd) 960de00ea2 [FIX] stock: avoid traceback when changing operation type
Steps to reproduce the bug:
- create a new transfer
- Click on new line but leave it empty
- Change operation type

Problem:
A traceback is triggered, because the onchange of picking_type is
triggered, so we try to get the description of each product in each
move. However, since the move does not have a product set,
an error is thrown:
https://github.com/odoo/odoo/blob/16.0/addons/stock/models/product.py#L235-L239

opw-3349646

closes odoo/odoo#125125

X-original-commit: 3db056a8a7a471a6eab800217bbe0690605d8db0
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
2023-06-15 13:33:42 +02:00
Touati Djamel (otd) 44509d46f3 [FIX] mrp_account: copy analytic account when duplicating a BoM
Steps to reproduce the bug:
- Install mrp_plm
- Create a BoM with an analytic account
- Create an ECO
- Start the revision

Problem:
The new BoM version doesn't have the analytic account from the original
one.

opw-3329901

closes odoo/odoo#125111

X-original-commit: 0210980037ccf843d73033d2a240369112899ff1
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
2023-06-15 13:33:40 +02:00
Jurgen (jugj) 4f3e1af489 [IMP] hr: Increase usability of the plans
This PR makes the following changes :
- In the demo data, add a fleet manager to the vehicle linked to Marc Demo & add a domain to that field to only list users from the selected company(ies)
- On the Launch Plan window change the dropdownlist for a radiobutton widget
- Remove the quick create and quick edit option on the launch plan screen
- Add a due date on the launch plan screen, the activities will be created on launch plan and the due date will be the one selected in the field
- On the activity type, hide the Schedule field if no value are defined on the previous field (suggest/trigger)
task-3337922

closes odoo/odoo#122298

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-06-15 10:45:06 +02:00
Pratik Awasthi a92d68649d [IMP] spreadsheet_dashboard: improve the dasboard panel
Improve the following generic UX

- Earlier service modules were under the project name so improved it by renaming
  it with Services
- Project overview was named Tasks so renamed it Project
- graph/pie view > project > breadcrumb of the dashboard was not visible because
  the action of the project has a target main which stops the breadcrumb of project
  so target it to main to make breadcrumb visible

task-3324591

closes odoo/odoo#121348

Related: odoo/enterprise#41032
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-06-15 10:44:58 +02:00
Pratik Awasthi 2a1aed788d [IMP] sale_timesheet: improve search view of timesheet
improve the UX for search view:
- remove the group by on 'Sale Order'
- remove the quick search on 'sales order item'
- add quick search for SO and SOL instead of 'Sale Order'

task-3265251

closes odoo/odoo#118801

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-06-15 10:44:55 +02:00
Jay Savaliya e1f1767491 [FIX] website_slides: prevent auto-marking videos complete
When user will open the video in any course, it will be marked as completed
directly which behaves like any other content(pdf, image). This behavior was
introduced when 'slide_view' was modified in https://github.com/odoo/odoo/commit/4c291fe30468dab7cef9d2e5a0377c78484f5045, but in the case of video,
it must not be marked as completed before the video is watched up until(near)
the end, as per the previous behavior.

Task-3346507

closes odoo/odoo#125128

X-original-commit: 488ce25425f71733abc3aa7b32f299d6abf48055
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-06-15 09:05:24 +02:00
Jurgen (jugj) 431a5bfe5a [IMP] hr: Add a search panel for company and department on hr_job views
task-3332640

closes odoo/odoo#125115

X-original-commit: 2ad504243ed4215ec87f6c2493c681f3f92a64e8
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-06-15 09:05:19 +02:00
Benoit Socias 0665bce6d8 [FIX] web_editor: fix border width options on zoomed browser
When the browser is zoomed, the value of the `border-width` CSS
properties obtained through `getComputedStyle` are impacted by the
zoom. Because of this, entering a "10px" border in a Chrome zoomed at
125% turns it into "9.6px" when leaving the input field.

This commit neutralizes the zoom effect by rounding the value up.
The rounding operation was empirically determined by observing values,
see table below.

When zoomed out this does not always work: e.g. at 50% zoom, a value
of 11px becomes 10px. But zooming out is an unxpected use case, that
situation is therefore not handled by this fix.

Observed values of the border-width property:
Set value => `getComputedStyle`
```
Value  Chrome 125%  Firefox 120%
  1px        0.8px     0.83333px
  2px        1.6px     1.66667px
  3px        2.4px     2.50000px
  4px        4.0px     3.33333px
  5px        4.8px     5.00000px
  6px        5.6px     5.83333px
  7px        6.4px     6.66667px
  8px        8.0px     7.50000px
  9px        8.8px     8.33333px
 10px        9.6px    10.00000px
 11px       10.4px    10.83333px
 12px       12.0px    11.66667px
```

Steps to reproduce:
- Drop a "Text - Image" block.
- Select the text column.
- Zoom with ctrl+mouse wheel or ctrl-plus.
- Set a 10px border.
- Leave input field.

=> Border option field displayed a different size.

task-3172235

closes odoo/odoo#125107

X-original-commit: 6398b0c75b9e14b7cecb1526fe5a950101d534ad
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
2023-06-15 09:05:13 +02:00
Kevin Baptiste c435c2ee6f [FIX] hr_holidays: fix test failing on weekends
The test would fail when running on a weekend, as the employee would be
considered not working.

Runbot error-21971.

closes odoo/odoo#125097

X-original-commit: c6d95961fa8d6bce2f7c290d2d45eb2195950d74
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-06-15 09:05:10 +02:00
Pierre Masereel e89c54b1fe [FIX] hr: Only change bank account partner when needed
When you use the salary configurator on existing employee, you get an
error because you cannot modify a trusted bank account.

Since we cannot modify the partner_id on a bank account when it is
trusted, we should only modify the partner on the accout when it is
needed, and untrust the account when it is changed.

This has been introduced in https://github.com/odoo/odoo/pull/120423

closes odoo/odoo#125096

X-original-commit: 2ef3ebe5985368e5e859ae43bc4725dd8b8ebf06
Related: odoo/enterprise#42567
Signed-off-by: Pierre Masereel (pim) <pim@odoo.com>
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-06-15 09:05:08 +02:00
Prakash Prajapati f5b8e0431b [IMP] hr_recruitment: add sequence field in Refuse reasons
In this commit, We have added the sequence field so that the user can
easily reorder the Refusal Reason.

task-3336247

closes odoo/odoo#122429

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-06-15 09:05:03 +02:00
nni-odoo 52bb41e92d [FIX] l10n_id_efaktur: incosistency in price
There are some inconsistencies in price between the original record and tax document due to rounding. This issue is now mitigated by having a more accurate decimal place rounding

3019692

closes odoo/odoo#125130

X-original-commit: 4a711c0433ea79976b9d8ccfeb3a94412c5041ff
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
2023-06-15 07:57:03 +02:00