Commit Graph
148305 Commits
Author SHA1 Message Date
Benoit Socias 96d2016cf6 [FIX] web, website: allow scrolling when only cookies bar remains
Since [1] when web was migrated to OWL, the cookies bar was considered
as a parent modal of any openend modal that got closed - thus preventing
scrolling the full page.

After this commit the cookies bar in the front end is not considered as
a remaining modal anymore, and therefore does not prevent scrolling on
the currently displayed website page.

[1]: https://github.com/odoo/odoo/commit/29731b404fe624b733d784cd4321113d6b0d27b7

task-2741894

closes odoo/odoo#84128

X-original-commit: c1aab97e6b4e8b916c7d79db5f278c746fd6b119
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-02-07 19:04:00 +00:00
Sébastien Theys 2d5a144898 [IMP] mail: rename newItem/itemNew to addingItem
Consistency in naming. Remove CSS as a bonus.

Part of task-2694206, split from main PR to ease its diff

closes odoo/odoo#84127

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-02-07 19:03:56 +00:00
Yannick Tivisse 67713706b5 [IMP] note: Allow name edition on notes
closes odoo/odoo#83836

Related: odoo/enterprise#23928
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-02-07 19:03:43 +00:00
William Braeckman 9e3b9317a1 [IMP] hr_contract: Improve demo data for payroll dashboard
Part-of: odoo/odoo#83836
2022-02-07 19:03:42 +00:00
Victor Feyens 64101c8d15 [FIX] sale: update_prices logic
The field show_update_pricelist, readonly, is not provided
to the server by the webclient, and therefore not updated on
new sale orders.

This fixes this problem and also reduces the recomputation by removing
the useless dependency on 'order_line' field.  The compute should
only be triggered on 'pricelist_id' field updates.

closes odoo/odoo#84105

X-original-commit: 365df4b1ed08f553397eab9619d369867162ed89
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-02-07 17:16:02 +00:00
Victor Feyens cf0d1eb80a [FIX] sale: compute the expected date based on the order state
The state of sale order lines is strictly related to the order state,
it's unnecessary to read the information line by line (and fetch/compute it)
when we already have it on the current order record.

X-original-commit: 660eaccbb417938bff0ffd8bd6a03aa1c42ce877
Part-of: odoo/odoo#84105
2022-02-07 17:16:02 +00:00
Victor Feyens 4d04ac2056 [FIX] sale: remove dumb onchange logic
Do not update the commitment_date everytime the expected date is
modified, otherwise there is no meaning to have two fields...

Furthermore, it seems that this onchange causes a performance loss
on SO/SOL updates, forcing the whole SOL data to be returned along
the SO data during the SO onchange.

Therefore removing this onchange improves the performance of SOL updates
and consequently the final save of the record by reducing the data wrongly
considered modified and given to the create/write call.

X-original-commit: 116ca30b2f5f27f8959961c786b88fdcec36338a
Part-of: odoo/odoo#84105
2022-02-07 17:16:02 +00:00
Nasreddin Boulif (bon) 2ca5fdcaac [FIX] web_editor: resize favicon preview image
Steps to reproduce:

  - Install Website
  - Go to Settings -> Website
  - Replace favicon with a 'big' image
  - Go to Website and edit any page
  - Click on Home

Issue:

  Favicon preview in popover is too big.

Solution:

  Set a max height/width for favicon preview (16x16).

opw-2744522

closes odoo/odoo#84101

X-original-commit: bb90ff7f320f815310ca8e76d19bccadf4204cc2
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Nasreddin Boulif (bon) <bon@odoo.com>
2022-02-07 17:15:52 +00:00
Victor Feyens bbcac30342 [FIX] payment,sale(_*): typos
closes odoo/odoo#84094

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-02-07 16:22:54 +00:00
Adrien Widart 31f29e5742 [FIX] purchase_stock: remove useless qty conversion in report
To reproduce the issue:
1. In Settings, enable "Units of Measure"
2. Create a product P:
    - Type: Storable
    - Unit of Measure: Units
    - Purchase UoM: Dozens
3. Create a PO with 1 (Dozens) x P
4. Open the Forecasted Report of P

Error: The value of "Requests for quotation" is 144, it should be 12.
The quantity has been converted twice.

OPW-2744195

closes odoo/odoo#84091

X-original-commit: 524a1c597fd409a488bb6af37aca8248727691c1
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
2022-02-07 15:25:07 +00:00
Sébastien Theys 96e355bcca [FIX] mail: prevent crash when destroying during attachment upload
File uploader might be deleted because it is linked to views, but the process of
upload should still happen for the related thread.

closes odoo/odoo#84085

X-original-commit: ddfcee8f35da4bcf16f258d1bdfd0cf08436d001
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-02-07 15:25:03 +00:00
Joseph Caburnay 30a92426e1 [FIX] point_of_sale: models[model].fields is no longer in pos
closes odoo/odoo#84084

X-original-commit: 4c77a117050539f1d9cd1759a055e3a4a65b0998
Signed-off-by: Masereel Pierre <pim@odoo.com>
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2022-02-07 15:24:59 +00:00
Rémy Voet (ryv) 2904de7bac [FIX] website_event: add missing ir.model.access
There isn't `ir.model.access` on `event.event.ticket` for public and
portal users, but there is already the `ir.rule` to check the access.

In master, It causes an issue now, since https://github.com/odoo/odoo/pull/82896,
the `description` field of `event.event.ticket` isn't prefetch anymore
by the sudoed `event_registrations_open`
compute (that fill the cache with ticket data in sudo).
It crashes single app build:
https://runbot.odoo.com/runbot/build/12473674

We prefer to backport it in stable, there are maybe some corners where
it will raise an Exception and for sake of correctness.

closes odoo/odoo#84072

X-original-commit: d4f1be276d31215158b164f2f282afa8fa75f2b9
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-02-07 15:24:54 +00:00
Victor Feyens 15440457b1 [IMP] sale: confirm demo orders in batch.
Minor setup performance improvement.

closes odoo/odoo#84055

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-02-07 15:24:50 +00:00
Victor Feyens 272d47868c [IMP] core: do not call create without values
Whenever a record is modified in a demo/data file,
create will still be called, but with an empty list of values.

This flow is correctly managed in the core orm code, but a lot of
custom logic in create overrides is triggered for nothing.

This commit makes sure that create is not called with an empty list
when there is no record to create (i.e. only records to update)
during files imports (including modules demo/data loading).

Part-of: odoo/odoo#84055
2022-02-07 15:24:49 +00:00
Victor Feyens e51537a430 [IMP] product: reduce forced cache invalidation & flushes
write call on product.template.attribute.line with an active value specified
will trigger cache invalidation & flush even if no record is specified in
the call.

_create_variant_ids is called on multiple places, including the unlink
of product.template.attribute.line records.  In this flow, self might
be an empty recordset, and there is no need to trigger early flushes and
cache invalidation if self is empty.

Part-of: odoo/odoo#84055
2022-02-07 15:24:49 +00:00
Audric Onockx (auon) 85268e1ae7 [FIX] hr_holidays : allow company leave second allocation
Steps :
Create a Leave Allocation :
	Mode : "By Company" (just to give it to every employee).
	Duration : 6 days
Create a Leave for 2 Employees A and B for week W.
Approve it.
Create a Leave for another Employee C for week W and next moday.

Issue:
Duration is 1. As a side effect, employee C still has 5 days left.

Cause:
At validation, requests with multpile employee create one leave per employee.
Then, a resource.calendar.leave is created fro eachone, including the firstone.
When creating the next request, _leave_intervals_batch looks for resource.calendar.leaves
with resource_id = C or False (which means several resources), that has been taken.
It finds the leaves taken by A and B, so it considers C is off too.

Fix:
We don't create a resource.calendar.leave for the multiple employee request.

opw:2739324

closes odoo/odoo#84078

X-original-commit: 4e3af83cdd455ae6cb82439d9e260c3f9ff0b564
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-02-07 14:18:18 +00:00
Goffin Simon b36e024cf1 [FIX] point_of_sale: Receipt not centered when printed
When printing the receip in the POS, the right margin was not equal to the left margin.
Introduce by https://github.com/odoo/odoo/pull/83130/commits/e14af37eb20453df8643b73f6007d6c986398b47

opw:2743902

closes odoo/odoo#83960

closes odoo/odoo#84077

X-original-commit: 26a55d017687190d7b45e3f6f86ba4fc86d81b71
Signed-off-by: Masereel Pierre <pim@odoo.com>
2022-02-07 14:18:14 +00:00
Adrien Widart 4911a26d2c [IMP] product: check barcode uniqueness
With GS1 nomenclature, products and packagins use the same pattern.
Therefore, we need to ensure the uniqueness between products' barcodes
and packagings' ones.

closes odoo/odoo#82883

Related: odoo/enterprise#23550
Related: odoo/upgrade#3180
Signed-off-by: Arnold Moyaux <arm@odoo.com>
2022-02-07 14:18:00 +00:00
Adrien Widart 186537b90a [IMP] barcodes: remove size constraint on pattern
The size constraint on the barcode pattern is an old one and is no more
required. Moreover, if someone wants to add new GS1 patterns, he might
need more than 32 characters.

Part-of: odoo/odoo#82883
2022-02-07 14:18:00 +00:00
Adrien Widart cb8aded19a [FIX] barcodes_gs1_nomenclature: differentiate package and packaging
On Odoo, "package" and "packaging" do not represent the same thing. The
current terms are quite confusing

Part-of: odoo/odoo#82883
2022-02-07 14:17:59 +00:00
Victor Feyens 4d4108e3d1 [IMP] base: correctly prefetch currency fields on monetary updates
closes odoo/odoo#81423

Signed-off-by: Raphael Collet <rco@odoo.com>
2022-02-07 14:17:50 +00:00
Victor Feyens a6c786090c [IMP] test_new_api: test precompute monetary fields
Part-of: odoo/odoo#81423
2022-02-07 14:17:50 +00:00
Victor Feyens 6f9343b8c3 [FIX] sale: search on order_line names
Cf https://github.com/odoo/odoo/commit/387debf7d1bfb3e888fc30e6ece6e21a94ad9504#commitcomment-65937112

closes odoo/odoo#84071

X-original-commit: 3cff07abd2da04804e65c82d6c20f9b8af1063e8
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-02-07 13:10:44 +00:00
Nicolas Bayet defccba4b3 [FIX] web_editor: add label in link_dialog from wysiwg
Open the link dialog from the wysiwyg with the label input.

Task-2704538

closes odoo/odoo#83454

X-original-commit: f7a0c321d94f84ed7daf4f6abff0740ad81024bb
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-02-07 13:10:40 +00:00
momegahed 9969b31a11 [FIX] sale_coupon: last use of promotion program coupon fails
Steps to reproduce:

- install ecommerce - sales
- sales > settings > enable coupons/promotion program
- create a promotion program that applies on the first n orders
- make orders with the promo code applied until order no. n-1
- order no. n will fail when you add the promo code without giving an
  error message

Bug:

The currently applied promotion program will not be applied if this is
the last order allowed in the program

Fix:

Include currently applied promotion program if it was the last order
allowed in it

opw-2737423

closes odoo/odoo#84031

X-original-commit: c397ed01019fc891d7b6e620c66f06deb2a13c69
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-02-07 11:19:44 +00:00
Victor Feyens 64aceb8914 [IMP] web: add test to cover recent change in framework
See 79f7c233ec

closes odoo/odoo#84011

X-original-commit: c5d8bb8ba0870d2b6fb00c57846ab8da7092398a
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-02-07 10:07:53 +00:00
Nicolas (vin) c915373920 [FIX] web: BasicModel: contexts order
When combining the context for an RPC, the
additional context is being added before the raw
context.

Because of this, a use case such as:
   - A o2m field with a context {'field': 'a'}
     with a tree editable view below it
   - That view defines controls to create lines,
     which would change the context key 'field' to
     another value.
=> The field context key would take precedence on
the creates key, making it impossible to override
that key in specific circumstances.

closes odoo/odoo#83996

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-02-07 10:07:50 +00:00
Adrien Widart 30f4a40e20 [FIX] web: compute aggregate value with valid data
The footer of some lists may contain undesirable values (such as `NaN`)

To reproduce the issue:
1. Install mrp with demo data
2. In Settings, enable "Work Orders"
3. Open the list view of MOs
4. Group by product

Error: The total value for Expected Duration and Real Duration is
`NaN:NaN`

(The below explanation is about Expected Duration
(`production_duration_expected`). This is exactly the same behavior for
Real Duration)

As defined on the list view, if there are several rows on the list,
there must be a sum of all `production_duration_expected`:
https://github.com/odoo/odoo/blob/cddbb76e02c3848819ac1f06948b4e7ab8df4bdd/addons/mrp/views/mrp_production_views.xml#L35
This is correctly working when consulting a standard list of MOs (step
3). However, this is different when using the Group-By feature.

When rendering the list, at some point, `_computeColumnAggregates` is
called to compute the sum of all `production_duration_expected`:
https://github.com/odoo/odoo/blob/4e213f0b93f59cf377271b18eae9765ff9cfbe4f/addons/web/static/src/legacy/js/views/list/list_renderer.js#L178-L185
Here is the issue: the rows in the list `data` are not records (there
are results of `read_group`) and these rows don't have any aggregate
value for `production_duration_expected`, which means that
`d.aggregateValues[attrs.name]` returns `undefined`. As a result, when
performing the sum of `0` and `undefined`, it gives `NaN`.

Some detailed explanations:
`aggregateValues` is completed when processing the result of the
`read_group` RPC:
https://github.com/odoo/odoo/blob/bc79a329a1e1edf964f97886943c0688db2087fd/addons/web/static/src/legacy/js/views/basic/basic_model.js#L4697-L4703
However, on PY-side, `read_group` doesn't provide any value for
`production_duration_expected`. For a `read_group` to provide some
aggregate values, it needs the field to be stored and the
`group_operator` attribute to be defined on this field:
https://github.com/odoo/odoo/blob/5691b126f06c2b200ae507bd6edd8f8f7e68d5f5/odoo/models.py#L2521-L2528
Except that none of the conditions are met:
https://github.com/odoo/odoo/blob/d584ad282178deb40bb036c48f971617b0a41f88/addons/mrp/models/mrp_production.py#L147

OPW-2735181

closes odoo/odoo#84035

X-original-commit: 8bc1c582b626aedb680d59f858c92db9dfe4f357
Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
2022-02-07 09:07:00 +00:00
thcl-odoo 6c086ba6d8 [FIX] account: update website URL
Current behavior :
"Learn More" link redirects to 404 page

Steps :
- Go to Apps
- Search for Invoicing
- Click on "LEARN MORE"

OPW-2743304

closes odoo/odoo#84030

X-original-commit: 8d6fbe78cc820579f978d883050027eafbcbd259
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
Signed-off-by: Claude Thibault (thcl) <thcl@odoo.com>
2022-02-07 09:06:56 +00:00
Florian Damhaut 1c4ac7799e [FIX] website: website_form_project get wrong arguments
Step to reproduce:
- Create a website form with its action set to 'create a task'
- Set a project for the task to be created in
- Submit the form while logged in as a portal user

Current Behaviour:
- Task is created but the data from fields is not take into account
This lead to the task not being linked to the project and ending as 'Private'
- Due to the changes of sudo in V15, authorized fields are not fetched
and thus cannot be set properly.

Behaviour after PR:
- The data is fetch via the SUPERUSER instead of sudo to ensure correct data
- The fields are correctly set and the task is created
in the corresponding project.

opw-2743065

closes odoo/odoo#84020

X-original-commit: de03ee2198e039e14d0852d2346cb8aaf3885b5b
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Damhaut Florian (flda) <flda@odoo.com>
2022-02-07 08:08:52 +00:00
Nikunj Ladava c47489e1b0 [FIX] mass_mailing: fix emoji widget position
Before this commit,
When editing a mass mailing in "wide" mode, the emoji widget
is outside of the subject field, which is not optimum for
several reasons like:
 - It makes it harder to understand what it will do
 - It is hidden under the tour bubble

After this commit,
Like in "not-wide" mode, emoji widget is now inside the
subject field.

task- 2730477

closes odoo/odoo#83995

X-original-commit: 9195a28dc19b3f0f29aa103e3a1fd62ee32216bd
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-02-07 08:08:48 +00:00
Florian Damhaut 40be48793e [FIX] hr_holidays: actually compute state for both validation
Step to reproduce:
Change the validation type of the hr.leave.type with id 1 (hlt1) to no_validation
Create a new time off request with a time off type different from hlt1

Current Behaviour:
Time off state is 'draft'

Behaviour After PR:
Default time off state is correctly computated.

opw-2713600

closes odoo/odoo#84007

X-original-commit: 5a26f3402d5760f7860897f2c64d359c7af7d14b
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-02-07 07:16:55 +00:00
David Ramia 80f3e28fc4 [CLA] signature for ramiadavid
closes odoo/odoo#84046

X-original-commit: 2fe3920207e03fc483230d78b842320a837b5d7d
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-02-06 20:10:50 +00:00
nicolas 24b9a61c70 [FIX] account: Use the company of the env instead user company.
For this case is wrong use the company of the user, because you may in other company at this moment and the search is not
working properly.
The way to solve this is use the "env" company as use in the computed method.

closes odoo/odoo#84037

X-original-commit: ee264787841395a95162ae809928ee71fd1b7c84
Signed-off-by: William André (wan) <wan@odoo.com>
2022-02-04 23:32:54 +00:00
Audric Onockx (auon) bb82f10776 [FIX] project : not allow portal to assign himself on task
Steps :
Create a project and a task.
Share editable with Deco Addict.
Collaborators > Deco Addict > Grant Portal Access.
Users > Deco Addict : change password.
Log in with Deco Addict.
Go to the task.

Issue :
You can assign yourself to the task.
This doesn't make sens as even an internal cannot assign a portal.

Fix :
Make this button available only for base.group_user.

closes odoo/odoo#84036

Opw: 2753908
X-original-commit: d8f83379ceb1f718c7ccbed33d3cd4d8f4d37c6f
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-02-04 22:38:57 +00:00
Sébastien Geelen (sge) 89176da7d7 [FIX] web_editor: fix missing strikethrough in editor
Strikethrough option was missing in the editor toolbar.

* Added the option in the toolbar.
* Added the keyboard shortcut (CTRL+5)

task-2754007

closes odoo/odoo#84029

X-original-commit: 9808073c22eacf9f2bcc55aa96eaec56f55597cc
Signed-off-by: Antoine Guenet <age@odoo.com>
2022-02-04 21:44:53 +00:00
Achraf (abz) d2529bbdc6 [FIX] point_of_sale: Fix crash in ClientListScreen
In some cases load_new_partners returns a rejected promise
with an argument of type string, which causes a crash in
the catch which considers that it is an rpc error using
error.message.code and this is an error because error is
a string in the case of a reject on load_new_partners

opw-2679837

closes odoo/odoo#84019

X-original-commit: c1ab58324f22ec51a63e1428072eea293d6ae99d
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Achraf <abz@odoo.com>
2022-02-04 19:44:45 +00:00
Paolo (pgi) ee324e8374 [FIX] web, l10n_ch: Error Correction Level QR Bill
l10n_ch QR bill report needs level 'M' (15% red.)
instead of default level 'L' (7% red.) as per:

https://en.wikipedia.org/wiki/QR_code#Error_correction

See specifications at:

https://www.paymentstandards.ch/dam/downloads/ig-qr-bill-en.pdf

The layout of higher level of Error Correction
are made of a thicker grid with more squares
(more information) at the cost of them being smaller
(a little harder to be read by the scanner).

opw-2584899

closes odoo/odoo#82932

X-original-commit: 0f374b61a6f3b25a1f986afe455c0e42797a5769
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Paolo Gatti (pgi) <pgi@odoo.com>
2022-02-04 19:44:38 +00:00
Brice bib Bartoletti 9a9d61f755 [IMP] l10n_dk: tax implementation, fix and last fine tuning
The aim of this commit is to:
- correct the implementation of the restaurationMoms
- add a price_include version of restauraionMoms
- make a better implementation of the energy tax

before this commit:
The implementation of the restaurationMoms is completly false.
The implementation of tax energy is quite complicated and makes
the UI display a "0 tax value".

after this commit:
2 restaurationMoms version and both are correct.
Tax energy implementation is more user-friendly and more correct
regarding information displayed by the UI.

closes odoo/odoo#84004

Task: #2748309
Pr: https://github.com/odoo/odoo/pull/83666
X-original-commit: 7d4dcf7944cf776d74d31c80f2df15c8d44e3c5c
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Brice Bartoletti <bib@odoo.com>
2022-02-04 18:48:45 +00:00
Adrien Widart 1ae9a47683 [FIX] stock: update qty in inventory report mode
It is currently not possible to update the quantity of a product from
the inventory report

To reproduce the issue:
1. Create a storable product P
2. Update its on hand quantity to 100
3. Inventory > Reporting > Inventory Report
4. On the line for P, update to quantity to 75

Error: The quantity becomes 0 instead of 75

When setting the quantity from the inventory report, the client calls
the `write` method with the context key `inventory_report_mode` defined
and equal to `True`
This `write` leads to `_set_inventory_quantity` which triggers
`action_apply_inventory` (without disabling the context key!):
https://github.com/odoo/odoo/blob/8b155b695823dfa954464ad0d5dd07445ece2471/addons/stock/models/stock_quant.py#L150-L158
At the end of the inventory update, it resets the field
`inventory_quantity` to 0:
https://github.com/odoo/odoo/blob/8b155b695823dfa954464ad0d5dd07445ece2471/addons/stock/models/stock_quant.py#L592
To do so, the `write` method is called again and here is the issue:
https://github.com/odoo/odoo/blob/8b155b695823dfa954464ad0d5dd07445ece2471/addons/stock/models/stock_quant.py#L244-L248
Once `inventory_quantity` is updated, since `inventory_report_mode` is
still in the context and equal to `True`, `action_apply_inventory` is
called again. Then, when applying again the inventory, it will consider
the value of `inventory_quantity` (i.e., `0`) to define the new
quantity.

OPW-2737437
OPW-2746201

closes odoo/odoo#84002

X-original-commit: 6500e99cbfda44ebd1931acd657e86841ac2342a
Signed-off-by: Arnold Moyaux <arm@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
2022-02-04 17:56:43 +00:00
alt-odoo 6e7d7f780d [FIX] project: allow regular user to share project in edit mode
If a user without Administration/Settings rights tries to share a
project in edit mode with a collaborator, an access rights error is
currently raised when creating the portal user. We should not create
any user instead, as there is a signup link sent to the partner anyway.
He can then set up his password without having to click on Reset
password, which was not user-friendly anyway.

closes odoo/odoo#84001

X-original-commit: 8de8c196a137f4ebbf67d7c7c83fee36f873f5c8
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-02-04 17:56:39 +00:00
Nicolas (vin) d0c3e6cba1 [FIX] account: fix tax line partner assignation
When creating a new invoice by giving it an invoice_line_ids list for
which the last line is a note, the tax line may be created wrongfully
without partner_id, which is totally wrong.

To reproduce :

Create a SO
Set a customer
Insert a product with tax
Insert a note
Deliver the product
Invoice the SO and confirm the invoice
The partner_id is not set on the created tax line

While the issue only arises in 15.0, it brings to light that the partner
is not in the grouping keys while it should, so it will be changed in 13.0+

opw-2750851

closes odoo/odoo#83999

X-original-commit: 2ce994d279126aa0356b86d3fa38b699e9035e54
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Nicolas Viseur <vin@odoo.com>
2022-02-04 17:56:35 +00:00
Anh Thao Pham (pta) 440be3f9e2 [FIX] mail, mass_mailing: fix picture of masanry snippet in mailing test
- Go to Email Marketing and create a new mailing
- Add Masonry snippet in mail body
- Send a test mail
The picture of the Masonry snippet is missing.

The masonry image is displayed with CSS via background-image attribute.

There are 2 causes for this issue:

1) The relative url cannot be converted to an absolute one.
This is due to the &quot; entity used to surround the url that is not detected.

style="background-image: url(&quot;/web/image/mass_mailing.s_masonry_block_default_image_1&quot;);"

2) html_sanitize is applied to mail body, but html_sanitize doesn't allow
background-image style attribute.

opw-2735636

closes odoo/odoo#83998

X-original-commit: cdcef228aa30d7dd4081fa25a1aab4811acda3ad
Signed-off-by: Antoine Guenet <age@odoo.com>
2022-02-04 16:54:09 +00:00
Alvaro Fuentes 45631cfcea [FIX] project: MemoryError on _compute_attached_docs_count
When there are multiple projects and many tasks the compute of
project.project.doc_count may raise a `MemoryError` on access to the
projects kanban view.

This issue may appear since the addition on 642fb2e6 of docs_count field
to the kanban view `view_project_kanban`.
https://github.com/odoo/odoo/blob/136808203545eb5d7056d941f3fc250f2871f95b/addons/project/views/project_views.xml#L613
This provokes too much information to be prefetched by the ORM, in
particular the `description` fields of the tasks which may be big (e.g.
contain embedded images).

This issue was observed during upg-101057

closes odoo/odoo#83997

X-original-commit: 6c207ed1027d9b39eecd19886932b17f1a79dccd
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-02-04 16:54:04 +00:00
jpr-odooandBenoit Socias 1bd4f3c7bd [IMP] base, website: prefill the country phone code in website forms
Before this commit the phone fields inside forms did start in a blank
state.

After this commit the empty phone fields are pre-filled with "+" and the
country phone code.
The country is determined based on the IP address with the GeoIP
database.  The phone code is obtained from `res.country` where it is
kept in cache.

task-2463563

closes odoo/odoo#78068

Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Co-authored-by: Benoit Socias <bso@odoo.com>
2022-02-04 16:53:54 +00:00
Pierre Masereel f914d42fee [FIX] point_of_sale: epson kitchen printer cannot render
When printer of type Epson are created for kitchen the pos model is not
passed, and so the rendering of the receipt does not working for
printers added that way.

We are now correctly passing the pos model.

OPW-2745009

closes odoo/odoo#83976

X-original-commit: 00713acce939df99016bdc71a8e9132fb564e978
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2022-02-04 15:26:37 +00:00
oco-odoo 5033a532c8 [FIX] account: fix labelling on payment's partner_bank_id
In the for view of account.payment, when creating an inbound one, the partner_bank_id field was always labeled either "Customer Bank Account" or "Vendor Bank Account". This was wrong, as this field contains the bank accounts receiving the payment, so in case of an inbound operation, it's the company account. We hence add a third possible label for it in that case.

closes odoo/odoo#83974

X-original-commit: c55f2e6aa88d01bc4f26bee7c6303f53e5bb8e48
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Olivier Colson <oco@odoo.com>
2022-02-04 15:26:33 +00:00
Ivàn Todorovich f4a417b124 [IMP] delivery: use the orm cache on _remove_delivery_line
closes odoo/odoo#79110

Signed-off-by: Arnold Moyaux <arm@odoo.com>
2022-02-04 14:03:41 +00:00
Josse Colpaert 1247f5dba0 [IMP] account: put country_code field in debit note and reversal wizard
closes odoo/odoo#83943

Signed-off-by: William André (wan) <wan@odoo.com>
2022-02-04 13:06:58 +00:00