Commit Graph
156816 Commits
Author SHA1 Message Date
Antoine Guenet 7c19e7389e [ADD] web_editor: multiline tab and shift+tab
This adds the possibility to remove leading tabulations with shift+tab,
as well as supporting tabulation and untabulation over multiple blocks.

task-2792099

closes odoo/odoo#100386

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-12-09 13:03:33 +01:00
Benoit Socias 55339cd6a7 [FIX] web_editor: prevent putting a table of content inside another one
Dropping a table of content inside another table of content triggers an
infinite loop of generated menu content updates.

This commit prevents dropping a table of content into another table of
content, be it from its thumbnail or from a previous location inside the
page.

task-2752391

closes odoo/odoo#107586

X-original-commit: 69ab750127ac65a24106deb47de3e4d2bf0cd0f5
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-12-09 11:49:01 +01:00
xO-Tx 8e12c0b19f [IMP] website_sale, *: follow-up of "site" menu restructure
*: website_sale_comparison

The goal of this commit is to add the following tweaks on website menus
(after the "Site" menu updates done in [1]):

- Use kanban view by default for products in "eCommerce" menu.
- Use list view by default for the product list in "site" menu.
- Add a placeholder text when there are no attribute categories defined.
- Move 'Attribute Categories' to debug mode.

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

task-2973149

closes odoo/odoo#107583

X-original-commit: 82e9afeff8bb4bd64c5f0fb95af4f4b7a66e722d
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-12-09 11:48:58 +01:00
Arthur Detroux (ard) ddfb9c2186 [FIX] website: prevent tb when using a background video as cover
Prior to this commit, when using a background video on the cover of the
website_slides homepage (/slides), after saving, a traceback would
occur and the video would not be displayed.

Steps to reproduce:
- Install website_slide
- Go to /slides
- Enter edit mode
- Change the cover of the page by a video
- Save
- Traceback

The reason for that is that the cover snippet used on the homepage of
elearning is the root of an XPath instead of its own oe_structure. (This
was changed in 16.0)
[1] made it so that the style and class attributes are saved but did not
save any data attributes needed for the background-video widget to work.

This commit adds those data attributes.

[1]: https://github.com/odoo/odoo/commit/5b252215dc375526af87c31a32256dd1a9582f02

opw-3063043

closes odoo/odoo#107577

X-original-commit: 86dc4d4349d033c95c0e04e8c173f63e5e2044ed
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-12-09 11:48:56 +01:00
Soukéina Bojabza 6bd580f353 [IMP] web_editor: make the background grid visible on dark backgrounds
Before this commit, when dragging/resizing a grid item, the background
grid that appears was not clearly visible if the background color was
dark.

This commit adds a light line next to the dark background grid lines in
order to make them always visible. It also moves the CSS rule about the
grid cell inside the background grid rule, as it is more correct
like this.

task-3060593

closes odoo/odoo#107576

X-original-commit: 1aa81243b7c80069c576381e2f3b04281455794f
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-12-09 11:48:53 +01:00
niyasraphy 89c95544d6 [FIX] *: make some user errors translatable
*: base, account_payment, l10n_ar, mrp_subcontracting, point_of_sale, pos_restaurant, purchase, sale

closes odoo/odoo#107264

X-original-commit: edd928cd0c63a01d1ee8b28ed344f61e9b6d0b54
Related: odoo/enterprise#34676
Signed-off-by: Julien Castiaux <juc@odoo.com>
2022-12-09 11:48:50 +01:00
Ricardo Gomes Rodrigues (rigr) 6b396c84e5 [IMP] account,l10n_*: clean country-specific fields from views
Many country-specific fields were displayed while a company with another country was selected (in case of a multi-company environment).

These country-specific fields are now visible only if one of the selected companies with said country is selected.

closes odoo/odoo#106221

Related: odoo/enterprise#34226
Signed-off-by: John Laterre (jol) <jol@odoo.com>
2022-12-09 11:48:42 +01:00
Ricardo Gomes Rodrigues (rigr) 5376b60af0 [IMP] base, web: add not like and not ilike operators for the JS Odoo domain
Currently the `not like` and `not ilike` operators are available for the Odoo domain in Python but not in JS.

This commit adds these two operators in the JS Odoo domain too for better code clarity. For instance:
`[('fiscal_country_codes', 'not like', 'AR')]`
instead of
`['|', ('fiscal_country_codes', 'like', 'AR')]`

Part-of: odoo/odoo#106221
2022-12-09 11:48:42 +01:00
Pierre Rousseau 092ca864db [FIX] spreadsheet: preload currency fields of list
Before this revision, the currency fields of monetary fields of a list
were not preloaded when the list was loaded. This was causing a double
rpc, a first one to get the list data, and a second one to get the
currency data.

With this revision, we preload the currency fields of monetary fields
of a list.

task-id 3095937

closes odoo/odoo#107591

X-original-commit: a2d5fc517d460ccf5c17611de023a219dfadf7ad
Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
2022-12-09 10:45:13 +01:00
niyasraphy 044231fb10 [FIX] hr_skills, hr_skills_{}: fix typo
closes odoo/odoo#107513

X-original-commit: 641571c27a2c8cfb4da243977ddec512dea11587
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-12-09 10:45:02 +01:00
niyasraphy d91fa0c405 [IMP] hr_recruitment_{}: improve user error message
in the model/view the name of the field is Applicant's Name and in the user error message the warning is shown as Contact Name, improving the message for easy and better understanding for the end user

closes odoo/odoo#107498

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-12-09 10:44:59 +01:00
Nicolas Bayet 34b1f71491 [FIX] web_editor: spellcheck properly on Safari
Before this commit, when using the spellcheck of safari, the selected
word was interpreted as the text "#" by the editor.

task-3093997

closes odoo/odoo#107563

X-original-commit: b8d1ff6bc39530e601baa29971bca720e2dd06cf
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-12-09 09:44:25 +01:00
Sébastien Geelen (sge) 9d1422f9d5 [FIX] web_editor: better command condition
Improve a condition to be more inclusive
and be truthy in some rare cases.

closes odoo/odoo#107545

X-original-commit: 51e37c00c749e6bf033317c612856d15daf6c39d
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-12-09 09:44:23 +01:00
niyasraphy 81a31d547c [FIX] point_of_sale: pos report wizard o2m tree width
in the wizard of sales report in point of sale module, the one2many tree's width is more than the screen size due to given col=4 and scrolling option is shown.

Point Of Sale -> Reporting -> Sales Details

closes odoo/odoo#107241

X-original-commit: b1e1ae315e7ff3e22e7533a602cea0e150eafb75
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
2022-12-09 09:44:20 +01:00
Nshimiyimana Séna bbca44b1a3 [FIX] web: make list view table borders visible in Firefox
## Steps to reproduce
* Using Firefox, Go to Accounting > Invoices > create a new invoice.
* Add a line to the invoice and remove the label.

You should see that there's no indication that the label field is
required. (It works well in Chrome)

## Cause
This is happening because the table borders (that become red when a
field fails validation) are not displayed in Firefox.

opw-3040299

closes odoo/odoo#107564

X-original-commit: 74726c649fa5bddec30573c18acd11020302d093
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Signed-off-by: Nshimiyimana Serge Séna (sesn) <sesn@odoo.com>
2022-12-09 08:46:10 +01:00
xO-Tx 3eebf5e384 [FIX] web: properly handle RTL direction for autoMoreMenu
Issue:

1. Install eCommerce + set up "Contact" header (there are probably other
   configurations where this bug occurs but this one fails for sure).
2. Go to website in english version (with few menu items on header)
3. Switch language to Arabic
=> The "+" dropdown appears on the header even when there is enough
   space for other menu items.

Explanation:

The 'AutoMoreMenu' option is used on website menu to auto adapt the
header layout so that elements are not wrapped on a new line (and sets
a "+" dropdown that contains the overflowing menu items).

When the language is switched to Arabic (or any RTL language), the
current code ('computeFloatOuterWidthWithMargins()' method) won't be
able to compute the reversed margins correctly for "unfoldable" items:

For example, if we want to compute the width (including margins) of the
"user dropdown":

============================================
IW -> Initial width value (without margins)
LR -> Left margin computing
RM -> Right margin computing
============================================

A- On English version (LTR):

1- LM: item has left auto margin class -> left margin won't be added.
2- RM: item has no right auto margin class -> right margin added (=== 0)
3- The final width is the same as the initial value (IW).

B- On Arabic version (RTL):

1- LM: item has left auto margin class -> left margin won't be added.
2- RM: item has no right auto margin class -> right margin added (> 0).
The right margin value added here is just the left auto margin
reversed because of direction. The code will return a final width > IW
and since the item is "unfoldable", its width will reduce the available
space for foldable items.

Solution:

The goal of this commit is to make the code smart enough to avoid adding
wrong right/left margin value caused by left/right auto margin class
on 'RTL' direction.

opw-2963123

closes odoo/odoo#107573

X-original-commit: 8a4a59389338ad1f50c08df3d55c267ca4d830da
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-12-08 19:59:17 +01:00
Kevin Baptiste 270b9aa7c3 [FIX] hr_org_chart: don't loop when own manager
When an employee was their own manager, the org chart would be filled
with their own name.

task-3093917

closes odoo/odoo#107546

X-original-commit: 53f9359d84a6bb500db693298a12608964a0a118
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-12-08 18:00:29 +01:00
Antoine Guenet afbe0de46f [FIX] web_editor: paste a full table after copying custom-selected table
With the tables' custom selection in the editor, copy-pasting from a
table became awkward. This ensures that copying (from) a table in the
editor guarantees a valid table on paste.

task-3061274

closes odoo/odoo#107544

X-original-commit: 9730a1f1e0053cc9633faaf0ffb424ae373bbc38
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Antoine Guenet (age) <age@odoo.com>
2022-12-08 18:00:24 +01:00
yhu-odoo 603b0ee228 [FIX] purchase,sale: Error when no partner_ids
Since #106658,
https://github.com/odoo/odoo/blob/348265db3ddb90a982b0fb60f2d8b1085ceaaf2a/addons/purchase/models/purchase.py#L338
https://github.com/odoo/odoo/blob/348265db3ddb90a982b0fb60f2d8b1085ceaaf2a/addons/sale/models/sale_order.py#L1198
trigger error when no partner_ids in kwargs.
Fix them.

closes odoo/odoo#107521

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-12-08 18:00:21 +01:00
Bastien (bvdn) 65893b50fa [IMP] project: change stage_display string in 'My/All Tasks' list view
Small fixup for already merged PR: 103318
stage_display column should have 'Stage' as a header, not 'Stage Display'
added the stage_display field to 'All Tasks' list view

Task-3024152

closes odoo/odoo#107407

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2022-12-08 18:00:18 +01:00
Nikunj Ladava 3abc5097f2 [FIX] event_sale: show correct amount in printed ticket
As multiple tickets can be sold in a single sale order line, we should not
display the line total amount on printed tickets but the unit price instead.

Task-3078743

closes odoo/odoo#107530

X-original-commit: 63d786e67006405140e3198543640edf4b4edb1b
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2022-12-08 16:58:58 +01:00
Hugo Carlier (Huca) 27e64cf856 [IMP] sale_project: modify fields order in form view of tasks
- project.task form view - the fields
'planned_date_begin' and 'planned_date_end' are displayed after the
customer field (or after the SOL field if it exists)

Task-3046210

closes odoo/odoo#107502

Related: odoo/enterprise#34782
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2022-12-08 16:58:55 +01:00
Thomas Lefebvre (thle) 29ec845109 [FIX] onboarding: modify access rights for onboarding model
Steps to reproduce:
    - install Calendar and Appointments apps;
    - give "Access Rights" for administration to a user;
    - go to calendar app with this user.

Issue:
    The user does not have access to the calendar.

Cause:
    The user has no access rights for the onboarding model.

Solution:
    Check that the user belongs to the "group_system" group in the onboarding model controller.

opw-3083014

closes odoo/odoo#107514

X-original-commit: fa7dc387154c65ef07af1f903fa25ca5d2e890f9
Signed-off-by: Arnaud Joset <arj@odoo.com>
2022-12-08 15:51:31 +01:00
Guillaume (gdi) f7311cf3db [FIX] website: prevent console errors when changing connectors type
Since [this commit], a new option is available on the steps block to
change the style of the connectors. Unfortunately this was causing
errors in the console. This commit makes sure that we don't have these
errors in the console anymore.

Steps to reproduce the issue:
- Drop a steps block on a page
- Change the type of the connectors

=> Errors are displayed in the developer console.

[this commit]: https://github.com/odoo/odoo/commit/aba31e9f2d8a44ce1586403f2a621a6caeed57b4

task-3069766

closes odoo/odoo#107511

X-original-commit: c1805fc5d3c3eeaa5c2edca69a6b9375f4ea1a39
Signed-off-by: Outagant Mehdi (mou) <mou@odoo.com>
2022-12-08 15:51:21 +01:00
Victor Feyens 6e11f14970 [MOV] sale: merge sale & sale_enterprise
Now that dashboard views have been removed, there is no reason
to keep a dedicated module with 2 custom fields that could be
in community.

* Move sale.report fields:
  * invoice_status field is simply moved as is
  * avg_days_to_confirm is removed, as it was only used and meaningful in the dasbhoard view
* Merge views content inside the parent view

Task-3011195

closes odoo/odoo#104920

Related: odoo/enterprise#33588
Related: odoo/upgrade#4010
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-12-08 15:51:16 +01:00
Ricardo Gomes Rodrigues (rigr) 6db6eb60e6 [FIX] l10n_multilang: CoA not translated if the language is installed after the CoA
Currently there is a bug where the Chart of Accounts is not translated if the language is installed after the CoA.

Steps to reproduce:
1. Create a CA company (where both French and English are used)
2. Set the CA Chart of Accounts
3. Go to the general settings
4. Add the French language and switch to it
5. Go back to the CoA
6. The CoA is not translated

This is because the variable `installed` is wrongfully placed in the code. In the current flow, we install the new language, then we check the installed language, therefore the new language is marked as an already installed language. Therfore the `to_install` variable will always be empty.
This commit fixes this by first storing the already installed languages, then installing the new one, and then compute the ones to install making sure that the newly installed one will be used afterwards to translate the Chart of Accounts.

task-id 3091315

closes odoo/odoo#107500

X-original-commit: a3c3c3ccfc8e769ce39dbf38263f92e449b44abb
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
Signed-off-by: Ricardo Gomes Rodrigues (rigr) <rigr@odoo.com>
2022-12-08 14:44:20 +01:00
Jérémy Hennecart (jeh) 348265db3d [FIX] mass_mailing: send at least one a/b test if possible
When there is not enough recipients for the A/B testing percentage,
we pick a minimum of one recipients (if there is at least one) to
avoid sending a/b test to no one.

task-2713198

closes odoo/odoo#107488

X-original-commit: e1fa7b10250efc790452f02490ab84d2183698ff
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2022-12-08 13:38:25 +01:00
dht-odoo 6bfe126313 [FIX] mass_mailing{_sms}: respect mailing_type when comparing a/b mailings
Before this commit
- When we were comparing versions, there was no such filter as
  mailing type. Due to this it will display both SMS and mail
  type records in it.

With this commit
- We have added '('mailing_type', '=', self.mailing_type)' in domain
  of compare version.

TaskId-2713198

X-original-commit: e8542e24597ad25b68104c03d4d4ed41e1efac82
Part-of: odoo/odoo#107488
2022-12-08 13:38:24 +01:00
dht-odoo 91a223bd52 [FIX] mass_mailing: disable A/B testing cron by default
Before this commit, the A/B testing cron was active by default.
It doesn't matter if A/B testing is true or false in settings.
So, with this commit, we set active equals to false by default
in the A/B testing cron. It will be active when the user sets
`group_mass_mailing_campaign` to True.

TaskId-2713198

X-original-commit: b348f8658f87c15d0fe4ee72888e99da2a529700
Part-of: odoo/odoo#107488
2022-12-08 13:38:24 +01:00
Nicolas Bayet 569407d1a0 [FIX] web_editor: replaceMedia on contenteeditable
In website, clicking on the snippet option action "Relpace" did
not work for an icon inside s_social_media as s_social_media is
contenteditable false.

The code was simulating a double click on the icon to open the media
dialog but in the double click handler, a check is made to prevent
the media dialog to be shown if the contenteditable is false. This
is important for the knowledge app to prevent changing a button inside
a knowledge view.

task-3086881

closes odoo/odoo#107487

X-original-commit: 3339c50fbebca8a6d419df4ab14ef03952ea6635
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-12-08 13:38:19 +01:00
Antoine Guenet 0c2015ee0e [FIX] web_editor: prevent closestElement traceback with comment nodes
Comment nodes don't have a `closest` method so when passing one to
`closestElement`, the method crashed.

----

Step to reproduce in website:
- Go to debug mode and to website app
- Click on configuration > websites
- Select a website and in the `custom_code_footer` field add an HTML
  comment
- Go to the website and try to enter edit mode -> Crash

The same error will be visible if you simply enter edit mode and drag &
drop the "Code" snippet and enter an HTML comment inside it.

-----

Step to reproduce in marketing automation:
- Install marketing automation
- Click on a campaign > Add a new activity
- On the mail template field, type something > Create and edit
- Select plain text -> `element.closest is not a function`

----

task-3083797
opw-3081323
opw-3081278

closes odoo/odoo#107486

X-original-commit: 3a9177dd6a6f12f75d0df8146b692e3486f2467c
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-12-08 13:38:17 +01:00
Touati Djamel (otd) 515fbccae3 [FIX] mrp: do not convert the quantity if there is no BoM
Steps to reproduce the bug:
- install “mrp_mps”
- Create a storable product “P1”
    - routes: Manufacture + MTO
    - make sure there is no BoM set

- Go to “Master Production Schedule”:
    - Add the product “P1”
    - Add a quantity and click on “Replenish”

Problem:
A User Error is triggered with the following message: `The unit of
measure Units defined on the order line doesn't belong to the same
category as the unit of measure False defined on the product. Please
correct the unit of measure defined on the order line or on the product,
 they should belong to the same category.`

The `compute_qauntity` function is called to convert the qty into the
UoM of the BoM, but since there is no bom, an empty record is given as
a parameter:
https://github.com/odoo/odoo/blob/8c5fb8b71538462422c8f166b772b5e316ecd6b5/addons/mrp/models/stock_rule.py#L122

https://github.com/odoo/odoo/blob/0f91970020af640faa3a06369fa888315f83f98f/addons/uom/models/uom_uom.py#L215

opw-3085227

closes odoo/odoo#107476

X-original-commit: 7d0df9035cf603ed25ef88a3cf99ed89aef6771e
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2022-12-08 13:38:11 +01:00
Goffin Simon 76199fd956 [FIX] delivery: Multi currencies with free shipping above amount
Steps to reproduce the issue:

- Let's consider two currencies C1, C2
- Let's consider two pricelists P1 in C1 and P2 in C2
- Let's consider that the current company CY has the default currency C1
- Let's consider that the current rate of C1 = 1.0 and C2 = 5.0
- Create a shipping method SM with fixed price = 50 and free shipping is above 100 (expressed in company currency)
- Create a SO with P2 and add a line with a product of 200 C2 (equal to 40 C1)
- Add shipping method SM

Bug:

The shipping was considered as free but the total of the SO was not above 100 in the currency of the company

opw:3010266

closes odoo/odoo#107456

X-original-commit: c93ab6615f0370963b152cc0320478fe4ceed164
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2022-12-08 13:38:06 +01:00
yhu-odoo 589622e82e [FIX] mrp: qty_remaining missing dependancy
To reproduce:
Create a MO without product_id, then add a new line in work orders.
Error raises.

Since cab8d8fe7f744fb4dd0cd61b624f6f4519eb8d8d, we started to show
qty_remaining of WO on MO form. It triggered the compute function of
qty_remaining. Since we don't set product_id, production_id.product_uom_id
is not provided when doing the calculation.

To fix, add production_id.product_uom_id as dependancy of qty_remaining,
and don't do the calculation without it.

opw-3092723

closes odoo/odoo#107434

X-original-commit: 0b10241c0bcbecda73dae04c8a5f1ceb8033a388
Signed-off-by: Tiffany Chang <tic@odoo.com>
Signed-off-by: Yuchen Huang (yhu) <yhu@odoo.com>
2022-12-08 13:38:00 +01:00
Eteil Djoumatchoua (etdj) bb12e9632c [FIX] sale_product_configurator: Track custom values when adding an item to cart from the website
Steps to reproduce the issue:
- Go to the website shop
- Select a product which allows custom features (eg. Customizable desk)
- Select custom and enter a value
- Add to cart

Issue:
Neither the modal preview nor the cart of the added item doesn't show the custom value, also it
doesn't appear in the created sale order

Cause:
The optional sale_product_configurator module hasn't implemented it

opw-3052987

closes odoo/odoo#107335

X-original-commit: 954653062ad6060babb77a712b269337b479fa65
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-12-08 13:37:54 +01:00
niyasraphy 40d86ef921 [FIX] hr_skills: remove duplicated model definition
closes odoo/odoo#106993

X-original-commit: 8a32755ce90ffd4edbcde1af363e1808a7f09c03
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-12-08 13:37:52 +01:00
Nasreddin Boulif (bon) e10a8d21ac [FIX] l10n_din5008_sale: add translation for DE language
Steps to reproduce:

- Install modules `l10n_din5008_sale` and `sale_management`
- Activate the language `German/Deutch`
- Create a new quotation
- Set a customer with `German/Deutch` as language
- Add a product then print the quotation

Issue:

  Some sentences are not translated.

Cause

  Missing translation files.

opw-3052426

closes odoo/odoo#107454

X-original-commit: 6b990318a142fe83009a54cd967f4d23ef939327
Signed-off-by: Nasreddin Boulif (bon) <bon@odoo.com>
2022-12-08 11:29:24 +01:00
clesgow 043cf8e418 [FIX] stock: Fix package_level unlink
Steps to reproduce :
- Create two products
- Create a planned internal transfer with one of each product from Stock
-> Location A
- Hit "Mark as todo"
- Hit "Put in pack"
- Validate the picking
- Create an new planned internal transfer, with the same products and
quantities, but from Location A -> Location B
- Remove the destination package for one product.
- This will remove the destination package for all products in the same
package.

When unlinking a package level, it will unlink all moves and move_lines
at the same time. Problem is that if a single move_line is updated in a
picking where multiple move_lines are in the same package, it will
unlink it for all the move_lines instead.

closes odoo/odoo#107448

X-original-commit: 9dcbc420f50ece3356dff57cbdc467c7893ff2c2
Signed-off-by: Tiffany Chang <tic@odoo.com>
2022-12-08 09:45:01 +01:00
Guillaume (guva) 924ffcaa52 [FIX] account: adapt query for items to reconcile
Changing the bank account on the bank journal led
to a traceback (expected singleton on currency_id)
when trying to open the reconciliation widget.
This is because we are trying to open a blank line
as the origin line was linked to the origin Bank account,
therefore there is no currency_id.

It has been decided to filter the statement line that
match the bank account and to adapt the action button.

Steps to reproduce:

- Create a bank statement line
- In Bank journal, change the Bank Account
- From Accounting Dashboard, click on "Reconcile X items" or
  just open the Bank Journal
-> Traceback (expected singleton)

opw-3085670

closes odoo/odoo#107441

X-original-commit: c566a48c5bc528a140e6f29399ca1fbcede60490
Related: odoo/enterprise#34762
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: Guillaume Vanleynseele (guva) <guva@odoo.com>
2022-12-08 09:44:56 +01:00
Lucas Lefèvre adc972e67e [IMP] spreadsheet: update o_spreadsheet to latest version
https://github.com/odoo/o-spreadsheet/commit/300da461 [IMP] style: add vertical text align option
https://github.com/odoo/o-spreadsheet/commit/b4c1339c [IMP] doc: improve custom function documentation
https://github.com/odoo/o-spreadsheet/commit/329d1aaa [FIX] figure: Prevent the figure from moving to far.
https://github.com/odoo/o-spreadsheet/commit/5eb41878 [FIX] format: SET_DECIMAL of cells with default format
https://github.com/odoo/o-spreadsheet/commit/606cbb27 [FIX] composer: display raw content of NumberCell
https://github.com/odoo/o-spreadsheet/commit/218052ac [FIX] renderer: negative number with lot of decimal are overflowing
https://github.com/odoo/o-spreadsheet/commit/8dc32cef [IMP] figures: insert images
https://github.com/odoo/o-spreadsheet/commit/4e3a8254 [FIX] tests: typo
https://github.com/odoo/o-spreadsheet/commit/6107b266 [FIX] link display: items are not vertically aligned
https://github.com/odoo/o-spreadsheet/commit/e92c401a [FIX] scorecard chart: Fix empty translation string
https://github.com/odoo/o-spreadsheet/commit/0c76423b [IMP] menu: remove call to isDashboard as menu are never called in dashboard mode
https://github.com/odoo/o-spreadsheet/commit/7548f5b7 [REF] tests: reorganize spreadsheet tests
https://github.com/odoo/o-spreadsheet/commit/08c620dd [REF] bottom_bar(tests): Use generic helper to mount bottom bar
https://github.com/odoo/o-spreadsheet/commit/1fe66362 [FIX] scrollbar: fix the scrollbar full size

closes odoo/odoo#107372

Related: odoo/enterprise#34727
Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
2022-12-08 09:44:48 +01:00
Rsq 4d3126b748 [CLA] ADD lnf83515
closes odoo/odoo#107411

X-original-commit: fbe7fe7f8e029a4c76589fa5a9892172c226c9ab
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-12-08 08:48:48 +01:00
Jorge Pinna Puissant ebbc63dbff [IMP] web: improve setting search
Before this commit, the setting search was done exclusively in some
selected texts. These texts needed to be on some specific selectors
(field, label, span.o_form_label and div.text-muted).

Now, all text on a setting are searchable (including the text in
buttons). This commit also re-structure the setting compilers file to
remove the functions outside the class, this is done to standardize the
compilers (setting, form and view).

closes odoo/odoo#107226

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-12-08 08:48:46 +01:00
hupo-odoo 4f0c264ca2 [IMP] Better fiscal position auto detect tooltip's description
Improved the tooltip description of the 'Detect automatically' field for fiscal positions. The previous tooltip was "Apply automatically this fiscal position" while the new one is "Apply tax & account mappings on invoices automatically if the matching criterias (VAT/Country) are met."

task id : 3088331
PR number : #107092

Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
2022-12-08 07:52:48 +01:00
Morgane (morm) 1e961704eb [FIX] im_livechat: chatbot rules layout
Prior to this commit, the layout of the fields of the form for a rule in
a chatbot was broken because of a missing condition in the
'only_if_no_operator' checkbox label.

closes odoo/odoo#107459

X-original-commit: bcd952f358c06017fc33f3e5af74cf3aff17a18a
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-12-08 01:42:00 +01:00
Aaron Bohy 5a5c2dbbf8 [FIX] web: handle float fields with digits=0
According to the orm documentation, the `digits` attribute of
float fields must be either a tuple (int, int) or a string.
However, people set `digits=0` on a bunch of float fields (some
are there for a while now). Historically, the webclient handled
this as "there's no digits attribute set", so it fallbacked on 2
digits precision.

With the new views, and owl props validation, we assert that the
`digits` props, when given, is an array. In the above situations,
we have a props validation error.

This commit fixes the error by filtering out the `digits` props
when it is not an array, s.t. it keeps working as before (i.e.
fallbacks on 2 digits). In master, we'll remove the fallback.

opw 3083100

closes odoo/odoo#107418

X-original-commit: 36407a9837ba3bf90670ae763751dc631309867b
Signed-off-by: Michaël Mattiello <mcm@odoo.com>
2022-12-08 00:43:08 +01:00
Rodopho Cammarosano de Lima (rcdl) ef41ffbb45 [FIX] web_editor: update z-index in CSS classes
Due to a change in Bootstrap, the tablepicker, the toolbar and the q-web
branching selector were hidden by modal dialogs.

In Odoo 15.0, the included Bootstrap version was 4.3.1, in which
.modal's z-index is set at 1050.

In Odoo 16.0, the included Bootstrap version is 5.1.3, in which .modal's
z-index is set at 1055.

Therefore, the previous z-index value of 1051 is now updated to 1056.

task# 3002456

closes odoo/odoo#107431

X-original-commit: 263137bcd38f788ff96d13d0810df4da13b72a19
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-12-07 22:48:45 +01:00
MerlinGuillaume 92424f5710 [FIX] hr_leave: validate leave in multi-company environment
Validating an employee's leave with multiple companies selected doesn't
work when the employee isn't part of one of the selected companies

Steps to reproduce:
1. Install Time Off
2. Go to General Settings > Companies and create another company
3. Connect as Marc Demo, open Time Off and create a new time off request
4. Connect as Mitchell Admin and go to Time Off > Managers > Time Off
5. Approve and validate the time off request of Marc Demo
6. An access error is raised: `Access to unauthorized or invalid
   companies.`

Solution:
Clear `allowed_company_ids` from the context when we create the
`calendar.event` to avoid raising the error

Problem:
The creation of the `calendar.event` didn't use the correct user's
`allowed_company_ids` in the context

opw-3052973

closes odoo/odoo#107415

X-original-commit: a5ab773378f5ba2241793c536cf141d27d250ae5
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Signed-off-by: Guillaume Merlin (megu) <megu@odoo.com>
2022-12-07 19:56:23 +01:00
Tiffany Chang (tic) a24d57daeb [FIX] mrp: correct unit cost in bom
Incorrect variable reference + calculation for unit BoM cost for
byproduct/product (to produce) within in BoM overview report. This
was leading to the displayed value having the cost_share being multipled
into the unit cost twice.

Steps to reproduce:

- create component with cost 100
- create BoM with 1 of this component + 1 byproduct with
  qty = 2 and cost_share = 50.00
- click on Overview

result before this commit:
Manufactured Product unit cost = 25.00
Byproduct unit cost = 12.50

actual result should be:
Manufactured Product unit cost = 50.00
Byproduct unit cost = 25.00

closes odoo/odoo#107410

X-original-commit: 2339bed170b5f670b1f5a6cebd533a9cee72d4db
Signed-off-by: Steve Van Essche <svs@odoo.com>
Signed-off-by: Tiffany Chang <tic@odoo.com>
2022-12-07 19:56:17 +01:00
niyasraphy 50ee5d7a09 [FIX] l10n_pe: documentation link
current link will return 404 error, updating the website link to correct documentation link

closes odoo/odoo#107399

X-original-commit: 33f94926038bb5cf9a9f7feadd2d6596e331b4e1
Signed-off-by: William André (wan) <wan@odoo.com>
2022-12-07 18:29:39 +01:00
roen-odoo d06528728d [FIX] point_of_sale: avoid overpayment if no cash method configured
Current behavior:
If the PoS has no cash method configured, and you try to make a
payment with a greater amount than the due amount, you will get an
error message. Because you cannot give money back to the customer as you
have no cash method configured.

Steps to reproduce:
- Remove Cash payment method from the PoS
- Open a PoS session
- Create an order with some products
- Pay the order with a greater amount than the due amount
- Validate the order, you will get an error message

Solution:
If the Pos has no cash method configured, and the user try to make a
payment with a greater amount than the due amount, we will automatically
set the amount to pay to the due amount and show a message to the user.

opw-3061612

closes odoo/odoo#107398

X-original-commit: 6280e5ac921b21d10100cd78a18072120d823aca
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
2022-12-07 18:29:36 +01:00