Commit Graph
166223 Commits
Author SHA1 Message Date
Soukéina Bojabza a98926d642 [FIX] website: fix the new design of the Banner snippet
In commit [1], the Banner snippet has been redesigned in order to be
in grid mode by default, to highlight some cool features of the editor.
However, some grid classes and attributes are missing or not well set:
- the first column has a `g-height-4` class despite having 8 rows: this
causes the vertical resize to not work correctly.
- the row does not have the `data-row-count` attribute, which is needed
to display the background grid correctly.

This commit fixes this by replacing the class by `g-height-8` and adding
the `data-row-count` attribute, which is set to 11 rows.

[1]: https://github.com/odoo/odoo/commit/3cbdf754ff8fac8a77887c4307b658cb86b0be1d

task-3369695

closes odoo/odoo#136683

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-10-14 23:52:16 +00:00
Soukéina Bojabza bd5678f907 [FIX] website: make the "Text Cover" snippet look good in grid mode
Before this commit, toggling the "Text Cover" snippet to grid mode did
not produce a good-looking result: the column containing the background
image loses all its padding and therefore appears smaller and shifted
compared to the normal mode.

This commit adds a background color to the image column. Indeed, with a
background color, and more precisely thanks to the `o_cc` class, the
padding is taken into account when computing the grid items size, making
them look similar to how they were in normal mode.

task-3369695

Part-of: odoo/odoo#136683
2023-10-14 23:52:16 +00:00
Soukéina Bojabza 0a52320d44 [FIX] web_editor: make background grid more visible on dark backgrounds
When redesigning the grid layout and handles, commit [1] removed the
filter that allowed the grid to be clearly visible on dark backgrounds
(added in commit [2]). Without this, the background grid when dragging/
resizing and the highlight effect when changing the gaps are difficult
to see.

This commit adds this filter back, but with a lowered opacity in order
to not obstruct the view too much.

[1]: https://github.com/odoo/odoo/commit/70f723a9f78c406746f5409f6a89cbe93ad21580
[2]: https://github.com/odoo/odoo/commit/1aa81243b7c80069c576381e2f3b04281455794f

task-3369695

Part-of: odoo/odoo#136683
2023-10-14 23:52:16 +00:00
Soukéina Bojabza 4345df3aee [IMP] web_editor, website: add a spacing option to modify the grid gaps
The `display: grid` property allows to modify the spacing (or gaps)
between the rows and columns of the grid with the `row-gap` and `column-
gap` CSS properties. When the grid mode was added with [1], these
properties were deliberately ignored and the gaps were forced to 0px.

This commit adds the "Spacing (Y, X)" option that allows to modify these
grid gaps. A grid preview is also added when using this option, in order
to visualize what is being changed in the grid.

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

task-3369695

Part-of: odoo/odoo#136683
2023-10-14 23:52:16 +00:00
Soukéina Bojabza 62985e8329 [REF] web_editor, website: remove duplicated grid/column options
When adding the grid options in commits [1] and [2], some of them have
been duplicated in order to cover the different use cases: grid-only,
columns-only and grid + columns. However, they should have been declared
only once and then called when needed.

This commit extracts the common options into views, to avoid duplicating
them.

[1]: https://github.com/odoo/odoo/commit/cc406afcea7bf5846233a9f97a4a8ac5f618f3ec
[2]: https://github.com/odoo/odoo/commit/85b352af319edec84407f2046cf795b4e5503460

task-3369695

Part-of: odoo/odoo#136683
2023-10-14 23:52:16 +00:00
Soukéina Bojabza 11418cc6f0 [IMP] web_editor, website: add individual Padding option for grid items
Before this commit, the "Padding" grid mode option, added in commit [1],
was impacting all the grid items at the same time, which was not
convenient since all these elements would have the same padding and
could not be styled individually.

This commit improves this option in order to modify the padding of the
grid items individually. The highlight effect, added in commit [2], when
changing the padding is still added.

[1]: https://github.com/odoo/odoo/commit/cc406afcea7bf5846233a9f97a4a8ac5f618f3ec
[2]: https://github.com/odoo/odoo/commit/f3f2c4c73ce08d3898b8c88e1ef045f7bbd1f624

task-3369695

Part-of: odoo/odoo#136683
2023-10-14 23:52:16 +00:00
Soukéina Bojabza e828683820 [REF] web_editor: refactor some grid code
In the grid mode code, the code managing the transformation of a grid
item into a normal column (when it is dropped or when we toggle the
normal mode) is repeated at several places.

This commit fixes that by creating a function doing this conversion
instead.

task-3369695

Part-of: odoo/odoo#136683
2023-10-14 23:52:16 +00:00
Soukéina Bojabzaandqsm-odoo 75331fd46a [IMP] web_editor: add support for data-min/max to InputUserValueWidget
Before this commit, when using a `we-input`, there was no way to easily
specify the min and max values that could be entered in the input, which
could be useful when too low/high values could break some behaviors, for
example.

This commit adds the support for the `data-min` and `data-max` data-
attributes in `InputUserValueWidget`. More precisely, when these
attributes are added on a `we-input`, if the user writes a value smaller
than the `data-min` or bigger than the `data-max`, the value snaps to
these bounds. When using the arrows, the value cannot be decreased/
increased beyond them either.

task-3369695

Part-of: odoo/odoo#136683
Co-authored-by: qsm-odoo <qsm@odoo.com>
2023-10-14 23:52:16 +00:00
Soukéina Bojabzaandqsm-odoo df7b8a17cd [IMP] web_editor: clean the snippet UI before cloning it
When cloning a snippet, if it had some previews displayed, the previews
may be cloned with it. This is not a good behavior because the clone
is a new snippet so it should not have all the preview classes that were
added when editing. Moreover, these previews could also cause bugs.

To solve this, an idea could be to call the `cleanForSave` function of
all its options before cloning the snippet. But the problem is that in
some options, the `cleanForSave` function does more than simply clean
the UI (as it was originally supposed to) and so it cannot be used for
that purpose only.

As a solution, this commit adds a new function called `cleanUI` whose
exclusive purpose will be to clean the snippet UI. In the future, it
will replace the `cleanForSave` function.

task-3369695

Part-of: odoo/odoo#136683
Co-authored-by: qsm-odoo <qsm@odoo.com>
2023-10-14 23:52:16 +00:00
Martin Trigaux 3314ec94e5 [FIX] website_event: avoid double indexing
Similar to d2edee2f6a6

Before this commit, web crawlers may endlessly index pages with tags,
the number of combinations were very large very quickly and could lead
to thousands of requests

opw-3525473

closes odoo/odoo#138718

X-original-commit: 953ac4bde2258d31c2d2f3f6233fb00c802b6e7f
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-10-14 03:27:11 +00:00
Xavier ALT 5b914326f1 [PERF] account: speed up _compute_days_sales_outstanding
Followup of odoo/odoo@eb7a32c31c, on large database with lot of
account.move computation still take certain amount of time and database
resources.

This commit limit the computation of `days_sales_outstanding` only
to the commercial partners that we need.

Note: the field is only shown in the Partner form view, so most of
  the time we were only computing it for a single record

| Before | After |
|--------|-------|
| 900ms  | 20ms  |

opw-3530408

closes odoo/odoo#138703

X-original-commit: f968ea2898d7ce314fd575da5446b0dd9d711524
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Xavier Alt (xal) <xal@odoo.com>
2023-10-14 03:27:10 +00:00
Louis (wil) 6ba2972b4f [I18N] l10n_din5008_sale: change Verkaufsauftrag to Auftragsbestätigung
closes odoo/odoo#138671

X-original-commit: ca7b21cdd3078a9f6bd981dcd1281ecb6d59ff4f
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
2023-10-14 03:27:09 +00:00
Josse Colpaert 581f3d34e6 [IMP] l10n_ar,l10n_es,l10n_se: remove unnecessary same inherited tax groups
closes odoo/odoo#137796

Signed-off-by: William André (wan) <wan@odoo.com>
2023-10-14 03:27:04 +00:00
b27d52c193 [IMP] website: introduce new pages templates design
This commit defines new page templates that are related to specific
use-cases.

task-3381714

closes odoo/odoo#126719

Related: odoo/design-themes#692
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Co-authored-by: Benoit Socias <bso@odoo.com>
Co-authored-by: Arthur Detroux (ard) <ard@odoo.com>
2023-10-14 03:27:03 +00:00
Benoit Socias 1b8a1d97d6 [REF] base, website, *: rename snippets_list to configurator_snippets
*: theme_default

This commit renames the `snippets_list` manifest key to
`configurator_snippets`.

task-3381714

Part-of: odoo/odoo#126719
2023-10-14 03:27:03 +00:00
Benoit Sociasandstefanorigano e0796020ee [IMP] website: make it possible to create new pages from templates
This commit modifies the "New Page" dialog so that it displays a list
of page templates to pick from in addition to the possibility to create
a blank page.

task-3381714

Part-of: odoo/odoo#126719
Co-authored-by: stefanorigano (SRI) <sri@odoo.com>
2023-10-14 03:27:03 +00:00
Benoit Socias 928eeca714 [IMP] website: use dedicated templates in configurator
This commit adapts the configurator so that the pages it generates are
composed of the primary templates generated from the manifest by the
previous commit.

task-3381714

Part-of: odoo/odoo#126719
2023-10-14 03:27:03 +00:00
Benoit Socias a2f8e18b76 [IMP] website, base: generate distinct templates for new pages
This commit is a preparation for the new page from template feature.

In order to make it possible for new page templates to be customizable
at several levels from themes, it was decided to create several layers
of primary templates.
Those templates are build from the descriptions found in manifest files
under the new `new_page_templates` key.
The same principle is also applied for configurator pages (described in
manifest files under the `snippet_lists` key) because we noticed that
some of the changes that were made in themes for some blocks were not
supposed to impact the "drag'n'drop" version of the block, but only
the version used inside the pages generated by the configurator. (E.g.
connecting shapes between blocks)

The manifest entries now have the following structure:
```py
'snippet_lists': {
    'somepagename': ['s_block_name', ...],
},
'new_template_pages': {
    'somecategoryname': {
        'sometemplatename': ['s_block_name', ...],
    },
},
```

This commit finds those entries in the manifests and creates the
following primary templates:
- `s_block_name`: already exists, this is the block that is drag and
dropped using the website builder
- `configurator_s_block_name`: specialization of `s_block_name` used in
all pages generated by the configurator
- `configurator_somepagename_s_block_name`: specialization of
`configurator_s_block_name` for that specific page
- `new_page_template_s_block_name`: specialization of `s_block_name`
used in all new page templates
- `new_page_template_somecategoryname_s_block_name`: specialization of
`new_page_template_s_block_name` used in new page templates of that
specific category
- `new_page_template_somecategoryname_sometemplatename_s_block_name`:
specialization of `new_page_template_somecategoryname_s_block_name` for
that specific template

For the template pages defined in `website` it also creates primary
templates that assemble `t-snippet-call`s of the most specific block
templates. Those templates are named
`new_page_template_sections_somecategoryname_sometemplatename`.

task-3381714

Part-of: odoo/odoo#126719
2023-10-14 03:27:03 +00:00
tsm-odoo e9446a511e [FIX] bus: fix race in websocket tests
Before this commit, websocket tests were sometimes failing with the
`no result to fetch` error. This is due to a race between the
`subscribe` event being received which itself leads to dispatching bus
notifications interferring with the rest of the test (the connection
is shared).

In order to solve this issue, the `WebsocketCase` now exposes a
`subscribe` method that waits for this dispatching to be done in order
to ensure it will not interfere with the rest of the test.

Some tests were also failing because the subscription was done with 0
as the last notification id. This is an issue since this could lead to
notifications being sent while they are not expected.

In order to solve this issue, `last_notification_id` is now correctly
passed when subscribing to channel notifications.

fixes runbot-24226

closes odoo/odoo#138649

X-original-commit: 3256885fd08d33a67d7165fa33d373fd039ef7af
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
2023-10-14 02:26:53 +00:00
Xavier-Do 3ee7cb6680 [FIX] invalidate t-cache in all cases
The issue with the t-cache (discribeds with a test in previous commit)
is that the key/value can be anything. It can be based on other t-cache
(assets in the example) but could be anything else.

The proposed solution will clear the t-cache when ANY other cache is
cleared. This is similar to the behaviour when the t-cache was
introduced (single ormcache)

Also sligly improve logging to precise what was cleared

closes odoo/odoo#138647

X-original-commit: aa69fa9f8efed0da45c601e5d57ce252446e376f
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2023-10-14 02:26:52 +00:00
Xavier-Do 10d2df35d0 [IMP] add a test for t-cache invalidation
The issue that can happen is a t-cache covering a t-call-asset.

The asset_cache is invalidated but not the t-cache, meaning that the url
pointing to the asset will lead to a 404 once another request, without
t-cache, will regenerate the asset.

X-original-commit: fffc198914b8c885905e9dddd72b6490fcc4c120
Part-of: odoo/odoo#138647
2023-10-14 02:26:52 +00:00
Benjamin Vray e9cc96ddf2 [FIX] fix dropping the facebook snippet onto the page
Since commit [1], the 'jquery.ba-bbq' library has been removed. Now,
when you drop the Facebook snippet into a page, there is a traceback.

This is because we were still using the 'querystring()' function from
'jquery.ba-bbq' to combine the parameters of the Facebook iframe's URL
with its URL.

[1]: https://github.com/odoo/odoo/commit/507c36883675a45a15485ce5c73aa4557ba23639

task-3543529

closes odoo/odoo#138592

Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-10-14 01:24:54 +00:00
Pierre Masereel 55e3b8f30c [IMP] base_import_module: use only one wizard
The wizard is overriden by studio, but we don't really need it so, we
modify it and we'll remove the override for studio.

closes odoo/odoo#138520

Related: odoo/enterprise#48860
Related: odoo/upgrade#5274
Signed-off-by: Pierre Masereel (pim) <pim@odoo.com>
2023-10-14 01:24:51 +00:00
Joseph Caburnay e227e7c3a2 [IMP] point_of_sale: consistent price on the combo lines
**ISSUE**

- Given a combo product with 2 combo_ids (pos.combo).
  - Combo A
    - A1, A2
  - Combo B
    - B1, B2
- When adding this combo product, it's possible that the user selects the
  combination A1 & B1.
- And in another order, A2 & B1.
- ISSUE: Between those two orders, prices of first line (component A) will be
  different. What we want is that the price of line corresponding to a component
  (pos.combo.line) is consistent between orders.

**SOLUTION**

This can be achieved by establishing a constant in each pos.combo.line. We
choose the minimum lst_price of the components as this constant which we call as
`base_price` field.

The calculation will be practically the same as before, except unit price is now
based on the `base_price` field:

- Compute the original price - which will be based on the `base_price`.
  - Recall: `base_price` is the minimum price among the `combo_line_ids` of a
    pos.combo.
- We then divide the original price to the target price (which is the price of
  the combo product) which we'll call the "prorateFactor".
- The price of the components are computed by multiplying the "prorateFactor" to
  the `base_price`.

**Rounding error:** Both the original procedure and the new strategy introduced
in this PR suffers from rounding error. To prevent the rounding error, we
compute the error and distribute it to the last line of the combo.

**Combo (Extra) Price:** The `pos.combo.line.combo_price` is added on top of the
prorated price.

closes odoo/odoo#138352

Signed-off-by: Vlad Stroia (vlst) <vlst@odoo.com>
2023-10-13 23:20:15 +00:00
Joseph Caburnay 5fc63dea81 [FIX] point_of_sale: make sure no trailing space in product name
**Steps to reproduce:**

- Install pos and pos_restaurant.
- Make sure preparation display tracks a pos.category, e.g. 'Food'.
- Open restaurant with the 'Food' category in mobile mode.
- ISSUE: The product reminder just above the 2 switch pane buttons is not shown.

**FIX:** The product reminder is not shown because the "change" name used in the
calculation for comparison has a trailing space. We just have to make sure that
the trailing space is not there.

Part-of: odoo/odoo#138352
2023-10-13 23:20:15 +00:00
Joseph Caburnay 874c7fc6b5 [FIX] pos_self_order: show correct total in order widget
Part-of: odoo/odoo#138352
2023-10-13 23:20:15 +00:00
Joseph Caburnay c3e412aafd [FIX] point_of_sale: products w/ unloaded category belong to root
It's possible that a product is loaded but its pos.category is not, e.g. when
loading a menu product (product with detailed_type='combo'), the components will
also be loaded.

In this case, the product's pos.category will be null and the product won't be
visible even when in the root category. This commit makes sure that if a
product's pos.category is not loaded, the product will be visible in the root
category.

Part-of: odoo/odoo#138352
2023-10-13 23:20:15 +00:00
Josse Colpaert 14886eb662 [IMP] l10n_ec: add active field on payment method
Because some payment methods get deprecated or are
used very little, an active field comes in handy.

closes odoo/odoo#137914

Related: odoo/upgrade#5253
Signed-off-by: William André (wan) <wan@odoo.com>
2023-10-13 23:20:14 +00:00
Josse Colpaert 331eaf2122 [IMP] l10n_ec: remove unused field l10n_ec_emission_type
The field was foreseen in advance in the community module,
but the final implementation of the electronic invoicing
did not need it.

Part-of: odoo/odoo#137914
2023-10-13 23:20:14 +00:00
niyasraphy 168b56e069 [IMP] product: pricelist option in label printing
before this commit, on printing product labels there
is no option to select the price list, always the
printed price is the default product price

after this commit, in the label printing wizard
the price list field is introduced and user can
select the price list before printing the labels

closes odoo/odoo#137190

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-10-13 21:11:55 +00:00
Benoit Socias 3c72683aac [REV] website: avoid crash in search snippet when page has no url
This reverts commit f75ec6131eff9165b06d42d27a49dd756387f4a0.

task-3443119

closes odoo/odoo#136764

Related: odoo/upgrade#5195
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-10-13 21:11:53 +00:00
Benoit Socias b082a1a546 [IMP] website: make website page URL required
Commit [1] was made to avoid that the search snippet fails when there
are pages without URLS.

In master this can be reverted and the URL field can be made mandatory.

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

task-3443119

Part-of: odoo/odoo#136764
2023-10-13 21:11:53 +00:00
Valeriya(vchu) 997aa444cb [IMP] payment: payment methods improvements
closes odoo/odoo#136525

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2023-10-13 21:11:53 +00:00
Bruno Boi 25423820ed [REF] web,mail: add popover props: arrow,animation
Better API as the arrow was not displayed when the fixedPosition
prop was true, which is as we were mixing apples and pears.

And as for the animation prop, it permits to remove the hacky
"o-fast-popover" class usages.

closes odoo/odoo#135188

Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
2023-10-13 21:11:52 +00:00
Bruno Boi 31c52824be [REF] web_tour: replace a deprecated function
**Before this commit**
The TourPointer component make use of a deprecated
function (reposition) in order to position itself.

**After this commit**
The TourPointer now make use of the usePosition hook,
which is the recommended way to compute this kind of positioning.

Part-of: odoo/odoo#135188
2023-10-13 21:11:52 +00:00
Bruno Boi b449ae6036 [IMP] web: improve usePosition API
**Before this commit**
The usePosition hook takes two arguments:
- the target element (could be a function returning an element)
- the positioning options, which are optional.

This API is a bit weird for these reasons:
- the target argument's type is variable
- the "popper" option is not very meaningful and has a
  default value of "popper", which is not clearly stated

**After this commit**
The usePosition hook now takes three different arguments:
- first is "refName", which is the reference to the element to position
  in the template
- then is "getTarget", a callback that must return the target element,
- finally the "options"

Part-of: odoo/odoo#135188
2023-10-13 21:11:52 +00:00
padh-odoo f610fb1d31 [IMP] hr_timesheet: improve add pivot and graph view for my timesheet
Improve added pivot and graph view for my timesheet in the timesheet app.
- Before this commit there was no pivot and graph view for my timseet in
  timesheet app.
- In this commit pivot and graph view is added or my timseet in
  timesheet app.

Task-3479322

closes odoo/odoo#134495

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-10-13 21:11:50 +00:00
Guillaume (gdi) 614dc4a517 [FIX] website: prevent default image drag and drop
By default, images on websites can be dragged and dropped in browsers.
As we have a custom drag & drop system, this commit removes the default
drag & drop behavior during the edition of a website page. In addition,
this commit prevents `OdooEditor` from managing drag and drop on images
that should not be dragged and dropped by the user.

task-3369600

closes odoo/odoo#125151

Signed-off-by: Benjamin Vray (bvr) <bvr@odoo.com>
2023-10-13 21:11:50 +00:00
Guillaume (gdi) 514d3dbad4 [IMP] web_editor: permit drag images and start from anywhere on it
Before this commit when the user was dragging an image in the editor,
the image was always dragged from the top middle of the image. Now the
user can drag the image from anywhere on it.

task-3369600

Part-of: odoo/odoo#125151
2023-10-13 21:11:49 +00:00
Guillaume (gdi) cff6f79b5f [IMP] web_editor: permit to drag images
This commit permits to drag and drop images directly (without using the
`o_move_handle`) with the website drag & drop tools. The user can
directly drag the image in edit mode by grabbing the image itself. It
was already possible to drag the image itself but this commit permits to
activate the website tools (grid mode, see dropable areas, etc.) while
dragging the image.

task-3369600

Part-of: odoo/odoo#125151
2023-10-13 21:11:49 +00:00
moerradi b79565785d [REF] l10n_es: Refactor mod 111, 115, 303 to use tax_tags engine
This commit replaces the outdated expressions and unsigned tags in mod 111, 115, and 303 with tax_tags expressions. This update follows the removal of the old technical decision after Reportalypse. A migration script is included to ensure proper conversion of accounting history. As a result, Spanish reports are more standardized and performance is significantly enhanced due to batching in the tax_tags engine.

closes odoo/odoo#120675

Task-id: 3126178
Related: odoo/enterprise#40777
Related: odoo/upgrade#4800
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
2023-10-13 21:11:46 +00:00
Himanshu Rohit 157c8b6493 [IMP] project: improve ux for project
The purpose of this commit is to do generic improvements to the project.

In Commit, made the following changes:

   - replace the rating % by the value out of 5 in the project kanban card.
   - replace the rating % by the value out of 5 and satisfaction by average rating in the
     project update right-side panel.
   - add the placeholder in project stages and project task type.

task-2962386

closes odoo/odoo#99474

Co-author-by: Manisha Tulsiyani <matu@odoo.com>
Related: odoo/enterprise#31013
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-10-13 21:11:45 +00:00
dane@odoo.com 6644cb7e3a [IMP] link_tracker: allow multiple clicks
This PR removes filter on ip so that each click should count as one.
previously multiple clicks from the same device only counted as one,
but now because of the ip removal, they are being counted as many
times as you go to the link.

task-3328661

closes odoo/odoo#132812

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-10-13 19:14:53 +00:00
Maximilien (malb) dc7328ff0f [IMP] account_reports: hide line at 0
In the enterprise PR, we allow to have a new options on reports that can hide
line that are equals to zero under certain condition.

A line should be visible depending on its value and the ones of its children.
For parent lines, it's visible if there is at least one child with a value different from zero
or if a child is visible, indicating it's a parent line.
For leaf nodes, it's visible if the value is different from zero.

This commit add the filter in the account_reports model.

closes odoo/odoo#130897

Task: 3359936
Related: odoo/enterprise#45291
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
2023-10-13 17:00:44 +00:00
roen-odoo 8554e6f88c [FIX] pos_restaurant: fix blank receipt print
Current behavior:
When trying to print the bill in PoS restaurant from a mobile device,
the bill appears completely blank.

Steps to reproduce:
- Open Odoo on mobile device
- Go to PoS restaurant
- Create an order
- Click on the "Bill" button
- Click on the "Print" button
- The bill is completely blank

This is happening because on mobile after clicking on the "Print" button
the pos directly return to the order screen. What happens when you do
`window.print()` is you basically do a screenshot of the screen with
some specific CSS rules. But on mobile, we go back too fast on the order
screen and the screenshot is empty.

opw-3507918

closes odoo/odoo#138282

X-original-commit: ebf214944097b9731a2a5dcf53d367715ceb8a35
Signed-off-by: Vlad Stroia (vlst) <vlst@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2023-10-13 15:54:27 +00:00
luve-odoo 7cf8b9f4ae [FIX] project : traceback with multi-company
How to reproduce:
    - Link 2 distinct projects to at least 2 different companies
    - Modify and save any setting in project settings (this action
    should trigger the write function of the project)
    --> Traceback: expected singleton

Why?
    - If projects associated with differing companies are updated
    collectively, the condition self.company_id.id anticipates a
    singular value, but it’s possible for there to be multiple.

Solution:
    - When we want to write a company_id on some projects, take back the
    ones already with the right companyc(as we don't have to change their
    stage) and then write the first stage found on the other records (
    by putting self.company_id.ids in order to avoid the singleton
    exception).

taskid:3520107

closes odoo/odoo#136614

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-10-13 15:54:25 +00:00
Saurabh Choraria 85b5ddfc0d [FIX] base_import: accept single character in text delimiter
When a user tries to import the CSV file with an empty text delimiter
or more than one character in text delimiter at that time the traceback
will be generated.

Steps to reproduce:
- Install Accounting module.
- Click on import in the bank statement.
- Select any CSV file for the bank statement line or can download and import
this file - https://drive.google.com/file/d/1lnScw4RN6T01pOkyNON8vvb3FQOPiy1O/view?usp=drive_link
- Enter empty text delimiter or more than one character in text delimiter.
- Click on the test or Import button.
- Error will occur.

Error: ValueError: Unsupported file format "text/csv", import only supports
CSV, ODS, XLS and XLSX

The issue is occurring because text delimiter (options['quoting']) is used
as quotechar while reading csv file and quotechar is always a single
character string. Check here -
https://github.com/odoo/odoo/blob/0fde590bee71618f78e5f954349530bd007c62cf/addons/base_import/models/base_import.py#L494-L497

To solve this issue the length of text delimiter has been checked and if it
is not equal to one then a warning is given to the user.

sentry-4390461991

closes odoo/odoo#138638

X-original-commit: 1f4aa620779ebe6a0cb7f7ca1910080a258d6fac
Signed-off-by: Achraf Ben Azzouz (abz) <abz@odoo.com>
Signed-off-by: Saurabh Choraria (sauc) <sauc@odoo.com>
2023-10-13 14:14:05 +00:00
tsm-odoo 8bf49da5a7 [FIX] website_livechat: fix tour failing nondeterministically
This commit fixes the `website_livechat_chatbot_flow_tour` that was
failing in a nondeterministc way. This is due to the tour sometimes
taking more than `60` seconds which is the default timeout for python
tours.

Most of the time is consumed waiting for the user to finish its
multiline input. This issue is solved by shortening the delay to
consider the multiline input as done: from `10`s to `500`ms.

fixes runbot-24557

closes odoo/odoo#138629

X-original-commit: cdca70941dab1b20dca9bdf9d44d354327176b59
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
2023-10-13 14:14:04 +00:00
Sina Chaichi Maleki (cmsi) 6357e6dd3a [IMP] hr_recruitment: refine user access to job positions view
Previously, a user could be a recruiter but not an interviewer. With the
new changes, the recruiter role is also an interviewer. On the job
positions kanban view, the functionality of the "X to Recruit" link
depended on whether a user was an interviewer or not. Now, since an
admin is also an interviewer, they only have interviewer access and can
only see the application list, which is not desired. In this commit,
we've changed the condition from being an interviewer to being a
recruiter. Consequently, the admin can navigate to the job position
edit form while interviewers only see the application list. Users with
neither role won't see the kanban view at all, so there's no concern
regarding that.

closes odoo/odoo#138628

Task: #3471557
X-original-commit: 06712c3a2c34ece2dc1b93180a270da46e7e5966
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2023-10-13 14:14:00 +00:00
Ken Luzuriaga 4c0a5ed445 [CLA] add new member to CLA Trescloud
closes odoo/odoo#138627

X-original-commit: 04d199187e2d698f6adfcca34121454ed0a188b6
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-10-13 14:13:58 +00:00