Commit Graph
148458 Commits
Author SHA1 Message Date
Aurélien (avd) 34c192761f [FIX] mrp: speedup _post_inventory for MO batches
Rewrite _post_inventory to make it work better
with mo batches. This mainly improves the
time it takes to mark_as_done manufacturing
orders from the Workorders ListView.

stock.move._action_done is faster
when called outside of a for loop, i.e.
directly on self.

opw-2760394

closes odoo/odoo#84846

X-original-commit: 4cc6083ea1bd28be07e275322481ad11d8995d58
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2022-02-18 10:46:57 +00:00
qsm-odoo 8d591ee3e2 [REF] web, *: move the openhand.cur file to the right folder
*: point_of_sale, pos_restaurant

With [1], we introduced a cursor file for the grab icon in 13.0. It was
then forward-ported up to master... but it should have been adapted
starting from 15.0 as the 'img' folder of web moved around at [2].

This commit fixes that to not have two 'img' folders in web.
Unfortunately, [1] was not merged yesterday so we cannot really "fix"
the stable 15.0 version whose custo may already rely on that wrong
image location. So this fixes only master.

[1]: https://github.com/odoo/odoo/commit/c8e4e1e90322a652b01fa0eb1e6612b9c244f744
[2]: https://github.com/odoo/odoo/commit/ecfe85db84fb5649aaeb48ba3b221386e61a57bc

closes odoo/odoo#84837

Related: odoo/enterprise#24484
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-02-18 10:46:53 +00:00
dbkosky 1906584e02 [FIX] l10n_it_edi: import fattura pa expected singleton product error
Sometimes when importing products that share the same internal reference code (default_code) the _import_fattura_pa function will throw an expected singleton error. This is because, in order to find the product for the line of the invoice, it will search for the product reference code (e.g. [CONS_0001]), which is not necessarily unique.

I've set the limit to one on the search to fix the immediate error for
now, but I will add more logic to better search for the relevant product
in a future commit.

closes odoo/odoo#84826

Task-id: 2764978
X-original-commit: aae609915cb1f76c32c518ff8959674853633f55
Signed-off-by: Josse Colpaert <jco@odoo.com>
2022-02-18 10:46:47 +00:00
dbkosky 276cc1d647 [FIX] l10n_it_edi_sdicoop: fix bug where retry after notificaScarto does nothing
Set the l10n_it_edi_transaction value on the invoice to false after
receiving notificaScarto from the edi. This is so that the methods
associated with posting the invoice will detect it again and process it
for posting.

Task-id: 2764978
X-original-commit: 925fc0ff3914e83ddaac4fd5f6c1bdb7b4b2c68b
Part-of: odoo/odoo#84826
2022-02-18 10:46:46 +00:00
dbkosky 732f21dd71 [FIX] account_edi_proxy_client, l10n_it_edi_sdicoop: adapt config params to make use of the test iap server
This commit adapts the l10n_it_edi_sdicoop and account_edi_proxy_client
modules to make use of the existing config param
'account_edi_proxy_client.demo' in order to target the correct odoo iap
server for italian edi requests.

When the config param is set to:
'prod' or False (when the config param doesn't exist): Target the
production odoo iap server (by default), which submits and collects edi from the
production channel. Though if the config parameter
'account_edi_proxy_client.edi_server_url' exists, we use the value
provided there instead.

'test': Target the test odoo iap server, which submits and collects edi
from the test channel

'demo' or anything else not above: don't send anything, and simulate the
flow of italian edi submissions in odoo

task-id 2764978

X-original-commit: 32683b70a34a900a112d19bf780446a973753ae5
Part-of: odoo/odoo#84826
2022-02-18 10:46:46 +00:00
roen-odoo dbdccd99c5 [FIX] mail: Onchange error after done & schedule next activity
Current behavior:
In any chatter, if you schedule an activity then use the "Done & schedule next" options you had an error if you try to modify some fields of the record linked to the chatter.
For example in CRM you couldn't modify the probability after using "Done & Schedule next"

Steps to reproduce:
-Go in CRM
-Go on a lead page
-In the chatter schedule an activity
-Click on mark done and then on Done & Schedule next
-Try to edit the probabilty field of the lead
-You get an error : Record does not exist or has been deleted. (Record: mail.activity(x,), User: xx)

opw-2648685

closes odoo/odoo#84841

X-original-commit: b45f024e96e17790427ad12e7f201567db0a249b
Signed-off-by: Anh Thao PHAM <pta@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
2022-02-18 09:49:41 +00:00
Kevin Baptiste 3f106f216a [IMP] hr_holidays: open corresponding record on Time Off Analysis
Add a button to directly open the leave/allocation in the Time Off
Analysis view.

closes odoo/odoo#84729

Taskid: 2762014
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-02-18 09:49:37 +00:00
Brieuc-brd 3463583f1f [IMP] web: revamp pivot view
This commit simplifies the SCSS of the Pivot View.
It also adds the possibility to detect if the Pivot View is embedded in
another one (eg. if the view is embedded in the Dashboard view). This
last change was made to adapt the size of the Pivot table depending of
the context.

task-2731553

closes odoo/odoo#82575

Related: odoo/enterprise#23701
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-02-18 09:49:27 +00:00
Demesmaeker 8442ea9c1a [IMP] payment_adyen: allow splitting authorization and capture
Being able to first authorize then capture a payment has several
advantages:
- Confirm a quotation when the payment is authorized and capture it
  when the order is shipped.
- Review orders before capturing the payment.
- Prevent credit card fees in the case of a refund

This commit implements this feature for the payment acquirer Adyen.

task-2507304

closes odoo/odoo#70591

Related: odoo/upgrade#3088
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-02-18 09:49:20 +00:00
Yannick Tivisse 99f7e35fc3 [FIX] base_geolocalize: Disable geolocalize on update/test mode
Purpose
=======

Avoid making useless external requests.

X-original-commit: 6742e410e4c28a1cd24d1f7ea679a563db693f00
2022-02-18 10:19:08 +01:00
William Braeckman fcb5a0ed66 [FIX] hr_attendance: fix attendance report
This commit contains two fixes.
The first fixes the absence of a multi company rule for the attendance
report model.
The second fixes the wrong widget being used in the pivot view of the
attendance report.

TaskId-2765671

closes odoo/odoo#84668

Related: odoo/upgrade#3251
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-02-17 19:32:40 +00:00
Louis Baudoux b4c29da0d3 [IMP] account: add separate settings for digitalization and OUT invoices
The settings that determines the digitalization mode (disabled, manual
or automatic) used to be common for both vendor bills and customer
invoices.
As many users only want to use the service on vendor bills and not on
customer invoices, the settings has been split for both types of
invoices.

closes odoo/odoo#84184

Task: 2751408
Related: odoo/enterprise#24083
Related: odoo/upgrade#3240
Signed-off-by: Florian Daloze (fda) <fda@odoo.com>
2022-02-17 17:37:58 +00:00
Demesmaeker 371c593422 [ADD] test_sale_product_configurators: test the product configurators
Before this commit, some tours from `sale_product_configurator` and
`sale_product_matrix` were not working since there wasn't a dependency
with `sale_management`.

They are now in a test module with all the other configurators and the
missing dependency.

Additionally, other tests are added to improve the coverage of the
configurators' logic.

task-2049081

closes odoo/odoo#82108

Related: odoo/enterprise#23199
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-02-17 17:37:51 +00:00
Odoo's Mergebot 8ac81e6cbe [IMP] website[_event|_crm]: clean website.visitors and consolidate information
PURPOSE

Consolidate information on a 'main' website.visitor when using multiple
devices / browsers.
Which in turn allows a much deeper cleaning of irrelevant and inactive
website.visitors instead of archiving them, saving a lot of DB space.

SPECS

This purpose is reached in 3 steps:

### First step

First move the concept of 'parent_id' of website.visitor into the 'website'
module.

The implementation of 'parent_id' was done in website_event because of stable
development requirements but it makes sense to move it to the website module.

### Second step

Then enforce the consolidation of all visitors information onto the
'main visitor'.

Visitors are linked when we are able to identify a single user through its Odoo
account. The browser where the last connection has been made will be linked to
the main visitor, other visitor records are linked to it through the parent_id
field.

When using multiple devices / browsers, we want to consolidate all the relevant
information on the main visitor, including:
- Created crm.leads
- Subscriptions to events
- Wishlisted tracks
- (Subscriptions to push notifications, done in enterprise counterpart)

Once we have clean visitor records containing necessary important information,
we can safely go ahead and modify the CRON cleaning inactive visitors to DELETE
them instead of archiving them, leading less database space required / improved
query performances.

### Third step

Clean now unnecessary code for wishlisted tracks.
This code was necessary when we had to keep track of all visitors and its
children records when there was only one push_token allowed per
website.visitor.

Now that a website.visitor can have multiple push subscriptions (see enterprise
counterpart), this code is no longer necessary, leading to better logic and
increased performances.

Check underlying commits for detailed information about those 3 steps.

LINKS

Task-2429652

closes odoo/odoo#65113

Related: odoo/enterprise#16781
Related: odoo/upgrade#2111
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-02-17 18:37:42 +01:00
Aurélien Warnon 8ba14334b2 [IMP] website_event_track: clean website.visitors wishlisted tracks
This commit is the community counterpart of the enterprise commit that
consolidates push tokens on website.visitors.

We now don't need to keep wishlisted tracks on children records of a
website.visitor and we can keep the whole wishlisted tracks list consolidated
on the parent only.

This allows some code cleaning and some simplification as well as a few
performance improvements.

Task-2429652

Part-of: odoo/odoo#65113
2022-02-17 17:37:41 +00:00
Aurélien Warnon a0d33b1c29 [IMP] website[_event|_crm]: unlink visitors when inactive & enforce linked visitors
PURPOSE

Visitors are useful in terms of marketing analysis but they can bloat the
database really quickly if you have a lot of traffic on your website.
This commit aims to relieve the database by fully deleting inactive visitors.

SPECS

On an active website, you can easily reach hundreds or even thousands of
visitors per day.
While active visitors are useful for marketing purposes, inactive ones were
archived after a period of inactivity (i.e: not connected for X days in a row,
where X is configurable as a parameter and 30 by default).

But archiving visitors is not really useful either.
We don't see any specific cases where you would want to restore some visitors.
That means we are better off unlinking the visitors completely to save database
storage space.

We want to make exceptions and avoid deletion of inactive visitors in some
cases:
- When they are linked to a partner (meaning most likely linked to a
  registered user)
- When they are linked to leads
- When they are registered to events

Several tests were added to ensure that leads matching these conditions are not
unlinked.

We also took this opportunity to enforce the "_link_to_visitor" rules in those
tests to make sure that:
- When visitors are linked, the leads are merged into the main visitor
- When visitors are linked, the event tickets are merged into the main visitor
- When visitors are linked, the wishlisted tracks are merged into the main
  visitor

This is also preliminary work for a commit that will move the push_token of
website.visitors to a separate table.
That will in turn allow us to link the push_tokens within the
"_link_to_visitor" method and delete the linked visitor instead of archiving
it.

LINKS

Task-2410217

Part-of: odoo/odoo#65113
2022-02-17 17:37:40 +00:00
Aurélien Warnon 0641cb20e8 [REF] website_event: move website.visitor's parent_id to website
The concept of 'parent_id' on website.visitors was introduced in the saas-13.3
stable while implementing the "event online" feature:
However, it should have been part of the website module from the start since
it's a 'global' concept that does not depend on events at all.
See #53540 for more details.

This commit aims to clean the code by moving the field to the website module,
which allows a nice cleaning of associated overridden methods as well.

Along with that, we move the website.visitor demo data from the event module to
the website module, allowing a fresh install of website to showcase some of our
visitors feature.

We also took this opportunity to do some minor improvements in the visitors
kanban view in order to make relevant information more visible.

Task-2429652

Part-of: odoo/odoo#65113
2022-02-17 17:37:40 +00:00
Merlin (megu) d6e774f8db [FIX] web: many2many tag always shows delete icon
The delete icon of many2many tags disappears when the text is too long
for the column

Steps to reproduce:
1. Install Invoicing
2. Open Invoicing and create a new invoice
3. Add any product (a tax should be added for that product) and reduce
the size of the 'Taxes' column until the tag is too long for the column
4. The tag's content overflows and the delete icon is not accessible
anymore

Solution:
Change \<span> element back to \<t>

Problem:
This commit https://github.com/odoo/odoo/commit/0915ac5a0e95ef9511559fded7cf1e149b19ce67
changed the element of `_badge_text` to \<span> which broke the
adaptability of the many2many tags

opw-2755293

closes odoo/odoo#84824

X-original-commit: d859c6328b3374b17f0b0be190ca62fe2597289d
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Guillaume Merlin (megu) <megu@odoo.com>
2022-02-17 16:42:08 +00:00
Luis González 3ca6e48142 [FIX] website_livechat: access error when retrieving chatter info
When chatter information is retrieved but current user has no access to website visitors, an access error is raised and chatter messages are not displayed.

To replicate:
- Enable livechat for current website
- Set user A as member of the livechat
- Log-in with user B, who doesn't have access to website visitors
- Visit any page that automatically opens the livechat with user B (no
  need to input anything, as a livechat is created when the chat window
  pops up)
- Go to backend with user B

To solve the above, visitor information is included only if current user
has enough right to access it.

closes odoo/odoo#84823

X-original-commit: 7fb23842ef2e2950466f44b18005d27443d292f9
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-02-17 16:42:04 +00:00
Laurent Stukkens (LTU) 3ed97cb8bb [FIX] project: ensure dissatisfied filter works properly
Before this commit:
* rating_last_value takes non consumed ratings into account, which prevents
  dissatisfied filter to work as expected.

After this commit:
* dissatisfied will be only based on rating_avg.

closes odoo/odoo#84821

X-original-commit: 65c87efd78ad93d76c63575300f5d28cfcb42b29
Signed-off-by: Xavier <xbo@odoo.com>
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-02-17 16:42:00 +00:00
Arnaud Joset a67dc7e151 [FIX] google_calendar: chose internal users when portal and internal users share the same email
Before this commit, when two users shared the same mail, they were ordered by alphabetical order.
This commit makes sure that the internal user is preferred.

closes odoo/odoo#84805

X-original-commit: 992b7a00f8eb567aed730420d0d10fa476fb9dd7
Signed-off-by: Thibault Francois <tfr@odoo.com>
Signed-off-by: Arnaud Joset <arj@odoo.com>
2022-02-17 16:41:56 +00:00
Arnaud Joset 968cd5ff33 [FIX] google_calendar: increase debug when all events in a recurrence are deleted.
Before this commit, a lot of events and mail followers would be deleted and recreated.
This PR commit aims to identify the issue and fix it.

X-original-commit: d0adfb0b269d21a2284e9608c75bd6f1afffa9a8
Part-of: odoo/odoo#84805
2022-02-17 16:41:56 +00:00
Martin Trigaux 99901f003e [I18N] l10n_fr_fec: synchronise translations
msgmerge with .pot file

Fixes odoo/odoo#83457

closes odoo/odoo#84802

X-original-commit: 462982d8c3ad4df3ceef8787492ea7737c0d68d1
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-02-17 16:41:51 +00:00
Yannick TivisseandRémy Voet c983ae0fa2 [FIX] core: update cache on parent_path when updated
Purpose
=======

The parent_path is invalidated from cache when computing it from scratch
(with method `_parent_store_compute`) but not when it is recomputed
(method `_parent_store_update`).

The issue is that a computed field depending on 'parent_path'
won't receive the updated value using the cache, and could lead
to inconsistencies if the developer is not aware of that.

Specification
=============

On `_parent_store_update`, set the new value of 'parent_path' in the
cache before marking the records as modified.

task-2766452

closes odoo/odoo#84795

X-original-commit: 861854a7598f31c0b971560484e3eb576af006b4
Signed-off-by: Raphael Collet <rco@odoo.com>
Signed-off-by: Rémy Voet <ryv@odoo.com>
Co-authored-by: Rémy Voet <ryv@odoo.com>
2022-02-17 16:41:47 +00:00
Vincent Schippefilt a503073b96 [IMP] base: simplify the query that checks the access rights
before this commit, checking access rights took 2 queries: 1 for group specific rules
and one for generic rules.
after this commit, a single query checks both

This change is important especially for the loading of the menu done in /web,
where we check the security for each model that has a menu, we are saving 25% of the queries

closes odoo/odoo#84736

Signed-off-by: Vincent Schippefilt (vsc) <vsc@odoo.com>
2022-02-17 16:41:43 +00:00
Antoine Guenet 5c6b6cb4ae [FIX] mail: test adaptation forward port
We adapted a test in mail in commit be21041f9aa385f2b9ce1b242379bf147c54b158.

Basically, the test only contained mso comments and no regular comment.
While the python code teats them the same, they are not semantically
equivalent as mso comments actually do have side effects in outlook.
The adaptation is to add a regular comment to the test data so that both
comment types are properly covered by the test, even though the result
is technically the same regardless.

This is the only change from this commit that was not yet present in 15.2.

closes odoo/odoo#84786

X-original-commit: 9275b0119ee6bb2e9a4ee5bef66b00e8c2456d3d
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-02-17 15:31:12 +00:00
FrancoisGe 62ebc97bd8 [IMP] web: Command Palette Config Debounce
This commit is intended to make command palette faster. To improve this,
we decided to make the debounce delay configurable by namespace.
We also decided to limit the number of Command displays to 100.

closes odoo/odoo#84227

Signed-off-by: Géry Debongnie <ged@odoo.com>
2022-02-17 12:51:43 +00:00
Kevin Baptiste a8d3ba8a8b [IMP] hr_skills: ensure Progress is positive
It was possible to have negative Progress on a skill, which doesn't make
sense.

Here we ensure it's a valid percentage between 0 and 100 inclusive.

odoo/upgrade#3238

closes odoo/odoo#84442

Taskid: 2762009
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-02-17 10:08:53 +00:00
Vincent LarcinandPriyanka Kakadiya 41116c81cd [IMP] project, sale_{project, timesheet}: improve user experience
This commit introduces some user experience improvements:

    - Always display sale_line_id field whether partner_id is set or not.
    - Don't restrict sale orders to the partner_id's one
    - Set partner_id to the one of the SOL if partner_id is False
    - Remove create option for fields 'user_ids'
    - Display the kanban state in the kanban view even in fsm

Task 2585357

closes odoo/odoo#73531

Related: odoo/upgrade#3211
Related: odoo/enterprise#19812
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Co-authored-by: Priyanka Kakadiya <pka@odoo.com>
2022-02-17 10:08:43 +00:00
Antoine Vandevenne (anv) 2d0133b52b [FIX] payment_adyen: unblock the UI when additional details are required
Commit b6ae8a0a introduced the generic behavior of blocking the UI as
soon as a submit button is pressed in a payment form. The 3DS2 flow of
Adyen was not taken into account, resulting in the impossibility to
enter the additional details required by Adyen.

With this commit, the UI is unblocked at the right time to allow the
user to submit the additional details. Moreover, the submit button is
now hidden as soon as we don't want to show it anymore, rather than
after having submitted the additional payment details.

closes odoo/odoo#84757

X-original-commit: 97f206e0b26c83eb8bf66f7777f1ab5f2de41615
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-02-17 09:07:00 +00:00
aliya 47cf4e8066 [FIX] l10n_ar, l10n_ec, l10n_pe: use fiscal country
Currently all latam localizations except Chile use country_id in _localization_use_documents().
account_fiscal_country_id should be used instead in all modules.

closes odoo/odoo#84756

Task: 2761248
X-original-commit: cf61089d9480d7450d2916911b0859cd5f6efcce
Signed-off-by: Olivier Colson <oco@odoo.com>
Signed-off-by: Tastemirova Aliya (alta) <alta@odoo.com>
2022-02-17 09:06:57 +00:00
Antoine Vandevenne (anv) 850f1317ed [FIX] payment: stop showing the content of HTML fields if they are empty
Before this commit, an empty line would be shown in the payment forms on
the card of each payment acquirer whose `pre_msg` field was not empty.
This is because displaying this HTML field in a form view and saving it
causes the value `<p><br></p>` to be written on the field, even if it
was left empty. The same issue occurred with the `pending_msg`,
`auth_msg`, `done_msg`, and `cancel_msg` fields that are shown on the
portal of some apps (Sales, Accounting...).

With this commit, the value of these fields is tested before displaying
them. If the value is `<p><br></p>`, the field is not displayed, hence
avoiding to display a blank line.

closes odoo/odoo#84755

X-original-commit: 808cc53bb02b0f1851a2a229bd5235a5fb944408
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-02-17 09:06:53 +00:00
Audric Onockx (auon) 5909a78915 [FIX] base_geolocalize : adapt geocoordinates to partner address
Steps :
Install Field Service and Contacts.
Create a FSM task > Customer : Demo.
Note that the displayed address is his Demo's current one.
Click Navigate To : it points this same address.
Go to Contacts > Demo > change the address and return to task.
Note that the displayed address is his Demo's new one. (Or else refresh)

Issue :
Click Navigate To : it points the OLD address.

Cause :
action_fsm_navigate calls partner.geo_localize
only if partner has no geocoordinates.
Yet he still have the old coordinates.

Fix :
Call when the address changes and not in action_fsm_navigate.

closes odoo/odoo#84753

Opw: 2743926
X-original-commit: 0c01f2a22485328e32ff1741a3ba98446b539318
Related: odoo/enterprise#24456
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Onockx Audric (auon) <auon@odoo.com>
2022-02-17 09:06:49 +00:00
Adrien Widart 5d7a376aab [FIX] mrp: list all kit components in delivery slip
When printing a delivery slip, if the delivered product is a kit
composed with a subkit, the products of this subkit won't be listed

To reproduced the issue:
1. Create 5 consumable products: 'Compo 01', 'Compo 02', 'Compo 03',
'Sub Kit', 'Super Kit'
2. Create two phantom-type boms:
    - Sub kit:
        - 1 x Compo 02
        - 1 x Compo 03
    - Super Kit:
        - 1 x Compo 01
        - 1 x Sub Kit
3. Process a delivery with 1 x Super Kit (the picking must be done)
4. Print the delivery slip

Error: The report only contains two lines, i.e. the name of the kit
('Super Kit') and the name of the 'direct' component ('Compo 01)

The issue comes from the SML used to define `kit_move_lines` (XML side).
It uses `has_kits` which only contains the top level kits' SML:
https://github.com/odoo/odoo/blob/1b1067b0cf2a3de2773915ff8205084492b1bbe3/addons/mrp/report/report_deliveryslip.xml#L6-L9
This is the reason why the SML for Compo 02 and Compo 03 are not listed

OPW-2740247

closes odoo/odoo#84735

X-original-commit: 586f900433eb09ee04d0ed073acfdcfa0fc59d58
Signed-off-by: Tiffany Chang <tic@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
2022-02-17 09:06:42 +00:00
Thibault Delavallée d44e6a5ab7 [FIX] sale_management: fix wrong domain in search
Followup of odoo/odoo@f448b3314e

closes odoo/odoo#84763

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-02-17 08:10:23 +00:00
sofiagvaladze eee7067a3f [FIX] hr_expense: Fix traceback caused by empty currency_id
When we are setting currency_id, if we delete it altogether,
we get a traceback.

Task - 2704297

closes odoo/odoo#84741

X-original-commit: 870577981e02fce4a3b1b1df200d2a81c814f5e8
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-02-17 07:21:43 +00:00
Christophe Monniez 9c578fdff6 [FIX] packaging: fix rpm package and stop using bdist_rpm
The rpm package failed recently on a file name containing a space.
This issue is fixed by protecting file names with double quotes in the
installed files list.

Also, during this fix, it was discovered that the bdist_rpm is
deprecated in setuptools [0].

For that reason, the rpm is now generated from the package.py script.

[0] https://github.com/pypa/setuptools/pull/2780

closes odoo/odoo#84665

Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2022-02-16 19:31:02 +00:00
Gorash a9343fae75 [FIX] web_editor: properly show snippet names via t-install directive
Since the refactoring done on ir.qweb at [1], directives are more
autonomous, so `t-att`, `t-options`, etc are no longer evaluated by
other directives. These directives are also ordered.

Before this commit, when directives such as `t-snippet`, `t-install`,
etc were called, the other attributes had already been consumed. Indeed,
at the end of the compilation, tags should no longer have attributes,
`t-att` removes all statics ones. So relying on the `string` attribute
in `t-install` was broken and so the snippet names for the snippets to
install from the editor panel in edit mode were gone.

This commit fixes that by evaluating those specific directives earlier.

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

task-2762377

closes odoo/odoo#84752

X-original-commit: f40b9522f20d5fbfe62c3718566c1d92ccfad75b
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-02-16 18:41:23 +00:00
qsm-odoo 0329c0fcab [FIX] website: prevent input and datepicker interaction in edit mode
Before this commit, during edit mode, the user was able to interact with
form elements. In 13.0, it was somehow prevented by some JS code by
losing the focus immediatly but it was not enough: if typing quickly the
user was able to type text. But the real problem was the user seeing the
input focused for half a second then not anymore, making him think a bug
occured. Worse, the datepickers of the form snippet were able to be used
entirely during edit mode, making the user think it is possible to
configure a default value (which was not true in 13.0). In following
versions, the bug is indeed worse as it messes up with the default
values configuration. In 14.0, it is apparently possible to type
normally in all of those inputs... although still ignored on save. In
15.0... the 13.0 behavior of losing the focus immediatly is back though.

This commit fixes that via CSS, still allowing a click on the elements
to be considered as a click on the parent, but preventing to focus our
snippet inputs (this fix is limited to our own snippets as stable fix).
Note: the 13.0/15.0 JS code which prevents the focus right now was not
found (if it even exists...) but it would not be ok to remove it in
stable anyway. More investigation and review will be done once this
reaches master.

task-2523496

closes odoo/odoo#84717

X-original-commit: ab9fbfb43365fcd39cc782f94b74911155e3f73e
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2022-02-16 17:50:44 +00:00
jbw ff9adda52e [FIX] account: don't map repartition lines on cash basis reversal
To reproduce the issue:
    - create a cash basis tax, with different account and tags for invoice and refund
    - make an customer invoice using this tax, post it, and register a full payment for it
    - unreconcile the payment

=> Two cash basis moves have been generated: one for the initial reconciliation, and another one reverting it when the reconciliation got cancelled.

=> Bug: the reverse move uses the refund repartition, while the original one is using the invoice's one, so they don't sum up to zero. It's wrong: since the reconciliation got cancelled, we want the impact of the invoice on our tax report to be 0 again, just as if it was brand new.

closes odoo/odoo#84727

X-original-commit: b9e94def7dd84a6a02ddb76959400b8d8fbc5025
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Olivier Colson <oco@odoo.com>
2022-02-16 16:57:29 +00:00
jbw df37d3ef91 [REV] account: commit d22cd54
d22cd54 introduced the fact that when doing a full refund of an invoice, the same account was used as on the original invoice, instead of the one on the tax refund repartition lines, though the tags were still the refund ones. This is wrong.

Also, it restored an inconsistent data setup in a test, while the current version was actually correct.

X-original-commit: 031f017a5a696874065cb5873f2fecd5c4b177ed
Part-of: odoo/odoo#84727
2022-02-16 16:57:28 +00:00
sofiagvaladze f6030aeecc [FIX] iap_mail: Remove messageIsHtml from IAP failure notification
Before the fix:
When we don't have enough credits for Bill Digitalization,
try to scan expense from expense app (or upload bill from billing).
Instead of getting 'Not enough credits for Bill Digitalization',
we are getting 'Odoo Client Error'.

That is because messageIsHtml is no more prop to component 'Notification'.

closes odoo/odoo#84701

Signed-off-by: Arnaud Joset <arj@odoo.com>
2022-02-16 16:57:20 +00:00
William Braeckman ee82585b4f [IMP] hr_attendance: enable back linking in report pivot
This commit makes it possible again to click on a pivot cell to check
where the data comes from.

TaskId-2760356

closes odoo/odoo#84252

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-02-16 15:59:59 +00:00
Alexandre Kühn 00e9c934cb [IMP] mail: adjust sound effect volume
Sounds were too loud and inconsistent.

closes odoo/odoo#82337

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-02-16 15:01:13 +00:00
Thanh Dodeur da9681696b [IMP] mail: add and update sound effects of rtc call interactions
task-2692600

Part-of: odoo/odoo#82337
2022-02-16 15:01:13 +00:00
Adrien Widart 05261f12c2 [FIX] stock: compute the source location of package level
When performing a picking with a package, the source location of the
package level may become incorrect

To reproduce the issue:
(Use demo data)
1. In Settings, enable:
    - Packages
    - Storage Locations
2. In Operations Types, edit "Internal Transfers":
    - Enable "Move Entire Packages"
3. Create a storable product P
4. Create a receipt R with for P
5. Put 10 P in pack and validate R
    - Let be PK the package generated/used
6. Process an internal transfer with PK
    - The destination location of the package level is WH/Stock/Shelf 1

Error: Once the picking is validated, the source location of the package
level is "WH/Stock/Shelf 1". This is not true, it should still be
"WH/Stock"

The compute method is incorrect. It uses the package location to define
the source location of the package level. However, once the picking is
processed, this package has moved so using its location to define the
source location doesn't make sense anymore.

OPW-2754179

closes odoo/odoo#84709

X-original-commit: 239898ed699d98ff185f6a18fc5a8529e126cecb
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2022-02-16 14:02:14 +00:00
Dhwani Patel b9019878ea [FIX] mrp: Use the float_round method to make quantity with the same
decimal places while we compute stock_quants.

closes odoo/odoo#84708

X-original-commit: fba9c9f32cb3d53841946588a999998f6c936e26
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2022-02-16 14:02:11 +00:00
Dossogne Bertrand 8d1dc3f9db [IMP] *: better margin in pdf reports
*: account, purchase, sale

Aim of this commit :
Get multiple pdfs reports to be more easily read, such as :
- pro-forma invoice
- quotation/order
- purchase order
- request for quotation
- invoices

After this commit :
Spaces have been added in order to improve readability

closes odoo/odoo#82277

Taskid: 2712478
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-02-16 14:01:53 +00:00
Adrien Widart e54ea32283 [FIX] stock: set default value for inventory_quantity_set
When a quant is creating, for instance thanks to an internal transfer,
some of these computed fields will have an incorrect value

To reproduce the issue:
1. In Settings, enable "Storage Locations"
2. Create a storable product P
3. Update P's quantity: 100 P in WH/Stock
4. Process an internal transfer
    - From: WH/Stock
    - To: WH/Stock/Shelf 1
    - Operations: 10 x P
5. Consult the on hand quantities of P

Error: There is a new line with 10 x P in WH/Stock/Shelf 1, which is
correct. However, the Counted Quantity field is defined and equal to 0,
and so does the Difference field with a value of -10. These two fields
should not be shown.

When validating the internal transfer, a new quant is created for the
location "Shelf 1". However, there isn't any value for the field
`inventory_quantity_set`. Therefore, at the end of the transfer
validation process, when the `flush` method is called, since
`inventory_quantity_set` is a computed field, its  `compute` method is
called and define the value to `True`:
https://github.com/odoo/odoo/blob/8b155b695823dfa954464ad0d5dd07445ece2471/addons/stock/models/stock_quant.py#L134-L136
This explains why, on front-end, the Counted Quantity and Difference
fields are displayed.

OPW-2733937

closes odoo/odoo#84679

X-original-commit: c519e26adec85025f40f78c59a05b2385377fb5d
Signed-off-by: Arnold Moyaux <arm@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
2022-02-16 13:05:02 +00:00
Yannick Tivisse b56b76fe62 [IMP] hr: Add master department field
closes odoo/odoo#84558

Related: odoo/enterprise#24332
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-02-16 13:04:50 +00:00