Commit Graph
160345 Commits
Author SHA1 Message Date
sofiagvaladze faf0f0130b [FIX] hr_recruitment: correctly count the number of applications
Previously, the "Other applications" smartbutton was incorrectly
matching with the applicants with '' on the fields. We don't want
applicants to match if both of them has '' on the matching fields.
Moreover, record rules were not correctly applied for application_count
calculation, as current record will not match with similar record
which has no company defined on it.

This commit fixes the above mentioned issues.

task - 3266694

closes odoo/odoo#118805

X-original-commit: e8263e56423432e9465f70d26fce60c021eabaa2
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-04-17 18:01:26 +02:00
Alexandre Kühn 79b30f13b8 [FIX] mail: border style of composer in edit message
closes odoo/odoo#118802

Signed-off-by: Debondt Didier (did) <did@odoo.com>
2023-04-17 18:01:24 +02:00
Antoine Dupuis (andu) d1834758ea [IMP] tools, account: remove XSD crons; download XSD button
At the moment, XSD files are automatically downloaded at database
initialization, which is quite unnecessary.

The idea is to change Odoo's use of XSDs from being systematically
downloaded and used for validation to simply being available if desired
(e.g. for development or for customers who want them).

To achieve this, this commit does the following:

- remove the XSD download crons;
- provide a 'download XSDs' button in the Settings (next to the debug
  mode button) which is available in debug mode;
- skip XSD validation if any required XSD file is not present; and
- deprecate the 'force_reload' option.

Entreprise PR: odoo/enterprise#38350
Task id: 3010716

closes odoo/odoo#118790

X-original-commit: c8174c7914e567489de74b574b076467440bdb2d
Related: odoo/enterprise#39879
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Antoine Dupuis (andu) <andu@odoo.com>
2023-04-17 18:01:18 +02:00
Victor Feyens f2ce4b4d46 [FIX] account_payment: show payment link action to accounting users
The 'Generate payment link' action on account move records was only
shown to the users of the group 'Show Full Accounting Feature'
(and to salesman when sale is installed).

This means that if you only have invoicing app (`account` module) installed,
you don't see the action.

This commit makes sure the action is visible to all accounting users, like
the refund wizard.

closes odoo/odoo#118800

X-original-commit: 8cf2aebe9582a12b0f2309f25844e0b2d82ed3e2
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-04-17 16:35:11 +02:00
Géry Debongnie 9a1dd53f89 [IMP] web: update owl from 2.0.9 to 2.1.1
This update contains the following commits:

[FIX] components: solve missing update (concurrency issue)
[DOC] remove old references to comp for useRef hook
[FIX] devtools: Fix build commands for windows users
[FIX] devtools: Fix devtools in detached window
[IMP] devtools: Add a button to navigate to the doc
[IMP] devtools: Add devtools documentation
[IMP] Allow app to be mounted in shadow DOM
[IMP] playground: allow sharing playground links
[IMP] runtime: allow validating object values using a type description
[FIX] devtools: Increase vertical padding of the search bar
[FIX] devtools: Hide the collapse all button
[FIX] devtools: Fix bad computation of highlight boxes on the page
[FIX] package: Auto-update package-lock.json

closes odoo/odoo#118798

Notes: https://github.com/odoo/owl/releases/tag/v2.1.1
X-original-commit: a57cd7b2f84a4ebc06f93cabb903d1ff6f23e23c
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Géry Debongnie <ged@odoo.com>
2023-04-17 16:35:09 +02:00
Didier (did) f11ab40c3e [IMP] mail: rename update function and cleanup dead code
closes odoo/odoo#118793

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-04-17 16:35:06 +02:00
Hubert Van de Walle (huvw) a6d65cac43 [FIX] mass_mailing: unregister ResizeObserver on unmount
Steps to reproduce
==================

This only seem to happen on Firefox

- Go to Email Marketing
- Open a campaign
- Go back to the homepage by using the topleft square button

-> `$(...).offset() is undefined`

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

The ResizeObserver used in MassMailingFullWidthViewController is still
triggered, even though it shoudln't.

Solution
========

Disconnect the observer when the component is unmounted.

opw-3271101

closes odoo/odoo#118785

X-original-commit: d5f6bc2b33c3b83520ed2ed710610b69dbe67b75
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
2023-04-17 16:35:03 +02:00
Mahdi cheikh rouhou (macr) bce7da2a38 [FIX] account : forbid recipient bank update on posted bill
When updating the recipient bank on a posted vendor bill the chnages
will not be saved.

Steps to reproduce the error:
1-Go to accounting
2-Create a vendor bill and confirm it
3-Change the bank recipient and click manual save
4-Reload and you can see the changes disappeared

The error was happening because the recipient bank was not displayed as
readonly on a posted state of the account move.

opw-3247282

closes odoo/odoo#118783

X-original-commit: 7e7ca95080a601ccf5c0da679aae00a61a9f8ccf
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: Mahdi Cheikh Rouhou (macr) <macr@odoo.com>
2023-04-17 16:35:00 +02:00
Raphael Collet 4c5cdf5f09 [FIX] core: new() always rounds floats that are put in cache
When new records are used to precompute some fields, the computations
are expected to use the "right" values for floats, in particular float
fields are expected to be rounded.

closes odoo/odoo#118518

Signed-off-by: Raphael Collet <rco@odoo.com>
2023-04-17 16:34:47 +02:00
aliya 8590c6a929 [IMP] account_edi_proxy_client,l10n_it_edi: remove edi format dependency
Edi format is going to be removed eventually - `account_edi_proxy_client` should not depend on it and be more flexible in general.

This commit:
- Removes edi_format field from `account_edi_proxy_client.user` model. We still have to add them in `l10n_it_edi` as it still heavily relies on edi format for now.
- Adds a way to have a unique edi user per company, proxy user, edi mode combination.

This is a necessary step before adding peppol, which will also depend on the account_edi_proxy_client

closes odoo/odoo#116059

Related: odoo/upgrade#4458
Signed-off-by: Laurent Smet <las@odoo.com>
2023-04-17 16:34:44 +02:00
Louis Baudoux a7710b32ba [FIX] partner_autocomplete: fix search by VAT number on Many2one fields
Since the Owl conversion of the partner autocomplete widgets, the search
by VAT number on a `Many2one` field of `res.partner` wasn't working
anymore.

closes odoo/odoo#118784

X-original-commit: 6229674b1788b4e9b62ebc5393e2d09b68b4a56e
Signed-off-by: Florian Daloze (fda) <fda@odoo.com>
Signed-off-by: Louis Baudoux (lba) <lba@odoo.com>
2023-04-17 15:19:06 +02:00
luvi 99ac5eafc7 [FIX] web: improve search in ExportDialog
This commits aims to improve the search feature in the export dialog.
Now, the search isn't resetted when a field is added to the export list
anymore. It is also possible to search in the list of fields using the
technical name of the field.

A test has been added for the search feature in debug mode, and another
one has been adapted to verify that the search input still contains the
string previously entered.

task-3266632

closes odoo/odoo#118767

X-original-commit: 83e58a0e7e1a6f50ad03a098829946d56393d496
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-04-17 15:19:03 +02:00
luvi d5c38635ed [FIX] web: improve export dialog fields search
This commit fixes the search feature of the export dialog. Before this
commit, it was impossible to display subfields that would match the
search pattern, since the filter was only applied to look for fields
at the 'root' of the available fields.

Now, it is possible to search and find subfields that matches the
pattern, and they are displayed inside their expanded parent(s).

A test has been added and verify the search feature.

task-3245492

X-original-commit: cd581aa41874dadb5c87605ed49b105959f1b222
Part-of: odoo/odoo#118767
2023-04-17 15:19:03 +02:00
niyasraphy 26ad6704f9 [FIX] base: alignment of ir.actions.act_window.view form
before this commit, the form view of
ir.actions.act_window.view was not properly aligned.

* open any menu linked with type ir.actions.act_window
* click on Edit Action from debugger button
* click on Add a line from the View one2many field

after this commit, the view will be
aligned properly.

closes odoo/odoo#118764

X-original-commit: 369a8cfca3f8165d6a7b6849b65564e396de9e76
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
2023-04-17 15:19:00 +02:00
Bastien (bvdn) fd36b064e5 [FIX] project: change task sort > priority then state
closes odoo/odoo#118747

X-original-commit: 5ba3f75
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-04-17 15:18:57 +02:00
Nasreddin Boulif (bon) c78edec4d5 [FIX] mail_thread: save attachment from mail in same encoding
Steps to reproduce:

  - Configure incoming mail server and set it to create X record
    on incoming mails (X can be any model with a chatter)
  - Create a CSV file and set the encoding to UTF-16
  - Send the CSV file through Gmail to the Odoo instance
  - Go to model X and open the created record
  - In the chatter, click/download the CSV file
  - Open the downloaded file with Geany (or any file editor that can
    show the file encoding)

Issue:

  The file encoding is not the same as the original file (utf-8 instead
  of utf-16).
  Working with Outlook.

Cause:

  The difference between Outlook and Gmail is that Gmail provides the
  charset of the file.

  The content of the mail is retrieved using `email` python lib.
  The lib will try to retrieve the charset of the file and fallback
  on `ASCII` if not available, then return the decode content.

```python
  def get_text_content(msg, errors='replace'):
    content = msg.get_payload(decode=True)
    charset = msg.get_param('charset', 'ASCII')
    return content.decode(charset, errors=errors)
```

  Example:
  content = b'd\x00a\x00,\x00,\x00,\......'
  Outlook:
  charset = 'ASCII'
  return => 'd\x00a\x00,\x00,\x00...'
  Gmail:
  charset = 'UTF-16LE'
  return => 'da,,,,,\n,,,,,\....'

  In the post process of the attachment, the content is encoded in
  'utf-8' (to then encoded in base64) before creating the attachment
  record.

  Content encoded to 'utf-8':
  Outlook: b'd\x00a\x00,\x00,\x00...'
  Gmail:  b'da,,,,,\n,,,,,\n....'

  Therefore, when writing the file on the disk, the encoding is based
  on the binary content.

Solution:

  When parsing the mail, add the encoding charset to the `info` variable.
  Then, when creating the attachment, use the charset in `info` (or
  fallback on 'utf'8' if no charset set) to encode the content.

opw-3089009

closes odoo/odoo#118694

X-original-commit: 2d1b13e68d8bb204ecfe12a9d3db519c4264592c
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Nasreddin Boulif (bon) <bon@odoo.com>
2023-04-17 15:18:54 +02:00
Nemael f80e2aad37 [IMP] mail: add banner on archived channels
This PR adds a banner on archived channels in detailed view
It also adds a banner on archived channels in kaban view, and
reduces the space available for description in case of banner.

Task-2494469

closes odoo/odoo#117619

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-04-17 15:18:51 +02:00
Xavier-Do f5797774c6 [FIX] profiling, base: non default in session
The current profiler will add default value in the user session
using disk space without valid reason.

This commit makes those parameters optional in the session.

closes odoo/odoo#118762

X-original-commit: eb3bf03b119105f56806d7460fccd4c0133deaab
Signed-off-by: Jérémy Kersten <jke@odoo.com>
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2023-04-17 14:14:30 +02:00
Hubert Van de Walle (huvw)andFrancoisGe 671d96d118 [FIX] web: pressing tab quickly with slow network responses
Steps to reproduce
==================

- With the Chrome devtools, add a network delay of 1 second
- Go to Purchase
- Create RFQ
- Add vendor
- Add products and navigate by using the 'TAB' key
- Add another product line
- Repeat process quickly

`this.list.editedRecord is null`

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

Order of events:
- First tab pressed
- onchange_1 triggered
- Second tab pressed
- onchange_2 triggered
- onchange_1 resolves
- The editedRecord is switched to readonly
- onchange_2 resolves
- There is no more editedRecord

opw-3115650

closes odoo/odoo#118760

X-original-commit: af5cedf078b439710e8801374ace524de54f3b66
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
Co-authored-by: FrancoisGe <fge@odoo.com>
2023-04-17 14:14:27 +02:00
pedrambiria 30ee75cbff [FIX] payment_stripe: provider_sudo has been changed to provider
After this commit https://github.com/odoo/odoo/commit/e534ab41e7b3b71a8286eba849fd4d70f4b27334 the `provider_sudo` has been refactored to
`provider`. But in the `saas_payment_stripe`, it still uses
`provider_sudo`. So it will cause an error in the saas databases.

opw-3271034

closes odoo/odoo#118748

X-original-commit: 3dde24f28ff338a98e6f88641ab592f0b4e6eba6
Signed-off-by: Valentin Chevalier <vcr@odoo.com>
2023-04-17 14:14:24 +02:00
Alexandre Kühn 4d5516774d [FIX] mail: im status online color in community
Before this commit, im status in community was blue instead
of green.

This commit makes im status green in all version, as it should.

closes odoo/odoo#118744

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-04-17 14:14:22 +02:00
Adrien Widart (awt) e587307437 [FIX] stock: check allow_new_product with packages
To reproduce the issue:
1. In Settings, enable:
   - Multi-Step Routes
   - Storage Categories
   - Packages
2. Create a Storage Category SC:
   - Allow New Product: same
   - Max Weight: 100 kg
   - Capacity by Package:
     - 2 x Pallet
3. Create two locations L1, L2:
   - Parent: WH/Stock
   - Type: Internal
   - Storage Category: SC
4. Create a putaway rule:
   - When in: WH/Stock
   - Package type: Pallet
   - Store to: WH/Stock
   - Having Category: SC
5. Edit the warehouse:
   - Incoming Shipments: 2 steps
6. Create a product P:
   - Type: Storable
   - Weight: 1 kg
7. Update L1:
   - There is 1 x P in a pallet
8. Create a planned receipt R:
   - To: WH/Input
   - Operations:
     - 2 x P
9. Mark R as Todo
10. Create two packages:
    - 1 x P in PK01 (! PK01 must be a Pallet)
    - 1 x P in PK02 (! PK02 must be a Pallet)
11. Validate R
12. Open the related internal transfer T

Error: Both packages are redirected to L2 but one of them should be
redirected to L1

When checking L1, we ensure that the policy 'all same products' is
respected. To do so, we compare the products of the quants of L1
with the given product. Here is the issue: when moving a package, we
don't provide any `product` value to the methods used in the putaway
rules process.

Note: There was also another issue with the 'all same products'
policy. Suppose L1 is empty, and we move a pallet with two different
products, the move line is redirected to L1, which breaks the 'all
same products' condition.

OPW-3204924

closes odoo/odoo#118708

X-original-commit: 3a6d82de77e0ab477b3f22985f6d41995e25f652
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
2023-04-17 14:14:16 +02:00
Victor Piryns (pivi) cb73921bef [FIX] project: dup milestones on tasks when dup project
Current behaviour:
When duplicating a project, new milestones are copied for the new
project, but none of them are assigned to the copied tasks like in
the original project.

Expected behaviour:
The new tasks in the new project should have the corresponding copy
of the milestone that were assigned in the original project.

Steps to reproduce:
- Install Project
- Duplicate "Office Design" (it has milestones)
- Observe that the tasks in the new project don't have milestones
  assigned to them, like in the original project.

Reason for the problem:
When we copy the tasks, they have the milestones of the original
project correctly assigned to them, but since the project of the
milestone is different from the project of the task (former
references the original project, while the latter references the
copied project), so in `_compute_milestone_id`, the milestone of the
task is set to False.

Fix:
Remove `copy=True` from `milestone_ids` on the project, and copy the
milestone by hand. This allows us to use an overwrite of `copy()`
for `project.milestone`, and we create a mapping between the old
milestones and the new ones in the context, similar to how we did
with `task_mapping`. With this we can assign the newly created
milestones on the copied tasks correctly (while preserving the
mapping like in the original project).

Affected versions:
- 16.0
- saas-16.1
- saas-16.2
- master

opw-3254868

closes odoo/odoo#118487

X-original-commit: aad60a2c8a887f3ea226af99be9b162673c33ec8
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Signed-off-by: Piryns Victor (pivi) <pivi@odoo.com>
2023-04-17 14:14:13 +02:00
Chenyun Yang 378954a486 [IMP] spreadsheet: include ongoing day in period filters
This commit includes the ongoing day in the current period filters.

Now the start date (time) of each period filter is the start of next day,
and the end date (time) is the end of today.

task 3267525

closes odoo/odoo#118326

Related: odoo/enterprise#39641
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2023-04-17 14:14:10 +02:00
Hubert Van de Walle (huvw) 27c90b95ff [FIX] web: allow to unregister multiple listener from the same target
Steps to reproduce
==================

- Register two events listener on the same target
- Unregister them

Only the first one is unregistered

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

`cbs` is used instead of `listeners`. This means that after any `.off`
call, the target is removed from the Map and it is not possible anymore
to unregister any events for it

closes odoo/odoo#118739

X-original-commit: 345dd30fdc627ada212a8eaa6f9817bbdaf5d3a3
Signed-off-by: Samuel Degueldre <sad@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
2023-04-17 13:09:42 +02:00
damr 10086517ba [FIX] sale: update the project panel when an sol price is changed
Step to reproduce :
- create a service product with 'create project & task'
- set the invoice policy on either 'invoice on TS', 'invoice on
milestone', 'prepaid'
- create a new SO with the product and confirm.
- update the price of the sol (e.a. from 10 to 20)
- go to project_updates

The project profitability panel is still showing 10 instead of the
updated price of 20

After this fix, the project profitability is correctly showing 20

task-3236240

closes odoo/odoo#118728

X-original-commit: 847313c3bccc31449bc441d21304b71648a7f429
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-04-17 13:09:37 +02:00
Denis Ledoux 1480f2fad5 [FIX] *: session.modified has been renamed is_dirty
Since odoo/odoo@04e972660b
The session `modified` flag has been renamed `is_dirty`.

However, it has not been renamed correctly in these
three different places.

The goal to set `modified` at this three places
is to force the session to be saved,
for instance because a mutable (a list or a dict)
contained in the session was modified,
but not the dict of the session itself,
therefore `modified` is not flagged automatically.

As the flag `modified` has not been renamed to `is_dirty`,
a key/value `modified: True` was actually assigned to the
session dict, and saved in file. The behavior
to save the session in these three places was kept,
as one key/value of the session has been changed,
but by the way to assign a new value in the session file,
which is not ideal.

It's better to assign the correct flag to avoid
setting a new key/value in the session for no reason.

closes odoo/odoo#118719

X-original-commit: b6f4a27f2d95d5bc5510f4da50132ab66d8c86aa
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2023-04-17 11:47:15 +02:00
Odoo's Mergebot eca72b05fa [FW][FIX] base, mail: fix various template preview issues
## Issues

- `error_msg` is not set when the template cannot find any record to use as example (16.2)
- `resource_ref` is only initialized in default_get. If the preview generates a report, the commit from that action invalidates the cache and that value disappears. (14.0, real issue since 16.2 as it was previously handled another way)
- html data using empty nodes `<t></t>` are incorrectly converted to 'self-closing' tags `<t/>` which becomes <t> thanks to standard html parsing. (14.0, real issue in 16.0 then 16.2)*

This last one was not an issue because jquery used to fix these invalid tags for us, until a recent update here: 9c41ee5091ac06ac3ca71aeac607195c70061e4a

## Fixes

- Simply add a default value and set that at the end of the compute method
- make resource_ref a write-able computed field to keep the same functionality while allowing the ORM to recompute it
- use the `method` argument of `lxml.etree.tostring` to tell lxml to print the content of the nodes as valid HTML in the data converter

See sub commits for more details.

Task-3162320

closes odoo/odoo#118710

Forward-port-of: odoo/odoo#114632
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-04-17 11:47:12 +02:00
Renaud Thiry 3fa9aa2c05 [FIX] mail: exclude abstract models from templates
Templates could previously be created for abstract models.

The methods are not written with that in mind and most useful ones will
raise an exception when calling them on that template.

task-3162320

X-original-commit: 0d4b473ee54d2376f4f71efd864aa0e16822d4ba
Part-of: odoo/odoo#118710
2023-04-17 11:47:12 +02:00
Renaud Thiry f7e5fd7aab [FIX] base: use html method from lxml
Prior to this change the convert tool did could mangle
the value of html fields when importing static data.

This is because html does not support 'self-closing'
except for HTML5 where it is allowed on void elements (such as img).

Browsers will assume that they are opening tags, left unclosed.
<span/> becomes <span>
They will then try to repair them with variying degrees of success.

Example where it fails:
`<t><t/></t><t><t/></t>`
should become
`<t><t></t></t><t><t></t></t>`
but it becomes
`<t><t></t><t><t></t></t>`

i.e. instead of closing the 'self-closing' tag immediately,
it puts everything inside a single t node

More concretely:
```
<t t-if>
  <t t-out />
</t>
<t t-else>
  <t t-out/>
</t>
```
becomes
```
<t t-if>
  <t t-out></t>
  <t t-else>
     <t t-out></t>
  </t>
</t>
```
which is invalid

-------------------------
The fix is simply to tell lxml that we want to print the xml nodes
as HTML nodes. This will make sure the output is compliant with
the standard and keep the semantic clear for the browser.

The issue does not appear before 16.2, as jquery used to fix it
for us until an update here 9c41ee5091ac06ac3ca71aeac607195c70061e4a

task-3162320

X-original-commit: 8ff2e1018264972107f19755ecda352d78dfa829
Part-of: odoo/odoo#118710
2023-04-17 11:47:11 +02:00
Renaud Thiry 5c146ec219 [FIX] mail: compute resource_ref
Before this, the resource_ref field is computed once in the default_get.
This means if the cache is invalidated, its value is unrecoverable.

Notably, the cache is invalidated when an attachment is generated
(triggering a commit).

So calling _generate_template could invalidate resource_ref,
which we use as a key to retrieve its result.

This results in a traceback for the user when trying to preview
a template where the first record hasn't yet generated its attachment.

As an example, trying to preview `Sales: Send Quotation`
on fresh installs.

task-3162320

X-original-commit: b4bd93c9b61736a7f41d70afe5db977a6e4b35e0
Part-of: odoo/odoo#118710
2023-04-17 11:47:11 +02:00
Renaud Thiry 20fe457377 [FIX] mail: set error_msg in template_preview
If the preview wizard was used to preview a template on a model that
has no record, error_msg would not be set.

This means the field is never set in that case and creating the wizard
results in a cache miss on that field.

The fix is to simply set it, and we add a test to cover that flow of
the wizard.

task-3162320

X-original-commit: 0976ce53e0a97a1f49dc2a262cf66355242fde25
Part-of: odoo/odoo#118710
2023-04-17 11:47:11 +02:00
paso-odoo 85ce80f029 [FIX] resource: external id not found in the system base.user_admin
If applied, this commit will solve the external id issue of the base admin user.

Before this commit:
==========================
When we delete the admin user (base.admin_user) and try to login with a new user
or try to write in a new user, this error will come.

After this commit:
===========================
The issue will be resolved after this commit and authorize new users without
any errors.

sentry - 3973828005
see - https://tinyurl.com/2jm772jm

closes odoo/odoo#118681

X-original-commit: 567027b4d4e3efdbbabab3a7a3c5e090df51dbf8
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2023-04-17 11:47:01 +02:00
Horacio Tellez b7332c016f [FIX] loyalty: rewards being reset to default upon save.
Before this commit when choosing the program rule type "Buy X get Y"
an error occured: after adding rewards and trying to save the record
the rewards were reset to the default value for program rules
of type "discount".

This ocurred because the program type was not being sent to the
`default_get` method of the `loyalty.reward` record.
After this commit rewards are correctly preserved.

opw - 3240558

closes odoo/odoo#118679

X-original-commit: 44b9eab482a219e6c260ef29512b8d6a595300ac
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-04-17 11:46:59 +02:00
dasz 0a2b6d3abc [IMP] hr_contract: add working times menu
closes odoo/odoo#118509

Task: 3254679
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-04-17 11:46:56 +02:00
Julien Van Roy 23760a53e1 [FIX] account_edi_ubl_cii: hide EDI section on journal
Section "Electronic Data Interchange" should not be displayed for
account_edi_ubl_cii since it's empty. In addition, only display the
section in account_edi if some EDI are compatibles.

closes odoo/odoo#117901

Related: odoo/upgrade#4525
Signed-off-by: Laurent Smet <las@odoo.com>
2023-04-17 11:46:47 +02:00
Benoit Socias f9c342374c [FIX] web_editor: allow aligning pictograms to the right in cards
When replacing an image by a pictogram inside columns, the pictogram
right-alignment is neutralised by the fact that the section of the card
inside the column spans over 100% width.

This commit makes pictograms in those sections rely on their auto width
instead - thus letting the right-alignment happen as expected.

Steps to reproduce:
- Drop a "Columns" block.
- Replace an image by a pictogram.
- Select the pictogram.
- Click on the "Float Right" icon in the toolbar.
=> Pictogram remained aligned to the left.

task-2841127

closes odoo/odoo#118684

X-original-commit: c3eae07259cb38656aa910ad98d0da04f4fc7edb
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
2023-04-17 10:34:32 +02:00
Benoit Socias 14bcdbc6f5 [FIX] web_editor: align image to the right
Align images to the right by using an auto left margin.

Steps to reproduce:
- Drop a "Columns" block.
- Select an image.
- Resize image to 50%.
- Align image to the right.
=> Image did not get aligned to the right.

task-2841127

X-original-commit: d2364278371828fa353c17d53fd266350aa2446b
Part-of: odoo/odoo#118684
2023-04-17 10:34:32 +02:00
Touati Djamel (otd) e3da10baf1 [FIX] purchase: fix test_supplier_list_in_product_with_multicompany
Install only the “purchase” module and run the test, it’ll always fail
since the product type is added in the stock module

Bug introduced in: https://github.com/odoo/odoo/pull/117956

Solution:
Use the consumable type instead

closes odoo/odoo#118672

X-original-commit: e155d91a906fabff02c0d34af51f874daebef909
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-04-17 09:28:06 +02:00
niyasraphy d289a59ab5 [FIX] transifex: update transifex project url
from april 3, the transifex has changed domain
from www.transifex.com to app.transifex.com

after this commit, the transifex project url
in the system parameter will be updated to
the new domain

closes odoo/odoo#118664

X-original-commit: c79164f6fad26f9838fee753436eb8fb763947ab
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-04-17 09:28:03 +02:00
Sanket Brahmbhatt da513fa016 [FIX] point_of_sale: prevent trackback when changing journal in report.pos.order
This issue occurs when the user changes the Journal 'journal_id' in this
'report.pos.order' model then traceback will be generated.

Step to Produce:-
- In POS, Click on Reporting Menu > Order.
- Click on graph > Open any One record.
- Try To Change the Journal('journal_id').
- Trace-back will be generated.

sentry:- 3929247828

closes odoo/odoo#118660

X-original-commit: 87ed00e65ecaa22c559a43452c87d4f16e598f3f
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-04-17 09:28:01 +02:00
Lucas LefèvreandAlexis Lacroix 7a1ae006eb [IMP] spreadsheet: update o_spreadsheet to latest version
https://github.com/odoo/o-spreadsheet/commit/6824b8a1 [REL] 16.3.0-alpha.4
https://github.com/odoo/o-spreadsheet/commit/9b911f61 [FIX] tests: fix indeterministic ui sheet
https://github.com/odoo/o-spreadsheet/commit/f20b7be5 [FIX] demo: Align font family with Odoo Task: 3269724
https://github.com/odoo/o-spreadsheet/commit/49a5ee0e [FIX] ColorPicker: Fix checkmark symbol Task: 3269724
https://github.com/odoo/o-spreadsheet/commit/4f2ecfec [REM] menu: remove icons on menu items
https://github.com/odoo/o-spreadsheet/commit/54fca81f [REF] *: rename 'menuItem' files to 'action' files
https://github.com/odoo/o-spreadsheet/commit/5c23e084 [REF] *: Change names of type 'MenuItem' to 'Action'
https://github.com/odoo/o-spreadsheet/commit/e5007fd1 [REF] replace xml tool bar in the xml top bar by menu item buttons
https://github.com/odoo/o-spreadsheet/commit/950abc45 [REF] menu registry: factorize menu registries by menu items
https://github.com/odoo/o-spreadsheet/commit/c02a7e96 [IMP] topbar menu: add icons for conditional menu items
https://github.com/odoo/o-spreadsheet/commit/a19d9cac [IMP] topbar menu: add icons for static menu items
https://github.com/odoo/o-spreadsheet/commit/7825124c [IMP] menu: replace right text icon by left icon
https://github.com/odoo/o-spreadsheet/commit/be3c3d6f [FIX] viewport: infinite loop with hidden headers
https://github.com/odoo/o-spreadsheet/commit/c05be1de [FIX] github: update release-action to latest version
https://github.com/odoo/o-spreadsheet/commit/9fdbdab2 [FIX] sheetview: correctly auto-size spreadsheet
https://github.com/odoo/o-spreadsheet/commit/7d18b589 [IMP] bottom_bar: hide add sheet button in readonly mode
https://github.com/odoo/o-spreadsheet/commit/108b89bd [FIX] menus: don't open submenu is not readonly
https://github.com/odoo/o-spreadsheet/commit/1edbc157 [FIX] top bar: remove useless "Save" menu item

closes odoo/odoo#118624

Related: odoo/enterprise#39801
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
Co-authored-by: Alexis Lacroix <laa@odoo.com>
2023-04-17 09:27:58 +02:00
Archana Vaghasiya 91a6b3097b [FIX] point_of_sale: prevent creation of journals with existing id's
Error:'UniqueViolation duplicate key value violates unique constraint
account_journal_code_company_uniq.'

When we install the 'point_of_sale'  module it tries to create account journals
with existing id's due to which we face the above error.

This commit removes the portion of code that creates the account journal
with already existing id's.

sentry - 4062359900

closes odoo/odoo#118618

X-original-commit: 3c209e5c91e374dc7738df01f48e630a7fba5caf
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-04-17 09:27:53 +02:00
Benoit Socias 95bb8dc0f8 [FIX] web_editor, website, *: make snippets name translatable
*: mass_mailing, website_blog, website_event, website_mail_group,
   website_mass_mailing, website_payment, website_sale, website_twitter

The names of snippet blocks are not translatable because their name is
obtained from a their template name which is not a translatable item.
For markets that use a non-latin alphabet this is a no go.

This commit makes it possible to specify a `string` attribute in the
`t-snippet` blocks that makes their name inventoried by the translation
process.

closes odoo/odoo#118530

X-original-commit: a501d226d8674ed0c9b183c69a9e754c79682237
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
2023-04-17 08:24:47 +02:00
william-andre fba1347784 [FIX] account: balance in GL on dashboard display
There were a few issues:
* we didn't always take the last statement as a reference: if we had
  two statement the same day, we needed to take the last one. Adding the
  `id` in the ORDER BY actually also improves the performances (4s to
  2.5s on the test database for all journals)
* If there is no statement, we didn't display the balance at all because
  `statement.first_line_index` is NULL, therefore the `>=` operator
  returned NULL and the condition was falsy

opw-3268956
opw-3269493
opw-3268950
opw-3270450
opw-3270143
and many more...

closes odoo/odoo#118368

X-original-commit: 5c4fb4cd15a371c0648ae4aee160f9f858b89445
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: William André (wan) <wan@odoo.com>
2023-04-16 09:49:06 +02:00
Bastien Fafchamps (bafa) 9d8523be8c [FIX] web: Break too long customer names in kanban
Behaviour before PR:
In kanban view, the cards UI is broken when there are too long words
without spaces or breaks in the bottom half of the cards.

Desired behaviour after PR:
The words are broken so it fits in the cards without breaking the UI.

closes odoo/odoo#118659

Task: 3083665
X-original-commit: f7696bb31d7a15596892e16cc64e1ab3d6438aa4
Signed-off-by: Géry Debongnie <ged@odoo.com>
2023-04-14 19:45:55 +02:00
Alexandre Kühn 41e0543932 [FIX] mail: no crash on receiving link preview of non-known message
This notification makes sense when we know this message. If we don't
know it yet, then we should just ignore and receive data of link
preview when fetching the message.

closes odoo/odoo#118647

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-04-14 19:45:52 +02:00
Soukéina Bojabza 544ead2b49 [FIX] website: reset a form properly for each submission success type
Before this commit, some behaviors of the forms after being submitted
were problematic:

- with the `On Success` option set on `Redirect`, when going back to a
form after submitting it (with the browser arrows), the fields were
still filled.
- with the `Show Message` option selected, when going in edit mode when
the message was displayed, the submit button was still "loading", even
after saving.

This commit solves this issues by properly resetting the form at each
start and restoring the submit button loading effect when the message is
displayed.

task-2798576

closes odoo/odoo#118645

X-original-commit: ecb3bda77fab512a9790daf58447058f250f49e6
Signed-off-by: Vray Benjamin (bvr) <bvr@odoo.com>
Signed-off-by: Bojabza Soukéina (sobo) <sobo@odoo.com>
2023-04-14 19:45:50 +02:00
Leonardo Pavan Rocha 823cbdf7e6 [IMP] calendar: rework quick create form view
This commit consists of a full rework of the quick create form in the calendar
view, so that it shows more options to the user rather than only the name of
the event. To accomplish this, we added a new attribute on the calendar view
with the id of the quick create form view to be used. This allows us to have
a custom view to be shown on quick create.

task-3129030

closes odoo/odoo#114827

Signed-off-by: Leonardo Pavan Rocha <lpr@odoo.com>
2023-04-14 18:43:34 +02:00
Andrea Grazioso (agr-odoo) 3e49f2bb57 [FIX] sale: sale order line quantity not rounded
Create a Field Service Task
Assing a customer, in Timesheet tab add a line with Hours Spent 00:20
Mark as Done
Sale Order will be created with a sale order line
Total of the line and Total of the order will not match

This occurs because the sale order line has been created with an
unrounded quantity of 0.333333

opw-3184468

closes odoo/odoo#118628

X-original-commit: ca72697042687e205fb288a97ec4717a97c89664
Related: odoo/enterprise#39799
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
2023-04-14 17:38:09 +02:00