Commit Graph
165814 Commits
Author SHA1 Message Date
Pedram (PEBR) 80bff89cb3 [FIX] point_of_sale: reverse order of paid orders to match backend
This commit modifies the `search_paid_order_ids` function to reverse
the order of fetched orders before returning them. The change ensures
that the order of fetched orders aligns with the sorting order of the
backend, providing a consistent and expected display of data on
the frontend.

opw-3462740

closes odoo/odoo#132253

X-original-commit: 92066ea0ae2e1da7dce18d173638a9695c73e31b
Signed-off-by: David Monnom (moda) <moda@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
2023-08-18 14:25:38 +02:00
Theo VINCENT (thvi) c8e83a894a [FIX] point_of_sale: closing session without cash
The closing session popup input for bank payment methods throws an error when no cash payment method is configured.

Steps to reproduce:
 - Configure a shop without any cash payment method and with at least one bank payment method
 - Open a session for that shop
 - Click on the button to display the closing session popup
 - In the popup, change the amount of the bank payment method

An error is thrown.

The fix simply consists in correctly checking if there is a cash payment method.

closes odoo/odoo#132243

Task-id: 3468828
X-original-commit: 554ccb12a154f30f03c01931dc66eb04394f8154
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-08-18 14:25:33 +02:00
Javier Vega 920262f55c [FIX] point_of_sale: validations added to tip lines
This change comes from an issue with the method `get_tip`, it
does not takes into account the actual quantity of the line.
So if you have `qty == 0` or `qty == 99`, the result will be
the same if it where `qty == 1`.

Because of the behavior just mentioned, when modifiyng any tip
line in the UI of the PoS, incoherence with data appears in the
backend field `(pos.order).tip_amount`. Since this field with
the unit price of the tip line. But the tip line can be actually 0,
or 9999 units. Causing the total of the order to be confusing,
because it does not match with the `(pos.order).tip_amount`.

To fix this, we have added some valiadtions FOR TIP LINES:
- Avoid qty modifications on those lines (with an error message for the user)
- If trying to delete a line, instead of going to qty, it gets deleted.

closes odoo/odoo#132227

X-original-commit: 03e66cb0c16567c5fa8dba1312132ff66c5916fc
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-08-18 14:25:28 +02:00
Rémy Voet (ryv) fcb092af12 [FIX] core: add test to ensure correct call of _compute_display_name
Add test to ensure that `_compute_display_name` is called once with
the correct recordset during `read_group`. Also
fix and small typo in the documentation of `read_group`.

closes odoo/odoo#132261

X-original-commit: 60477586f11ca7eb698240a6bd3f565b5a9e3279
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
Signed-off-by: Raphael Collet <rco@odoo.com>
Signed-off-by: Rémy Voet (ryv) <ryv@odoo.com>
2023-08-18 12:17:57 +02:00
Rémy Voet (ryv) 4dc9e42a64 [FIX] *: fix usages of _read_group with NewId
In https://github.com/odoo/odoo/pull/110737, I didn't consider that
compute could be called on NewId record with `_origin`. Some compute
methods are badly refactored with the new signature of `_read_group`.
We use recordsets returning from `_read_group` to assign field value to
`self`. But if `self` contains `NewId` with `origin`, these records
don't represent `self`, it contains real record instead of the one with
NewId + origin. Then the assignations are done on records not in `self`
which may lead to generate traceback or write to other records during
an onchange.

Fix multiple compute to work correctly with NewId (origin set) record.

X-original-commit: bd22d0a5c479a72cdaf799309387e41ce692bb29
Part-of: odoo/odoo#132261
2023-08-18 12:17:56 +02:00
Gorash 0d99f4b9d9 [REF] base,all: Update modifier syntax: adapt JavaScript
closes odoo/odoo#104741

Related: odoo/enterprise#35255
Related: odoo/documentation#3523
Related: odoo/upgrade#4884
Signed-off-by: Rémy Voet (ryv) <ryv@odoo.com>
2023-08-18 09:49:16 +02:00
Gorash ecd8547672 [FIX] mrp: fix the test following the change of attributes
The test is wrong, the field can't handle, now the Form test take care of
this case and raise if the field is invisible.

Part-of: odoo/odoo#104741
2023-08-18 09:49:15 +02:00
Gorash 774a3fad0e [REF] base,all: Update modifier syntax: view migration
Apply of the migration script to update all view modifiers.

Part-of: odoo/odoo#104741
2023-08-18 09:49:13 +02:00
Gorash 1e12f68a1d [REF] base,all: Update modifier syntax: prepare view migration
These changes are made as a result of simplifying attrs and 'states' in
views.

Before applying the migration script, it is necessary to fix some views.
These views are erroneous and either work by chance or are simply
untested. We have for example wrong domains, elements used by modifiers
but not present in the view, obsolete domain operators, inherit views
not targeting the right views, xpaths using attributes as target, the
use of %(...)s in views, false attribute value types in python.

Part-of: odoo/odoo#104741
2023-08-18 09:49:12 +02:00
Gorash 75a105f46a [REF] base/all: Update modifier syntax: remove 'states' from fields
These changes are made as a result of simplifying attrs and 'states' in
views. However, they should have remained in a separate commit. When
applying the script making the xml changes (used later for the migration
script), the script checked the definition of the python fields in order
to convert the information into a python expression. Therefore, this
commit is not applied when the script is applied to xml changes.

During this attribute deletion pre-existing errors were found. Part of
the code was using the boolean values of 'states' and another part of
the code was not. The behavior could therefore be different (in cases
where readonly on the field had the same value as the ballan in
'states').

Following the deletion of 'states' and without the application of the
view migration, the js tests (tower) were no longer functional. Tests
using the Form view suffered the same effect. There are few tests that
had to be adapted, including two tests in business accounting (updated
by the accounting team). A test for column_invisible did not work. Test
checking if the test system triggers an error if we try to write on an
invisible field. It turns out that Form was testing on the value of
invisible but not taking into account if the column was invisible. The
test system fix is applied separately because there were a lot of tests
that were incorrect.

Part-of: odoo/odoo#104741
2023-08-18 09:49:11 +02:00
Gorash 5419d0ef7a [REF] base,all: Update modifier syntax: clean fields keys
Part-of: odoo/odoo#104741
2023-08-18 09:49:10 +02:00
Gorash cdaa761ced [REF] base: Update modifier syntax (invisible, required, readonly)
Goal:
* Simplified modifiers to only have one way to define modifiers;
* Remove states attributes on python field;
* Use python expression in view `required`, `readonly`, `invisible`;
* More accurate validation of xml views.

This commit change the syntax to python expression. The next commit
will update/convert all xml views.

Before this commit:
* the `required`, `readonly` and `invisible` attributes can only have
values of `True`, `False`, 1, 0 or a python expression to use the
context;
* the `attrs` attribute define a dict. The key of this dict was
`required`, `readonly` and `invisible` and the values are the domain or
a string representing a domain to be evaluate as python expression.
This python expressions was evaluate by the javascript with view fields
and other contextual values as: context, uid, parent, active_id,
active_ids, active_model, allowed_company_ids, current_company_id.
* the `states` attribute in the view was a comma separated list of the
state. This list was combined with the `invisible` attribute;
* the `invisible` attribute on python field is used as default value;
* the `states` attribute on python field was dictionnary with state as
key and list of tuple. This structure was combined with `readonly` view
attribute.
* After combining, the resulting domains of the different attributes
`required`, `readonly` and `invisible` are evaluated with the values of
the fields. The `invisible` attributes is splitted into two use:
`invisible` and `column_invisible`.

After this commit:
* The attributes `required`, `readonly`, `invisible` and
`column_invisible` define python expression. This python expressions
are evaluate by the javascript with view fields and other contextual
values as: context, uid, parent, active_id, active_ids, active_model,
allowed_company_ids, current_company_id.

The domains can contains contextual value and will be evaluate by the
javascript.

```xml
    <field name="field_a" readonly="not context.get('show_a')" attrs="{'readonly': [('field_b', '!=', False), ('field_c', '=', parent.c)]}"/>
    <field name="field_b" states="draft"/>
```
will be replaced by
```xml
    <field name="field_a" readonly="not context.get('show_a') or field_b and field_c == parent.c"/>
    <field name="field_b" invisible="state != 'draft'"/>
```

Some inherited views will be modified differently in order to maintain
the previous behavior:

```xml
    <field name="field_a" readonly="not context.get('show_a')" attrs="{'invisible': [('field_b', '!=', False)]}">
```
```xml
    <field name="field_a" position="attributes">
        <attribute name="attrs">{'readonly': [('field_c', '=', False)], 'invisible': [('field_d', '!=', '3')]}<attribute>
    </field>
```
will be replaced by
```xml
    <field name="field_a" readonly="not context.get('show_a')" invisible="field_b">
```
```xml
    <field name="field_a" position="attributes">
        <attribute name="readonly" add="(not field_c)" separator=" or "/>
        <attribute name="invisible">field_d != 3<attribute>
    </field>
```

Validation:
A stricter control is made on the level of the attributes (modifiers)
and the fields necessary for these. The use of the previous attributes
'attr' and 'states' triggers an error (these no longer exist after the
application of the migration script)

task-2495504

Part-of: odoo/odoo#104741
2023-08-18 09:49:08 +02:00
FrancoisGe 6d6e53dc20 [FIX] web: x2m readonly
Before this commit, when the same record is opened for the second time
in an x2m readonly, the record is in edition.

Why:
If the record has already been extended (when first opened), it is switch
in edit mode.

Solution:
The switch to "edit" mode should not be forced. The mode applied is passed to params.

How to reproduce:
- Go to a form view with an x2m readonly in list mode
- Open a record
- Close the dialo
- Open the same record

Before this commit
    The record is in ed mode

After this commit
    The record is in readonly mode

closes odoo/odoo#132246

Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
2023-08-18 08:11:47 +02:00
niyasraphy 6af53cd20b [FIX] project: xml syntax error
before this commit, in project module there is a syntax
error in xml file

opening and ending tag was mismatched

on exporting the translation of project module shows
warning in the log

after this commit, no warning/error will be shown
in log

closes odoo/odoo#132263

X-original-commit: 4709ff342b603ac3f085f2e2c63812dfdc880f66
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-08-17 23:25:14 +02:00
Olivier Dony 5485187504 [FIX] l10n_es_edi_sii: fix post-install, remove auto-install
This commit fixes 2 problems that currently crash database
installations for Spanish companies:

1. Since 8e6a3d7269, the post-init hook
installing tax data uses `_load_data()` and crashes when the taxes to be
updated are not installed. The taxes have not been created yet, to it
tries to create them with only partial info, and missing required
fields:

```
Database initialization failed: null value in column "name" of relation "account_tax" violates not-null constraint DETAIL: Failing row contains (3, 1, 1, 1, null, 233, 1, 1, sale, consu, percent, on_invoice, null, null, null, 0.0000, t, f, f, t, null, 2023-08-14 14:15:43.048823, 2023-08-14 14:15:43.048823, 01, null, sujeto, f).
```

The post-init hook should be more robust and at least not attempt to
load the taxes when no chart is loaded for the company.

2. In #130836 the `l10n_es_edi_sii` module was made auto-installed on
`l10n_es`, but the goal of that PR was only to remove the auto-installation
of `account_edi`.
That seems an unforeseen and undesired change of behavior, so this PR is
partially reverted, to reduce other side-effects of this
auto-installation of `l10n_es_edi_sii`.

opw-3461739
opw-3463573
and more...

closes odoo/odoo#131974

X-original-commit: c031d1bf3dba9afbc86f5a8a2867d5624a40c683
Signed-off-by: Olivier Dony (odo) <odo@odoo.com>
2023-08-17 20:49:01 +02:00
Romain Derie 594bf0c200 [IMP] website: add a shortcut to enter edit mode from frontend
Entering edit mode in the website builder is bound to ALT+A.
But often, you are on the frontend version on the page you want to edit
where you first have to navigate to the backend version of the page to
enter edit mode.

This commit adds the same shortcut in the frontend pages.
It's a low effort/small code added to have a really useful shortcut.

Even if there is no hint about this shortcut existence, it will be
found quite easily as people used to keyboard will, out of habit, press
this keyboard even in frontend (after a page reload eg, which navigates
to the frontend).

closes odoo/odoo#132236

X-original-commit: 09287915371032753593295df6c616f3bcb55ac9
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-08-17 19:51:21 +02:00
Louis Wicket (wil) 75c69aeb38 [IMP] account, web_editor, base: remove useless use strict
According to the ECMAScript 2023 Language Specification:
> Module code is always strict mode code.

Odoo Modules mimic this behavior and automatically add “use strict“ at
the top of the file, so there's no need to do it yourself.

This commit removes all the useless occurrences of use strict.

closes odoo/odoo#132235

Related: odoo/enterprise#45908
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-08-17 19:51:17 +02:00
Pratik Awasthi 496c0a275a [IMP] project: improve the list view by adding personal stage
This will improve the following generic UX

-  rename 'personal user stage' into 'personal stage' for private task
- added the 'personal stage' field to the right of the stage optional=hide
- earlier gantt view open with the user now it will open with groupby  project
- removed groupby stage in pivot view
- rename 'undefined' into 'private' for graph view of private task

task-3251648

closes odoo/odoo#120094

Related: odoo/upgrade#4607
Related: odoo/enterprise#40515
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-08-17 19:50:59 +02:00
niyasraphy 6a60b7df35 [FIX] pos_restaurant: remove typo in warning
before this commit, on deleting a floor from
pos user interface, there is a typo in the
pop up confirmation message shown

wanna -> want to

after this commit, the typo in the message is
corrected.

closes odoo/odoo#132211

X-original-commit: c2bb0e06044500d2c2fea0fb475d833bc6d457b0
Signed-off-by: Vlad Stroia (vlst) <vlst@odoo.com>
2023-08-17 18:43:37 +02:00
Alexandre Kühn ace1c03600 [FIX] mail: chat notification body should not have author name
Before this commit, messaging menu items of type chat show the
author name in body part. This is redundant with name of
conversation that is usually the name of the correspondent.

This commit does not show the name of the author in notification
item body when it's the same as correspondent of conversation.

closes odoo/odoo#132210

X-original-commit: 4b146aa70c721162b3741486246936af74f77f36
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-08-17 18:43:33 +02:00
Antoine (ande) 0a0cbe9041 [FIX] tools: nbsp html character
Current behaviour:
When sending an email from Odoo,
&nbsp; can be seen in plaintext.

Steps to reproduce:
1. Install sale_management
2. Head over to Sales > Quotations
3. Create a new quotation
4. Enter a partner
5. Click on Send by email
6. [...] S00021 amounting in $&nbsp;12.00 [...]

Fix:
When parsing to plaintext, replacing
html character by unicode character

opw-3389602

closes odoo/odoo#132203

X-original-commit: 3e3f1e67dd5894a41c830344ed41c91a5e44159e
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Antoine Demany (ande) <ande@odoo.com>
2023-08-17 18:43:28 +02:00
Lucas Lefèvre (lul) a27556a781 [IMP] spreadsheet: update o_spreadsheet to latest version
### Contains the following commits:

https://github.com/odoo/o-spreadsheet/commit/e0cb3aae [REL] 16.5.0-alpha.5
https://github.com/odoo/o-spreadsheet/commit/dd9b007f [FIX] translation: fix sprintf() for String objects
https://github.com/odoo/o-spreadsheet/commit/ad81d88e [REM] translation: remove _t from env Task: 3292454
https://github.com/odoo/o-spreadsheet/commit/61dd916a [FIX] chart panel: wrongly aligned ColorPicker Task: 3380585
https://github.com/odoo/o-spreadsheet/commit/08afd52c [IMP] side-panels: use `o-checkbox` for all checkboxes Task: 3380585
https://github.com/odoo/o-spreadsheet/commit/ff80be44 [FIX] worksheet: download issue with sheets containing array formulas
https://github.com/odoo/o-spreadsheet/commit/5d5fd2f2 [FIX] scorecard: measure text with bold/italic style Task: 3380613
https://github.com/odoo/o-spreadsheet/commit/c746b1c5 [REF] filters: rename 'values' in command
https://github.com/odoo/o-spreadsheet/commit/6d03710b [REF] formulas: replace Array.isArray by isMatrix
https://github.com/odoo/o-spreadsheet/commit/97a54980 [REF] formulas: simplify typing
https://github.com/odoo/o-spreadsheet/commit/589e11e3 [IMP] formulas: compute format
https://github.com/odoo/o-spreadsheet/commit/7dcd570a [REF] formulas: refactor helpers
https://github.com/odoo/o-spreadsheet/commit/ff1b96ff [REF] formulas: improve typing
https://github.com/odoo/o-spreadsheet/commit/29905892 [REF] formulas: clean matrix helpers
https://github.com/odoo/o-spreadsheet/commit/980b6a60 [IMP] formulas: Accept null values in the formula return
https://github.com/odoo/o-spreadsheet/commit/36f155d9 [IMP] formulas: compute value and format at the same time
https://github.com/odoo/o-spreadsheet/commit/92961ac5 [REF] formulas: improve typing
https://github.com/odoo/o-spreadsheet/commit/e60f4da9 [IMP] prettier: update version
https://github.com/odoo/o-spreadsheet/commit/cbd6ceee [FIX] Composer: formula autocomplete navigation with arrow keys Task: 3461828
https://github.com/odoo/o-spreadsheet/commit/09dd17fa [REF] *: Remove env._t

closes odoo/odoo#132183

Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2023-08-17 18:43:23 +02:00
Dossogne Bertrand 0a77bc56e4 [FIX] hr_recruitment: fix applicant form view access
Before this commit, all users with recruitment rights would have a
section of the applicant form hidden, though only those with interviewer
rights are supposed not to see it.
This commit brings back that section for both recruitment officers and admins.
The availability field has also been moved to keep it available for inteviewers.

closes odoo/odoo#132013

X-original-commit: 23c6df4683bf00578648b6af56f61d3ab01e8d20
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
Signed-off-by: Bertrand Dossogne (bedo) <bedo@odoo.com>
2023-08-17 18:43:12 +02:00
Rodolpho Lima ab10ed0c62 [FIX] web_editor: images converted to public attachments
Before this commit, since [1], when an image was pasted or dropped, it
was converted to a public attachment on save.

This was an oversight, and this commit fixes it by creating such
attachment as a private one instead, much like when uploading an image
via  the "/image" command.

Attachments created via the website remain public.

[1]: https://github.com/odoo/odoo/pull/128452/commits/1b3877191ee9d97d2c50ccacb41461827b42fd56

closes odoo/odoo#131975

X-original-commit: d939fc83ab645ebced6859e04269fb65bf47f323
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-08-17 18:43:08 +02:00
Rodolpho Lima ef9efcdc61 [FIX] web_editor: disable dropImageAsAttachment for mail and mailing
This commit deactivates the conversion of pasted or dropped images into
attachments through a controller within the web_editor module. This
alteration applies to mail and mass_mailing modules, as they have their
own mechanism to handle this process.

task-3457541
opw-3448851

X-original-commit: 291ca7496515701737f6940fa27c917ded205aa6
Part-of: odoo/odoo#131975
2023-08-17 18:43:06 +02:00
Thomas Becquevort (thbe) 7e9129936c [FIX] hr_expense: expense splitting redirection and display
As from the 16.2, when splitting an expense, the wizard first opens so you
can modify the result of the splitting and when clicking the split expense
button, you are redirected to a new and blank expense. Inside of the
splitting wizard, if you click on a total and modify it without pressing
"Enter" or "Esc", the currency symbol stays to the extreme left of the
column. These two behaviors are not desired.

This PR changes the redirection after splitting an expense so the user is
brought back to the tree view of the expenses and the total field of the
lines inside the splitting wizard is modified so the symbol stays to the
right of the column.

For the redirection, a different return on the splitting action is added
and is triggered when the action is called from inside the wizard.
For the symbol, an adjustment to the field size is made so it stays
shorter until a bigger value is entered.

After this PR, the expense flow is improved with a better redirection of
the user after he split an expense and the display of the total amount
column is clarified

task-3443396

closes odoo/odoo#131638

X-original-commit: 3b64971045741e5dbea93a8961a86a73cdeeb891
Signed-off-by: Laurent Smet (las) <las@odoo.com>
Signed-off-by: Thomas Becquevort (thbe) <thbe@odoo.com>
2023-08-17 18:42:59 +02:00
Daniel Kosky (dako) 084408a9bb [FIX] l10n_*: set default taxes
The default taxes for most localisations have been left undefined by
default. When loading the chart template, the model generally selects
the first sales and purchase taxes, based on the order in which the
taxes appear in the csv, for the default sales and purchase taxes
respectively.

This behaviour can be confusing to those who are not yet familiar with
it. It has been decided that it is preferable instead to specify the
default tax in _get_*_res_company function on the account chart template
model, such that the default taxes are defined explicitly for every
localisation.

task-3453997

closes odoo/odoo#130733

Related: odoo/enterprise#45531
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
2023-08-17 18:42:46 +02:00
Rahul Reddiar e7bd0cf464 [IMP] mrp_workorder: transform the button_start and button_pending methods
With this commit
================
Removed 'action_mass_start' and 'action_mass_pause' methods also
the 'button_start' and 'button_pending' methods have been modified
to accommodate multiple work orders, ensuring seamless functionality.

closes odoo/odoo#130663

Related: odoo/enterprise#45883
Signed-off-by: Tiffany Chang (tic) <tic@odoo.com>
2023-08-17 18:42:36 +02:00
Rahul Reddiar 36acef2ce0 [FIX] mrp: wo list view fix multiple workorders done
Before this commit
==================
Marking multiple work-orders as done was not functioning as expected.
Only the first work-order status was being marked as done, and not all of them.

Steps to Produce
================
- Create a bom product having multiple work-orders.
- Create a MO and confirm it.
- Inside WO list view select multiple work orders of the recently created MO,
  and click on "done". You will notice that even though multiple work-orders
  were selected, only the first work-order status is changed to "done".

With this commit
================
On selecting multiple work-orders and triggering "done" will work as expected,
and the status of all selected work-orders will be marked as "done".

Task: 3374990
X-original-commit: 486aab5ee8ae1cd8792bc9bbb4aae1797c38fe5f
Part-of: odoo/odoo#130663
2023-08-17 18:42:35 +02:00
niyasraphy ec89c3e960 [IMP] pos_self_order: alignment of qr menu button in settings
before this commit, in the pos settings when the qr code
menu is activated, the buttons Generate QR Codes, Configure
Buttons, Preview is not aligned properly

after this commit, the button will be aligned properly
in the settings.

closes odoo/odoo#129095

Signed-off-by: Vlad Stroia (vlst) <vlst@odoo.com>
2023-08-17 18:42:29 +02:00
niyasraphy 8127947af5 [IMP] pos_self_order: change report name in print action
before this commit, in the print action of pos.config
model, it is shown as qr.codes for printing the qr code

after this commit, the name will be updated QR Codes as
in the printed file name.

closes odoo/odoo#129088

Signed-off-by: Vlad Stroia (vlst) <vlst@odoo.com>
2023-08-17 18:42:24 +02:00
Yannick Tivisse 743d75206c [IMP] fleet: Improve vehicle creation + general UX
Purpose
=======

When you create a vehicle, there is no sense in adding it to the
"registered column", you always start at the first stage. And this
is also very subjective to create a contract for one year. Why ?
In addition, the contract is empty, excepted for the date.

Specification
=============

- When you create a vehicle, his stage is : New Request

- On the contract form view, make the vehicle's field editable,
  the driver is always related to the vehicle.

- Allow to add property fields on vehicle and model

closes odoo/odoo#127298

Taskid: 3349871
Related: odoo/enterprise#43627
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2023-08-17 18:42:15 +02:00
Yannick Tivisse 186f804a25 [IMP] hr_attendance,planning: Manage overtime generation
closes odoo/odoo#127244

Taskid: 3102448
Related: odoo/enterprise#43602
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2023-08-17 18:42:03 +02:00
Valentin Chevalier 6c007fee1c [FIX] sale_product_configurator: add tooltip to color ptav
Before this commit, the color attribute values were shown without
textual information about the color which could lead to misleading
information about the color.

Now, the name will be shown when the color is hover with the mouse
cursor.

opw-3423073

closes odoo/odoo#132188

X-original-commit: b77b37df78e0ca2f39915020c32a3ed0c508695b
Signed-off-by: Valentin Chevalier <vcr@odoo.com>
2023-08-17 16:37:18 +02:00
Pedram (PEBR) ff3c554088 [FIX] google_calendar: ensure syncronization with cancelled event
This commit addresses a synchronization issue with Google Calendar,
which arose after the implementation of commit https://github.com/odoo/odoo/pull/94018/commits/d9c4043557c6460b3860216bdfd39a623a5e0795.
The mentioned commit added tracking to the pre-commit process,
inadvertently causing problems during Google Calendar synchronization.

During the synchronization of Google Calendar, a recurring event that
had one of its occurrences deleted resulted in Google sending both a
recurring event record and a cancelled single event. In Odoo's
synchronization process, it first created occurrences for the recurrent
event and then synced the single events. During this synchronization of
single events, the existing cancelled events were unlinked using the
`_cancel` function to remove the event.

The issue surfaced when the `_message_track_post_template` function was
called in the pre-commit phase. If the appointment function was
installed, the `_track_template` was overridden in this module, leading
to an attempt to access the removed event, which raised an error and
prevented calendar synchronization.

With this modification, the `_track_template` will not be called for
the created event that was cancelled in the same transaction.

opw-3418758

closes odoo/odoo#132174

X-original-commit: c1a455f6a46a8c936176e306f35651d60e39f869
Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
2023-08-17 16:37:14 +02:00
zel-odoo a1f949c8c3 [IMP] web,mail: Discuss app commands in command palette
This commit adds some discuss-related options in the command
palette.

- hotkeys to add channel (C) & chat (D), and start a meeting (M);
- namespaces `@` or `#` show mentionned and recent conversations
  in Discuss app when search is empty;

Items show optional badge with needaction counter.

Mentions/Recent categories are only visible when there are no
search term. Indeed, `@term` searches for users while `#channel`
searches for channels, so these categories are meant to quickly
jump to recent and important conversations. When typing some
search terms, the fuzzy search has precedence over mentions/recent
criteria.

task-3330218

closes odoo/odoo#128896

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-08-17 14:52:03 +02:00
Abdelouahab (abla) c2896d3b18 [FIX] website_event_sale: mandatory company
To reproduce
============
- create event with ticket that can be sold on website
- make company field empty in event form
- buy ticket from website and go back to the event form > Error raised

Problem
========
- the method `_compute_sale_price_subtotal` is using `company_id`, but as
it's not required in Form View we give it a null value

Solution
========
- make `company_id` required from view
- if `company_id` is not set, use the current company from `env`
- Define constraint on `website_id` as the user should choose website from
same company of the event

opw-3395108

closes odoo/odoo#132173

X-original-commit: 0d70e38ab4bab850ee4bddc7b21b4c6c10809294
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Abdelouahab Laaroussi (abla) <abla@odoo.com>
2023-08-17 13:03:18 +02:00
Adrien Guilliams (adgu) 1e4dbaa8bc [FIX] pos_restaurant: order reminder with product without category
Sometimes, it is possible to have a product for which its category is
unknown by the pos db of the config. This can happen for example when
using pos_loyalty. If a user makes a "buy x get y" program with the
reward being a product with a category not accepted by the config
(e.g. due to a restrict category of the config), the category id cannot
be found in the db of this pos. This leads to problem in pos_restaurant
as under the button order, there is a reminder of the products that
should be sent either to the preparation display or the preparation
printer linked to this pos. If this preparation display or preparation
printer contains the category of the reward, the problem happens.

The fix is to not show the new category (as it is at first not available
due to the restrict so we comply with the choice of the user).
This might be a temporarly fix while waiting for a better solution.

closes odoo/odoo#131379

X-original-commit: a82b550dcf4311ee35570f5b9dc37bf50a46c17d
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-08-17 13:03:05 +02:00
Nicolas Bayet 0c4a94e17d [FIX] web_editor: properly return the value of _hasICEServers
In the forward port #129226, the return value of _hasICEServers was
not properly returned, which led to the collaboration to always be
disabled.

task-3468261

closes odoo/odoo#132165

X-original-commit: e215290bd2d6091396aafadc58a93a68675d77dd
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-08-17 11:48:48 +02:00
Adrien Dieudonné ee850cd689 [IMP] web: removes contains() polyfill
Mainly used for Internet Explorer support.
´contains´ is now supported by Edge.

https://caniuse.com/mdn-api_node_contains

closes odoo/odoo#132162

Signed-off-by: Romain Estievenart (res) <res@odoo.com>
2023-08-17 11:48:44 +02:00
FrancoisGe a35cbff36c [FIX] web: grouped list with aggregated value
Since the relational model (PR 114024) has been rewritten, in a grouped list
 view, if we have a field with name (value, count, aggregates or length)
and it is aggregatable, then the aggregated value of the group is false.

Why:
When loading the group list data or will process the group. As a result,
values such as "value", "count", etc. are overwritten.

Solution:
We will no longer modify the group data, but only extrat what the Group
DataPoint needs.

How to reproduce:
- Go to a grouped list view with the "value" field aggregateable

Before this commit:
    The value displayed on the group for the value field is wrong

After this commit:
    The value displayed on the group for the value field is correct

closes odoo/odoo#132154

Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
2023-08-17 11:48:39 +02:00
niyasraphy 329ce3e113 [IMP] point_of_sale: improve window title in invoice request
before this commit, on invoice request page the window
title is shown as ticket_request_with_code

after this commit, the window title will be shown as
Invoice Request

closes odoo/odoo#131981

Signed-off-by: Vlad Stroia (vlst) <vlst@odoo.com>
2023-08-17 11:48:28 +02:00
Yannick Tivisse c1ce7afcef [IMP] hr_recruitment: Avoid copying applicants private phone on partner
Purpose
=======

The partner is not private anymore, so avoid copying the private information
like phone and mobile when creating a partner (from the chatter for instance).

Only copy needed and unavoidable pieces of information like the partner name
and the email address.

closes odoo/odoo#130982

Taskid: 3414035
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2023-08-17 11:48:18 +02:00
Hubert Van de Walle (huvw) f100f16c3d [FIX] web: Many2One option no_opening -> no_open
When editing a Many2One field with studio, and toggling "Disable
opening" with studio, it doesn't do anything because it's the wrong
option.

opw-3434895

closes odoo/odoo#132102

X-original-commit: 0ec5a45f1633ffaff91aba6808cf50ad1c58c60b
Signed-off-by: Luca Vitali (luvi) <luvi@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
2023-08-17 10:33:19 +02:00
Theo VINCENT (thvi) f8563dcc3e [FIX] pos_online_payment: payment popup display
Since the use of Bootstrap, the online payment popup is no longer correctly displayed.

Steps to reproduce:
 - Configure an online payment method for a shop
 - Open a session for that shop
 - Make an order
 - Select the configured online payment method in the payment screen
 - Click on "Validate" button

The online payment popup is displayed.

The fix consists of adding back the display of this popup as it was before the Bootstrap use.

closes odoo/odoo#132002

Task-id: 3468071
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-08-17 10:33:10 +02:00
vlst f2a107ff29 [FIX] pos*: various ui fixes
pos*: point_of_sale, pos_hr, pos_restaurant

In this PR we fix a number of small UI issues in the point of sale app.

Issues fixed:
- Align filter option in the TicketScreen search bar;
- Align items in the opening popup that shows the available
login options in the pos_hr module;
- Align tips column in ticket screen;
- Made it so clicking on the employee icon does not open the
selection popup if there is only one employee configured
( as it will be empty in this case );

closes odoo/odoo#131351

Task: 3458435
Related: odoo/enterprise#45526
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-08-17 10:33:05 +02:00
Yannick Tivisse b9b165db7d [FIX] hr_work_entry_contract: Correctly compute work entries for edge timezones
closes odoo/odoo#124222

Related: odoo/upgrade#4699
Related: odoo/enterprise#41253
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2023-08-17 10:32:54 +02:00
Yannick Tivisse 8a83cbeb28 [IMP] account: Add salary accounts to generic CoA
Part-of: odoo/odoo#124222
2023-08-17 10:32:53 +02:00
Yannick Tivisse 3312657294 [FIX] hr_payroll_acccount: Make default account configurable on journal
Purpose
=======

2 commits were making impossible to define a default account on a
miscellaneous account journal. However, this is used in payroll
to auto-balance unbalanced moves.

After a discussion with the related team, it has been decided to
revert both commits, which were breaking other use cases as well.

Revert "[FIX] account: fix the domain of default_account_id from account_journal"
This reverts commit b09f06f986.

Revert "[IMP] account: remove default account on misc journal form view"
This reverts commit f2c0bc321b.

Part-of: odoo/odoo#124222
2023-08-17 10:32:52 +02:00
Yannick Tivisse d0e2d1365c [IMP] hr: Expose Social Security Number of employee forms
Part-of: odoo/odoo#124222
2023-08-17 10:32:50 +02:00