Commit Graph
157402 Commits
Author SHA1 Message Date
Nshimiyimana Séna 1d3fbcb6e2 [FIX] l10n_gcc_invoice: translate payment terms' notes correctly
## Steps to reproduce
- install l10n_gcc_invoice module
- switch to a company in Saudi Arabia (SA company)
- create and print an invoice that has a payment term with a translated
  note

We expect the payment term's note to be displayed both in English and
Arabic. But instead, the note is displayed twice in the customer's
preferred language.

## Cause
`t-field` does not use the context defined on the field itself. It uses
the rendering context.

opw-3101387

closes odoo/odoo#109330

X-original-commit: 8a3049a63c7e9b13892278784781a793f8e0ab4f
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
2023-01-10 15:43:16 +01:00
Kartik Chavda 743704c54e [IMP] project: group task list view by default
This commit adds default groupBy for task list view
to represent data properly menu vise.
- add default groupBy stage for tasks from project action.
- add default groupBy personal stage for `My Task` menu.
- add default groupBy project for `All Tasks` menu.

task-3084850

closes odoo/odoo#109281

Related: odoo/documentation#3311
Related: odoo/enterprise#35504
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-01-10 15:43:10 +01:00
Kartik Chavda 6b22e54f1a [IMP] {sale_,}project: hide customer and sol field for private task
Before this commit when user creates a private task user
still able to customer and sol field which no use for
private task.

This commit hide customer and sol field for private task
and reset customer field when user make non private task
to private task.

task-3084850

Part-of: odoo/odoo#109281
2023-01-10 15:43:10 +01:00
Kartik Chavda 3cd30d1531 [IMP] web: add default_group_by in list view
Before this commit it is not possible to add default
groupBy in list if users want default groupBy a list
then they have to pass default groupBy in action and
passing default groupBy in action groupBy other views
in action, so priorer to this commit users cannot add
default groupBy in list view without impacting other
view.

In, this commit add default_group_by in list view
attribute so users can add default groupBy in list
view without impacting other views in action.

task-3084850

Part-of: odoo/odoo#109281
2023-01-10 15:43:10 +01:00
sofiagvaladze 262c0ad84f [IMP] hr_holidays: send time off cancellation notification to manager
Purpose:

User should be abled to delete him time off (time off that needs to be
validated by both, manager and time off officer), if it has not been validated
by officer yet.

The manager that validated the time off, should be notified
if/when the time off is canceled by the user.

Both manager and user should be notified if officer refused time off,
validated by manager.

This commit also fixes traceback on time off form in development mode.

If there is

<field name="A"/>
<label for="A"/>

we get traceback in dev mode.

Instread it should be

<label for="A"/>
<field name="A"/>

task - 2857233

closes odoo/odoo#94533

Related: odoo/upgrade#3809
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-01-10 15:43:00 +01:00
Demesmaeker 65ee6ddacc [FIX] payment_payumoney: fix typo in docstring
closes odoo/odoo#109534

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2023-01-10 14:41:05 +01:00
Thibault Delavallée 0fcd089a3d [IMP] test_mail: improve composer tests, yet again
Some additional changes in mail composer tests before going into some rewriting
and improvements

  * some improved messages in asserts;
  * additional tests for attachments in mass mailing mode, using sub tests;
  * additional tests for configuration (auto_delete_* fields, email fields,
    subtype, ...);
  * removed some wrong tests not failing due to current code: when testing
    template values, do not give a creation value at the same time as it
    will fail when moving to editable stored fields;

Task-2710804 (Mail: Clean MailThread Posting API)

closes odoo/odoo#109522

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-01-10 14:40:59 +01:00
Thibault DelavalléeandRobin Engels a2f9f26c85 [FIX] mail: better support private recipient in full composer
Current behavior

In the recruitment module, if you set an email template for the first step of
a job recruitment process you cannot send any other email using the full
composer. This happen because the partner type goes from 'contact' to 'private'
and this type cannot be set as recipient in the full composer.

Steps to reproduce

- Go to any job recruitement and set an email template for the first
  step
- Go on the website and apply for this job
- Go back to the job application and send an email using the full
  composer, the email is not sent to the applicant. And the applicant
  is not added to the followers.

Fix is to somehow improve support by adding asked partners from default in
context.

Note that this does not change anything from ACLs point of view, as trying
to access private partners without the necessary group or ACLs will raise an
access error anyway.

Also note that private partners defined on a template are still stripped
as they do not respect the new (nor the old) domain. That would be tricky
to solve, better not use private partners in templates.

opw-3010308

closes odoo/odoo#109451

X-original-commit: 12b25f21216b11511d5fed22fb3564d9dc297559
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Part-of: odoo/odoo#109522
Co-authored-by: Robin Engels <roen@odoo.com>
2023-01-10 14:40:59 +01:00
Thibault DelavalléeandRobin Engels a45afdd830 [IMP] mail: add tests for private partners in composer
Add tests showing current behavior of partner_ids fields on composer when
dealing with private partners. Some use cases are added as unit tests

  * default_partner_ids: coming notably from suggested recipients;
  * template usage adding a partner (e.g. partner_to);
  * when not having the rights to see private partners, access error should
    be raised;
  * mail gateway when a private partner sends an email;

X-original-commit: 2153eec790b730761fe50d6bea5cd4bacedce97a
Part-of: odoo/odoo#109522
Co-authored-by: Robin Engels <roen@odoo.com>
2023-01-10 14:40:58 +01:00
aliya 73b1aad8fb [IMP] l10n_co: update CoA, taxes
This commit:
- Updates the Chart of Accounts for Colombia
- Updates taxes

task-2830938

closes odoo/odoo#100513

Related: odoo/enterprise#31474
Signed-off-by: Laurent Smet <las@odoo.com>
2023-01-10 14:40:55 +01:00
Adrien Dieudonne 84bff82d76 [FIX] web, web_editor: ace widget partially hidden in read-only mode
Before this commit, the ´.ace_gutter´ overlapped the beginning
of the ace widget text content.

It only happens in read-only mode if it's a one-liner content.

Note that ´aria-hidden´ attribute is not set on BS modal. So,
it seems useless to remove it. Maybe a relicate of Bootstrap 3.

Steps to reproduce:
In debug mode,
- Open Settings
- Technical
- Scheduled Actions
- Open any

closes odoo/odoo#109519

X-original-commit: dc65d3de3a02a8f196eb22348bdfe41ede23f5d1
Signed-off-by: Romeo Fragomeli (rfr) <rfr@odoo.com>
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2023-01-10 13:40:01 +01:00
Joseph Caburnay 4bf700140b [FIX] web: list column resize issue
**Issue:**

- Try resizing a column.
- Bug: After releasing the resize, the column being resized is also reordered.
  - This results to automatic resizing of the columns, not respecting
    the current resize made by the user.

**Solution:**

1. Keep the size of the columns after reordering. Better UX because any resize
   made by the user won't change when reordering the list (accidentally or purposely).
2. During resize, we track state variables - `resizing` and `preventReorder`.
   - When resize starts, `resizing` is set to `true`.
   - When the mouse pointer is released (mouseup), and before the `mouseup` event
     reaches the `window`'s `mouseup` listener, the column title handles the `mouseup`
     first, setting another state variable `preventReorder` to `true`.
   - `mouseup` will eventually reached `window` which stops the resize, setting
     `resizing` to false.
   - Then, click event happens on the column header. And since the `preventSort` is
     true, it will return early but resets the `preventReorder` to `false`.
     - If the click event happened to be in the resizer span element, we should not
       prevent it from bubbling so that `preventReorder` is properly reset.

**TASK-ID:** 3109501

closes odoo/odoo#109518

X-original-commit: 7a71a0974164277ac7fd382391684b078b71bf7d
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-01-10 13:39:58 +01:00
Rémi Rahir dfb88e4fa2 [IMP] spreadsheet: update o_spreadsheet to latest version
https://github.com/odoo/o-spreadsheet/commit/fc313d38 [IMP] images: delete images from the file store
https://github.com/odoo/o-spreadsheet/commit/d4e45186 [REF] config: move data external dependencies to config
https://github.com/odoo/o-spreadsheet/commit/3f6cd0f5 [FIX] headers: fix rounding error in header size
https://github.com/odoo/o-spreadsheet/commit/ac07e847 [FIX] functions: fix error message
https://github.com/odoo/o-spreadsheet/commit/e068c651 [IMP] clipboard: copy cell as HTML in OS clipboard

closes odoo/odoo#109497

Related: odoo/enterprise#35607
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2023-01-10 13:39:56 +01:00
David Ramia bcf253063f [FIX] website: optimize the asset disabling function
Before this commit, the behavior disabling the unused snippet assets
performed two checks:

1. It was looking for occurrences for its use in the snippet template
2. It was looking for occurrences for its use in the HTML fields
3. Checked on the occurrences of step 1 and 2 and return result.

In many cases there are already coincidences in the first step, making
the second step unnecessary since this second one is the slowest.
Matches are now checked between steps 1 and 2 to skip the second if
matches are already found.

closes odoo/odoo#109488

X-original-commit: 56100532dbcbdeb5487662d0cbf35ba6d62b15b5
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-01-10 13:39:51 +01:00
Jensi Chovatiya 06b6a52648 [FIX] web: too long input placeholder
The placeholder may be too long and not fit the screen. In this
situation it would not been shown at all. Using the `text-trauncate`
bootstrap class, the end of the text is truncated with an ellipsis in
case it doesn't fit on screen.

task-id-3098157

closes odoo/odoo#109424

X-original-commit: dc7e4c90c9c28c456c1dfbdd503a4cb9095a1292
Signed-off-by: Julien Castiaux <juc@odoo.com>
2023-01-10 12:35:09 +01:00
FrancoisGe 79c89438a7 [REF] web: converted the client actions from misc.js
This commit is to convert the client actions in misc.js into the new
architecture.
We remove the client actions login and logout because they are no
longer used in the code base.

closes odoo/odoo#109332

Task-id: 3099992
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-01-10 12:35:04 +01:00
David Monnom (moda) 9644ca52ff [IMP] point_of_sale: display rescue session
- Add link to see rescue session on each `pos_config`
- Change error popup by a alert popup when closing a pos.

Before the user wasn't notified when a rescue session isn't closed.
The popup isn't an error but a notification that inform the user that the session is already closed and a rescue session was created.

closes odoo/odoo#107000

Taskid: 2817110
Related: odoo/upgrade#4111
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
2023-01-10 12:34:59 +01:00
FrancoisGe 2587f31912 [FIX] web: search in m2o displays lost connection notification
In the PR 104415, we add the possibility to abort the name_search rpcs
which will be ignored.
Unfortunately, we forgot that xhr.abort performs a reject which will be
converted into an "XmlHttpRequestError abort" error. This error will
cause a notification "Connection lost. Trying to reconnect...".

Solution:
We revert the modifications in the abort function and in the m2o
we catch all the errors on the rpc name_search that we are going to
abort because they have no more use.

How to reproduce:
- Go to a form view with a m2o field
- Having a slow network or a lot of records in the m2o
- Enter several char in the m2o search bar

Before this commit:
A notification "Connection lost. Trying to reconnect..." is displayed.

After this commit:
There is no notification.

closes odoo/odoo#109500

X-original-commit: 7bff161ac5e916bf4d4eabe4f9ada9a147893cf2
Signed-off-by: Samuel Degueldre <sad@odoo.com>
2023-01-10 11:23:33 +01:00
Aaron Bohy d9b812d3f9 [FIX] base: allow t-debug directive in arch validation
Commit [1] added a whitelist of qweb directives that can be used
in qweb-based views (e.g. kanban). We forgot to allow the `t-debug`
directive, which obviously doesn't make sense in production but is
useful for debugging purposes.

This commit adds that directive to the whitelist, s.t. one can now
edit the view in xml or directly from the interface to add a
`t-debug`. Moreover, we add a test to ensure that we don't forget
a `t-debug` in an arch when we commit.

[1] 7fd5cec72b

closes odoo/odoo#109493

Signed-off-by: Samuel Degueldre <sad@odoo.com>
2023-01-10 11:23:30 +01:00
José Moreno Hanshing 8802a69da6 [FIX] l10n_cl: extra delivery address in invoice header
This fixes an extra section that was being shown from the account module in Chilean localization invoices
because of changes in the account template in 16.0
Now we display delivery address in chilean invoices if it is different than the customer's address.
Also reorganized the header to optimize space. Addresses now don't use extra line breaks, moved the GIRO
to the right, and the Address to the left

closes odoo/odoo#109490

X-original-commit: e76c0f827f7c2b0a054cd1e4572155ece094f2cc
Signed-off-by: Josse Colpaert <jco@odoo.com>
2023-01-10 11:23:28 +01:00
Victor Feyens a3c3518313 [FIX] sale: avoid conflict between demo & test rates
When run on new year, the test fails because the created
currency rate (for the test) conflicts with the one in
the demo data.

closes odoo/odoo#109483

X-original-commit: 5a62eb7a25a05c7e779866824e0c1308d558f64a
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-01-10 11:23:25 +01:00
Adrien Widart (awt) d4f82ff1fa [FIX] purchase_stock: generate vendor delay report
The vendor delay report only works with basic use cases. Here are
the issues:
- For each SM, we sum up the done qty of all SMLs without
  considering the UoMs
- When grouping several lines (for instance, by partner and product),
  we sum up the quantities of each line but their UoM can be different
- When grouping several lines, we sum the `qty_total` which are the
  quantity of the related POL. This is an issue: suppose a POL with
  a quantity Q and suppose there are two SM (backorder), if we group
  by product, we will have a total quantity of 2Q, which is
  incorrect (and so will be the delivery rate)

To reproduce the issues: See the tests added by this commit.
Note: the last test (`test_vendor_delay_report_without_backorder`)
was not failing before this commit. It is added to simply improve
  the tests

OPW-3065065

closes odoo/odoo#109471

X-original-commit: c2e351534b9627b6844effba9943b09d4b0b93f3
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
2023-01-10 11:23:22 +01:00
niyasraphy 0758297a65 [IMP] account: remove reference to view in enterprise
removing the view from the return action and thus it will take the default tree view.

closes odoo/odoo#107345

Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
2023-01-10 11:23:17 +01:00
Demesmaeker a6087c67b7 [FIX] sale: ensure correct partner is picked
Followup of b9e80c1403de0341a0c133a254142e53ef8c2842

In the last commit, we make it so when the tour was working as expected, the partner had an email.
But the problem which lead to another partner sometimes chosen instead was still there. We now make
sure to select the correct partner. Additionally, we supress an useless step.

closes odoo/odoo#109459

X-original-commit: 9b31ee81095ccef100c98cb0751b6e96d81f691e
Signed-off-by: Morgane Demesmaeker <edm@odoo.com>
2023-01-10 10:16:56 +01:00
Jigar Vaghela 99e75e4e4e [IMP] l10n_in_edi: allow negative line for in invoice
Indian edi does not support line with a negative subtotal
but this use case is common when you want to apply a global discount.

This commit modify the json generated. The negative line are
splitted on same HSN code of the positive line affecting the discount of the positive
line.

The total of the invoice and the taxes remain unchanged.

closes odoo/odoo#109389

X-original-commit: 80701911229af6b9a6a29420796e45fcdbbd13ec
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: Josse Colpaert <jco@odoo.com>
2023-01-10 10:16:54 +01:00
fdardenne e602a55503 [FIX] mail: activity view: luxon in rendering context
Since the refactoring of the activity view, luxon is not in the
rendering context. Resulting in crashing in some activity views
that used luxon in their template.

- Go to Appraisal
- Switch to the activity view
- Create a record in this view -> crash

Now, luxon is in the rendering context.

closes odoo/odoo#109153

Signed-off-by: Luca Vitali <luvi@odoo.com>
2023-01-10 10:16:51 +01:00
fdardenne ca80a60199 [IMP] mail: activity view: allow to filter columns
Before, in activity view, it was not possible for users to hide
never used columns.

Now it is possible for users to hide and show columns in the
activity view.

task-3039919

Part-of: odoo/odoo#109153
2023-01-10 10:16:51 +01:00
Claire Bretton (clbr) 9a20271a2a [FIX] l10n_ch: translate tax report line to English
One line of the tax report was still in plain French while the code should always be in English
Translate the data and update pot/po files.

closes odoo/odoo#109480

X-original-commit: bc8ff80b84d650c34224315097742cb878404f5b
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
2023-01-10 09:12:44 +01:00
Claire Bretton (clbr) 7bd3871d07 [FIX] l10n_ch: reintroduce lost translations from 15.0/Transifex
Some translations were lost when we changed to 16.0 since there is no l10n project for 16.0 on Transifex.
Reintroduced lost translations for Arabic, German, French, Italian, Dutch and Chinese.

Task: 3126103
X-original-commit: b2794c76fea71011c92212808bfd2bf2edf42645
Part-of: odoo/odoo#109480
2023-01-10 09:12:44 +01:00
FrancoisGe 5d7136c21d [FIX] web: Incorrect navbar when leaving an invalid form view
Before this commit, when trying to change the menu from an invalid form
view, you would stay on the form view but the navbar would be modified
to dispaly the menu you had selected.

How to reproduce:
- Go to a form view
- Edit the fields so that the record is invalid
- Change the menu using the menu app or the palette command

Before this commit:
The form view has not changed but the navbar has been modified, it shows
the menu you selected.

After this commit:
The form view and the navbar have not changed.

closes odoo/odoo#109460

X-original-commit: bd7e36edcd2f9d33a72cc25b030f91c20da78387
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-01-10 08:14:46 +01:00
Rod Schouteden 2a1512f52e [IMP] microsoft_outlook: update refresh token when getting a new access token
Every 90 days the imap auth needs to be done again, because that is the only
way the refresh token is updated. With this commit it is now done also when
a new access token is called.

closes odoo/odoo#109477

X-original-commit: b9ecb538b39e7d5467de141a515ac833ace02973
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-01-09 22:31:51 +01:00
Benoit Socias d824a17344 [FIX] web_editor: reset m2m suggestions also after RPC returns
Since [1] when the m2m widget was introduced, when the network latency
is high enough, the `_search()` method can be called several times in
parallel. The former list of existing records is removed before doing
the RPC call, then populated with the results received after the RPC
call returns. With the proper timing and race conditions, this could
lead to having the list cleared several times, then populated several
times with the incoming results.

This commit makes sure the list is cleared after the RPC results are
obtained instead of before.

Steps to reproduce:
- Create and save a blog post with several tags.
- Edit blog post.
- Configure network latency to one second in browser's developer tools.
- Remove one tag.
- Remove another tag after 500ms. (Because the search happens after a
`setTimeout`.)
- Open tag suggestions.
=> List contained the concatenation of the two suggestion lists.

[1]: https://github.com/odoo/odoo/commit/be05ac7e2b8d866a72693b761f3bc8576d54e59e

task-2811746

closes odoo/odoo#109479

X-original-commit: 48564abe484f61c09ca98c3cddd5b4b0b55e6497
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-01-09 21:15:45 +01:00
Benoit Socias f588703c28 [FIX] website_blog: make removed custom tags reusable
Since [1] when the blog tags field option was refactored to use the m2m
widget, the list of existing tags is not cleaned up anymore.
This causes custom tags to remain in that list when they are removed.

This commit adapts the existing condition to exclude custom tags that
have been removed.

Steps to reproduce:
- edit blog
- create custom tag 'test'
- remove custom tag 'test'
- create custom tag 'test'
=> was detecting the tag as already existing

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

task-2811746

X-original-commit: 7f58519b922264efb6b6180608fd5a461d30b9e8
Part-of: odoo/odoo#109479
2023-01-09 21:15:45 +01:00
Benoit Socias 396ac318d9 [FIX] web_editor: restore m2m create text value before create
Since [1] when the m2m widget was introduced, events that were neither
from the create input text nor the create button did remove the internal
value of the text that was entered in the create input text.
Because of this "Create" had no effect if the user hovered e.g. a
suggested blog tag on its way to pointing to the "Create" button.

This commit replaces this behaviour by restoring the text value of the
create input when the create button is used.

[1]: https://github.com/odoo/odoo/commit/be05ac7e2b8d866a72693b761f3bc8576d54e59e

task-2811746

X-original-commit: 59ecbb96db75a77cdcce11460cdbe8aa04438449
Part-of: odoo/odoo#109479
2023-01-09 21:15:44 +01:00
Benoit Socias 7df1cf332e [FIX] website_blog: refresh options UI after adding a new tag
Since [1] adding a new tag on a blog does not refresh the tag list in
the options tab. That commit sorts the `methodsNames` alphabetically.
Previously, the unspecified order of the methods just happened to make
the add operation work.

After this commit the tag list is reset that happens during `setTags`
is prevented when a new tag is created.
If at a later stage a mechanism is created to allow specifying the
order of the `methodsNames`, it should be used instead of this dirty
ad-hoc way.

[1]: https://github.com/odoo/odoo/commit/a48a30f954afcb6ff3a59c4f32b05fd0c2cfcd2b

task-2811746

X-original-commit: e35e1128f5a569f386429b5e532d4b96e9348191
Part-of: odoo/odoo#109479
2023-01-09 21:15:44 +01:00
Bastien Fafchamps (bafa) ae619e6a41 [FIX] base_import: Fix filtered fields shown in select menu
During the conversion to Owl of the base_import action, the fields
mapping for each column was made incorrect.

The fields are now properly sorted between the suggested, additional and
relational categories and the subfields are also correctly handled (no
more duplicates and correct labels).

closes odoo/odoo#109416

Signed-off-by: Luca Vitali <luvi@odoo.com>
2023-01-09 20:08:48 +01:00
Pierre Rousseau 73cf0d7669 [FIX] spreadsheet: fix name get assignation
Since d6a1aa63702132ffc59d2412c2a009912eba797a, a name get saved from the result of a pivot was
stored with an incorrect `deferred`. The value stored was not the
deferred, but the result of `new Deferred().resolve`, which is
undefined.

This revision fixes this issue by storing the correct deferred.

closes odoo/odoo#109472

X-original-commit: b3ad5ee64865dc7a3b84cae18cd37002f6d69a91
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
2023-01-09 18:42:42 +01:00
Samuel Degueldre 4e31216c5d [FIX] point_of_sale, *: prevent block-header from blocking whole pos
*: pos_hr_restaurant, pos_restaurant

In #108891 the navbar was extracted out of the Chrome and into its own
components, but when a temp screen is shown, an overlay is placed over
the navbar to prevent the user from using it to navigate away as this
can break some flows, and the overlay was not moved inside the navbar.
This caused the overlay to go over the entire Chrome which was not the
goal.

This commit moves the block-header overlay into the navbar (and adapts
some code to make the tempScreen state accessible inside the navbar).

closes odoo/odoo#109456

Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
2023-01-09 16:39:18 +01:00
pedrambiria 623cdeef01 [FIX] crm_mail_plugin: get CRM lead with partner id
Before this commit: Outlook Plugin wasn't able to get the opportunities of
contact. The problem was that the `crm_lead_get_by_partner_id` function
calls `_fetch_partner_leads` from the `CrmClient` instance, while it
doesn't have this function.

The solution is inherit the `MailPluginController` which contains this
function.

opw-3092995

closes odoo/odoo#109452

X-original-commit: 7013772d3b760cba0ba2fc1e4162ccfc260eba43
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
2023-01-09 16:39:15 +01:00
Andrea Grazioso (agr-odoo) 808174dfec [FIX] l10n_be: readd 140,141 to the chart of accounts
After 95b74f4 reworked the BE CoA, the accounts "140000-Bénéfice
reporté" and "141000-Perte reportée" are missing in the chart of account.
Tose accounts are part of the minimal legal accounts needed and are also used
in the Belgian Balance sheet in the section "14 - Bénéfice (Perte) reporté(e)".

opw-2871547

closes odoo/odoo#109425

X-original-commit: 790d6635e4db801afeff33ddd0d9fba5cde945da
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
2023-01-09 16:39:07 +01:00
Dossogne Bertrand 060a383aa3 [FIX] hr: fix visuals for mobile on form & kanban views
Before this commit, two visual errors were present on mobile:
- In the employee form view, the name and professions were
overlapping with the profile picture;
- In the employee kanban view, the presence logo and the
activity logo were misaligned

This commit also fixes some indentation errors.

closes odoo/odoo#109145

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2023-01-09 16:39:04 +01:00
Hugo Carlier (Huca) 2e29170852 [IMP] {hr,sale}_timesheet,{sale_}project: modify task sharing form view
The form view of project.task in project sharing is modified to be
similar to the classical form view of tasks (in backend). A
priorititization is added to the views of project.task for project
sharing used in the following modules:
- project
- sale_project
- hr_timesheet
- sale_timesheet

task-3119935

closes odoo/odoo#109067

Related: odoo/enterprise#35421
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-01-09 16:38:57 +01:00
Adrien Guilliams (adgu) 560e141b3e [IMP] point_of_sale: load products and partners from db is always on
Since mid-15, when there are still products (partners) in db that are not loaded in PoS,
they are loaded from db when a user searches it from the PoS.
However, after the load of the last products (partners) in db, a flag is raised
so that no call will be done after that to the db to search for new products (partners).
The problem is that, if a new product (partner) is added to the db while the flag
is raised in an opened PoS config, the config will not make call to the db to
load these new products (partners).

This PR makes the loading of products (partners) by the user through a search
always enabled, so that a new product (partner) can be loaded into the PoS config.

closes odoo/odoo#108025

Task-id: 3092473
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
2023-01-09 16:38:54 +01:00
Hubert Van de Walle (huvw) c7208ecaee [FIX] web: Date{Time,}Field formatting empty values
Steps to reproduce
==================

- Install mrp_product_expiry
- Go to Inventory > Products > Lots/Serial Numbers
- Add the column "Expiration date"
- Remove the groupby if any
- Select 2 records, set an expiration date
- Confirm
- Select the same records, remove the expiration date
-> TypeError: value.setZone is not a function

Cause of the issue
==================

When entering the readonly mode after changing the date, the function
`formattedValue` is called. But `this.props.value` is equal to `""`.
`formatDateTime` only handles `DateTime | false`

The field is rendered from this template https://github.com/odoo/odoo/blob/1d8f6359bbf55983a9582282d12a187c67cdf509/addons/web/static/src/views/list/list_renderer.xml#L233-L236

When `canUseFormatter` returns true, formatDateTime is called with
false, coming from `record.data[fieldName]`

opw-3111869

closes odoo/odoo#109436

X-original-commit: 5b26a080ae28fab2a78e92a838472578591eef17
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-01-09 15:29:07 +01:00
roen-odoo 65c23b4bc7 [FIX] point_of_sale: rounding of refund orders
Current behavior:
When a refund order is created, the amount is not rounded the same way
as the orginial order.

Steps to reproduce:
- Create a rouding method with 0.05 as rounding value, with the DOWN
  rounding method
- Create an order with a product of price 1.98
- Validate the order, the price should be 1.95
- Create a refund order for the previous order
- Validate the refund order, the price should be -1.95 but it's -2.00

Solution:
Always act like the order has a positive amount, and apply the rounding
the normal way. Then apply the sign of the original order.
If the remaining amount has a different sign than the original total,
we should invert the rounding method to apply a rounding in the same
"direction" as the original order.

For example :
- Original order is -1.98
- Rounding is applied and the total is -2.00
- After the payment, the remaining is -1.98 - -2.00 = 0.02
- Wich will be rounded to 0.05 wich is not correct, it should be rounded
  to 0.00. So we invert the rounding method to apply a rounding in the
  same "direction" as the original order. If we don't do this the total
  due would have been -1.95 instead of -2.00. And the change would have
  been 0.05 instead of 0.00.

opw-3106656

closes odoo/odoo#109422

X-original-commit: c92074e8ec5b4a11fa90f08a16c859bb72234863
Signed-off-by: Heinz Robin (rhe) <rhe@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
2023-01-09 15:28:58 +01:00
Julien Castiaux c7de0a1db7 [FIX] website: restore /website/image endpoint
The route was introduced with [1] but wrongly removed in [2].
Such routes are still used, notably on odoo.com.

[1]: https://github.com/odoo/odoo/commit/d7b0a56f34d569f090239588cd3e8cd9263f6429
[2]: https://github.com/odoo/odoo/commit/da8def8e410de68256ba4ab09ebf7a8b699355ac

closes odoo/odoo#109376

X-original-commit: a967bd6587bcfa5533e3acd2fc70d391b6bd6d0d
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-01-09 15:28:55 +01:00
maximilien(malb) 6c3ec89c7d [IMP] l10n_sk: translation
Before this PR, all this localisation was written in slovak, but all the localisation have to be written in english and then translated back in the native language. This PR correct that.

closes odoo/odoo#109040

Task-id: 3119583
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
2023-01-09 15:28:53 +01:00
Nasreddin Boulif (bon) f07bb106be [FIX] hr_expense: fix analytic account on expense sheet
Steps to reproduce:

  - Install Expense module
  - Activate analytic accounting in settings
  - Create an analytic account X
  - Create an expense with X as analytic
  - Delete the analytic account X
  - Go back to the expense created

Issue:

  Cannot access the expense (error message).

Cause:

  The analytic account is deleted but the analytics (Json field) on the
  expense are not updated.

Solution:

  When deleting an analytic account,
  if used in an expense raise an error.

opw-3059908

closes odoo/odoo#109012

X-original-commit: 6c058e62812605f511220ec6cde06ebe77ae7edd
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Signed-off-by: Nasreddin Boulif (bon) <bon@odoo.com>
2023-01-09 15:28:50 +01:00
Arnold Moyaux 2420c640f1 [FIX] purchase, purchase_stock: add price difference account
Version 16.0 removed the price different account following this pull request #99411

This decision has been made because it was only used anymore by standard cost method and real time valuation.
We thought that standard was not a valid accounting method and we didn't want to maintain code for it.

But:
- Standard could be valid if you manualy complete the accounting entries
by yourself (e.g. employees/machines cost in mrp).
- It's also valid if you record the difference between standard price and
vendo price (price diff)

If you want to have an estimation of your cogs (benefits and loss) during an
accounting period. People just do a manual correction at the end but they have
a real time reporting on the situation.

It's a too big regression to be acceptable. We apologize and reintroduce it for
16.0 and future version.

This PR reintroduce the fields in purchase and the fix module in 16.0 is
not needed anymore.

closes odoo/odoo#108736

Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-01-09 15:28:46 +01:00
maximilien(malb) f87228b0be [FIX] l10n_hr: Migrations modification
To allow people from v16.0 to have the new module in EURO, we added the module l10n_hr_euro in stable, this PR modify the l10n_hr module to allow people to migrate without problem since l10n_hr_euro become l10n_hr in master.

Also the old module l10n_hr of the stable version will be added so that they can keep an history. But like the other, we renamed the module to facilitate the comprehension.
l10n_hr in stable become l10n_hr_kuna in master.

closes odoo/odoo#108511

Task-id: 3102242
Related: odoo/upgrade#4154
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
2023-01-09 15:28:44 +01:00