Commit Graph
164204 Commits
Author SHA1 Message Date
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
Yannick Tivisse b634498fc0 [IMP] hr: Make contract type country specific
Part-of: odoo/odoo#124222
2023-08-17 10:32:49 +02:00
Yannick Tivisse e7ba02b1b1 [IMP] hr_payroll: Move wage_type/schedule_pay on contract
Purpose
=======

Currently the wage_type and the schedule pay are defined on the
salary structure type level, preventing users paying different
employees on the same structure with different salary types or
periodicity, which is a employee choice on certain countries,
like Mexico or the USA.

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

Move the logic at the contract level, but keep the structure
type field definition to be used as default values.

Part-of: odoo/odoo#124222
2023-08-17 10:32:48 +02:00
althaf shaik 00ab68201e [FIX] lunch: handle error of invalid time in lunch suppliers
This traceback raises when user gives invalid time (hours) at the time of
updating a record in lunch suppliers.

To produce this issue:

- Install 'Lunch'
- Open Lunch/Configuration/Vendors
- Open an existing record and in 'Orders' click 'Send Order By' as 'Email'
- Give invalid time in 'Order Time' like -ve value or greater-than 12
- Save the record

Error: 'A traceback appears': 'hour must be in 0..23'

When user update a record 'write' method calls first than
'_sql_constraints' and in that method '_sync_cron' method is used.
Because of user giving invalid time it lead to above
traceback.

See:
https://github.com/odoo/odoo/blob/88c1541a1646c419d37a9ca94a27f069844614db/addons/lunch/models/lunch_supplier.py#L186-L199

Sentry-4297889570

closes odoo/odoo#132143

X-original-commit: 99fb33167fb6bd332548f21c83d69fd9fe6b6c69
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
Signed-off-by: Altaf Shaik (alsh) <alsh@odoo.com>
2023-08-17 09:21:16 +02:00
Lucas Lefèvre (lul) 2088384de6 [FIX] spreadsheet_edition: ignore property fields
See enterprise PR ;)

Property fields are not supported in spreadsheet.
In saas-16.2, it even completely ruins the entire list
if it contains one property field.

With this commit, until we support properly property fields[1],
we ignores property field when the list view is inserted
in spreadsheet

[1] in master, see task 3329490

opw-3284273
opw-3465243

closes odoo/odoo#132138

Task: 3329490
X-original-commit: ada541d6c4a8d0a5b515c4f1f7e9d71c54b992d5
Related: odoo/enterprise#45844
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-08-17 09:21:11 +02:00
Yolann Sabaux f5da45537a [FIX] account: allows ungrouped batch payment with different payment terms
Steps to reproduce:
- Create two Bills with different payment terms with one having no "early_discount" such as '30% Now, Balance 60 Days'
- Select the Bills and click on Register Payment (make sure the payment is not grouped)

Issue:
Server Error

Cause:
We try to Register Payment for all the Bills at once, but the "early_discount" is not defined for all the Bills.
So, whenever there is a move with an early discount, the mode is always considered as "early_payment".
Therefore, we call `_get_invoice_counterpart_amls_for_early_payment_discount` with an empty list since there is no early discount
https://github.com/odoo/odoo/blob/0ffaaebfa5c25c4bf71fb0e02288767dbfac959d/addons/account/wizard/account_payment_register.py#L750-L755
https://github.com/odoo/odoo/blob/0ffaaebfa5c25c4bf71fb0e02288767dbfac959d/addons/account/wizard/account_payment_register.py#L760

Causing the "local variable 'aml' referenced before assignment" error.

Solution:
We only iterate through moves belonging to the batch. This way, we avoid setting the mode to "early_payment" and entering the confition.

opw-3378445

closes odoo/odoo#132113

X-original-commit: 9bba9576d3365500a5c1eda0cfd57457fd999878
Signed-off-by: Laurent Smet (las) <las@odoo.com>
Signed-off-by: Yolann Sabaux (yosa) <yosa@odoo.com>
2023-08-17 09:21:02 +02:00
althaf shaik 1e77837bf5 [FIX] purchase_stock: print report of the purchase order with incoterm location
The traceback arises when a user tries to print 'Request for Qutation'
in 'purchase order' after providing 'Incoterm Location' and 'incoterm' value.

To reproduce this issue:

1) Install 'purchase_stock'
2) Open any existing purchase order
3) Click on 'Other Information' and give any value for 'Purchase Location'
4) Select any 'Incoterm'
5) Now print 'Request for Qutation' template

Error:-''purchase.order' object has no attribute 'invoice_incoterm_id''

On 'purchase_report_template' instead of 'incoterm_id', 'invoice_incoterm_id'
is used.
See:-
https://github.com/odoo/odoo/blob/158f8090ef30065b97ebe8b15b0bf73fff6a9ac4/addons/purchase_stock/report/purchase_report_templates.xml#L43-L48

In 'Purchase_order' there is no attribute of name 'invoice_incoterm_id'.
When the user tries to print 'request for Qutaion' and because of
'invoice_incoterm_id' is used, which leads to above traceback.

sentry-4379690422

closes odoo/odoo#132080

X-original-commit: c1daf78d1aa4252bf0f85cd704df0e929062f496
Signed-off-by: Tiffany Chang (tic) <tic@odoo.com>
2023-08-17 09:20:49 +02:00
Chrysanthe (chgo) 8120fca14f [FIX] account, kanban_dashboard: fix favorite alignment
Commit[1] introduced some changes in order to fix a layout issue in the
accounting dashboard but these changes were applied in a way that affects
a lot of modules and files that should not be modified.

In fact, by removing the padding inside the `kanban_dashboard.scss`
commit[1] is actually removing the padding in every place where
the boolean_favorite widget is used.

There is also a change applied in the Bootstrap library files, which
should remain untouched.

=== AFTER ===

We revert the changes applied by commit[1] and also fix the layout issue
in the accounting dashboard that it aimed to fix.

commit[1]: d4ba0c1

task-3453799
part of task-3326263

closes odoo/odoo#132134

X-original-commit: f78571cec0a5debf78c5dd1859c78b13d33df1ab
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-08-17 01:04:34 +02:00
Walid d9e31fbb51 [FIX] delivery: apply tracking to all pickings in multistep delivery
Steps to reproduce:
- Install DHL carrier
- Enable multistep routes
- On warehouse config set 3 steps(pick,pack,ship) on outgoing shippments
- Create an SO  and add DHL shipping
- Validate the first picking and send to shipper

Bug:
only the first picking has a tracking ref
this causes an issue because this an in internal picking and only the
last is shown to the customer on sales portal so the customer doesn't
have acces to the tracking ref

Fix:
set the referrence on all the pickings of the so

opw-3269257

closes odoo/odoo#132142

X-original-commit: fd19ba5483dc4312e4459100582f417a38b52b3b
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2023-08-16 22:22:46 +02:00
Xavier ALT 99d4bc5e04 [FIX] mail: correctly parse body as html for pure-html email
Some external tools send email as pure html (no multipart) and when
parsing such email we ends up having the raw HTML as body (text)

This commit ensure we correctly parse and sanitize the body as HTML
for such emails.

closes odoo/odoo#132127

Task-id: 3451889
X-original-commit: a4763d214bfc7b09510226e552f749f9cd95870e
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Xavier Alt (xal) <xal@odoo.com>
2023-08-16 21:12:52 +02:00
Romain Derie ec6677b79f [FIX] website: allow again external website redirect
Broken by commit [1], where only the `url_to` should've been part of the
check for 301/302. The rest of the `if` was about relative URL check,
routing map check and converter check, all related to 308 only.

Note that in the meantime, commit [2] was added in those checks and
needs to be part of 301/302 too.

[1]: https://github.com/odoo/odoo/commit/14a850976711431f36b7f889ea9cf31b1114513d
[2]: https://github.com/odoo/odoo/commit/26fa923f6ab01298bf1a1e9f6a615c9aa9e2e5ed

Fixes https://github.com/odoo/odoo/issues/129290

closes odoo/odoo#132114

X-original-commit: ec27fd45868318542f365ec4ec1b3c9d5084f586
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-08-16 20:03:42 +02:00