Commit Graph
162151 Commits
Author SHA1 Message Date
Jurgen (jugj) 431a5bfe5a [IMP] hr: Add a search panel for company and department on hr_job views
task-3332640

closes odoo/odoo#125115

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

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

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

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

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

=> Border option field displayed a different size.

task-3172235

closes odoo/odoo#125107

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

Runbot error-21971.

closes odoo/odoo#125097

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

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

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

closes odoo/odoo#125096

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

task-3336247

closes odoo/odoo#122429

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

3019692

closes odoo/odoo#125130

X-original-commit: 4a711c0433ea79976b9d8ccfeb3a94412c5041ff
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
2023-06-15 07:57:03 +02:00
Romain Estievenart 90c4acfa44 [FIX] web: tooltip in kanban header doesn't dispose on items click
Before this commit, the kanban title's tooltip was set on the parent
element of the column's title. So the lifecycle (display/hide) of the
tooltip was not handled correctly when we clicked on the "quick create"
button or the "gear dropdown".
This commit moves the tooltip on the title's element to avoid that.

Steps to reproduce:

1. Open the "Event" app
2. Mouseenter the first kanban header
3. A wild tooltip appears (Gotta Catch 'Em All)
4. Click on the quick create button or the gear dropdown.
   => the tooltip isn't disposed => bug

Task ID: 3336233

closes odoo/odoo#125080

X-original-commit: 03a7bed1b0df29fb75d868fcc9c46e90e18aa58e
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Signed-off-by: Romain Estievenart (res) <res@odoo.com>
2023-06-15 02:38:09 +02:00
Rodolpho Lima 7d66755ff9 [FIX] mass_mailing: traceback on read-only iframe
Since [1] the `value` prop is no longer part of the standard field
props, and its value must be accessed as
`this.props.record.data[this.props.name]`.

This commit fixes a traceback when opening a mailing in read-only mode,
which resulted from reading `length` of `this.props.value`, which is
undefined.

[1]: 688986f888

closes odoo/odoo#125070

X-original-commit: 2ccee9ab4316f991252a398c9856c47ef3030789
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Rodolpho Cammarosano de Lima (rcdl) <rcdl@odoo.com>
2023-06-15 02:38:07 +02:00
Gauthier Wala (gawa) e779f51f09 [FIX] analytic: view all plans on view subplans
To reproduce:
- Activate analytic accounting
- Create an analytic plan
- Click on Subplans
- Create a Subplan
- Come back to the list view of subplans (with the breadcrumb)
=> The new plan does not appear

The children_ids are not recomputed, so we inverse the logic.

task-3359643

closes odoo/odoo#125062

X-original-commit: c0bc5aedce0aa601e402c368fdf139c722a0fca7
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Wala Gauthier (gawa) <gawa@odoo.com>
2023-06-15 02:38:04 +02:00
Hugo Carlier (Huca) 977f822a0e [FIX] sale_timesheet: switch steps in the sale_timesheet_tour
To test the onchange on uom, the service type is first change. Checking
the value of the uom input right after introduces underteministic
behavior which makes the test fail in some cases. To try to solve this,
another step is processed inbetween, before checking the value of the
uom input.

related-https://github.com/odoo/odoo/pull/105951

closes odoo/odoo#125023

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-06-15 02:38:01 +02:00
Thomas Lefebvre (thle) 2aa0a4adb2 [FIX] hr_holidays_attendance: not blocking the refusal of leave
Steps to reproduce:
-------------------
- activate "Count Extra Hours" in Attendances settings;
- create attendances for an employee to create an overtime
(select one day of the weekend for example);
- create an Extra Hours type leave for this employee;
- remove the attendance that creates extra hours;

The extra hours of the employee is negative

- refuse the leave created before;

Issue:
------
A Validation Error occurs with the message:
"The employee does not have enough extra hours to extend this leave.".

Solution:
---------
Refuse leave based on extra hours
should not require any control
because we are not trying to extend leave.

opw-3342778

closes odoo/odoo#124994

X-original-commit: b86afb9f0b13e84dc391699d285e39197907d207
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-06-15 02:37:56 +02:00
Alvaro Fuentes e50f762aa9 [FIX] point_of_sale: fix memory error
When there are too many (millions) of POS order lines associated to
opened POS sessions we get too many taxes, most are duplicated. This
causes a MemorryError.

Example queries from a real DB:
```
> select count(distinct r.account_tax_id) from pos_order_line l join pos_order o on o.id = l.order_id join pos_session s on s.id = o.session_id join account_tax_pos_order_line_rel r on r.pos_order_
 line_id = l.id where s.state != 'closed'
+-------+
| count |
|-------|
| 24    |
+-------+
> select count(r.account_tax_id) from pos_order_line l join pos_order o on o.id = l.order_id join pos_session s on s.id = o.session_id join account_tax_pos_order_line_rel r on r.pos_order_line_id =
  l.id where s.state != 'closed'
+---------+
| count   |
|---------|
| 2504539 |
+---------+
```

opw-3295467

closes odoo/odoo#124990

X-original-commit: b5870af0fd74118d96cbd130f3b319e2319d82f8
Signed-off-by: Christophe Simonis (chs) <chs@odoo.com>
2023-06-15 01:20:15 +02:00
Guillaume (gdi) 081ce53120 [IMP] web_editor, website: make many2X related to current website
This commit changes the way the we-many2one and we-many2many fields work
so that they check if the model they are attached to has a website_id
field, if so, the data loaded from the model will be that related to the
current website.

After this commit, developers can get rid of the website_id field when
they add a many2X field. The domain will be automatically computed.

task-3316278

closes odoo/odoo#124985

X-original-commit: 78cfcf3b2b3a44ee8e19084639e37277991b969a
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Dieleman Guillaume (gdi) <gdi@odoo.com>
2023-06-15 01:20:12 +02:00
anhe-odoo f47f1278f3 [IMP] spreadsheet: autofill from pivot/list propagate the format
Task Description

When autofilling a pivot/list cell from another pivot/list cell,
the format of the target wasn't overwritten. This can lead to some
strange behaviour where the user set the desired format to a cell
then autofill the remaning cell of the column/row to apply the same
format once and nothing happen.
We now propagate the set format with the pivot/list autofill, but
we still don't propagate the style and border definition, as it
could break the currently defined pivot/list style.

Related Task
task-3252442

closes odoo/odoo#124984

X-original-commit: 8678b716a9fe2b38e9ed5d399d89df2343ee239c
Related: odoo/enterprise#42542
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
Signed-off-by: Hendrickx Anthony (anhe) <anhe@odoo.com>
2023-06-15 00:12:47 +02:00
luvi 410c3dce05 [FIX] mail: display strip animation on filtering activities
This commit fixes the display of the ColumnProgress component, which was
no longer displaying an animation when a filter is applied. This was due
to changes made in commit (1), introducing an "activeBar" key on the
value given to the ColumnProgress component.

A test has been modified to assert that the classes corresponding to the
animation are added as expected when a filter is selected.

1) 58ca40b032

closes odoo/odoo#124969

X-original-commit: b4857a5c4570d3824b581003cdf456bcdc29f75f
Signed-off-by: Dardenne Florent (dafl) <dafl@odoo.com>
Signed-off-by: Luca Vitali <luvi@odoo.com>
2023-06-15 00:12:45 +02:00
Sébastien Theys 77fa212a43 [REF] mail: move ChannelSelector to discuss folder
Part of task-3265211

closes odoo/odoo#124891

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-06-14 22:40:02 +02:00
Michael (mcm) 44aa89d0ec [IMP] web: test binary field as m2m tags domain
The commit only adds a test which checks that binary
field can be used as the domain of many2many tags field.
We already have a case in the "account" addon  so the
test is there to check that the feature is supported.

task id: 3336189

closes odoo/odoo#124623

Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
2023-06-14 21:28:35 +02:00
Michael (mcm) e0cd68c725 [IMP] web: remove title from attachment image
This commit remove the title on the attachment image widget
when not in debug mode.
The title gave the name of the file and wasn't really necessary
as it is rather a technical info.

task 3343366

closes odoo/odoo#123895

Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
2023-06-14 21:28:33 +02:00
Yash Vaishnav ce7bca79ba [IMP] website_hr_recruitment: simplify the long name and hide the number
Before this commit, when the recruiter's name and job position were excessively
long, it extended beyond the boundaries of the box. And, if the recruiter did
not have a phone number, the phone symbol would still be displayed within
the box.

In this commit, The name and job position of the recruiter were shortened and
the space at the bottom of the recruiter's email was minimized.

task-3342768

closes odoo/odoo#123054

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-06-14 21:28:30 +02:00
Sanket Brahmbhatt 220f9b30cc [FIX] account_edi_ubl_cii: ignore exception error in sentry
'Error while converting to PDF/A' log error is generated when the user uploads
the files and that file could' t convert PDF to PDF-A.

we stop catching exception in sentry.

sentry-4172828056

closes odoo/odoo#122555

X-original-commit: 1c0418f00a8111058465e95dfedec1b8d6200e60
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: Sanket Brahmbhatt (sabr) <sabr@odoo.com>
2023-06-14 21:28:28 +02:00
Florian Damhaut 92a0907484 [IMP] web: graph line, cumulated graph start
This PR allows a line chart in cumulative mode to start at some
non zero value if some conditions are met.
For this, the attribute "cumulated_start" should be set to true on
the arch root node of the graph view. If set to true, if the first
groupby (if any) is a date/datetime field "d", and if the domain
contains a condition based on "d" - thus possibly excluding some
groups with "d" values inferior to the least "d" value found in
the fetched groups - the initial value for the cumulative chart
will be set to be the aggregated value for those excluded groups.

closes odoo/odoo#122321

Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
2023-06-14 20:20:51 +02:00
bit-odoo fff449a419 [IMP] calendar: calendar app should open on due date with pop-up opened
PURPOSE

Calendar app should open with pop-up opened

SPECIFICATIONS

When activity of type meeting is edited(Reschedule), he gets a calendar
app open on due date's week.The calendar app should be opened with the
corresponding meeting highlighted (or the pop-up opened same as if the user
has click on it)

Task-2528115

closes odoo/odoo#72544

Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
2023-06-14 20:20:43 +02:00
Valentin Vallaeys (vava) 54c3513026 [FIX] loyalty: fix next order coupon mail template
Default mail template for coupon on next order was linked to the gift
card mail template, but it should be linked to loyalty coupon card.

OPW-3281621

closes odoo/odoo#124927

X-original-commit: ece055c105a3a1cbd3621f25765668594af9837e
Signed-off-by: Vallaeys Valentin (vava) <vava@odoo.com>
2023-06-14 17:14:43 +02:00
Adrien Guilliams (adgu) 39d1035952 [FIX] point_of_sale: _compute_cash_balance falsy
The computation of the cash_balance of the sessions was falsy due
to a change retrieving a part of the domain related to the payment
lines of the session. The change of the domain led to retrieving
all payments done during the entire lifetime of the config instead
of only the ones done during the session and leading to miscomputation
of the cash balance.

closes odoo/odoo#124817

X-original-commit: d6d9e5ade690fb807b6c3644622e38b34b14de2c
Signed-off-by: Heinz Robin (rhe) <rhe@odoo.com>
Signed-off-by: Guilliams Adrien (adgu) <adgu@odoo.com>
2023-06-14 14:28:43 +02:00
Tom De Caluwé 34f1bc96a2 [FIX] hr_holidays: ignore unconfirmed leaves in current leave status
As of this commit, only confirmed leaves will be considered when computing the
current leave or absence of an employee. Additionally, a bug in the is_absent
search implementation was fixed: before this commit, the same results were
returned for absent and non-absent searches.

opw-2877328

closes odoo/odoo#124968

X-original-commit: 28ccbbab07a0c25570ca9b940428b8e541d262d7
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-06-14 13:10:49 +02:00
Demesmaeker 233b964b99 [FIX] sale_loyalty: ensure the test works around midnight
Fix nightly fails

closes odoo/odoo#124962

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2023-06-14 13:10:40 +02:00
Victor Piryns (pivi) c77373892b [FIX] hr, hr_timesheet: correct empl. access w/ no rights
Current behaviour:
In mobile view, if an user that doesn't have any rights over
"Employees", clicking on any of the Many2One `employee_id` (for ex:
when adding a timesheet on a task and clicking on the employee field),
for either the dropdown, or to the form view with the `external` button,
we get a stacktrace.

Expected behaviour:
We shouldn't be met with a stacktrace, if we don't have rights, we
should be redirected to the corresponding view for the `hr.employee.
public` model.

Steps to reproduce:
- Install Timesheets
- Set Marc Demo's Employee's right to `none/empty`, login as Marc
- In mobile view, go to Project > a task > open the timesheet sheet
- Click on Add or any of the present timesheets
- Click on employee field, either on it (redirect to the mobile
  kanban view of all employees) or to the right edge of it (redirect
  to the form view for the currently selected employee).
- Instead of being redirected, you are met with a stacktrace.

Reason for the problem:
Since the migration to Owl, there is an implicit consistency
expected between what is the requested model for said view, and the
model we get back from the server for said view. In general (for
example when in desktop view), usually we pass by an override of
`get_formview_action` which changes the model we are loading
front-end side depending on the access to the employee model. If
access, we load `hr.employee`, if no access, `hr.employee.public`.
But for mobile, we don't pass by an action, we just load a dialog,
and the `resModel` used for the dialog is based on the `relation` of
the `Many2OneField`, which is `hr.employee`. In that case when
`get_views` is being called, we receive a view with the model key
being `hr.employee.public`, which is inconsistent with what the
front-end requested (which is `hr.employee`) and we have a
stacktrace in owl.

Fix:
Override the `relation` property to the correct model in the
corresponding widget set on the template of the field, based on
available group. This relation is used to set the `resModel` when
opening the dialog.

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

opw-3269817

closes odoo/odoo#124961

X-original-commit: 05f1d58ee6143432ce85bc7629dbe76c74c2da33
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Signed-off-by: Piryns Victor (pivi) <pivi@odoo.com>
2023-06-14 10:55:00 +02:00
pedrambiria 88124fcf60 [FIX] point_of_sale: prevent removing order after bill screen timeout
steps to reproduce the issue:
-Navigate to POS, Open Bar (needs to be restaurant POS)
-Click on a table and add some items to the order.
-Click the Bill button under the order
-Wait about 90 seconds
-Bill page times out and goes back to the floor screen
-Click on Orders at the top and view Ongoing Orders. The one you just
made is not here (it should be)

The solution is to prevent removing the not finalized order when
coming back to the FloorScreen.

opw-3276345

closes odoo/odoo#124960

X-original-commit: be384e27ced7c256867938c53aa5d2a7d81c0ade
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
2023-06-14 10:54:53 +02:00
Antoine Dupuis (andu) c31beb459d [FIX] tools: Improve docstring of load_xsd_files_from_url()
This is to clarify that the file_name param is not used if a ZIP is
downloaded: in that case, the filenames in the ZIP are used to save
the attachment.

See discussion in https://github.com/odoo/odoo/pull/115720#pullrequestreview-1392562860

closes odoo/odoo#124946

X-original-commit: ae94f14a844352f66490ec326fe2d1a716023891
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Antoine Dupuis (andu) <andu@odoo.com>
2023-06-14 10:54:47 +02:00
Benjamin Vray 059841d870 [FIX] website: fix the scrolling of table of content in website slides
Steps to reproduce the bug:

- Install the Website Slides module.
- Got to the /slides page.
- Click on a course.
- Click on the "Add Content" button.
- Choose "Web Page" in the modal.
- Once in edit mode, drag and drop a "Table of Content" snippet onto the
page.
- Save the page.
- Scroll the page and observe that the navbar items are updated as you
scroll.
- Click on the "Fullscreen" button.
- Bug: When scrolling the page, the navbar items are no longer updated
as you scroll.

This commit fixes the issue by detecting the scrolling element by
traversing up the ancestors from the 'table of content' snippet, instead
of using the 'getScrollingElement' function, which always returned the
'#wrapwrap' when a Website Slides page is in fullscreen.

opw-3302118

closes odoo/odoo#124935

X-original-commit: 1ac274c3cdddca3e6caf76d9b30b9efaa38bc09f
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Vray Benjamin (bvr) <bvr@odoo.com>
2023-06-14 10:54:40 +02:00
Jay Savaliya 156625b86e [FIX] mail: arrow icon should be centered in join button
On the welcome page, in the join channel button, the arrow icon is not centered.

Technical reason:
Currently, fa-stack class is used with the oi class, that results in the
misalignment of the arrow icon, which prevents it from being centered.

After this commit icon will be centered.

Task-3355356

closes odoo/odoo#124910

X-original-commit: 60b0155ee17e74f7eadfa02c635b8b617c451be4
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-06-14 10:54:33 +02:00
hupo-odoo a4583a1aa6 [IMP] l10n_{mx,ua,in,dz,ma}: activate default setting
For Mexican localization, activate by default the setting display_invoice_amount_total_words for the Mexican localization. As this localization uses its own amount to words function, the related commit enables an override of the generic function to use it correctly with Mexican localization.

For the other mentioned localizations (ua,in,dz,ma), the setting was already activated but overriding the create method was not a proper way of doing.

task - 3367243

closes odoo/odoo#124909

X-original-commit: 6ee9842764e0b1244927cb8ece1f6407ccec20d5
Related: odoo/enterprise#42510
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: hupo-odoo <hupo@odoo.com>
2023-06-14 10:54:24 +02:00
Guillaume (gdi) 609e25521e [FIX] web_editor: clear m2X cache
This commit clears the cache of we-many2X widgets. Since [the merge of
the backend into the frontend], the page is not refreshed when the user
goes to modify data in his backend. This means that if the data has been
changed between two editions of a page and the many2X widget has already
made the RPC call, it will not do it again and will still have the old
data. For example with website installed:
- Edit a page of your website
- Add the add to cart button
- Search for "ERP" product
- The product does not exist so save the page
- Create and publish a new product called "ERP"
- Edit the page again
- Search for the product "ERP"

=> It is not present because the query is in the cache which has not
been cleared. If you refresh the page, the product will be found.
This commit fixes this problem by clearing the cache after an edit.

Note that a similar implementation of caching clearing has been done
here: https://github.com/odoo/odoo/commit/3efb726575679f62f9ee2894193323bfe45d7938

[the merge of the backend into the frontend]: https://github.com/odoo/odoo/commit/31cc10b91dc7762e23b4bde9b945be0c4ce3fe3b

task-3078137

closes odoo/odoo#124908

X-original-commit: ff0cfca420a434e6024654749ea316bbfc5e0772
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Dieleman Guillaume (gdi) <gdi@odoo.com>
2023-06-14 10:54:17 +02:00
Benoit Socias 4952ea3dcf [FIX] web,*: keep distinct cached translation bundles per front-end lang
*: website_sale_stock

When translations are loaded in a front-end page, the language is
initially deduced by the server. The `GET` that obtains them does not
have a language parameter set. Because of this, this initial result is
reused from the browser cache on subsequent page accesses.
This is a problem when the user toggles between languages because the
cached content is reused while it is related to a previously selected
language.

This commit avoids this problem by making the cache specific to the
current front-end language.

Steps to reproduce:
- Make sure "Disable cache" is not enabled in your browser.
- Install website_sale_stock.
- Add the French language and activate it on the first website.
- In the backend, go to a product (e.g. Office Lamp)'s Sales tab.
- Disable "Out-of-Stock: Continue selling".
- Enter an "Out-of-Stock Message" in both English and French.
- Open the product's website page in French.
- Copy the URL.
- Open a new browser private navigation window.
- Go to the copied URL.
- Switch to English.
- Switch to French.

=> The price is first displayed correctly in French with a "," decimal
separator then is replaced by using the English "." decimal separator
and the out-of-stock message is displayed in English.

opw-3293403
opw-3343614

closes odoo/odoo#124907

X-original-commit: a827de6fffedc9d952d0a4e888c7089896bdb44f
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
2023-06-14 10:54:10 +02:00
xO-Tx 410b4cddd6 [FIX] website: adapt browser URL on "edit translations" mode
Steps to reproduce:

- Go to a website page > Add a 'Form' block.
- Go to the page (in 'edit_translations' mode) > Reload the page > The
form won't be pre-filled with default values. [1]

The page reloading with `?edit_translations=1` leads to a misleading
situation where the form block is handled as on 'edit_translations'
mode (see: `data-edit_translations="1"` on the DOM) hence the behaviour
in [1].

The goal of this commit is to prevent this inconsistency by simply
adapting the browser URL once "edit_translations" mode is activated.

closes odoo/odoo#124889

X-original-commit: 8c7d096a09fe23ac7ef9b7bf54123592c52122dd
Signed-off-by: Colin Louis (loco) <loco@odoo.com>
2023-06-14 10:54:04 +02:00
vlst e82f75d66f [IMP] point_of_sale, *: Unify price type field
*: l10n_fr_pos_cert, pos_discount, pos_loyalty, pos_sale, pos_self_order

The `Orderline` model contains the fields: `price_manually_set` and `price_automatically_set`.
They are meant to signify what type of price the orderline has: `automatic`, `manual` or `original`.

It's very confusing to manage the two fields when in fact they only describe three types of setting the orderline price.

This PR replaces the 2 fields with a single one: `price_type`, which will take one of the 3 possible values.

closes odoo/odoo#124858

Task: 3358265
Signed-off-by: Heinz Robin (rhe) <rhe@odoo.com>
2023-06-14 10:53:57 +02:00
Tejas Modi 280f3de900 [IMP] stock: print report in 4x7 layout for both the operations
Currently, Storage locations and Operations type barcode are printing in 8x3 layout.

So in this commit, I have changed Report of Storage locations and Operations type
barcode print into 4x7.

TaskID - 2579195

closes odoo/odoo#116844

Related: odoo/enterprise#38901
Signed-off-by: Steve Van Essche <svs@odoo.com>
2023-06-14 10:53:51 +02:00
Benoit Socias e6dd94aa21 [FIX] website: not fail in Firefox when leaving/entering website app
Since [1], navigating from the website application to another one
raises an error when using Firefox.

This commit avoids looking at the URL if the iframe is not available.

It seems that in Firefox the `pagehide` event is triggered after the
iframe is released.

Steps to reproduce:
- Use Firefox.
- Go to the Website app.
- Go to Discuss.

=> An error popup was displayed.

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

task-3302981
opw-3349388
opw-3357461
opw-3357511

closes odoo/odoo#124940

X-original-commit: 57c3ab3058d4e2eee581f5c35a7a9e1b9ac83593
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
2023-06-14 09:39:16 +02:00
Thomas Beckers 364e13da96 [FIX] l10n_it_stock_ddt: trim NumeroDDT for complience
Based on the government documentation, NumeroDDT should be alphanumeric format
and max length 20 characters. Currently it's possible to NumeroDDT larger
than 20 characters which will fail if sent to the authorities.

Now this value will be trimmed to the last 20 characters to respect the
specifications.

opw-3343345

closes odoo/odoo#124873

X-original-commit: f6b4614b7b907a3f45190b0a3c864d458423b6d7
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Thomas Beckers (tbs) <tbs@odoo.com>
2023-06-14 09:39:05 +02:00
Hugo Carlier (Huca) 40c99636c9 [IMP] sale_timesheet: initially set hours UoM for timesheet products
- product form view: set 'hours' as the UoM if the service is either
prepaid or invoice based on timesheets and if sale_timesheet is
installed.

- Details: Before this commit, the default UoM was the same for every
invoice policy or product type selected. With this commit the UoM is
automatically changed to 'Hours' when the product is of type service
and the invoice policy is either prepaid (A) or based on
timesheet (B). The value of the UoM can still be changed manually. The
following corner cases are managed:
    - The user edits (or creates) a product, changes its type to
    service then to storable/consumable without saving it. The UoM
    should then be set to its initial value (before change) or its
    default value.
    - The user edits (or creates) a product, changes its invoice
    policy to A or B then again to another one without saving it. The
    UoM should then be set to its initial value (before change) or its
    default value.
    - The user edits a product of type service with invoice policy set
    to A (or B) and UoM that has manually been changed to something
    else than 'Hours'. He then modifies the invoice policy to B (or A)
    and then again to A (or B) without saving the changes. The UoM should
    then be set back to its initial value.

Task-3072818

closes odoo/odoo#105951

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-06-14 09:38:59 +02:00
Jurgen (jugj) 45639a209c [IMP] hr_contract_salary, test_l10n_be_hr_payroll_account : Rework generate simulation link wizard
This task aims to rework the wizard that creates a salary configurator and pre-fills the applicant's name, phone and email
task - 3171707

closes odoo/odoo#124809

X-original-commit: ec2d0ad0bbe6098c8eedd4d913e84260cadd16cb
Related: odoo/enterprise#42460
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-06-14 08:26:24 +02:00
tsm-odoo 21c1000581 [FIX] website_livechat: fix im_status wrongly positionned
Before this PR, the `im_status` of a visitor was wrongly positionned
in the discuss app banner.

This commit fixes the issue.

closes odoo/odoo#124921

X-original-commit: 09109573814d5a83c4e5432ffe1b252f3e75e954
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Stockbauer Matthieu (tsm) <tsm@odoo.com>
2023-06-14 07:18:43 +02:00
Nicolas Viseur (vin) e575b66114 [FIX] l10n_sg: demo company vat number
The demo company vat number would fail the check in base_vat
and thus always cause the demo company to not be added when
installing l10n_sg.
So we replace it with a number that passes the check to ease
testing and avoid throwing errors in the face of our users if
they want to try that localisation.

Task id #3366323

closes odoo/odoo#124948

X-original-commit: c5bc8673b661e3ab6c17d6988e56a014a5b915cf
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
2023-06-14 04:46:54 +02:00
pedrambiria 01b42985f7 [FIX] point_of_sale: open session with no Distribution for invoices
Before this commit, if you used a tax that was using "Group of Taxes"
for the "Tax Computation" in PoS, it would crash because it doesn't
have Distribution for invoices. This issue also occurred for other taxes
that lacked a "Distribution for invoices" line.

opw-3341807

closes odoo/odoo#124904

X-original-commit: 03cb9ea055fff0a56d9cc9d3d87bff817bec9b9d
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
2023-06-13 22:58:13 +02:00
Mathieu (mano) 9da1f5c990 [FIX] web: set input background to transparent
Prior to this commit, the `input-bg` in enterprise and in community were
inconsistent. Some inputs such as the ones in list view were appearing
in community with a weird white background while being hovered on.
Meanwhile in enterprise, these inputs were having a transparent
background.

This commit sets the `input-bg` variable in `bootstrap_overridden`
to transparent for the inputs in community. Since the variable is now
the same in community and enterprise, this variable is now unnecessary
and was removed from the enterprise branch.

The boolean switch input is relying on the $form-switch-checked-color to
display its SVG white circle, therefore it should be set to $o-white in
community instead of $input-bg (its already the case in enterprise,
doing so, this line can be removed from enterprise as well).

The `form-switch-focus-color` is providing almost the same visual result
when mixed with transparent rather than gray, allowing to remove the
enterprise override. The form override in `review_backend` can be
removed as well.

$form-switch-circle-bg-color is not used anywhere in the code and can
be removed since we use $form-switch-checked-color instead.

Note: `form-control` relies on input-bg and could potentially cause
issues but I didn't find any yet since most of the time the background
is overridden or is on a white background.

Task-3094005

closes odoo/odoo#124906

X-original-commit: fd55732d23956c1069c605cfc086d2d2d824b905
Related: odoo/enterprise#42509
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-06-13 20:40:56 +02:00
Alexandre Kühn 1d42692cfd [IMP] mail: improve discuss counter style
To match the visual of the messaging menu badge for its counter.

Task-3345133

closes odoo/odoo#122946

Related: odoo/enterprise#42493
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
2023-06-13 19:28:59 +02:00
Alexandre Kühn b90b64c6b5 [IMP] mail: improve new message separator visual
smaller and centered text

Part-of: odoo/odoo#122946
2023-06-13 19:28:58 +02:00
Walid fbcc33f3d3 [FIX] point_of_sale: apply quantity bracode nomenclature
Steps to reproduce:
1) Have Barcode Installed and have Barcode Nomenclature set
2) edit 1st rule(Price Barcodes 2 Decimals) to type Quantity
3) Create a product with barcode 2380201000008
4) Open POS and scan barcode 2380201010007

Bug:
error popup product not found because the callback for this rule
is not set

Fix:
apply same callback as weight (set product quantity)

opw-3213595

closes odoo/odoo#124886

X-original-commit: cd727b13b4ead39cd2b79ad0527e2912c8cf769b
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2023-06-13 18:21:10 +02:00
Romeo Fragomeli 035355766b [FIX] web: QUnit Rerun in debug not working correctly
Since commit [1], we have added the "Rerun in debug" in QUnit.
This link forces a specific test to be run in debug mode.
This link doesn't work some time as it runs another test.

This commit fixes that by using the `testId` parameter to set the id of
the test like QUnit does, and we add `debugTest` to force the
`Debug Mode`.

Step to reproduce:
* Go to the QUnit test suite
* Wait to have some tests passed
* Uncheck `Hide passed tests`
* Select a `Rerun` on a valid test
  e.g. URL: `/web/tests/?testId=cb868a47`
* Click on "Rerun in debug"
  e.g. URL: `/web/tests/?testId=cb868a47&debugTestId=cb868a47`
* Delete from URL `testId=X` (where `X` = hash of the test)
  e.g. URL: `/web/tests/?debugTestId=cb868a47`
* BUG => The tested test will not be the selected one.
  e.g. in our case, it is MockServer: performRPC (037b6d96)

Note
Small table of tests:
| Hash     | Test Module         | Test Name                                 |
| -------- | ------------------- | ----------------------------------------- |
| cb868a47 | utils > makeContext | evaluate strings                          |
| 037b6d96 | MockServer          | performRPC: search with active_test=false |

Also, a minor fix, using URL constructor and adding search parameter
through `searchParams.set()` to avoid the missing `?` in some cases.
The url `http://127.0.0.1:8069/web/tests/mobile` works but not
`http://127.0.0.1:8069/web/tests/mobile&testId=0e3481e3&debugTest=true`
as there is no search in the first URL when we click to "Rerun in debug"
it adds `&testId=0e3481e3&debugTest=true` but now it's a new page and
not the QUnit mobile suite.

[1]: odoo/odoo@b7ce395a47

closes odoo/odoo#124882

X-original-commit: ee791847caa91e3c98fa4ca47b1cc18f29b37c13
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-06-13 18:21:04 +02:00
Guillaume (gdi) 9177076cae [IMP] iap, website: add IAP languages test
This commit adds a test to check that the IAP languages work as
expected for the website configurator. The test checks that the
industries are translated (different than other languages).

task-3343616

closes odoo/odoo#123722

Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-06-13 18:20:52 +02:00