Commit Graph
155566 Commits
Author SHA1 Message Date
Denis Ledoux af24e05429 [FIX] crm: remove no longer used code.
The code removed by this revision was initally introduced in
odoo/odoo@126ba0a9a8

The `_get_view` override introduced relied
on the context key `opportunity_id`,
which was set in the crm.phonecall form view with
```xml
<field name="opportunity_id" on_change="on_change_opportunity(opportunity_id)" context="{'opportunity_id': opportunity_id}"/>
```
as you can see in the above mentioned revision.

This above node was removed 7 years ago in revision
https://github.com/odoo/odoo/commit/ff2b14d4c3c5aaa62418b527585d0a19e98a23de#diff-892062d6151c1e1c1cb5f6c09035df1d5ae6d5a71f7558aacfdc8cf62627bf5fL138
Therefore making pointless the code about it in the `_get_view`
override.

In addition to this clue to make sure the override is pointless,
checking the code, we can see it relies on `get_formview_action`
to set a different view according to the result of `get_formview_action`.

Since revision
https://github.com/odoo/odoo/commit/e28d3aa4d3851d72deba08c236072d002f83216a#diff-595d3dbbabdc4f766a380a320c1c1a43b143385bc7487c7275e80f76a9fbabc2L1224
the override of `get_formview_id` is removed,
therefore making `get_formview_action` of `crm.lead` completely default
(as there is no override of `get_formview_action` either in crm.lead,
nor any dependent method)

We can therefore assume this code was useless,
at least in standard odoo,
and can therefore be removed.

X-original-commit: 82c2f4b13034c16ca5546afd777150ecb4d8ad9b
Part-of: odoo/odoo#103438
2022-10-19 20:47:51 +02:00
Alexandre Kühn 9c8a987e0f [FIX] mail: no write on read-only SuggestedRecipientInfo/isSelected
Before this commit, when a recipient is suggested in composer header
and current user click on checkbox, there was the following warning
in the console:

```
read-only SuggestedRecipientInfo/isSelected on record(SuggestedRecipientInfo_1) was updated
```

The state of a selected suggested recipient is determined by being
manually selected on UI, but also that there's a partner related
to this recipient. `isSelected` is a computed field with itself
as dependency, and it was also imperatively set. We don't want
any computed field to be set imperatively, hence the warning in
the console.

This commit fixes the issue by introducing another field that
is specific to selection on UI by current user. This field does
not depend on whether there's a partner. This field is imperatively
set, and then `isSelected` is fully declarative as a computed field
with no self dependency and no imperative update.

Task-3032869

closes odoo/odoo#103573

X-original-commit: 8e2980e1e871a8046f09d3d0affb6400ee030eeb
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-10-19 19:54:04 +02:00
Mathieu Duckerts-Antoine e0b852bc6e [FIX] web: core: offset in to_utc
Take a PyDateTime representing the moment "2022-10-17 00:00:00" in
the timezone of Brussels. Trying to get the related utc moment through
to_utc gives wrongly "2022-10-16 23:00:00". This happens because the
months are not numbered in the same way in Date or PyDateTime, so that
in October for example, the offset applied was that of November which is
-60 instead of -120 (summer/winter change). We fix that problem.

closes odoo/odoo#103561

X-original-commit: a11e1fb5f702400fe51938362fe3f24570977ba9
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
2022-10-19 18:06:59 +02:00
Victor Piryns (pivi) 44d4c65560 [FIX] point_of_sale: open POS sessions with restricted categories
Current behaviour:
We get a traceback when opening a POS session with restricted categories

Expected behaviour:
We should be able to start a POS session with restricted categories.

Steps to reproduce:
- Install POS
- In POS global settings add any category in the restricted categories
- Try opening a new POS session

Reason for the problem:
Incorrect domain right leaf, the reference field that is a pos.category
is not de-referenced.

Fix:
Add `.ids` at the tail end of the record reference

Affected versions:
- 16.0
- master

opw-3021490

closes odoo/odoo#103548

X-original-commit: 8c76afc161133b78239cf91d746a159d67f67c4e
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
Signed-off-by: Piryns Victor (pivi) <pivi@odoo.com>
2022-10-19 18:06:53 +02:00
tsm-odoo 7277275d06 [FIX] bus: restore current partner in pyEnv
Since [1], `pyEnv.currentPartner` has been removed. This was
a mistake since this information is still used during tests.

This PR restores it.

[1]: https://github.com/odoo/odoo/pull/98374

closes odoo/odoo#103544

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-10-19 18:06:50 +02:00
maximilien(malb) c3638cef9b [FIX] l10n_de_*: datev codes
Change datev codes in l10n_de_skr03 and 04 for some lines and allow 4 digit codes.

closes odoo/odoo#103533

Doc: https://apps.datev.de/help-center/documents/0907043
Task-id: 2977383
X-original-commit: 32931d0efdff5245d71d633682615ba1bdc74326
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Maximilien La Barre (malb) <malb@odoo.com>
2022-10-19 16:09:55 +02:00
Jacky (trj) 2b4a060b96 [FIX] point_of_sale: hidden product search bar
The search bar could be hidden when there was no categories in the PoS. This
was due to the new design where the search bar has been moved to the categories bar.

closes odoo/odoo#103514

X-original-commit: eadaa267c689415eeaacaeba23c663b95a1d12d2
Signed-off-by: Heinz Robin (rhe) <rhe@odoo.com>
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
2022-10-19 15:12:49 +02:00
Stéphane Bidoul 8e040df274 [IMP] core: add odoo.__main__
This allows launching Odoo with "python -m odoo".

This manner of launching python applications is now widespread.
In particular it makes it easier to configure an IDE debugger to run with the correct python version.

closes odoo/odoo#81864

Signed-off-by: Vincent Schippefilt (vsc) <vsc@odoo.com>
2022-10-19 15:12:44 +02:00
Thomas Lefebvre (thle) 16219df38e [FIX] account: overwrite journal accounts of a payment
Steps to reproduce:
	- create two journals, A and B, which have the default accounts defined in the payment method manual in "outstanding receipts accounts".
    - create a payment with a journal A;
    - duplicate the draft of the payment (because it is not possible to change a journal if it was posted before);
    - select the journal B and save (or confirm)
    - The journal is changed, but the default journal B accounts are not applied.

Issue:
   Despite the payment is in draft and has not been posted before, move_line accounts do not change with the journal selected for the move.

Cause:
   When a payment is duplicate, records are save in the database.
   Modify the journal en then save will trigger the write method of the payment model (and not the create).
   During this method, we begin to find the move lines which correspond to liquidity, counterpart and writeoff lines.
   Unfortunately, the line corresponding to the old journal will be detected as a writeoff and not as a liquidity line (because the journal has changed).
   This fault will cause a balance error in the rest of the procedure.

Solution:
	Take into account the case where writeoffs are detected when there is no liquidity line (and no counterpart line).
	In this case, force the no writeoff line.
	Generate the correct ORM commands taking in consideration if the line exist (1: update) or not (0: create).

opw-2998031

closes odoo/odoo#103496

X-original-commit: cf277b2685a72e0a8ca44c4a59331136a722fbed
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Lefebvre Thomas (thle) <thle@odoo.com>
2022-10-19 13:11:50 +02:00
Joseph CaburnayandBruno Boi 390955b751 [FIX] web: fix traceback when shift-tab on list field
**Before**

A traceback is raised when pressing shift-tab on the first column of
the first row in a focused list field as shown in the vid:
https://youtu.be/g97ZTp1QdBE

**After**

shift-tab on the first column of first row will now unselect the list field
and immediately focuses on the previous field.

**Additional change**

We now allow skipping focus on the dropdown toggler by introducing new
props.

closes odoo/odoo#103485

X-original-commit: 9ba9977e42d201035b5299bc13ba03211cddbc1f
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Co-authored-by: Bruno Boi <boi@odoo.com>
2022-10-19 12:10:41 +02:00
Aurélien Warnon 8a2a171aa4 [FIX] core: remove 'firebase_admin' warning ignore line
Followup of: odoo/enterprise@b58637f1ab

That completely removed the firebase_admin library support, making this warning
ignore line not necessary.

Task-3000338

closes odoo/odoo#103474

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-10-19 11:11:56 +02:00
Mathieu Duckerts-Antoine 8c2ec7b4de [REF] web: remove PieChart
Now that the module web_dashboard has been removed https://github.com/odoo/enterprise/pull/31641,
the component PieChart is unused. We remove it.

closes odoo/odoo#102761

X-original-commit: 3e92c60034cedcd999572bb7e93c8b05ca07be70
Related: odoo/enterprise#32573
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
2022-10-19 11:11:53 +02:00
Mathieu Duckerts-Antoine dcb0498ab8 [REF] web: remove unused props in reporting views
Now that the module web_dashboard has been removed https://github.com/odoo/enterprise/pull/31641,
some props of the reporting views graph and pivot have become unused.
We remove the code related to those props.

X-original-commit: 7d231d1d37707dab4b0ecdd4e2e7cc4535ba6196
Part-of: odoo/odoo#102761
2022-10-19 11:11:53 +02:00
Mathieu Duckerts-Antoine 9f4130bd57 [FIX] web: kanban, list: no search model in env
When a x2many record is opened in a X2ManyFieldDialog, it can happen
that the form renderer displayed in the dialog also contains a x2many
that use a kanban or list renderer. In those cases, the View component
is not used. Consequently, the WithSearch component responsible for
making available a search model in the env is not used either so that
a crash occurs at the setup of the kanban renderer (and sometimes later
on for the list renderer). We fix that problem.

closes odoo/odoo#103349

X-original-commit: 2c284317b6dc3c0f0b4e9e376dcee755d81222da
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
2022-10-19 10:14:55 +02:00
Victor Piryns (pivi) 55b04db229 [FIX] l10n_id_efaktur: add kode_transaksi when generating POS invoice
Current behaviour:
When an indonesian customer buys from the POS and generates an invoice,
we get an error of missing kode_transaksi of the customer,
even tough it it correctly set on the invoice details of the contact.

Expected behaviour:
Every indonesian contact with correctly setup up invoice details,
should be able to checkout from POS and generate an invoice without
problems.

Steps to reproduce:
- Install indonesian accounting localisation, the efaktur module, POS and Contacts
- Switch to the Indonesian company
- Create a new Contact, add a VAT, check ID PKP,
and in Invoicing fill the whole "Indonesian Taxes" section
- Add a valid invoice range in the e-fakture general settings
- Setup a POS Session if non is present, it's irrelevant, start a new session
- Try to buy something with the new contact as customer, and generate a new invoice at checkout.
- You should have a pop-up error about the "Kode Transaksi" missing.

Reason for the problem:
The `l10n_id_kode_transaksi` field is not present in the values used
when generating the moves for the invoice.

Fix:
Add a compute that fetches the kode_transaksi from the partner_id linked
to the move.

In the meantime, we needed to inverse the readonly states logic (keeping
the same behaviour) in order to avoid the compute being triggered in the
constraint.

Affected versions:
- 14.0
- 15.0
- saas-15.2
- saas-15.3
- 16.0
- master

opw-2993838

closes odoo/odoo#103457

X-original-commit: cfa43a9ccba225c84972a5d5f9443d9997bd7b31
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Piryns Victor (pivi) <pivi@odoo.com>
2022-10-19 09:10:40 +02:00
Thomas Lefebvre (thle) b4f9086bff [FIX] web: correctly append attribute expressions
Steps to reproduce:
    - install "Peru - Accounting" module (l10n_pe module);
	- try to open a contact form.

Issue:
    An error message appears with an impossibility of access to the form.

Cause:
    The function that concatenates the different attributes should not take into account the "{{ ... }}" tags already put in before.

    Example:
    When appending `scope && scope.className || ""` to `{{props.record.isInEdition ? 'o_form_editable' : 'o_form_readonly'}} d-block {{ props.record.isDirty ? 'o_form_dirty' : !props.record.isVirtual ? 'o_form_saved' : '' }}`;
    This is generated:
    `{{{{props.record.isInEdition ? 'o_form_editable' : 'o_form_readonly'}} d-block {{ props.record.isDirty ? 'o_form_dirty' : !props.record.isVirtual ? 'o_form_saved' : '' }} scope && scope.className || "" }}`
    instead of:
    `{{props.record.isInEdition ? 'o_form_editable' : 'o_form_readonly'}} d-block {{ props.record.isDirty ? 'o_form_dirty' : !props.record.isVirtual ? 'o_form_saved' : '' }} {{scope && scope.className || "" }}`

opw-3018917

closes odoo/odoo#103460

X-original-commit: 846d3b3c67e8ef46ecb29c5d72d895b2b852fc10
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Lefebvre Thomas (thle) <thle@odoo.com>
2022-10-19 07:21:55 +02:00
Joseph Caburnay fd8633e345 [FIX] web: properly resequence newly created kanban column
**Issue:** https://watch.screencastify.com/v/5ewbfVCuC0cAyVil9hqW

**Solution:**

We always reorder all the records when one of the records don't have
`sequence` (handleField) information.

closes odoo/odoo#103459

X-original-commit: 2dededb2cea3b9f60a7bd27c282ec7b5db9456a0
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2022-10-18 23:08:59 +02:00
william-andre 57e8201768 [FIX] account: general performances
* The default order of `account.move.line` includes the `sequence` since
  080d41a341
  This field was not indexed and was leading to poor performances when
  opening the list view of journal items or when searching without
  overriding the order.
* A typo in `_get_invalid_statement_ids` was leading to recomputing all
  the validity of all statements when we only needed to compute a few
* Domains on `account.move.line` often include filters on related
  fields, including the accounts' and payments' types. This can lead to
  multiple sub queries that are repeating the same thing.

closes odoo/odoo#103466

X-original-commit: 99d7d0a7b875ffb1e5ce00cd7f3fc2c9e0359796
Related: odoo/enterprise#32908
Signed-off-by: Josse Colpaert <jco@odoo.com>
2022-10-18 21:48:02 +02:00
Xavier BOL (xbo) d8fecf4c1c [FIX] project: manage true and false domain for project sharing
Before this commit, when the domain used in `read_group` and `search` to
check if the portal user can access to the fields used in the domain
does not take into account the `TRUE_LEAF` (that is, `(1, '=', 1)`) and
`FALSE_LEAF` (that is, `(0, '=', 1)`). In other words, when the
`TRUE_LEAF` or `FALSE_LEAF` is in the domain, an access error is raised
saying the field name `1` or `0` cannot be accessible by the portal user.

This commit allows to add `TRUE_LEAF` and `FALSE_LEAF` in the domain to
avoid having an access error because of that.

close #103214

closes odoo/odoo#103465

X-original-commit: 953033e1ab20a01918dae7ca495654cddef14af3
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Signed-off-by: Xavier <xbo@odoo.com>
2022-10-18 20:49:26 +02:00
Adam Heinz 3772a25920 [FIX] mail: Failed to load resource ting.mp3
closes odoo/odoo#103464

X-original-commit: 3d5a2b559fe6efd1d8c6e1f07c7f56502e7efc5e
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-10-18 20:49:23 +02:00
Stanislas Gueniffey 683f37de27 [FIX] mail: add missing component in form_renderer
WebClientViewAttachmentViewContainer was missing in the FormRenderer components
This prevented opening account.payment lines from the Batch Content tab of Batch Payments

closes odoo/odoo#103450

X-original-commit: 2d58c5bf8679cffd4d0ad33782f47962b72cc3cd
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-10-18 18:58:40 +02:00
Victor Feyens d0764b51a2 [FIX] payment: tests requiring account_payment
Skip the payment_asiapay test verifying the reference computation
with an invoice when account_payment is not installed.

Also add a dedicated helper, using the variable in payment already storing
whether the account_payment module is installed.

closes odoo/odoo#103449

X-original-commit: f1fd1c9e484025782079fc18c152269aa1723ed5
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-10-18 18:58:37 +02:00
Julien Van Roy 899260fa06 [IMP] l10n_account_edi_ubl_cii_tests: improve factur-x testing
Add tests to check Factur-X for a non FR/DE company (a US company here).
This US company should be able to import a Factur-X pdf and when printing
a PDF, a Factur-X should also be contained in the PDF.

closes odoo/odoo#103448

X-original-commit: 99bc6c7813df03c6d2c3ba22d37634c7debe2b36
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Julien Van Roy <juvr@odoo.com>
2022-10-18 18:58:35 +02:00
Aaron Bohy 89edbad901 [REF] web: move legacy menu.js to frontend assets
This file is only necessary for the website.

closes odoo/odoo#102606

X-original-commit: 71584d7846dc76d8cbe0f19c283ccc7711e157a9
Signed-off-by: Géry Debongnie <ged@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-10-18 18:05:01 +02:00
Aaron Bohy 5da13e1d5a [REF] web: remove legacy fields/widgets compatibility layer
This commit removes the code that wrapped legacy fields and widgets
(coming from the legacy registries) into owl components and added
them to the wowl registries. This temporary compatibility layer,
which was incomplete and only allowed us to merge the new views
without converting all fields/widgets in once without breaking
everything, is no longer necessary as we now have converted all of
them into owl components.

X-original-commit: 555959c87e25faa71396f61479e8bb41b66ac164
Part-of: odoo/odoo#102606
2022-10-18 18:05:01 +02:00
Aaron Bohy 651ddf69f1 [REF] web: FormViewDialog: no longer support legacy js_class
Now that all views are converted to owl, that compatibility layer
is not needed anymore.

X-original-commit: 736572b5ae7692e0fe4b61f3331317ff1be16e8f
Part-of: odoo/odoo#102606
2022-10-18 18:05:01 +02:00
aliya df42baa553 [FIX] account: fix exchange difference currency in the invoice widget
Suppose there is an invoice is issued in a foreign currency, but the statement line only has an amount in the company's currency and the `amount_foreign_currency` is empty. In this case, the exchange difference currency matches the invoice and `amount_foreign_currency` is 0,00, which is shown between the brackets in the pop-up.

Brackets should not be shown if the `amount_foreign_currency` is 0. The exchange difference currency should match company currency.

closes odoo/odoo#103433

X-original-commit: 8afccc41592d88125ab0f2678399086f83ab308d
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Aliya Tastemirova (alta) <alta@odoo.com>
2022-10-18 17:12:10 +02:00
Louis Wicket (wil) eb24659182 [FIX] mail: fix unstar button title
The toggle star action view currently does not take into account the
starred state of the message, returning "Mark as Todo" unconditionally
as a title for the button.

This commit adds a check for the starred state to return an appropriate
title if the message is already starred.

closes odoo/odoo#103432

X-original-commit: b77660850bb0dbf4fad2a52d931e230f4acde975
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
2022-10-18 17:12:07 +02:00
fdardenne 5ba91f1d69 [FIX] web: checkbox: deactivate onChange when disabled
Before, even if the checkbox is deactivated, clicking on it
cause an `onChange`.
This caused unexpected behavior, the form view changed to a dirty
mode even if the checkbox was in read-only mode and nothing
was modified.

Now, the checkbox does not call `onChange` when deactivated.

closes odoo/odoo#103429

X-original-commit: 4802c2528cfa23c5981fa30fa69cfa23f28faf05
Signed-off-by: Luca Vitali <luvi@odoo.com>
2022-10-18 17:12:04 +02:00
Benjamin Vrayandqsm-odoo 3c7467f31a [FIX] website: fix link anchor option
Before this commit, the "page anchor" option of the link editor did not
work in Website. Choosing an anchor did not update the link in the DOM.

task-2900529

closes odoo/odoo#103366

X-original-commit: b24b87a688bafac459bdc6ea698378189a1bf071
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
2022-10-18 17:11:59 +02:00
William Henrotin c9ed5212d7 [FIX] stock_picking_batch: ensure the wave has a picking_type
If a stock picking wave is created from move lines. It may happen no
picking type is set on the wave. If an entire stock move or an entire
picking represented by the move lines 'to wave'. a picking type is
correctly set.

This commit ensure a picking type is set directly from the move lines

closes odoo/odoo#103348

X-original-commit: 86a1f2219904a19166155555da873b1772efa620
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2022-10-18 17:11:56 +02:00
Romeo Fragomeli 0e12bcb3da [FIX] web: typo in MEDIAS_BREAKPOINTS
In commit, odoo/odoo@3c10fcadee
a typo was introduced in the `minWidth` (`769` instead of `768`).
This typo was resulting in a strange behaviour in the webclient when the
width of the viewport was `768px`.

Step to reproduce:
* Open Odoo
* Go to a form view (e.g. Sales -> Select a record)
* Set the size of the viewport to 767
* Set the size of the viewport to 768 => BUG nothing happens
* Set the size of the viewport to 769 => BUG redraw but to late, CSS
  already change due to its media break point rules when it was at 768.

Ref:
https://getbootstrap.com/docs/5.1/layout/breakpoints/

closes odoo/odoo#103397

X-original-commit: 82d8348d3d5a05e065a07af1924de579cbec3a35
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Signed-off-by: Romeo Fragomeli (rfr) <rfr@odoo.com>
2022-10-18 14:15:13 +02:00
Lucas Perais f489eb9226 [FIX] account: adapt account_move form arch to form view grid
Before this commit, when creating a new account move, there were spaces at the
beginning of both left and right form inner groups. This was due to the new form grid
in which each element declared as child of the inner group will be a cell.

After this commit, the account move form view is correct.

closes odoo/odoo#103396

X-original-commit: d3fee87e5bb1966e32e366a8b1bf480601b5d76c
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-10-18 14:15:10 +02:00
maximilien(malb) 5052e0599a [FIX] account_test: some view improvements
With the recent css change the view had some problem:
* the new grid system made the text in a smaller cell with a scrollbar, the colspan allow to deal with that
* The text on the code help section could go out of the page, by adding a div and the style it will not happen again

closes odoo/odoo#103395

X-original-commit: 209f90a098b03cb5c1eeb7644b09cf13f87f6cf0
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: Maximilien La Barre (malb) <malb@odoo.com>
2022-10-18 14:15:08 +02:00
maximilien(malb) 0c3bde91dd [FIX] account: fix label on account tax
The label for the two list views was displayed behind them, the margin  bottom allows to put the list view below.

closes odoo/odoo#103394

X-original-commit: 41d97d8ffaba938555f90cbf2f9ffc2de1881e10
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: Maximilien La Barre (malb) <malb@odoo.com>
2022-10-18 14:15:05 +02:00
yhu-odoo 19b653f784 [FIX] mrp_subcontracting: prevent open on portal
When click action_show_details button on portal, the field product_id
and product_qty are clickable. Fix it

closes odoo/odoo#103346

X-original-commit: 717d501cbf7e321124ddbe9d9061221ea97787b5
Signed-off-by: Tiffany Chang <tic@odoo.com>
2022-10-18 14:15:02 +02:00
Ignacio Cainelli 5197f37e55 [IMP] l10n_ar: data of amortizations
In this commit, we add data of amortizations accounts and correct the
accumulated amortization accounts (now they are of the fixed asset
type) to be consistent with the Argentine chart of accounts.

For each accumulated amortization account we have an expense type
amortization account.

closes odoo/odoo#103386

X-original-commit: 05a8eddebea35c29c2c41163d366d88c96158395
Signed-off-by: Josse Colpaert <jco@odoo.com>
2022-10-18 13:17:34 +02:00
Thibault Delavallée 29c0b49fd1 [FIX] mail: be defensive when trying to parse res_id from redirect controller
When having falsy values, we may end up with 'False' as a string. Better be
defensive when trying to parse res_id.

Task-3025143

closes odoo/odoo#102576

closes odoo/odoo#103378

X-original-commit: ac8d97262d196c7bb4c4fc15db63cc66512be838
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-10-18 13:17:31 +02:00
Thibault DelavalléeandKrzysztof Magusiak <kmagusiak> 28ed4eddea [FIX] portal: check model is valid when entering mail redirect controller
When mail_action_view() calls this function, the model may not be a valid
one or even be missing. So we check if the model exists before checking its
type.

We also correctly add kwargs parameters propagation.

Add tests.

Task-3025143

X-original-commit: b5d9f42ddc2dfde21714544add72023004069815
Part-of: odoo/odoo#103378
Co-authored-by: Krzysztof Magusiak <kmagusiak>
2022-10-18 13:17:31 +02:00
Pallavi Savaliya 78703dd803 [FIX] sale_project: fix the tooltip for service_tracking type
Before this commit, tooltip for service_tracking type is mismatch
with task_in_project and project_only.

So in this commit, fixes the tooltip of product in 'task_in_project' and
'project_only' fields.

task-2891983

closes odoo/odoo#103374

X-original-commit: c78a785ad7080b53a9b1e15fc113c57169f526d8
Signed-off-by: Xavier <xbo@odoo.com>
2022-10-18 13:17:28 +02:00
Lucas Perais 152be24c17 [FIX] web: RelationalModel: pass view's context down to evalContext
Have some keys in the context passed to a view.
Have a many2x field in that view that uses those keys in its domain
with some flavor of:

```xml
<tree>
    <field name="many2one" domain="[['someField', '=', context.get('some_key')]]" />
</tree>
```

Before this commit, the global context was not added to the evalContext used to evaluate the domain.

After this commit, it is.

closes odoo/odoo#103370

X-original-commit: 93c5e6cbc06bdb6ab2cfc959b68be8088837e1de
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2022-10-18 13:17:25 +02:00
Lucas Perais 2a3bd05bac [FIX] web: form settings: keep scroll position per module app
Have more than one Odoo module installed. Go to the Settings.
Scroll the first page.
Change the app in the sidebar.

Before this commit, the scroll position was the same for all modules (or apps, same thing).
It is not wrong per se, but when changing app, there is no reason that the scroll position of the former
is somehow correct business-wise.

After this commit, the scroll position is stored and restored on a per-app basis.

closes odoo/odoo#103369

X-original-commit: 01b16c392b888ceaccc8b0c95da142dbb90517ef
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2022-10-18 13:17:22 +02:00
Lucas Perais 9390319b79 [FIX] web: settings form view should not autofocus its field
Have a simple char field somewhere in res.config.settings.

Before this commit, when arriving on the settings form view, the settings page
was scrolled. This was because the standard FromRenderer has and used its autofocus feature,
thus focusing the first text field present in the view.
After that, the Settings form view gave the focus back to its search view input.

After this commit, the FormRenderer's autofocus feature is deactivated.

X-original-commit: 2c67b1dbe15d2cb77ee0b50514a4b9d41a006114
Part-of: odoo/odoo#103369
2022-10-18 13:17:22 +02:00
Rémi Rahir e4bf9126c8 [FIX] spreadsheet: wait for async functions in Excel download
Task 3002547

closes odoo/odoo#103368

X-original-commit: ae5fdcc963529573e5dace497ab2ff6f8b365eea
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2022-10-18 13:17:19 +02:00
Walid HANNICHE (waha) 6c903ddf53 [FIX] point_of_sale: group split taxes on product info
Steps to reproduce;
Create a tax with two accounts that take 50% each.

Bug:
In the info tab on the pos of a product with the tax
the tax will show as two lines.

Fix:
group taxes with the same id

opw-3006360

closes odoo/odoo#103365

X-original-commit: 860103130fd5de880d9b179f5e1218107f4be0de
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
2022-10-18 13:17:16 +02:00
tsm-odoo f9e7a34ef7 [IMP] mail: remove owl bus on/off
These are deprecated since Owl 2, and lead to memory leak in the
compatibility layer. This PR removes the last ones in the mail code.

task-2877316

closes odoo/odoo#103301

Related: odoo/enterprise#32842
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-10-18 13:17:11 +02:00
Lucas Perais 62526a3546 [FIX] web: discarding an existing record in form view action target new.
Do an action in target new that will spawn a record in its form view.
The typical example is "Edit View: XXX" in the debug systray.

On the dialog, click on "Discard".

Before this commit, that button did not close the dialog.

After this commit, that "Discard" button closes the dialog.

closes odoo/odoo#103275

X-original-commit: 08751e0eef0cefe74e626ffa8ba26a5e8f18113f
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2022-10-18 13:17:06 +02:00
Lucas Perais 4c224159b9 [FIX] web: basicRelationalModel trigger_up reload
Before this commit, the basicRelationalModel could not handle the legacy
event "reload" trigger by the basicModel., resulting in crashes.

In particular, when the method "action_archived", via the method `record.archive()` returns an action
(in target new usually) to confirm or ask the user for some additional information, closing that modal
will trigger a model reload via the event.

After this commit, this whole flow is tested and works correctly.

closes odoo/odoo#102826

X-original-commit: 0abb90fb2aa7857990b5f5dae95e9e891125b5fa
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2022-10-18 13:17:00 +02:00
Lucas Perais bf053ecef9 [FIX] sale_stock: re-introduce qtyAtDate legacy Widget.
This widget may be used in some arch only handled by legacy code.
We reintroduce it to prevent crashes.

closes odoo/odoo#102748

X-original-commit: dfe98cff11a723627d46a6619223b6a41a5243fc
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2022-10-18 13:16:57 +02:00
Alexis Lacroix 7a23c27e85 [IMP] base: add banner_route to graph view attributes
odoo task id 2985113

closes odoo/odoo#102397

Related: odoo/enterprise#32382
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2022-10-18 13:16:39 +02:00