Commit Graph
156142 Commits
Author SHA1 Message Date
Solan Delvenne (sode) c7bc8e80c0 [FIX] snailmail: Force english locale on snail-mails
Pingen does not support localized country names, as such we need to force English locale.

closes odoo/odoo#105456

X-original-commit: e0233bff032c722cb309357c4b329bf9fe1aae43
Signed-off-by: Florian Daloze (fda) <fda@odoo.com>
Signed-off-by: Solan Delvenne (sode) <sode@odoo.com>
2022-11-10 21:16:16 +01:00
Hubert Van de Walle (huvw) b214c62e26 [FIX] web: mobile: scroll in selection mode
This is a port of https://github.com/odoo/enterprise/pull/30046 for wowl

Steps to reproduce:

On a mobile device:
- Go to Inventory > Product Variants
- Switch to the list view
- Long press on a record
-> We can't scroll to select records below the current screen

closes odoo/odoo#105545

X-original-commit: cd874593b2390efba8e92228f85e9cf07c0e1a8c
Related: odoo/enterprise#33861
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
2022-11-10 17:53:54 +01:00
fdardenne 9b7ed7ed0b [IMP] web: Layout: make it friendly for client action
Before, the `Layout` component was not friendly enough for
client action. There was no default component for `ControlPanel`
and `SearchPanel` in `Layout`, resulting in the fact that it had to be
defined manually in the client action environment:

```js
useSubEnv({
            config: {
                ...getDefaultConfig(),
                ...this.env.config,
            },
        });
    }
```

Now, the `Layout` component defines default component for `ControlPanel`
and `SearchPanel`. Making it easier to use for generic usage.

closes odoo/odoo#105413

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-11-10 16:05:56 +01:00
Rémi Rahir bbca93a811 [IMP] spreadsheet: improve typing
closes odoo/odoo#103387

Related: odoo/enterprise#32872
Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
2022-11-10 14:13:46 +01:00
Chong Wang (cwg) b95b549d24 [IMP] core: raise warnings for related translated stored fields
The _compute_related function can only update one translation but not all. We
decide not to update all translations to avoid increasing the time complexity.
As a result, the value for related translated fields should always be generated
in the runtime, and storing it is illegal.

A related translated stored field may work as expected in a single language
environment. But in mult languages environment, if you have a name field

    name = fields.Char(related="parent_id.name", store=True)

changing parent_id in French, will only change the French translation of the
name field

This PR tries to remove these fields. And a warning is added to prevent
developers creating a related translated stored field in the future.

closes odoo/odoo#102553

Related: odoo/upgrade#4004
Signed-off-by: Wang Chong (cwg) <cwg@odoo.com>
2022-11-10 14:13:41 +01:00
Aaron Bohy 98095e082f [FIX] web: AutoComplete: don't show previous results
... when re-opening the dropdown.

Before this commit, in an autocomplete component with an async
source, when:
 - clicking on the input to open the dropdown,
 - then typing something to filter the results
 - then selecting one of them (which closes the dropdown)
 - and finally re-opening the dropdown:
the previously displayed (and filtered) results were briefly
displayed, while the source was being fetched again. It thus
produced a weird and annoying flickering.

This commit fixes the issue by reseting the source before fetching
it.

closes odoo/odoo#105539

X-original-commit: 83769b00837f4eea29586f53709d65d3078ddce3
Signed-off-by: Michaël Mattiello <mcm@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-11-10 13:15:56 +01:00
Guillaume (guva) 355def0bbc [FIX] account: cumulated balance non exportable in GL
We made the field cumulated balance non exportable
in the GL.

Steps:

- Go to Accounting->Accounting->General Ledger
- Unfold and select one or several lines
- export lines
-> The cumulated balance is not computed

The reason is we don't pass in the compute as we don't
come from the search_read method when exporting, so we don't have a domain
to compute the cumulated balance.
As we can't force the domain, we override the fields_get method
to make the field non exportable.

opw-2800669

closes odoo/odoo#105538

X-original-commit: bd41d369342bfc97161a4190f03c98b718458aea
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Guillaume Vanleynseele (guva) <guva@odoo.com>
2022-11-10 13:15:51 +01:00
Aaron Bohy 7931d126d9 [FIX] web: kanban tests: fix typo
closes odoo/odoo#105533

X-original-commit: 48cd64c4c60422dee26a244bdbd06b90e3709c85
Related: odoo/enterprise#33841
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-11-10 13:15:45 +01:00
miad-odoo decbed094d [IMP] sale_crm: show opportunity in sale order view
Before this commit, the field opportunity_id was only visible in debug mode in
the sale.order form view. It was correctly pointing to opportunities but, when
used to create new records, it was creating leads instead.

The field is now always visible so users can link sale orders and opportunities
and a context was added so that the field correctly creates opportunities
instead of leads.

Task-3039802

closes odoo/odoo#104123

Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2022-11-10 13:15:39 +01:00
Géry Debongnie 03cdc9c417 [IMP] web: prevent duplicate entries in QUnit dropdown search
It is really annoying to have thousands of duplicate entries in that
dropdown menu. This commit hacks the problem away, but modifying QUnit
in place. Some day, we should modernize our testing infrastructure, but
this will do the trick in the mean time.

closes odoo/odoo#105483

Signed-off-by: Georis François (fge) <fge@odoo.com>
2022-11-10 12:22:05 +01:00
Florian Vranckx e1e9b19af3 [IMP] base: improve perfomance of has_group
Using the already existing indexing on the model to slightly improve the perfomance.

closes odoo/odoo#105354

X-original-commit: 4344d399002a32eeca05374527336d77a161c898
Signed-off-by: Vranckx Florian (flvr) <flvr@odoo.com>
2022-11-10 12:22:03 +01:00
Julien Mougenot cda3396546 [FIX] web,project: Restore kanban drag&drop in Firefox
Before this commit, the drag & drop feature for the Project "Tasks"
kanban view did not work if the drag sequence was initiated from the
title of the card.

This was due to the "o_kanban_record_headings" class having the CSS rule
`overflow: hidden`, because of a well known 6 year-long-and-counting
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1352061

Namely: mouse enter|leave events won't fire on anything underneath
elements having `overflow: hidden`.

This commit solves this issue by introducing a dedicated class name
'o_dragged' to all elements dragged using the `draggable_hook_builder`,
and defining on it the CSS attributes that were assigned in JS before,
as well as `pointer-events: none` on itself and all its children to
avoid the issue mentioned above.

Also in this commit: fixed a syntax error in a CSS rule in project's
"task_name_with_subtask_count_char_field" widget.

closes odoo/odoo#105353

Related: odoo/enterprise#33774
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-11-10 12:21:57 +01:00
Nicolas (vin) f0eb6f3906 [FIX] website_sale_*: fix a few tests
Some tests are running tours, which have triggers on the amount.
The issue is that if the test is running on a company with another
currency than usd, and these tours ends up using a pricelist in USD for
example, then the prices in the website will be adapted and no longer
match the trigger in the tours.
This change aims to correct that by ensuring that only one pricelist
can be used when these tours are running, and that this pricelist
currency matches the one from the company. As such, the prices will be
as expected and the tours will run properly.

closes odoo/odoo#105523

X-original-commit: 9a81cf604bbbc626a0fa68219a4fe017cd781bc7
Related: odoo/enterprise#33836
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
2022-11-10 09:50:40 +01:00
Nicolas (vin) e8f699428d [FIX] l10n_ar: avoid renaming products in demo data
Because it causes them to be inconsistent with their images,
and causes issues with some website tours depending on them.

X-original-commit: cfbe95ae05fd0c87e24668fc8550da9fdd7ee70d
Part-of: odoo/odoo#105523
2022-11-10 09:50:39 +01:00
FrancoisGe ab5a126f10 [FIX] web: empty group when changing page
Before this commit, in a grouped list view, it was possible to have
empty groups when changing pages.

Why:
Before this commit, if a grouped list performs a load, then it is
checked if its previousParams are equal to the current one. If so, we
keep all the old groups empty. This requirement is related to the kanban
view, so we will move it to the kanban model.
The kanban view needs it when we archive data but don't want to delete
groups (colomns). So we perform a load but we don't want to delete the
empty columns.

How to reproduce:
- Go to a grouped list view
- Click on a record
- Return to the list view using the breadcrumb
- Go to the next page

Before this commit:
The groups on the first page are always present with those on the second
page. The groups on the first page are empty.

After this commit:
We only have the groups on the first page.

closes odoo/odoo#105488

X-original-commit: 04467197b9ec0851e3f9f7a74d1b97c5e27420bc
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
Signed-off-by: Georis François (fge) <fge@odoo.com>
2022-11-10 08:57:28 +01:00
David (dafr) a64a3dc90b [FIX] stock_account: Use correct company for SVL account_move creation
The valuation field of the product_id is company-dependent.
If the user validate the picking in multi-company context with his current company != picking company, then the checks may fail, and the account move can not be created.

closes odoo/odoo#105476

X-original-commit: c29c668d694ef8d675116d42393e496636072d13
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: David <dafr@odoo.com>
2022-11-10 07:14:53 +01:00
niyasraphy 1709cba800 [FIX] sale,purchase,stock,account: partner form warning alignment
closes odoo/odoo#105511

X-original-commit: 6aa86c92c7ee7d46c54250960c2b34753e13b8be
Signed-off-by: William André (wan) <wan@odoo.com>
2022-11-10 00:27:59 +01:00
Walid HANNICHE (waha) 23c8ee0532 [FIX] sale_coupon: move global coupons to the end of the SO
Steps to reproduce:
 - Install website_sale_coupon
 - Load demo data
 - Create a promotion program that applies on the order
 - Go to the webshop and add 2 different products to the cart

Bug:
The line of promotion is in second place, instead of at the end.

Fix:
move the old sale order line to the end if it applies on all the order

opw-2985632

closes odoo/odoo#105517

X-original-commit: 48d20d44cf08fee411411665013fdaca72bf39c3
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2022-11-09 23:33:27 +01:00
William Braeckman a901105299 [FIX] website_sale: fix traceback when unselecting attribute
This commit fixes a traceback when changing the attributes when the
current page has no products to display

TaskId-3045085

closes odoo/odoo#105515

X-original-commit: b8a1b1143eec4a85b9dc8b2c6fbb0112f6b813d7
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-11-09 22:12:48 +01:00
niyasraphy 9b08bb0ea8 [IMP] account_sale_timesheet, project_{}, sale_poject_account : module license
closes odoo/odoo#105506

X-original-commit: a7a991bcdd052c0493c50afe9af8a3b44dcd17c2
Signed-off-by: John Laterre (jol) <jol@odoo.com>
2022-11-09 21:17:46 +01:00
Adrien Dieudonné a68d8bd2fb [FIX] web: form: ignore invisible items from rows
Before this commit, we had an issue with the width calculated
for data cell (see. sizeOfDataCell).
In some case, the width was 50% instead of taking 100% of the
available space.

This was because some elements of the inner groups that should not
have been visible were computed as if they were, taking an effective
slot in an innergroup's row.

E.g. with two labels:

Before:
"invisible label" and "label" on the same line with `style="width: infinite"`
"data field" on a second line with `style="width: 50%"`

After this commit:
"label" and "data field" on the same line with `style="width: 100%"`

Note that as `infinite` is not a valid value, this wasn't interpreted and
style attribute was empty.

Thanks to grid for still aligning elements even if they are technically
in different rows. It's why we only saw this issue because of the
width of the data cell.

Steps to reproduce:
- Go to Accounting
- Customer -> Invoice
- Create a new invoice
-> See Customer field

Thx to @kebeclibre

closes odoo/odoo#105489

X-original-commit: e177c63e3618e4b9e492a27d1301c098a0066cb6
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-11-09 19:03:48 +01:00
Younn Olivier a377708436 [FIX] web_editor: fix pasting youtube videos from the editor
Before this commit, following this flow in the Website Builder:
- Enter edit mode,
- Drop a snippet with text,
- Paste a youtube video link,
- Click on the "Embed Youtube Video" option of the powerbox,
=> There is a traceback.

This is coming from the bad function calls in the Wysiwyg to create a
video node.
When [1] reworked the MediaDialog in owl, a first implementation was
done exporting some utils (saveVideos, videoSpecificMediaClasses). But
this implementation was not kept and later changed to use static methods
and properties on the VideoSelector class (createElements and
mediaSpecificClasses).

Unfortunately, the outdated util methods used in the Wysiwyg were not
changed, and it was breaking the youtube video instertions.

This commit changes the Wysiwyg to use the existing
VideoSelector.createElements and VideoSelector.mediaSpecificClasses
static method and property to fix this flow.

[1]: https://github.com/odoo/odoo/commit/31cc10b91dc7762e23b4bde9b945be0c4ce3fe3b

task-2687506

closes odoo/odoo#105475

X-original-commit: 4923c20c29170407d43908f983f2a168241f4817
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Younn Olivier (yol) <yol@odoo.com>
2022-11-09 18:06:56 +01:00
Joseph Caburnay 011b61f425 [FIX] web: fix crash when editing m2m avatar field in list view
When editing a m2m avatar field in the list view, keyboard navigation,
e.g. pressing arrow-left when the focus is on the right-most item,
results to a crash. Also, the "delete" button when in edit mode
is not there anymore so the user is unable to remove items.

This is because we are not building the proper list of tags. More
specifically, we fail to provide `onKeydown` and `onDelete` handler
to the tags, thus, it crashes and no delete button. This proposed
change fixes both issues.

closes odoo/odoo#105467

X-original-commit: 02a046708a96567a41b5f9aec0f71cefc92ab981
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2022-11-09 17:02:56 +01:00
Sergey Shebanin bc0cd0bb56 [FIX] web: translations hash don't consider all loaded modules
Only server wide modules are being taken into account when calculating translations hash.
So user probably can't get translations of new installed modules unless it is forced by hard page reload (Ctrl+Shift+R).

Problem exists since https://github.com/odoo/odoo/commit/80d74e7ee0eab83dc5100e0776df09d04b882fec and the cause in that `mods = odoo.conf.server_wide_modules or []` string was unpaired with the following `if` statement during refactoring.

This commit restores computation of hash based on all loaded modules.

closes odoo/odoo#105466

X-original-commit: 859cd0463aec4533df30e4839367832fef0685fd
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2022-11-09 17:02:54 +01:00
Alexandre Kühn 78d2b87a78 [FIX] mail: allow uploading same attachment twice
Before this commit, when uploading an attachment then delete
then re-upload attachment again, the reupload was unsuccessful.

This happens because it should clear the `<input>` of type `file`,
but the condition was wrong and therefore `<input>` was not cleared,
thus keeping same value as before so input was not detected as
changed. A change on this file input is necessary to detect user
interaction file upload.

This commit fixes trigger for clearing the `<input>` of type file,
so that any file upload is properly detected, including uploading
same attachment.

Task-3060429

closes odoo/odoo#105465

X-original-commit: 97f445ae15663486d0100d7127287f9ec3d1d4cc
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-11-09 17:02:50 +01:00
Thibault Libioulle b054a9b9c8 [FIX] sale_mrp{,_margin}: fix dependency break on purchase_price
This commit fixes premature usage of `purchase_price` field on
sale.order.line model, before its definition in sale_margin module.

Since this test requires both sale_mrp and sale_stock_margin to pass,
this commit adds an auto-install bridge module that solely address this
issue.

Steps to reproduce:
- Install sale_mrp module
- Run tests (at least .test_kit_cost_calculation)

Problem:
Traceback:
AttributeError: 'sale.order.line' object has no attribute 'purchase_price'

See #100126

closes #104891

closes odoo/odoo#105458

X-original-commit: ac921c88909110deefa9b91be104244bda12458f
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
Co-authored-by: Thibault Libioulle <thibault.libioulle@aerospacelab.be>
2022-11-09 16:08:19 +01:00
niyasraphy 32073ef3da [FIX] base: name search for ir_module_module model
name, shortdec, summary fields are added to name search based on the fields set in the filter domain of existing search view of apps menu

closes odoo/odoo#105457

X-original-commit: a33165a78ab888b8c690b5424ed997b94ee8be05
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2022-11-09 16:08:10 +01:00
Jorge Pinna Puissant 9fd3ddbce9 [IMP] web: add the new test_lint eslint rules to the tooling
closes odoo/odoo#105433

Related: odoo/enterprise#33802
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2022-11-09 16:08:07 +01:00
Jorge Pinna Puissant 4f24e34b39 [IMP] test_lint, *: eslint remove caughtErrorsIgnorePattern from no-unused-vars
Unused catch block arguments are now forbidden even when prefixed with an
underscore:  if the argument on the catch block is not needed, the use of the
optional catch binding is enforced.

Part-of: odoo/odoo#105433
2022-11-09 16:08:07 +01:00
Ashmawy Walid (was) ceac99b81b [FIX] Inventory: prevent crash when printing package report if uom rounding bigger than 4 digits
closes odoo/odoo#105449

X-original-commit: ae22a2c3e98d6ccf9c3262d576ff9b483736552d
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2022-11-09 15:04:17 +01:00
Nshimiyimana Séna f1a777903a [FIX] account: set correct account on cash basis tax line
### Steps to reproduce
* go to Accounting > Settings and activate 'Cash Basis'
* got to Chart of Accounts and create a new  account of type
  `Current Assets`. We'll call it `A`.
* create a new tax, we'll call it `T`, with the following parameters:
  * Tax type: Purchases
  * Tax computation: Percentage of Price
  * Amount: 22%
  * Distribution of invoices:
    * add a line with the following parameters:
      % = 40, Based On = 'of tax' and Account = the tax paid account.
    * add a second line with the following parameters:
      %= 60, Based On = 'of tax'
  * Distribution of Credit Notes: Add the same lines as
    'Distribution of invoices'
  * In the Advanced Options tab, set :
    * Tax Eligibility = 'Based on Payment'
    * Cash Basis Transition Account = `A`
* create a new vendor bill and add a product line to it and set
  Taxes = `T` on that line
* confirm and register payment

Now go to Accounting > Journal Items, group by Journal. Look through the
'Cash Basis Taxes' group and find the entries related to the vendor bill
you just made. One of the debit lines on account `A` is not correct.
Here, the account should be the one specified on the invoice line.

opw-2796727

closes odoo/odoo#105445

X-original-commit: b69fc397aad019cc18bd00975d38dde9ffcc985b
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Nshimiyimana Serge Séna (sesn) <sesn@odoo.com>
2022-11-09 15:04:14 +01:00
fdardenne 9d74c8ec4d [FIX] web: legacy_client_actions: scroll to saved position
Before in a legacy client action, using a link to change view and
going back to the client action with breadcrumb does not restore the
scroll position.

Now with this commit, the scroll position is restored when going back to``
the client action.

Steps to reproduce:
- Install Accounting
- Go to `Accounting -> Reporting -> Balance Sheet`
- Unfold the tree to make the window scrollable
- Click on a link at the bottom of the window
- Go back to Balance Sheet

closes odoo/odoo#105443

X-original-commit: 225e809aa3ce1c506be69287e8084adf877547d7
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-11-09 15:04:11 +01:00
niyasraphy 7ba966d3e2 [FIX] purchase_requisition: typo for quantites
closes odoo/odoo#105442

X-original-commit: 9dd93b697a6ff50314b2fb2e5894b7125b8b207a
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2022-11-09 15:04:06 +01:00
qsm-odooandJulien Castiaux 0e8e5d4c0a [FIX] web_editor: restore shape on default images in themes
Website themes make customizations to the default snippets. In
particular, some are applying shapes on default images. To do that, the
customization is not applied on the image directly but by changing its
src to a special web_editor route in charge of automatically adding the
shape on whatever default image the configurator chose for this snippet.

Typically, in a snippet with an image whose src is:

/web/image/website.my_snippet_default_image

The src is replaced by the theme with:

/web_editor/image_shape/website.my_snippet_default_image/website/some_shape.svg

That controller/route crashed since [1], making those images blank
areas in pages generated by the configurator. Indeed, the image from
the filestore was accessed via `file_open` which only allows reading
inside the addons_paths.

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

closes odoo/odoo#105421

X-original-commit: d536e0a23cf0aa06c3ee13fb2c105e83201434e0
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: Julien Castiaux <juc@odoo.com>
2022-11-09 15:04:03 +01:00
maximilien(malb) 246666fe7d [FIX] account: Account group search bar
The search bar had a trace back when searching on a name, and searching on the code prefix did not work.

This was not working because using str(self) does not work in v16, str is not defined in filter domain.

By removing the str and adapting the filter domain logic, it now works as it should. And the behavior of version 15 is restored

closes odoo/odoo#105381

Task-id: 3058778
X-original-commit: 9173e4da3912f8e46f163cc0d38a4a037b591c60
Signed-off-by: John Laterre (jol) <jol@odoo.com>
Signed-off-by: Maximilien La Barre (malb) <malb@odoo.com>
2022-11-09 14:00:33 +01:00
Joseph Caburnay c22afcbe0d [FIX] web: custom filter display on selection field
**Issue:** When creating a custom filter for a selection field,
the selected value is not properly displayed. Note however that
applying the filter still works. The problem is only in the displayed
value.

This is caused by setting the "value" attribute of the selection
element which is always an empty string (because formatField doesn't
properly work for selection field). However, the empty string is not
the issue because it doesn't matter what "formatted value" is returned,
it is not needed. The selection field's value is based on the value
of the selected option.

**Solution:** To properly show the display text of the selection item,
we need to make sure that value of the selection field is not overridden
during its onChange event. As a result, the selected option will become
the value of the selection field, displaying the proper text.

Therefore, in the onValueChange event handler, if the field type is
selection, we don't reset the value of the the selection element.

closes odoo/odoo#105420

X-original-commit: afadac5e21e6af2111ef42852243e78bb085d7c3
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2022-11-09 12:37:10 +01:00
roen-odoo fa7ba0ddcf [FIX] point_of_sale: apply timezone on order list
Current behavior:
When you open the order list, the orders are displayed in UTC.

Steps to reproduce:
- Be sure you are in a timezone different than UTC
- Start a PoS restaurant session
- Go on a table and make and order
- Go on the order list
- Go back on the table, then go back on the order list
- The time showed for the order is not correct (it's in UTC)

This bug was happening because `moment(order.validation_date)` consider
that the date is already in the local timezone, so it doesn't apply the
timezone offset. So we have to apply the offset manually before sending
it to the frontend.

opw-3002417

closes odoo/odoo#105417

X-original-commit: bd366a6d11fd8864b4c2fd2819463449d6da5278
Signed-off-by: Masereel Pierre <pim@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
2022-11-09 12:37:07 +01:00
niyasraphy 6ad5efbb57 [FIX] base: remove create option from apps field in export translation wizard
closes odoo/odoo#105409

X-original-commit: 0ce7eafd6994357513f6dd46a01c685c40a187bd
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2022-11-09 12:37:02 +01:00
Jorge Pinna Puissant f10a9b8361 [IMP] test_lint, *: enable eslint aditional rules
*: google_calendar, website_sale_loyalty

rules enabled :
    - no-dupe-keys
    - no-dupe-args
    - no-dupe-else-if

closes odoo/odoo#105398

Related: odoo/enterprise#33783
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-11-09 10:56:54 +01:00
bat-odoo d5ddfb438a [FIX] l10n_in_edi: using sign instead of abs
Before this commit
==================
When we post a Customer Invoice by adding 2 products first one has a positive
unit value and the second one has a negative unit value than the wrong JSON
is generated.
The issue happens because of abs method converts the negative value into a positive.

After this commit
==================
In this commit, we are using the sign amount instead of the abs method.

Effected from this PR https://github.com/odoo/odoo/pull/99401

closes odoo/odoo#104876

X-original-commit: 99b99bc672a54665b59efaa3a4e696f6250065c3
Signed-off-by: Josse Colpaert <jco@odoo.com>
2022-11-09 10:56:48 +01:00
Sébastien Geelen (sge) edfa446fd5 [FIX] web_editor: block commandbar in non html field
Prevent the PowerBox command bar to open in (non html) Odoo field
embedded inside the editable zone.

task-3040872

closes odoo/odoo#105372

X-original-commit: cab3a9b9b89a6b1c0d430e5374feb2f963e466fc
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Geelen Sébastien (sge) <sge@odoo.com>
2022-11-09 08:14:53 +01:00
Abdelouahab (abla) 6d8898ada1 [FIX] account : remove QR code generation for credit note
To Reproduce
============

- enable QR code on Accounting settings
- with a customer who has a bank account create a credit note for him/her
- in other info tab, make sure that the qr code method is empty
- send or print the credit note

The Problem
===========

the qr code method field will be filled with SEPA, and a QR code will be added to the PDF

Solution
========

Generating a QR code for a credit note doesn't make any sense, so the qr code method field must be hidden
and no QR code should be generated.

opw-3010649

closes odoo/odoo#105385

X-original-commit: 4b0c37833547ff45d2240e51272372a572a920d5
Signed-off-by: William André (wan) <wan@odoo.com>
2022-11-09 00:39:42 +01:00
Adesh Jolhe (adjo) 11ea3fd06e [FIX] {sale_}project,hr_timesheet: translate various messages
Before this commit, some error messages and others messages are
not translated.

This commit uses the translation function to be able to translate
those messages.

task-3006627

closes odoo/odoo#105192

X-original-commit: 85ef44cd66474bf5dcda4d7478d566e462d1a550
Related: odoo/enterprise#33717
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2022-11-08 23:14:51 +01:00
Raphael Collet 725130f8fa [FIX] core: missing documentation about field.recursive
closes odoo/odoo#105371

X-original-commit: 0376743c65dc8fc29ac2f1353b02901423f4d18a
Signed-off-by: Raphael Collet <rco@odoo.com>
2022-11-08 20:45:47 +01:00
Hubert Van de Walle (huvw) 3de9e58239 [FIX] project: grouped by personal stages in kanban -> user == current user
Steps to reproduce
==================

- Go to project > My tasks
- Click on load More on the first column
- Nothing is loaded

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

The orm groups by stages for each stage where the user is
the current one or null
-> This returns a null stage when the left join has not match
   But we only want stages linked to the current user

Solution
========

When loading project kanban groups and isGroupedByPersonalStages is true:
Add the user_id to the domain

This is the same solution applied in saas-15.3

https://github.com/odoo/odoo/blob/f463d9a6ba95c0df64268b1c577f1b9d1c5bcb25/addons/project/static/src/js/project_kanban.js#L342

opw-3033943

closes odoo/odoo#105367

X-original-commit: 1294ff85aa54aa195e2f1554c6ef426869b90c75
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2022-11-08 20:45:44 +01:00
Carmen Bianca Bakker 1c1109df94 [CLA] Signature for Coop IT Easy
closes odoo/odoo#105352

X-original-commit: 6a941201465077c1232be70a8ff07a4e6c246372
Signed-off-by: Carmen Bianca Bakker <carmen@coopiteasy.be>
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-11-08 19:22:21 +01:00
Laurent Smet c348995732 [MOV] account: Move matching rules to enterprise
closes odoo/odoo#105201

Related: odoo/enterprise#33722
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
2022-11-08 18:22:51 +01:00
krha-odoo 6c78c91355 [FIX] sale: fix duplicated sale.report ids
Before this commit, when point of sale order line (in table pos_order_line, Point of Sale app) and empty sale order (in table sale_order, Sales app) shares the same id number, it may create duplicate id in sale_report sql view. Empty sale order is an order with no products, so not connected to sale order line.
Additionally, these duplicates creates some discrepancies between pivot and list view in sale report in Sales app.

This commit fixes the issue by removing sale orders with no order lines.

Steps to reproduce the issue:
-----------------------------
1. Create order in Point of Sale app with minimum pos_order_line id equal to "n"
2. Create empty sale order (no order lines inside) with id equal to "n"

To reproduce issue on runbot, one may check the minimum order line for one of pos orders (assume this is n) and then delete all order lines from sale order with id equal to n.

Current behavior:
----------------------------
There will be two lines in sale_repot sql view with id equal to "-n"

Expected behavior:
----------------------------
Id in sale_report view should be unique

opw-2946444

closes odoo/odoo#105343

X-original-commit: 76711686a261cf0c42110902ab426756c5d43608
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-11-08 16:52:58 +01:00
Florian Charlier a96513a79b [FIX] sale: fix image link for onb. sample QO
The image for the sample product was updated in 76141b0d which made the
'Sample quotation' onboarding step hang for databases without any
`product.product` record.

A simple unit test for `_get_sample_sales_order` is included.

Technically, it wasn't possible to add it to the existing onboarding test class
because these tests are run post_install, and would fail on ENT builds because
of pos_loyalty preventing archiving `product.product`s.

--Additional note for 15.3 fw-port:
As logic moved from pos_loyalty to loyalty, which is installed before sale on
runbots, the problem described above resurfaces. We chose this cross module but
simple and limited-impact fix to avoid it.

Task-3045287

closes odoo/odoo#105339

X-original-commit: 0698388aab821e21309cbb2dd2411dac60f71be6
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-11-08 16:52:54 +01:00
Vincent Baggerman 7cda12ea0d [CLA] Added Abstractive corporate CLA
closes odoo/odoo#105337

X-original-commit: a1b942ab5f04f49c5aa2ab22c3bc9e4a830447a9
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-11-08 16:52:52 +01:00