Commit Graph
157597 Commits
Author SHA1 Message Date
Renaud Thiry 9828ce96d0 [FIX] web: handle falsy m2m_tags
Before this change, if a user left a string value in a m2m_tags
and removed it afterward without selecting a tag, the update method
of Many2XAutoComplete would be called with false.

As the update method for m2m_tags expects a record or record list
this caused a traceback.

The fix is to simply skip the update in that case.

task-3109811

closes odoo/odoo#110123

X-original-commit: 14f314feb7594dc888de6af4e4ad23a948044854
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2023-01-17 14:16:47 +01:00
Jorge Pinna Puissant e54d00f832 [FIX] web: kanban: concurrency issue with animated numbers
Before this commit, in the kanban view, if we click the progress bar to
filter the column multiple times, the count of records number's could
show an incorrect value. This occurs because when removing the filter
from the progress bar, an animation is done to the number (to increase
the value until the correct number of records). Contrariwise, when
activating a filter, the number of records is set directly without
animation. When we remove and add again a filter quickly, the animation
to increase the value of the number finishes when the filter is already
apply and the value shown is the old count of records (without the
filter).

To avoid this, in this commit, we stop the animation when the count of
record changes.

Unfortunately, testing this is very complicated (because it involves
animation frames and Date.now()), and as the cost/reward ratio is very
low, we didn't add a test of this behaviour.

closes odoo/odoo#110121

X-original-commit: 4c8bb53df6ad6382c5b168532c8493ddbb1f7252
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-01-17 14:16:45 +01:00
gawa-odoo 4f9a5a73f4 [FIX] account_report: change formula's update of expression
How to reproduce:
- Have a report line with a custom creation with a 'balance' label
- Replace the expression by an `account_code_formula` in the xml
=> The 'balance' expression does not exist anymore in the xml,
so the ORM removes it, and a new one is not created.

We changed the update so only 'balance' label expressions are changed:
- if we have an expression with an xml_id, we remove the expression and
recreate a new one.
- if we don't (custom created or coming already from a formula shortcut),
we just update its values.
We also created a way to remove a formula shortcut (making it falsy will
unlink the expression that was linked to it)

closes odoo/odoo#110119

X-original-commit: d01a7b76bee4471444eeedacc05bd52fe9c0399c
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Signed-off-by: Wala Gauthier (gawa) <gawa@odoo.com>
2023-01-17 14:16:42 +01:00
Jeremy Kersten e2c082717b [FIX] website_slides: fix qweb template slide_content_detailed
odoo.addons.base.models.ir_qweb.QWebException: Error while render the template

closes odoo/odoo#110117

Attributeerror: 'slide.channel' object has no attribute 'can_access_channel'
Template: website_slides.slide_content_detailed
Path: /t/div[6]/div/div[2]/t[3]/t[2]
Node: <t t-if='not slide.channel_id.can_comment and slide.channel_id.can_access_channel'/>
X-original-commit: 1ca26014a32a8aca528a4769451b7f7cf5f61b1a
Signed-off-by: Jérémy Kersten <jke@odoo.com>
2023-01-17 14:16:39 +01:00
niyasraphy 324913beea [FIX] payment: readonly/invisible fields when provider is not installed
before this commit, from the payment providers menu, even though the provider is not installed in the database, the company, website and image fields are editable for the users.

after this commit, the fields will be editable/visible only after the provider is installed in the db.

publish/unpublish button will be shown only when provider is installed.

closes odoo/odoo#110114

X-original-commit: e910dee3ce4b526aa956ad489e83442b3a425c36
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2023-01-17 14:16:36 +01:00
Rémi Rahir 3e7bdd40fa [FIX] spreadsheet: Catch access errors on spreadsheet
Currently, a user opening a spreadsheet containing pivots/lists/graphs
that they don't have the rights to access (be it because of the parent
model or the domain applied) will end up in an infinite loop.

While starting the datasources, the fetch step will throw, potentially
spamming the user with access errors.

Manual forward port of https://github.com/odoo/enterprise/pull/35146

Task 3107650

closes odoo/odoo#110113

X-original-commit: 1555e79be0b52c30df43e8de50f5db56fbbda630
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
2023-01-17 14:16:34 +01:00
fdardenne e554f5688c [FIX] web: list view: make the scrollbar above the thead in safari
Since odoo/odoo#107631, in Safari (version tested 15.6.1),
the scrollbar stayed below the list view thead and thus looked glitchy.

Now, the scrollbar stays above the sticky thead. The fix applied is
documented in this stackoverflow thread
The fix applied is described in this stackoverflow thread:
https://stackoverflow.com/questions/20832531/mobile-safari-positionfixed-z-index-glitch-when-scrolling

closes odoo/odoo#109773

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-01-17 14:16:25 +01:00
bat-odoo 662eed1f3d [IMP] l10n_in_edi_ewaybill: fix JSON value for Transportation Mode
Currently, when we select Transportation Mode with Rail, Air or Ship and try
to generate an e-waybill the system raises an error. because of using the wrong fields.

Also made some improvements:
- updated error message
- updated timeout params for jsonrpc because, in the test server, it takes around 61 seconds so we set timeout to 70 seconds.
- filter E-waybill Document Type based on the invoice type

closes odoo/odoo#110111

X-original-commit: d6e40019c137dc353ecaa4785f91d6afa4cf954d
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Bhavin Patel (bat) <bat@odoo.com>
2023-01-17 12:59:05 +01:00
bat-odoo 6816335f8c [IMP] l10n_in_edi: check partner country code for overseas customer
In this commit, before updating the JSON value we check the partner country code
for overseas customers.

X-original-commit: 875d5959d502ad8f761a034aef1dc5b568802f25
Part-of: odoo/odoo#110111
2023-01-17 12:59:05 +01:00
Samuel Degueldre 76a44b29f5 [FIX] web: improve performance in list views with date/datetime fields
When rendering the list view, we evaluate the evalContext for each field
so that we can give it infos such as readonly, required, invalid or
empty. In doing so, date and datetime feels are serialized and added to
the evalContext, but serializing dates can be slow, especially when not
using the default English locale. Internally, luxon checks whether the
locale is English which instantiates an Intl object which can be slow
and this is compounded by the fact that the method is called hundreds of
time in a single render.

This commit caches serialized dates and datetimes in a WeakMap, as the
luxon Date objects are immutable, this is safe, and because these
objects are not recreated often, it also eliminates a lot of the calls
to luxon's toFormat. In the quotation list view, this brings the render
time from ~1100ms to ~270ms. While this is still slow and further work
will be undertaken to make the evalContext lazy (so that only
date/datetimes which are actually used are serialized), it is a good
first step and brings the performance back to a level where the list
view is reasonably usable.

closes odoo/odoo#110103

X-original-commit: 64eeeef4d3d93a9b2753520e0067aa7996988d4c
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-01-17 12:58:59 +01:00
John Laterre (jol) 3330215c4d [FIX] account: add uom category constraint
Steps to reproduce:
- Create an invoice with a product.
- Confirm it.
- Go to the product and select a UoM of another UoM category.

Issue:
Traceback

Cause:
https://github.com/odoo/odoo/blob/51ead4b2d52e0faec2065b475dac7f376328c425/addons/uom/models/uom_uom.py#L155-L159

Solution:
Add a constraint to prevent the user from changing the UoM category
of a product if it is used in a posted invoice.

At the same time, a similar constraint is added on `account.move.line`
to make sure the line's uom remains consistent with its product.

opw-3039419

closes odoo/odoo#110102

X-original-commit: aeb798d01aafee5fcaa8614f7e2b39a380d0b6ce
Related: odoo/enterprise#35887
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: John Laterre (jol) <jol@odoo.com>
2023-01-17 12:58:56 +01:00
Thomas Carlier(thc) ac8c6736fc [FIX] project_timesheet_holidays: Fix traceback when no timesheet_task_id is found.
-steps to reproduce:
 do a search in project.task on is_timeoff_task when no
 timesheet_task_id is defined on any hr.leave_type.
 This will trigger the _search_is_timeoff_task method

-before this commit:
 crash when no leave_type with timesheet_task_id is found

-after this commit:
 creation of an empty list as expected

opw-3086486

closes odoo/odoo#110091

X-original-commit: b98949b1cb85514ee5a56ff1a5860591c10b0994
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-01-17 12:58:48 +01:00
mehjabin aa1d5ca617 [FIX] base: make action name translatable
before this commit, the action name was not translatable to user language.

after this commit, action name will be shown in user's language.

closes odoo/odoo#110090

X-original-commit: 98fdef318968ae0ee81532c691ca5b372975d486
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-01-17 11:34:35 +01:00
David Monjoie f6c7c1e655 [FIX] mass_mailing: always use the link dialog with the basic template
The basic "Plain Text" template does not have the sidebar and
therefore cannot use the link tools that are in it and must use
the link dialog instead.

Task-3128388
Task-2889670

closes odoo/odoo#110089

X-original-commit: 399e5919c18145371791092868839a5ef11209a2
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-01-17 11:34:32 +01:00
David Monjoie 462f2517f6 [REV] mass_mailing: revert automatically open linktools when clicking a link
This behavior only made sense with [1] applying in all cases, but
since it was wrong to begin with (because of the "Plain Text"
template) and was reverted in the previous commit of this PR, then
the behavior does not make sense anymore, as the dialog would open
as soon as the user clicks on the link.

This reverts commit aaf70d3692.

Task-3128388
Task-2889670

[1] https://github.com/odoo/odoo/commit/61f7366d686b353ae9614285370e952253ec067c

X-original-commit: 33e5dcdb41ae2d4bb2a47ea3fd92f522b09b53e8
Part-of: odoo/odoo#110089
2023-01-17 11:34:32 +01:00
David Monjoie cb69c04233 [REV] mass_mailing: revert do not open link dialog with Powerbox
Since [1], the /link and /button commands did not open in the dialog
anymore and used the sidebar instead. This was wrong for the "Plain
Text" template which does not use the sidebar, and was otherwise
confusing as the main effect of the command would be to focus in the
sidebar.

Task-3128388
Task-2889670

[1] https://github.com/odoo/odoo/commit/61f7366d686b353ae9614285370e952253ec067c

X-original-commit: 44c9be11f1bc5451adc76a69862e7e513c2d9bba
Part-of: odoo/odoo#110089
2023-01-17 11:34:32 +01:00
abd-msyukyu-odooandAntoine Guenet a817a865c3 [FIX] web_editor,knowledge: suspend wysiwyg onBlur with dialogs
Sometimes, there is a crash when uploading a file when loading an article for
the first time.

Impacted versions:
16.0+

How to reproduce:
- open the odoo home page (module menu) and CTRL+f5 (force reload)
- go to the knowledge app
- in an article, put the cursor somewhere and type ENTER to create a new line
- type the /file command in that line
- try to upload a file
- traceback (if it does not happen, try again from the first step, it is not
  always consistent)

Fix:
Delay the _onBlur handling of the wysiwig when using the modal. The Blur event
may occur and may trigger an update on the html_field, which may in turn induce
a rerendering of the component and its value.
We don't want this to occur when using the modal, because the selection was
registered by the modal to restore it when the modal closes (`preserveCursor`).

If the contents of the html_field are updated, then the stored position used to
restore the selection won't be in the DOM anymore, and the restoration will
fail. As such when we try to insert the Knowledge file block, the selection is
not in the editor and the method fails.

Task-2889670
Task-3128388
Task-3086694

X-original-commit: 2591d343793f59e2e70e7ffe8fa666661995348f
Part-of: odoo/odoo#110089
Co-authored-by: Antoine Guenet <age@odoo.com>
2023-01-17 11:34:32 +01:00
Dmytro Lazariev 67328ebd39 [FIX] web_editor: fix missing allow_command_image XML option
Both `allow_command_video` and `allow_command_image` options are supported by the
editor, but only `allow_command_video` was being sourced from the XML of the view.

This works:
<field name="body" widget="html" options="{'allow_command_video: false}"/>

But this didn't work without this commit:
<field name="body" widget="html" options="{'allow_command_image': false}"/>

It looks like that particular option was simply forgotten. This commit rectifies that.

Impacted version:

 - 16.0
---
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

closes odoo/odoo#110088

X-original-commit: c81c5918e6ba2f263e173b27978194de1f71f1db
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-01-17 11:34:27 +01:00
Martin Trigaux eaa39012ba [FIX] base: allow calling install_lang in RPC
This method is used in Transifex synchronisation scripts and needs to
be called in RPC.
It was the case before 727ef9e0a2ca9308

closes odoo/odoo#110087

X-original-commit: 3b7e4535d358e554f7b089828efb82bc6b0a40e3
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-01-17 11:34:25 +01:00
Nasreddin Boulif (bon) 27fe31c317 [IMP] website_sale: extract order line update processes to ease override
In order to be able to do a pre or post processing on the order line
updates, we extract the code to a dedicated method.

i.e.: will be used in this PR: https://github.com/odoo/enterprise/pull/35689

opw-3099515

closes odoo/odoo#110082

X-original-commit: 7129806a9aad0ea87e0e73b9322b56006caed202
Related: odoo/enterprise#35879
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2023-01-17 11:34:18 +01:00
Andrea Grazioso (agr-odoo) bb9c08d443 [FIX] account: extra payment lines with payment term discount
In Settings>Accounting set 'Cash Discount Tax Reduction' to 'On early
payment'
Have a payment term 'D' with 10% discount if paid in a few days
Have a fixed tax 'F' (0.04) and a percent tax 'P' (21%)
Create an invoice with paymen term 'D'
Have an invoice line with price unit of 100$, taxes 'P' and 'F'
Post invoice and register payment (with discount)

Issue: Due to the fixed tax extra lines are created in the
journal entry of the payment
Example:

| N |       Account       | Taxes | Debit | Credit |
|---|---------------------|-------|-------|--------|
| 1 |Outstanding Receipts |       | 108.94|    0.00|
| 2 |Account Receivable   |       |   0.00|  121.04|
| 3 |Cash Discount Loss   |    F,P|   10.0|    0.00|
| 4 |Bank Suspense Account|       |   0.00|    0.04|
| 5 |Cash Discount Loss   |       |   2.10|    0.00|
| 6 |Cash Discount Loss   |       |   0.04|    0.00|

Because F is taken into account in line 3, line 6 is created, but it
should not be the case

opw-3119894

closes odoo/odoo#110078

X-original-commit: 4a5e696bc4507a2e6e4c03c694c4ec7e636805d7
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
2023-01-17 11:34:16 +01:00
Andrea Grazioso (agr-odoo) 772a2ba023 [FIX] account: payment term discount affecting fixed tax
In Settings>Accounting set 'Cash Discount Tax Reduction' to 'Always'
Have a payment term 'D' with discount
Have a fixed tax 'F'
Create an invoice with paymen term 'D', and 'F' on a line

Issue: Tax amount will be affected by the discount, this should not
occur for fixed taxes

opw-3119894

X-original-commit: e18292d0079ab83673e3b5b406ebee9b5929f06d
Part-of: odoo/odoo#110078
2023-01-17 11:34:15 +01:00
Victor Piryns (pivi) edb990e03b [FIX] sale_project: put recurrent services only in project subs section
Current behaviour:
When selling a recurrent service with fixed/prepaid invoicing, it
appears two times in the project profitability report, once as
"Fixed/Prepaid" Service, another time as a "Subscription".

Expected behaviour:
Such service should only be present in the "Subscription" section.

Steps to reproduce:
- Install Sales, Project, Subscription
- Create a Service that is invoiced "Fixed/Prepaid", creates a new
  project on creation
- Create a new SO with that product, confirm it.
- Go to the Project's Update of the newly created project
- Observe that the services was accounted 2 times, onces in the
  "Fixed/Prepaid" section, another time in the "Subscription".

Reason for the problem:
When calculating the profitability from "Fixed/Prepaid" services,
we ignore the fact if they are a subscription or not.

Fix:
Extend the domain to not take subscription into account when
generating the profitability items that are prepaid services.

Affected versions:
- 16.0
- master

opw-3113320

closes odoo/odoo#110074

X-original-commit: 840a867c5e3da818b3d7f8dd8d4f25c851536057
Related: odoo/enterprise#35877
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Signed-off-by: Piryns Victor (pivi) <pivi@odoo.com>
2023-01-17 11:34:12 +01:00
Nasreddin Boulif (bon) 80f213c2bd [FIX] stock_account: fix test
Step to reproduce:

  - Install l10n_it (or l10n_fr)
  - Run test `.test_standard_manual_to_auto_1`

Issue:

  Test fail.

Cause:

  Since this [commit](https://github.com/odoo/odoo/commit/0d84cc7aa17d325600e093aa58b0a82f6c0605aa),
  when changing the property valuation of a product category to
  `manual_periodic`, the properties `property_stock_*` are set to False.
  When setting back the property valuation to 'real_time', on the write
  of the product, we will try to 'Replenish the stock with the new cost
  method'. By doing so it will check a stock_input_account is found but
  since remove property from product category and property not set on
  company, it will not find any account and raise an error.

Solution:

  Only for the test (since should consider that must set the default
  propreties on the company), when changing the property valuation, set
  also all the property_stock_* properties.

opw-2767684

closes odoo/odoo#110054

X-original-commit: 7b6c25ec7945bf8aae7530696c3ef9e1afbc8c19
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Nasreddin Boulif (bon) <bon@odoo.com>
2023-01-17 11:34:00 +01:00
Kevin Baptiste 2558911fa0 [IMP] hr(_contract): reorganize employee profile view
- Remove the contract from HR Settings as it's already showing from the
   smartbutton;
 - Move `job_id` from the HR Settings;
 - Move the Payroll group to the Belgian payroll localization.

task-3127455

closes odoo/odoo#109552

Related: odoo/enterprise#35621
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-01-17 11:33:50 +01:00
Pierre-Yves Dufays bcccd4fefb [FIX] mail: fix template preview layout
Enlarge selection fields of record and language in the template preview form so
that the labels are not truncated.

Task-3098782

closes odoo/odoo#110075

X-original-commit: f1ac110cb71d982acd9d6cdbccaf6d2415a38736
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2023-01-17 10:21:10 +01:00
Victor Feyens 3ef26523fb [FIX] product: UX of advanced pricelist rules
task-3062387

closes odoo/odoo#110060

X-original-commit: f91f3db47469d4f516083f8cbcfeb0381c066844
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-01-17 10:21:05 +01:00
Ivan Yelizariev 7209a84910 [FIX] survey: update cursive font
New version of the font is downloaded from Google Fonts website:
https://fonts.google.com/specimen/Alex+Brush?preview.text=c%C4%8Dc&preview.text_type=custom#standard-styles

The reason of this update is because old version doesn't support special
characters, e.g. Aleksandar Vučić.

opw-2891706

closes odoo/odoo#110058

X-original-commit: a3c6db01173cf5a97a74ae4f9a09201e49690fb6
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Ivan Elizaryev (iel) <iel@odoo.com>
2023-01-17 10:21:02 +01:00
Bruno Boi 204a9cef02 [FIX] web: shortcuts usermenu entry for Mac users
Before this commit:
> The command palette displays a footer tip about shortcut overlays.
> The tip is false for MacOS users.
> They cant see overlays with "ALT" key, they need to press "CONTROL".
> They do not need to do "ALT + CONTROL" in order to trigger a shortcut,
> only "CONTROL" is enough.

After this commit
> The tip is good for MacOS users too.

closes odoo/odoo#110050

X-original-commit: 65dda569f45401c002fc34fb12718de709847bf0
Signed-off-by: Georis François (fge) <fge@odoo.com>
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
2023-01-17 10:20:56 +01:00
Victor Feyens c67d8b1bb9 [FIX] base_setup: test verifying validity of documentation links
Since c7c2959449, most documentation
links specified in the settings are written through a dedicated
documentation attribute on the setting nodes.

The test verifying the documentation links was not adapted
accordingly and therefore all the links specified with the new
API were not verified anymore.

closes odoo/odoo#110045

X-original-commit: 9abf52a666596f37a937892682815c321e0e69c4
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-01-17 10:20:51 +01:00
Brice bib Bartoletti d03a66c0c3 [FIX] account: prevent saving unbalanced misc
The aim of this commit is to prevent the user to save unbalanced misc entry
that wouldn't be created by adding a tax.

Context:
Since commit d8d47f9 we allow user to create unbalanced entries by
automatically balancing them on a suspense account. This isn't an issue but we
also allow to post those entries.
As the flow is smooth and fast, a quick user could just post this entries which
could be problematic.
Resetting to draft could be an option but that wouldn't be convenient if some
lines would have been reconciled. (which could have side effects in case
of there would be a cash basis tax on the line)
It's also impossible in case of a journal that would be hashed.
It also means that the problem would be delayed until the end of year
accounting processes, when accountants are tied to dead-lines.

Before this commit:
An unbalanced misc entry created manually would automatically be balanced with
a suspense account.

After this commit:
- Unbalanced misc entry can't be saved if there isn't any tax on it
- Unbalanced misc entry with a tax are balanced automatically.
- Unbalanced misc entry with a tax we are about to remove are balanced
automatically

closes odoo/odoo#110063

Community-pr: https://github.com/odoo/odoo/pull/109878
Task-id: 3129172
X-original-commit: c86786676b86381fbeeac9897508d3fe0ce77151
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
2023-01-17 09:14:55 +01:00
Aaron Bohy 057f281f20 [FIX] web: RelationalModel: find previous group with date
When a list or kanban view is grouped, at each reload, we try to
match the fetched groups with the previously created Group
datapoints, such that we can restore/keep the state of each group
(for instance, the fact that it is folded, the limit of the inner
list...).

Before this commit, this didn't work when the view was grouped by
a date or datetime field, because in those cases, the value of the
group was a luxon instance, and strict equality between two
different luxon instances, even if they represent the same value, is
always false.

This commit fixes the issue.

Issue reported in the feedback pad after migrating odoo.com to 16.0.

closes odoo/odoo#110046

X-original-commit: 80fa8f187939d78ea644a49ec17c112bcc97b32b
Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-01-17 09:14:52 +01:00
David Monjoie 3f320c8a93 [FIX] web_editor: fix toolbar not hiding when clicking outside of editable
Commit [1] correctly disabled some of the behaviors of the editor
that used to modify the selection outside of the editable. However,
it also had the inadvertent side-effect of disabling the toolbar
update mechanism when clicking outside of the editable.

Behavior before this commit:
When the toolbar is visible, clicking outside the editable zone
does not hide the toolbar.

Behavior after this commit:
Clicking outside of the editable zone hides the toolbar.

[1]: 07a1483967

task-3131435

closes odoo/odoo#110044

X-original-commit: 28a35a6b53493abd03e42cc30d164262c86b6de5
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-01-17 09:14:49 +01:00
Romeo Fragomeli dcf06d45cb [FIX] web: settings control panel's layout on small screen
The custom control panel for Settings form view has radically changed
and the old CSS rules (`.o_settings_title`, `.o_setting_search`) didn't
apply anymore, so we remove it.

Note that the form view uses a custom control panel `FormControlPanel`
but the settings form view uses the normal one: `ControlPanel`.

In this commit, we adapt the CSS to reflect the normal control panel
(e.g. the one used by the Kanban view)

Also note the differance between the old version and now:
* before (< Odoo 15.2) the input search was focused when the app was
opened and there wasn't any title
* after (>= Odoo 16) we have harmonized the search to match the other
control panel, so we have to click on the magnifying glass to show
the search input.

Steps to reproduce:
* Open Odoo on a small screen (e.g. on Mobile)
* Open the Settings app => BUG the magnifying glass isn't at the right
position.

closes odoo/odoo#110043

X-original-commit: 91ab277ef66a2ca6b34c13fcba7197f18c50aab0
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Signed-off-by: Romeo Fragomeli (rfr) <rfr@odoo.com>
2023-01-17 09:14:47 +01:00
Thomas Lefebvre (thle) 42b5a8d86e [FIX] sale_loyalty: add ewallet and coupons to cart
Steps to reproduce:
- go to e-commerce;
- add two products (A and B) to the cart;
- apply an eWallet;
- apply a coupons which allows a 100% discount on product A.

Issue:
A traceback appears (Internal Server Error).

Cause:
We are trying to access a dictionary value
a key which does not exist.

Solution:
Correct the distribution of the amount of payment programs.

opw-3115066

closes odoo/odoo#110036

X-original-commit: 0654d87211d9d9319e94b87a8bc6469778633f02
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Signed-off-by: Lefebvre Thomas (thle) <thle@odoo.com>
2023-01-17 08:17:52 +01:00
Jigar Vaghela cb243d6918 [IMP] l10n_in_edi_ewaybill: Use same end point for all Indian IAP
closes odoo/odoo#109751

closes odoo/odoo#110067

X-original-commit: 99e3a7ba49e1a367f2c90db28b67571427e0f048
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Jigar Vaghela (jva) <jva@odoo.com>
2023-01-17 06:22:57 +01:00
niyasraphy 6faad52256 [FIX] base: index_content field alignment in attachment form
before this commit, the index_content field in attachment form view, is not taking full available space.

after this commit, the colspan="2" is added and field will be shown in full width

closes odoo/odoo#110037

X-original-commit: c11dcf88abe2d1e15d174d71e80ff48f50faa3c2
Signed-off-by: Julien Castiaux <juc@odoo.com>
2023-01-17 02:02:26 +01:00
Nicolas (vin) 8ed53c5a57 [FIX] base: ir ui views word break
Fix an issue in the form view of the ir ui view where,
in the edit view dialog, the right group labels would be
all squished up if the xml_id of the view is long.
E.g. the bank reconciliation view.

This is fixed by adding the text-break class to the field.

Task id # 3133662

closes odoo/odoo#110039

X-original-commit: cd1a75f6e9349d8a9ff59c4e65e1d52403e531e9
Signed-off-by: Julien Castiaux <juc@odoo.com>
2023-01-17 01:10:12 +01:00
M.A Heshmatkhah 9a5bc52839 [CLA] Mohammadamir Heshmatkhah
closes odoo/odoo#110034

X-original-commit: 3d96cad285ec3beecb31348002a2837eff1bf9d6
Signed-off-by: Julien Castiaux <juc@odoo.com>
2023-01-17 01:10:09 +01:00
M.A Heshmatkhah e73ad6a53d [FIX] auth_oauth: fragment_to_query_string return
Use the `fragment_to_query_string` decorator before the `route`
decorator on a controller endpoint. Traceback when the endpoint is
called as a `str` object is not a `Response` object.

Since httpocalypse it is advised that all decorators used with http-type
controllers return a Response. This makes it possible to decorate the
endpoint in any order, even before `@route`.

    # Preferred
    @route(...)
    @fragment_to_query_string
    def endpoint(...):
        ...

    # This work
    @fragment_to_query_string
    @route(...)
    def endpoint(...):
        ...

X-original-commit: 4a879cb4a395ad5ef47384937fcc383acdb3e431
Part-of: odoo/odoo#110034
2023-01-17 01:10:09 +01:00
bat-odoo 7b447e4139 [IMP] l10n_in_edi_ewaybill: get the error message from code
In this commit, added the list of error codes with messages, and use them when
an error message is empty. If we don't find the message from the defined error
codes then we call API to get the latest code and message.

closes odoo/odoo#110059

X-original-commit: e845e458548534acbac55bd355cdcdd295b4ae2f
Signed-off-by: Josse Colpaert <jco@odoo.com>
2023-01-16 23:21:04 +01:00
Daniel Blanco 130451983f [FIX] l10n_cl: remove content from view l10n_cl.view_move_form_inherit_l10n_cl
to solve issue: wrong display of the field "Reference" on journal entries.

closes odoo/odoo#110062

X-original-commit: 84f52ab08515336158dfa4b72a0573cf9500ce39
Signed-off-by: Josse Colpaert <jco@odoo.com>
2023-01-16 22:21:56 +01:00
Victor Feyens 1a1ce16265 [IMP] core,*: check routes decorators
When overriding an existing controller route, developers can
easily c/p the route definition and call super() in the overridden method
when the route attributes are automatically deducted by odoo from the parent route.

Removing those redefined attributes simplifies the routes definition,
clearly highlighting what's changed by the override.
Also reduces unexpected behavior when modifying the base route without
noticing/considering the redefined attributes in a overridden route,
which overrides the changes made to the base route when the sub-module is installed.

This commit adds a test to catch routes attributes redefinition, and clean existing routes.

closes odoo/odoo#108512

Related: odoo/enterprise#35176
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-01-16 19:45:57 +01:00
niyasraphy d9281dcaec [IMP] base_geolocalize : form view for base.geo_provider model
closes odoo/odoo#106374

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-01-16 19:45:52 +01:00
aliya aebd1a2c7e [FIX] base: add kz to EEU country group
EEU is missing KZ among the member countries, this commit fixes this omission.

closes odoo/odoo#109936

Signed-off-by: William André (wan) <wan@odoo.com>
2023-01-16 18:14:56 +01:00
Camille Spiritus 508dc8ac8b [FIX] account-l10n_ch: solve sepa vs swiss QR problems
Aim :
Allow customer from Switzerland to emit an invoice with a QR code to a SEPA customer.

Context:
In Switzerland, adding an extra page containing a QR Bill is mandatory in many cases, mainly when the customer is also from Switzerland (although there are other conditions).

However, activating the option 'QR Codes' in the settings (which is not linked to the QR Bill) can cause problem.

For instance, it will be impossible to bill a foreign customer, because we check that the conditions are right to emit a swiss QR (which is a bug).

After this commit :
The new behaviour is :
- Swiss user --> swiss customer: don't change the invoice, allow to create a QR Bill
- SEPA option activated, swiss user --> SEPA customer : join the SEPA QR to the invoice
- SEPA option activated, swiss user --> swiss customer : raise error

task-3062570

Manual fw-port of https://github.com/odoo/odoo/pull/109808

closes odoo/odoo#109935

X-original-commit: a9980477048e4adffda4a71a72ff1cc8490637f9
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
2023-01-16 18:14:53 +01:00
Nicolas (vin) cb9e936dc8 [IMP] account: bank statement report improvement
Improve the bank statement report by reducing the amount of
blank lines in it, as well as adding more information about
the partner and bank account when we have it.

Task id #2860753

closes odoo/odoo#93162

Signed-off-by: Quentin De Paoli <qdp@odoo.com>
2023-01-16 18:14:48 +01:00
Christophe Monniez 8e6e200477 [IMP] core: bump master release to 16.2 alpha 2023-01-16 17:00:48 +01:00
Demesmaeker ba16fdc8c1 [FIX] payment: use a defined currency
Following f3a3e34150, the l10n tests were failing due to the main
currency changing to a currency not available for the test provider.

closes odoo/odoo#109916

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2023-01-16 15:43:09 +01:00
Hugo Carlier (Huca) 20b8635737 [REF] resource, project: replace the function remove_domain_leaf
The function remove_domain_leaf is currently used for project burdown
chart. Due to an increasing need of such a function in multiple modules
for various functional cases, it has been decided to:
- Move this function in 'resource' that is imported in all the modules
where this function is needed.
- Implement extensive unit test to ensure that it address corner cases.
- Refactor the function to address the corner cases it was not
addressing until now.

The refactored function 'filter_domain_leaf' is used to transform a
given domain to a new domain using only the leaves that verify a given
check (more precisely, the leaves whose first element verify this check). To perform this transformation, the leaves that do not verify
this check are considered as undetermined. All the logical operators
dealing with undetermined leaves are ignored, which means:
- AND(leaf, ?) = leaf
- OR(leaf, ?) = leaf
- AND(? , ?) = ?
- OR(?, ?) = ?
- NOT(?) = ?
If the result of the operation is undetermined, it is returned as an
empty domain ([]).

closes odoo/odoo#105470

Related: odoo/enterprise#33657
Related: odoo/upgrade#4221
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-01-16 15:43:01 +01:00