Commit Graph
159874 Commits
Author SHA1 Message Date
Josse Colpaert 390e27e7b7 [FIX] l10n_latam_invoice_document: onchange needed now after debit note wizard
An error in l10n staging showed a different name for the debit note as
foreseen in the XML.  Checking in the runbot of that l10n staging, we saw
that from the debit note wizard, the document type is recalculated, but
the onchange to trigger the name change was not triggered, so we added that
and this made it back green.

Because of the changes of commit
7edee80

X-original-commit: 3efc6cf1d7a2276a18a4656b4ea4f9e18141bc21
Part-of: odoo/odoo#113302
2023-03-31 15:52:18 +02:00
Stanislas GueniffeyandJosse Colpaert 6b031e7925 [FIX] account_edi: also cancel non-invoice moves
Enables the EDI postprocessing method to cancel non-invoice moves.
This is useful for entry moves such as withholds in l10n_ec

X-original-commit: 1c515e1f55ea675df3f6aace7f6537889779779c
Part-of: odoo/odoo#113302
Co-authored-by: Josse Colpaert <jco@odoo.com>
2023-03-31 15:52:17 +02:00
Kartik Chavda 6e03d2bd26 [IMP] {sale_}project{_mrp}: improve some generic UX of project app.
Purpose:
 - Improve some generic UX of project app.

Specification:
 - make milestone field option hide in task tree view.
 - set default 'Tasks' to label_tasks field on creation when
   label_tasks field is empty.
 - order stat buttons of project update right side panel
   according to user usage.
 - hide project field for list, calendar, graph and activity
   view of act_project_project_2_project_task_all action.
 - archive task ratings template when ratings is disabled and
   unarchive that template when its not.

task-3083855

closes odoo/odoo#107467

Related: odoo/enterprise#34778
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-03-31 15:52:14 +02:00
Odoo's Mergebot d689f6083f [MERGE] digest: make digest bioutifoul again
Digest emails are currently not always correctly displayed on several
email readers. Notably using Outlook feeling is quite bad. This is
notably due to the support of "div" tags in outlook that far from
being perfect. Outlook notably does not support margin nor padding in
div, as well as many "modern" CSS properties.

Digest layout is updated to fix its display. We therefore get back to a
more hardcoded table-based display. It gives a better and more robust
layout cross readers.

This PR fixes the issue by using inline CSS, old CSS, and HTML table tags
to solve the above problem.

This PR also changes the kpi data in various models; update mass mailing
statistics layout;  and adapts test cases in digest and mass mailing models. 

task-2717426

closes odoo/odoo#89549

Related: odoo/upgrade#3707
Related: odoo/enterprise#32083
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-03-31 15:51:59 +02:00
Thibault Delavallée 052495863a [FIX] digest, sale_management: make digest data noupdate=False
As those are mainly demonstration data and heavily linked to some design
choices better force their update to avoid having badly designed tips.
Mose digest tips are updatable data, just some modules are still having
them as noupdate.

task-2717426

Part-of: odoo/odoo#89549
2023-03-31 15:51:59 +02:00
Mahamadasif Ansari 9b016e828f [IMP] digest, mass_mailing: replace css variable with qweb variable
The digest currently includes a CSS variable for the company's
secondary color, but Outlook does not support it.

This commit replaces the CSS variable in the digest with the QWEB
variable. Apart from that, if the secondary colour of the company
is available, it sets it into the colour property header of the
"mass_mailing_kpi_link_trackers" in email marketing and revert the
changes in commit[1] because border-start/end is an invalid property in CSS.

commit[1] - odoo-dev@1fcd098#diff-faee7192e5f6cf07658d2ceae16380c4b5d54035ecfb9bb4848608db3f429c69L263

tast-2717426

Part-of: odoo/odoo#89549
2023-03-31 15:51:58 +02:00
MAHAMADASIF ANSARI dd9abe6a76 [IMP] digest, test_mass_mailing: adapt test cases due to changes in templates
With this PR, the `digest_data` template is changed, so many test cases fail.
This commit adapts the test cases by changing the `data-field` from `div` to
`table`.

task-2717426

Part-of: odoo/odoo#89549
2023-03-31 15:51:58 +02:00
MAHAMADASIF ANSARI 7f72dd5c43 [IMP] mass_mailing: update statistics layout after digest layout update
With this PR, the `digest_data` template has been changed, so the statistics
layout is not compatible anymore with those updated layout. This commit
updates the `mass_mailing_kpi_link_trackers` data to be compatible with the
new changes.

task-2717426

Part-of: odoo/odoo#89549
2023-03-31 15:51:58 +02:00
Mahamadasif Ansari 02788e4076 [IMP] various: changes tips data due to changes in digest templates
With this PR, the `digest_data` template has been changed, so the `digest_tips`
is not compatible with the new changes.

This commit changes the `digest_tips` data to be compatible with the new changes.

Below are the modules affected:
 - account
 - crm
 - digest
 - hr_expense
 - hr_timesheet
 - im_livechat
 - mrp
 - project
 - purchase
 - sale_management
 - stock
 - website

task-2717426

Part-of: odoo/odoo#89549
2023-03-31 15:51:58 +02:00
MAHAMADASIF ANSARI 535d1aae14 [IMP] digest: fix outlook desktop design
igest emails are currently not always correctly displayed on several
email readers. Notably using Outlook feeling is quite bad. This is
notably due to the support of "div" tags in outlook that far from
being perfect. Outlook notably does not support margin nor padding in
div, as well as many "modern" CSS properties.

Digest layout is updated to fix its display. We therefore get back to a
more hardcoded table-based display. It gives a better and more robust
layout cross readers.

Note that this globally reverts odoo/odoo@fd8709515c that was probably a bad idea.

task-2717426

Part-of: odoo/odoo#89549
2023-03-31 15:51:57 +02:00
david f64e52ee09 [FIX] point_of_sale: blurred company logo on ticket
The `/web/binary/company_logo` controller returns an image with a
maximum of 180px wide, while the point of sale data loader tries to
resize such image to 300px wide. The result is an image with blurry
edges.

A better option is to use the standard `/web/image` controller that
recovers the original image from the proper attachment. This is a tiny
overhead since it's done just once when session is loaded.

closes odoo/odoo#117326

X-original-commit: 49ec373d6269febb66eaace8e71b812798ca11c7
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
2023-03-31 14:43:40 +02:00
Tommy (tong) b34e647f9d [FIX] event_sale: fix unit test
Steps to reproduce:

- Install any localization account module
- Install event_sale
- Run the unit test :TestEventSale.test_ticket_price_with_currency_conversion

Current behaviour:
The unit test will fail in line 341

Expected behaviour:
The unit test should not fail

Explanation:
The unit test used self.env.company which will populate demo invoices after installing
the localization account module. Therefore we can't change the currency on the company
any more in event_sale/tests/test_event_sale.py line 341. It is better to create a new
company in the unit test to prevent side effect like this.

closes odoo/odoo#117286

X-original-commit: 96998664285c00ab3d3ac6491123e596cfa9b3e8
Signed-off-by: William André (wan) <wan@odoo.com>
2023-03-31 14:43:37 +02:00
Aaron Bohy b3b3db6732 [REF] web: move isM2MGrouped logic from model to list
This is only necessary for the list view, no need to add complexity
to the model for this.

Part of task 3179751

closes odoo/odoo#117309

Signed-off-by: Géry Debongnie <ged@odoo.com>
2023-03-31 11:59:00 +02:00
William Henrotin b056deb7ab [FIX] stock_picking_batch: do not confirm multiple times
Commit 324298967cb6 fix the call to _find_auto_batch() by calling
_action_confirm() of the picking _after_ the assignation.

This implies to confirming 2 times the pickings. Which is an issue in
case an automatic orderpoint is searched and triggered. to fullfill the
need in the source location.

This commit change the call to action_confirm() to a call to
_find_auto_batch() only

closes odoo/odoo#117100

X-original-commit: eb6da7009a525665d4608243e260a2d07093abcc
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-03-31 11:58:52 +02:00
Camille Spiritus cbf462f9b9 [IMP] account: make QR error message more explicit
When trying to add a QR code to an invoice, if some conditions weren't met, the user would more often than not get a message simply stating :
"The chosen QR code is not eligible with this invoice".
This was confusing to the user, since the reason for a QR code to not be eligible are multiple : invalid IBAN, unavailable in X country, wrong currency...
Modified the _eligible_for_qr_code function to _get_error_messages_for_qr() so it returns an error message if the qr code is not eligible, and None otherwise.

task-3069753

closes odoo/odoo#116482

Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
2023-03-31 11:58:47 +02:00
Pierre-Yves Dufays 7710b82c26 [FIX] website_slides: Fix add pdf and image content
When uploading an image or a pdf content to a course, it was not uploaded. When
viewing it, as nothing was uploaded:
- for image, a default one was displayed
- for pdf, it kept loading for ever
This fixes the problem.

We also add tests checking the upload of a new image and a pdf.

Technical note: The file to upload is converted to base64 when the upload input
is changed and stored in file.data. When the user submit the file, it is that
preprocessed data that is being sent to the server. Following 542cb1dc,
nothing was assigned any more to file.data when the input field was changed so
submitted file was then always empty:
- for image, before this fix, undefined was always assigned to file.data
because the "dataURL" was split in 1 element and the second element was taken
for file.data. The submitted file was then always empty.
- for pdf, before this fix, only the preview was generated and file.data was
not assigned. Before that commit (542cb1dc), the file was read twice, one for
assigning the base64 content of the file to file.data and one to render the
preview. Here we read it only once in base64 to store it in file.data and then
convert it to binary for computing the preview using atob.

Task-3178726

closes odoo/odoo#117293

X-original-commit: 8a7453d9fc43cde13e2e07697e0b0b104a537b93
Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
2023-03-31 10:53:16 +02:00
Hubert Van de Walle (huvw) 6ca723dee4 [FIX] web: group pager: use correct count
Steps to reproduce
==================

- Go to the products list view
- Remove every filter/group by
- Search for "bolt"
- Group by > Add Custom Group > Active
- Remove the bold filter
- Expand the group

Cause of the issue
==================

The group pager is not displayed because the condition was incorrect

A group pager should only be displayed when the group limit is less than the
group count. The list count was used instead, meaning the total count
was the number of groups and not the number of item in the group.

opw-3221226

closes odoo/odoo#117267

X-original-commit: 4caab25d182bc2b5d1a2c315795a79d286a4491e
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
2023-03-31 10:53:13 +02:00
MerlinGuillaume ae1d574453 [FIX] web: add the same image on different records
Using the same image on new records does not work without refreshing the
page

Steps to reproduce:
1. Install Sales
2. Go to Sales > Products > Products and create a new product
3. Set a name and an image on the product
4. Create a new product (with the 'New' button in the top right of the
   form)
5. Set the image used previously on this product
6. The image does not save

Solution:
Add a `t-key` on the FileUploader in order to recreate a FileUploader
when we open a new form

Problem:
The FileUploader component is not reset when we open a new form (the
files previously uploaded are still present on the FileUploader).
`onFileChange` is thus not called when we use the same image, as the
file hasn't changed.

[This commit] in master fixed the same issue by resetting the
FileUploader after each upload so we can revert it
https://github.com/odoo/odoo/blob/7710c3331ebd22f8396870bd0731f8c1152d9c41/addons/web/static/src/views/fields/file_handler.js#L66

[This commit]:https://github.com/odoo/odoo/commit/18384bb519d95e937ea4cfdd660ac08ba89214c0

opw-3151756

closes odoo/odoo#117252

X-original-commit: 3b04edc80f916b3b02a6abc7e88de32e53593fc2
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
2023-03-31 10:53:10 +02:00
Romain Estievenart fb8112a06b [IMP] mail,hr,web: change the UX of the Many2ManyAvatarFieldPopover
The commit change the design of the Many2ManyAvatarFieldPopover the goal
is to remove the m2m dropdown and fill the dropdown content directly
inside the popover.

It also reverses the order of the displayed tags inside the m2m avatar
field in the kanban view and inside the popover.

It removes the possibility to unassign users on mouse hover in kanban
view.

Note:
It's still possible to remove users inside an m2m_avatar_field popover.

Task ID: 3229888

closes odoo/odoo#117194

X-original-commit: f0d71e98743421318a798ef9d4f1e75d11a23334
Signed-off-by: Michaël Mattiello <mcm@odoo.com>
2023-03-31 10:53:08 +02:00
Mylyna Hy f647465332 [FIX] website_sale: improve internal ref search
Problem:
Results do not show when users search the internal reference of the product template on the ecommerce page
if the product has other variants aside from itself.
The search only searches internal reference of product variants and not the product template.

Steps to reproduce on Runbot 15:

- Install Sales and eCommerce
- Create a product (can be sold), Set its Internal reference, and Add attributes and variants to the product --> Save
Note: the internal ref of the product variants are not set by default
- Go to ecommerce webpage and search the internal reference --> no product found

Proposed solution:
 Add a condition to the domain to also search based on the internal reference of the product template

opw-3212883

closes odoo/odoo#116771

X-original-commit: 5f0578059fe436d770e38ca90d8311ee80301878
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2023-03-31 10:53:02 +02:00
det 21e401fc16 [FIX] account: attachment_ids missing res_id
Step to reproduce:
- create 2 users without admin rights
- go to reconcialiation widget
- go to list view
- add a bank statement in multi mode (via the wizard) with an attachment
- change user and try to access bank statement
> user errors: 'Sorry, you are not allowed to access this document.'

This commit fixes this by adding the missing res_id to the attachment records.

closes odoo/odoo#117268

Note: in master, we shouldn't use the m2m attachment_ids.
Task-id: 3252972
X-original-commit: ea505d7421a7036d7a0d0152bd1cb79e28955eba
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Detry Thomas (det) <det@odoo.com>
2023-03-31 09:48:56 +02:00
Julien Van Roy c3182fa59c [FIX] account_edi_ubl_cii: create partner at import if vat
When importing an electronic invoice, we only want to create the partner
when the vat and the name were retrieved.

closes odoo/odoo#117264

X-original-commit: ddfb7076f9f114ce4b29f50ae22c8663592cb4f4
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Julien Van Roy <juvr@odoo.com>
2023-03-31 09:48:51 +02:00
Julien Banken 88c256d8d8 [FIX] web: standardize behavior for int and float property fields
Currently, the property fields of type integer and decimal does not
behave like the standard fields. There are the following issues:

1. The property fields of type integer and decimal do not fallback to
   the value 0 or 0.0 when the field is emptied.
2. The user can not write the value 0 in the property field of type
   integer and decimal. The value gets discarded whenever the user
   unfocuses the input field.

This commit will fix those two issues and ensure that the property
fields have the same behavior as the standard fields.

task-3226202

closes odoo/odoo#117253

X-original-commit: 08c317743ba90802f471058a8f12d7211f9eb150
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-03-31 09:48:46 +02:00
Adrien Widart (awt) e33b3f4e01 [FIX] stock: display weight UoM on storage category
On the form of a storage category, the UoM of the weight is
hardcoded. This is incorrect as it could be `lb` thanks to the
option in the Settings

OPW-3204924

closes odoo/odoo#117236

X-original-commit: 57d3829d26d16d5360380aec4b7807fc381dd34a
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
2023-03-31 09:48:41 +02:00
Thanh Dodeur 560243aefa [FIX] mail: prevent attachmentViewer crash when clicking a video
In the last refactoring*, the click event handler from the old code
was missed, calling an undefined function, which can cause a crash
on some browsers.

This commit fixes this issue and implements the expected behavior of
preventing the propagation of the click to the parent handler that
closes the attachmentViewer.

\* https://github.com/odoo/odoo/pull/110188

closes odoo/odoo#117288

Signed-off-by: Stockbauer Matthieu (tsm) <tsm@odoo.com>
2023-03-31 08:51:05 +02:00
Kevin Baptiste efb5564fd5 [FIX] hr_work_entry: correct add item to list
The fix introduced in #110559 was partially wrong, the employee ID was
not properly added to the list and would crash.

> TypeError: 'int' object is not iterable

closes odoo/odoo#117217

X-original-commit: a7914d43d7d1835a76486bb66de753b29a24dd70
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-03-31 08:50:55 +02:00
Sanket Brahmbhatt a0d3d49279 [FIX] ir_module: remove unnecessary download function
This error occurs when the name of the module is changed or modified after
being installed.

Steps to reproduce :
1. Install any module.
2. then change the module name.
3. click on module info >  upgrade.
4. Now Apply scheduled Upgrades in the navbar > Confirm.

See the way of error Generating by video:- https://tinyurl.com/2nj2tun4

We changed the name of the base module i.e. 'account_accountant' to
'account_accountant_demo' but this error will also come if the custom module
name has been changed.

commit link of function remove: - https://github.com/odoo/odoo/commit/0339a506f82daa41ccee7b918cb257ba9e8668bd#diff-4f9678d6b87914dc6deca5942262375043388c5ad041b65ce48e0c004e5e0e0bL806-L808

closes odoo/odoo#116265

Sentry: - 3980051773
X-original-commit: 1fa6d9ac2b47e684fc6a6d81632f93b9ffa781a9
Signed-off-by: Raphael Collet <rco@odoo.com>
Signed-off-by: Rémy Voet <ryv@odoo.com>
2023-03-31 08:50:52 +02:00
Rodrigo Serrano 47591e463d [CLA] Update Vauxoo's CLA
Incorporate Rodrigo Serrano (Rodrigosu_Vauxoo) as Vauxoo's contributor.
I confirm I have signed the CLA and read the PR guidelines at:
www.odoo.com/submit-pr

closes odoo/odoo#117280

X-original-commit: 492fb63063581a0335f6a7d3346b32044a533c1a
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-03-31 07:50:43 +02:00
Louis Baudoux 8016ae059e [FIX] account: fix tax rounding adjustments in _check_total_amount
The tax adjustment could fail in the case where the user used another
language than English.
The `Untaxed Total` key was translated when inserted in the
`tax_totals['groups_by_subtotal']` dictionary but not when it was
accessed.

Ticket #3207452

closes odoo/odoo#117284

X-original-commit: 02b5037ff09ed193dca0899cacae48eaa34f9ea4
Signed-off-by: William André (wan) <wan@odoo.com>
2023-03-31 00:27:41 +02:00
qsm-odoo f697decd51 [FIX] portal: use proper muted color for portal chatter published dates
The color that was used for portal chatter published dates was the muted
color that we use at some places in the backend. The portal screens
being frontend screens, it of course did not work with all website color
schemes.

This simply uses the `$text-muted` color to fix the issue. This probably
needs refactoring in master to avoid those extra CSS rules that could
simply be gone with proper bootstrap XML structures.

opw-3146164

closes odoo/odoo#117233

X-original-commit: 29d691327317600ddf2116b7c02709bbeb6cae5b
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-03-30 20:03:32 +02:00
David b43716af45 [FIX] sale_loyalty: prevent sending coupon message on failed sale confirm
There can be multiple causes that could prevent a sales order gets
confirmed when we push the *Confirm* button. This can be common when
extension modules come to play.

The simplest way to reproduce it (no extra modules needed) would be to
make an automated action on sale.order with a criteria that could avoid
the confirmation throwing a UserError.

The coupon email would be sent anyway as we can't rollback a mail
sending once it's gone away but it wouldn't be valid as the process
stopped after it.

So we want to prevent sending that mail if the sale.order can't be
confirmed.

TT42124

closes odoo/odoo#117215

X-original-commit: 2e5c0bf6568f9ed12a0a93d1519bdee75c5eec80
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-03-30 18:59:11 +02:00
Leonardo Pavan Rocha 1fbe56df36 [FIX] calendar: fix videocall location is always readonly
After https://github.com/odoo/odoo/pull/102967, a readonly="1" was added in the
videocall_location field. This forces the field to be readonly instead of
taking into account the readonly domain set in the attrs.

closes odoo/odoo#117214

X-original-commit: 459d5d75edafc2f8796006308e15940889c7dcb6
Signed-off-by: Arnaud Joset <arj@odoo.com>
Signed-off-by: Leonardo Pavan Rocha <lpr@odoo.com>
2023-03-30 18:59:08 +02:00
Leonardo Pavan Rocha 0d7ebeac42 [FIX] calendar: convert relative URLs to absolute
In case the videocall_location was a relative URL, the link wouldn't work
properly. This commit fixes this by converting all URLs to absolute
automatically. Note that this only works for http and https protocols. If
using proprietary schemes such as :skype is desired, this implementation
should be done in the respective module.

X-original-commit: 16fb60e193d0c79333d95ef2f31f0ec01830571f
Part-of: odoo/odoo#117214
2023-03-30 18:59:08 +02:00
Alexandre Kühn 96ebb86201 [FIX] mail: CTRL-C content in chat window from home menu
Before this commit, when in home menu with a chat window,
it was not possible to copy content in conversation with
CTRL-C.

This was due to keydown event being intercepted by the hidden
home menu input.

This commit solves the issue by not propagating keydown events
above chat window, so it's not intercepted by the home menu for
his input.

closes odoo/odoo#117211

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-03-30 18:59:05 +02:00
Arthur Detroux (ard) 1ebcdb0023 [FIX] website, *: check access rights to display elements in New+ modal
*: website_blog,website_event,website_forum,website_hr_recruitment,
website_livechat,website_sale,website_slides

Prior to this commit, elements inside the New+ modal had a `isDisplayed`
property that was meant to be changed by the patches done by each
module. Unfortunately, this was forgotten in the refactor done in [1]
and more precisely when the component was introduced in [2].

This commit fixes that by checking the access rights of the user on each
individual model used on the create form.

[1]: https://github.com/odoo/odoo/commit/31cc10b91dc7762e23b4bde9b945be0c4ce3fe3b
[2]: https://github.com/odoo/odoo/commit/ca2e143d54622d598201826a2cd669bad64b205d

opw-3198700

closes odoo/odoo#117206

X-original-commit: 58704cb7615addd7d40291431e05a894776320d8
Related: odoo/enterprise#39066
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-03-30 18:58:59 +02:00
Valeriya(vchu) 305aac3045 [IMP] sale: promote create_invoices button
create invoice is a common action in sales orders listview that should be promoted for the better user experience

task-3037442

closes odoo/odoo#116495

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-03-30 18:58:54 +02:00
hiroh-odoo 647cf8fe63 [IMP] project: prevent opening form/list view from reporting
Before this commit open the form/list view from reporting views when clicking
on the graph and pivot.

This commit prevents the opening of the form/list view from reporting.

task-3166747

closes odoo/odoo#113362

Related: odoo/enterprise#37402
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-03-30 18:58:51 +02:00
Vincent Larcin 20f938bd10 [IMP] project: add fields to burndown chart search view
This commit removes some field from the burndown chart search view that
were previously removed from the task search views.
It also adds a few fields present in the task search views but missing
from the burndown chart.

Enterprise: https://github.com/odoo/enterprise/pull/36804

Task-3142077

closes odoo/odoo#112194

Related: odoo/enterprise#36804
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-03-30 18:58:43 +02:00
Alexandre Kühn 43bc9897e3 [FIX] mail: read more/less link on message of type notification
Read more/less requires content being `t-ref="body".
It was not properly set for messages of type notification, thus
skipping the read more/less insertion in the content.

closes odoo/odoo#117203

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-03-30 17:58:07 +02:00
Christophe Monniez e878843ee0 [FIX] requirements: fix jinja version for py 3.11
The pinned version of markupsafe for python > 3.10 is incompatible with
the pinned version of jinja.

With this commit, the Jinja version is pinned to follow Debian bookworm
version when python > 3.10 which should fix the issue.

closes odoo/odoo#117191

X-original-commit: 548d177e16f364b35f61f861df132dfcedc71e28
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2023-03-30 17:58:04 +02:00
Ivan Yelizariev 94cf6128df [FIX] *: fix css issue with labels in Settings page
Settings page lacks a space between some labels and corresponding selection
input. Example: label *Digest Email* and default value *Your Odoo Periodic
Digest*.

Fix it by adding margin via mr8 class

Code analysis
=============

v15 has margin:
https://github.com/odoo/odoo/blob/eee0a77619b0cef70272b24f6ff663210e94eb1e/addons/web/static/src/legacy/scss/form_view.scss#L673

while v16 doesn't have it
https://github.com/odoo/odoo/blob/3ee5d7a0fbccae5f742e1aba8d3d24f8bab3cbdd/addons/web/static/src/views/form/form_controller.scss#L605

v16 was refactored first https://github.com/odoo/odoo/commit/8fa6e923d0fc8695d92e0b114e230d3abab7d9bc

- margin: 0 $o-form-spacing-unit 0 0;
+ margin-right: $o-form-spacing-unit;

but then it was completely removed
https://github.com/odoo/odoo/commit/fb629dc91df1720cb0658d3e9f946a4fda83fbd0

opw-3115232

closes odoo/odoo#117187

X-original-commit: b87e214e7b6ea23aa187f87f922ef8f077393e9a
Related: odoo/enterprise#39054
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Signed-off-by: Ivan Elizaryev (iel) <iel@odoo.com>
2023-03-30 17:57:58 +02:00
Maruan Aguerdouh (magm) 345fdee4fb [FIX] mass_mailing: fix traceback when creating a mailing campaing with filters
Steps to reproduce:

- Get Marketing Automation module and mass_mailing module
- Go to Marketing Automation > Configuration > Favorite filters
- Create a new filter with for example, Recipient Model as Contact and
the domain to be 'Name contains test'
- Now we go back to Campaigns (Inside Marketing Automation) and create a
new campaign with the filter that we have just created.
- Create a new activity for this campaign with any mail template and
save it.
- Now just pres "start" to start the campaign.
- After that you can also use "Launch a test" to see the trace-back.

Issue:

We receive a trace-back when we try to access to a value of a undefined
object. That it is launch whenever we have a campaign with filters.

Solution:

Added the handling of the case when the inputElement is undefined.

opw-3146908

closes odoo/odoo#117185

X-original-commit: b5b0d665ef2ea492bf7f9823da7f7982b0ddefa6
Signed-off-by: Thiry Renaud (reth) <reth@odoo.com>
2023-03-30 17:57:55 +02:00
Didier (did) bb8017707c [FIX] mail: restore the ability to disable link preview
Before this PR it was not possible to disable the link preview by setting
`mail.link_preview_throttle` to 0. This feature was lost in the refactoring.

This PR reintroduce this feature.

closes odoo/odoo#117101

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-03-30 17:57:53 +02:00
Valeriya(vchu) 8a3af894f4 [IMP] sale: add placeholder for order many2one fields
make clear for the user that the keyboard can be used for the search

task-3175239

closes odoo/odoo#116546

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-03-30 17:57:47 +02:00
Lucas Lefèvre 052dadfc5b [REF] spreadsheet: introduce @odoo/o-spreadsheet module
Using o-spreadsheet features and functions is done using
the same import module as if it was installed from npm.

Additionaly, by adding the library as dev dependency in package.json[1], IDEs can
now leverage Typescript types for autocomplete and type checking.
The "alpha" release tag is always the lastest master version.

[1] enable web tooling `addons/web/tooling/enable.sh` ;)

closes odoo/odoo#115972

Related: odoo/enterprise#38471
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2023-03-30 17:57:44 +02:00
Julien Van Roy 209da20bda [IMP] account_edi_ubl_cii: create partner at import if not retrieved
When importing a vendor bill/invoice, a matching partner is searched. If
no match is found, a new partner will created.

task-3141337

closes odoo/odoo#117168

X-original-commit: 08a6bbd92276f92f215d3225f3f14ae8a908f034
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Julien Van Roy <juvr@odoo.com>
2023-03-30 16:23:13 +02:00
Brice bib Bartoletti 9e949bb0bf [REF] account,l10n_eu_oss: query tag easily
The aimf of this commit is to make the query of a specific tag with a
specific sign easier by avoiding all the filtering in
`expression._get_tax_tags().filtered(lambda t: t.tax_negate)`

With this commit, we just leverage the existing filtering on domain to
only get the desired tag.

no-task

closes odoo/odoo#117167

X-original-commit: 6eb53a3802d24e283b8334b6f245ffe87dddcbe8
Related: odoo/enterprise#39044
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
2023-03-30 16:23:10 +02:00
Victor Piryns (pivi) 1adaaba90e [FIX] (sale_)project(_purchase): proj.prof. w/ AA distr. for inv/bills
Current behaviour:
The project profitability panel doesn't take into account the AA
distribution of the project's AA for solo invoices and bills.

Expected behaviour:
It should take the distribution set into account.

Steps to reproduce:
- Install Accounting, Sales, Project, Purchase
- Settings > Activate AA
- Create a new project with a new AA for it.
- Create a new bill or invoice, on the line set the 2 AA, one with
  the project's AA with some X%, and the other AA is irrelevant (the
  sum of all AA on the line should be 100%)
- Confirm the invoice/bill
- Go to the project profitability report (project updates), see that
  we have 100% of the line value that contributed, when it should have.

Reason for the problem:
The contribution of the AA was not taken into account when computing
the project profitability for solo invoices/bills (invoices/bills
w/o SO/PO respectively)

Fix:
Additionally get the analytic_distribution when fetch the
account_move_lines to compute the project's profitability.

Affected versions:
- 16.0
- saas-16.1
- saas-16.2
- master

opw-3246199

closes odoo/odoo#117163

X-original-commit: c3c66d05d039514c9dd02ebdede20a3dff757728
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Signed-off-by: Piryns Victor (pivi) <pivi@odoo.com>
2023-03-30 16:23:04 +02:00
Andrea Grazioso (agr-odoo) 406ec9dcdf [FIX] account: analytic plan match
Settings>Accounting, activate analytics
Create an Analytic Plan:
  - Default Applicability: Optional
  - Add 1 applicability line:
    - Domain: Vendor Bill
    - Product Category: All / Saleable / Office Furniture
    - Applicability: Mandatory
Create a vendor bill, fill partner, billdate and create a line without
product
Save and Confirm

Action will be blocked with message:
"One or more lines require a 100% analytic distribution."
This should not occur as the mandatory applicability should not match
the bill

opw-3189829

closes odoo/odoo#117162

X-original-commit: c4f90cf7b116fbec8516659475c4e1160a00b2f1
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
2023-03-30 16:23:01 +02:00
Julien Banken 53d0b30c53 [IMP] base: add codeview option on action helper form
When editing an action using the dev options, one may need to update the
action helper of the current action. Currently, the html field used to
edit the action helper does not have the "codeview" option. As a result,
the raw html of the action helper can not be edited easily. To solve
that problem, this commit will simply add the "codeview" option on the
html field.

task-3252414

closes odoo/odoo#117032

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-03-30 16:22:58 +02:00