Commit Graph
147466 Commits
Author SHA1 Message Date
Younn Olivierandqsm-odoo 30682fd44c [FIX] web_editor: remove rename button from custom snippet on drag
Commit [1] added a rename button for custom snippets... but forgot to
remove it once the snippet is being dragged.

[1]: https://github.com/odoo/odoo/commit/1044a76a19d94ce93c4cd41841fb805d36a160e3

closes odoo/odoo#82080

X-original-commit: 2d81a6e4a1a8ebb915f00bf37267fb445b7027b7
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
2021-12-30 15:15:37 +00:00
bit-odoo c74e501e3a [IMP] mail: add test for temporary or transient messages not have reply icon
Task-2702690

closes odoo/odoo#82079

X-original-commit: 87c0f4a2ab43f9bd385fb66b21629e64415c5461
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2021-12-30 15:15:33 +00:00
Florian Damhaut b52cd37c5e [FIX] account: accrual rounding error
Step to reproduce:
- Create PO with an item rounded to 0.01
- Deliver 0.48/1
- Open Accrual Expense Entry

Current Behaviour:
- Order line is not taken into account due to rounding error
- Wizard is empty

Behaviour After PR:
- Qty is correctly rounded and appear as expected
- Order line is taken into account

opw-2720161

closes odoo/odoo#82073

X-original-commit: 85c2ab58d9ce1ccefd02f8214937a649285fde4a
Signed-off-by: Damhaut Florian (flda) <flda@odoo.com>
2021-12-30 15:15:30 +00:00
Florian Damhaut baa88e7a26 [FIX] stock: assign in priority to earlier move line
Steps to reproduce:
-Create a quote with 2 lines (same product - different lead time).
-When a partial delivery is made (e.g., 5 of 10), Odoo places the operation related to the remaining undelivered quantity (5), on the last line in the Operations list.
-When the next delivery is made, Odoo deducts the quantity from the first operation in the list instead of from the line whose deadline is closest.

Current Behaviour :
Odoo assign button assign quantity to the first move line in the list.

Behaviour After the PR:
Odoo assign button assign quantity to a move line based on the priority, the closest deadline and the id.

opw-2657048

closes odoo/odoo#82062

X-original-commit: 430f4f2ca1cebaea62415ee72bf4369684abbfaa
Signed-off-by: Arnold Moyaux <arm@odoo.com>
Signed-off-by: Damhaut Florian (flda) <flda@odoo.com>
2021-12-30 15:15:26 +00:00
qsm-odoo 29e5516e2a [FIX] web_editor: re-encourage to use snippets in empty oe_structure
This commit re-applies the commit that was merged at [1] but whose
code was lost during Jabberwock revert at [2].

Make the draggable snippets "wizz" when the user clicks on an empty
oe_structure.

[1]: https://github.com/odoo/odoo/commit/3ed3537abd416ebc35f8bc2ee65f209840c071bf
[2]: https://github.com/odoo/odoo/commit/e5572c317a7775a58675ed73efc89b5c9f6c0c39

Related to task-2363616

closes odoo/odoo#82046

X-original-commit: 668539aa17f061c8851099863e4d5fb7b11b59e8
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-12-30 11:16:11 +00:00
Younn Olivierandqsm-odoo 116afad9fa [FIX] web_editor: correctly move snippets on a popup
Inside a scrollable popup, the scroll was not correctly triggered when
moving one of its snippets through drag and drop.

This commit correctly defines the SmoothScrollOnDrag.$scrollTarget when
a modal is shown.

task-2431469

closes odoo/odoo#82040

X-original-commit: 844051168311ac0c3e8640dda2a90545e373c98d
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
2021-12-30 11:16:08 +00:00
Arnold Moyaux 062ad4d998 [FIX] stock: add a partner on warehouse doesn't set correct properties
- Install stock with demo data
- Log in Chicago company
- Chicago partner has inter-company transit set on Customer and Supplier
locations
- Jeff Lawson (partner address of chicago warehouse) has Customer and
supplier locations set instead of inter-company transit.

It prevents the following usecase:
- Enable synch SO and PO between chicago and SF company with automatic
confirmation
- Create a product with route Buy and MTO
- Create a PO in company chicago that buy to SF comapny
- Validate the PO

You have an error with rule since it try to pull from intercompany
transit instead of customer

However if you log in San Francisco company Jeff Lawson has
inter-company transit set while it should not.

It happens because during the demo install the partner is added through
a write and the company is not provided and the code was missing a part
in that case.

closes odoo/odoo#82006

X-original-commit: 46c49ce4f6c9677463425981f01b69117c11943e
Signed-off-by: Arnold Moyaux <arm@odoo.com>
2021-12-30 09:27:33 +00:00
Arnold Moyaux 72ef6c8db5 [FIX] sale_mrp: quantity invoiced in cogs is different than qty delivered
When a kit is exploded to `stock.move` the quantity is rounded half-up
for every move. But during the invoice. The quantity to invoice on
kit is rounded up so it could result in differences between the
inventory valuation and the cost of the product

closes odoo/odoo#81778

X-original-commit: 1a56d6646d44861cea238ae67d2a7becb36c01b3
Signed-off-by: Tiffany Chang <tic@odoo.com>
Signed-off-by: Arnold Moyaux <arm@odoo.com>
2021-12-30 09:27:29 +00:00
nni-odoo e0f74e8b0a [FIX] sale_mrp: unit price calculation BoM in different UoM
Fix for task 2620026.

_get_bom_component_qty function is only referred to once in the whole odoo app,
which is on addons/sale_mrp/models/account_move.py#22.

The result returned from this function is used as a multiplier to quantity
to convert into the expected UoM. However, the quantity being referred to on
_stock_account_get_anglo_saxon_price_unit (qty_invoiced, qty_to_invoice), are
already converted into the SO Line's product's default UoM. In this function,
it however tries to convert 1 from SO Line's UoM to BoM's UOM.

With this, if Product UoM=x, SO Line UoM=y, BOM UoM=x, in the function _stock_account_get_anglo_saxon_price_unit,
the quantities will be multiplied by the same factor twice, resulting to the incorrect computation of price_unit to follow.

X-original-commit: d7c2f59dc6e769bd6e8c0e53fe1e4f9df16bbe52
Part-of: odoo/odoo#81778
2021-12-30 09:27:29 +00:00
Florian Damhaut 83d7e36864 [FIX] mail: no more than 2 user in a chat
Step to reproduce:
- Settings -> Mail channel -> any chat-type channel
- Go to Members
- Add an user
- Refresh the page

Current Behaviour:
- Traceback
- Chat are designed for 2 users and you should not be able to add more

Behaviour after PR:
- Can only edit members of channel if it's not a chat
- User error if try to add more user
- Fix traceback if there is too much users

opw-2717341

closes odoo/odoo#82044

X-original-commit: 85f7b7c1304222966610833dc325bc47f1c13158
Related: odoo/enterprise#23156
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-12-29 18:44:41 +00:00
Alexandre Kühn edb25d056e [IMP] mail: use popover view for emojis
Task-2694206

closes odoo/odoo#81877

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-12-29 17:55:16 +00:00
Sébastien Theys 07048871af [FIX] mail, im_livechat, *: restore usage of livechat user name
* = website_livechat

Prevents from leaking unnecessary information to livechat clients.

opw-2453956

closes odoo/odoo#82026

X-original-commit: 5ec191d288d5b44f78cd1f6980c47bb64cfd9bd1
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-12-29 16:55:47 +00:00
William Braeckman 0c2f518c58 [FIX] hr_holidays: fix end of year error
Fixes an error happening near the end of the year with one of the test.
The error was introduced with 254d6a71e8

TaskId-2724172

closes odoo/odoo#82028

X-original-commit: 1de3a4bee7b1df4960694d0851e72ef2eecb98a9
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2021-12-29 15:16:26 +00:00
Younn Olivierandqsm-odoo a50c09e3b4 [IMP] web_editor: display help tooltip when clicking on a snippet
This commit introduces a tooltip to indicate to the user that he can
drag and drop the block into the page.

This tooltip is shown after a delay; if the user has started dragging
the block in the meantime, the tooltip won't be shown. Otherwise, it
auto fades out.

task-2431469

closes odoo/odoo#81430

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
2021-12-29 15:16:22 +00:00
Guillaume (guva) 5f721aab73 [FIX] account: right accounts in account group
Steps to reproduce:

- Create an account group for a range for example from 100000 to 200000
- Now edit the group to have a range from 100000 to 150000

Issue:

The accounts with code > 150000 are still in the account group

Solution

Adding an other intermediary table to the query in order to take into
account the accounts which have no group_id

opw-2695533

closes odoo/odoo#82023

X-original-commit: 05c3cb8dbb7a9bf0f438d5ee687b92e8d934f26b
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Guillaume Vanleynseele <guva@odoo.com>
2021-12-29 14:24:14 +00:00
Nicolas Lempereur d20c0044e9 [FIX] purchase: no bulgarian for en_GB translation
The translation of purchase.order().notes name (Terms and Conditions) is
wrongly done in bulgarian since 2016
(d14efd562b).

opw-2719178

closes odoo/odoo#82005

X-original-commit: b0be51f8b2fc1c9422aa543d03a321936bb8f667
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2021-12-29 06:58:00 +00:00
qsm-odoo 2e4d4485c9 [FIX] website, *: do not lose the shadow configuration on option hover
*: web_editor

Hovering the shadow mode option reset the entire shadow instead of just
previewing the mode change.

Related to opw-2701512

closes odoo/odoo#81980

X-original-commit: cae1b99052ded63a3e532b92419236dd51056fd8
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-12-28 15:06:48 +00:00
Nasreddin Boulif (bon)andqsm-odoo ab5c7f7ea8 [FIX] web_editor: allow to remove shadow on all cards
Steps to reproduce:

  - Install `website_hr_recruiment` module
  - Go to `your_website.com/jobs`
  - Activate Edit mode and add a "3 Columns" block
  - Select one of the columns and set the shadow to `None`

Issue:

  Shadow is not removed, and by default the "outset" mode is selected.

Cause:

  When we check the state of the shadow with `css('box-shadow')`, it
  will always be set because a custom css 'box-shadow' is set by the
  module website_hr_recruitment on card element, and therefore the value
  will always be either 'inset' or 'outset'.

Solution:

  If widget value is set to '', replace `box-shadow` style to 'none'
  (only if needed) so it will override the style from css file.

opw-2701512

X-original-commit: 212d8ec10bb48e8fd7de3d3ff7660447b968c62a
Part-of: odoo/odoo#81980
Co-authored-by: qsm-odoo <qsm@odoo.com>
2021-12-28 15:06:48 +00:00
Romain Derie 90a9dce222 [FIX] base, (test_)website: remove the copy_ids orphan leftover
Before this commit, if a theme record (eg `theme.ir.ui.view`) was deleted,
its copy_ids would not be.
While this is perfectly normal and wanted behavior when this is done in a
website context (to not alter other websites), it shouldn't be the case when
performing a theme update through CLI/Migration (or if the user find a way to
update the module through the UI).

Fixes https://github.com/odoo/upgrade/pull/3048
task-2593407
opw-2680866
opw-2685951
opw-2685124
opw-2679040

closes odoo/odoo#81953

X-original-commit: 3146dd72e6cb07d6e78ca763325f13dd54de0086
Related: odoo/design-themes#548
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2021-12-28 11:47:05 +00:00
Romain Derie fa7399c4e6 [FIX] theme_*: enable footer/header template correctly
Some theme are enabling an header template. When doing so, they also disable
the default header template.
But this is not enough, as the user could have changed that template and it is
not the default one anymore.

Then, updating that theme (UX, CLI, Migration) will raise a traceback.

Step to reproduce:
  - Create a website and install theme avantgarde
  - Enter edit mode and select Magazine header template
  At that point, update the theme, either:
  - Through the UI, on theme switch screen, click on Update
  - Through CLI, just run a `-u theme_avantgarde`
-> A traceback will be raised about an xpath error, as both the magazine header
   template and the hamburger header template are active at the same time. Only
   one template is supposed to be activated.

The issue also impact migration, as migrated website can't be accessed due to
the xpath error on rendering.

Theme being impacted (at least): Avantgarde, Graphene & Nano

Note that when installing one of those themes for the first time on a website,
the error won't occur as `_reset_default_config()` will be called through
`_theme_remove()`.

Note that this fix will ensure the correct template is set (and all others are
disabled), but the scss variable won't be correctly set (as it would be if that
template change was done through the right panel).
This is not that much of a problem (considering what it solves), any later
change from the user through the right panel will solve that mismatch.

Fixes https://github.com/odoo/upgrade/pull/3048
task-2593407
opw-2680866
opw-2685951
opw-2685124
opw-2679040

X-original-commit: f18cd32a936829d8a059db0d259189503ee5317f
Part-of: odoo/odoo#81953
2021-12-28 11:47:04 +00:00
Wolfgang Taferner e85c2041fd [FIX] payment: Chatter will not convert to breaks
As the message is thought to be posted in chatter replacing returns with html break.

closes odoo/odoo#81937

X-original-commit: 6cb616d74f71951b3989880ae232702d2257d292
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Signed-off-by: Wolfgang Taferner <w.taferner@wtioit.at>
2021-12-28 10:39:01 +00:00
Merlin (megu) 497ff4610e [FIX] survey: download certificate as portal user
A portal user couldn't download a survey certificate

Steps to reproduce:
1. Install the Survey app and open it
2. Create a survey with a scoring and a certificate and copy the link
3. In an incognito tab, connect as portal and go to the survey
4. After completing the survey, try to download the certificate

Solution:
Change the call 'sudo()' to 'with_user(SUPERUSER_ID)'

OPW-2687625

closes odoo/odoo#81957

X-original-commit: 962919ec878b4e93b4dd8f01f029ce1366976d9b
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
Signed-off-by: Guillaume Merlin (megu) <megu@odoo.com>
2021-12-28 09:47:42 +00:00
Shawcker 0ed31c16be [IMP] l10n_nl: update COA for the Netherlands
The dutch COA is outdated and incomplete. Some accounts have wrong types, and some accounts are missing.
Correct the COA so that every account is correctly categorized.

Changes:
- Add and correct accounts in the dutch COA
- Add tag to 'bank suspense account'

Task id=2674603

closes odoo/odoo#81943

X-original-commit: d486d26cbd705cc5a2bff074d26308c0ecc9d798
Related: odoo/enterprise#23115
Signed-off-by: Laurent Smet <las@odoo.com>
2021-12-28 09:47:39 +00:00
Josse Colpaert 3d4972ff39 [FIX] l10n_es_edi_sii: partners without vat should work as well
Before, the system required a vat number on every partner, but that
is not required.  We need to send it as some other kind of ID however.

To clarify, a partner without vat is not for the simplified case only.

closes odoo/odoo#81942

X-original-commit: 2b164b8e5173ebbc80b8662a011ec48a7a06bcf5
Signed-off-by: Laurent Smet <las@odoo.com>
2021-12-28 09:47:33 +00:00
Bruno-brsy 4036381b68 [FIX] account: Validate invoice with archived bank account
It's possible to confirm an invoice with an archived bank account of
the recipient. But it's not making any sense, since the bank account
is archived.

It's why we need to raise an error if the user want to confirm an
invoice with an archived bank account.

opw-2704605

closes odoo/odoo#81939

X-original-commit: 8b9ff034cb67b132cdb6736a5f18d70beb63c253
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Bruno-brsy <brsy@odoo.com>
2021-12-28 09:47:29 +00:00
thcl-odoo 5b854f7f5f [FIX] web: match downloaded pdf with preview
Current behavior :
PDF Preview in document layout settings doesn't match the downloaded one (colors of div with the total and the columns displayed)

Steps to reproduce :
- Go to Settings
- 'Configure Document Layout' under Companies
- Set layout to Boxed
- Change the colors
- Download the PDF Preview

Reason :
- The columns for the unit price and taxes had the 'd-none' class so they weren't visible when printing the pdf preview. To keep coherence, if we see them in the preview we must see them in the pdf.
- Colors, especially the total div with a 'Boxed' layout, weren't taken into account for some elements in the preview. This is due to a character sanitized in the CSS, specifically '>' which becomes '&gt;' for the '.row > div > table' selector.

OPW-2716089

closes odoo/odoo#81932

X-original-commit: 158c0ae425b3be446d81c3a6f4387b2d9426d10e
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Claude Thibault (thcl) <thcl@odoo.com>
2021-12-28 09:47:25 +00:00
Adrien Widart b513a7b08a [FIX] point_of_sale: assign SML with correct SN
In case the product is tracked and the "Ship Later" feature is enabled,
the lots defined on the POS order are not the same that the ones on the
SMLs of the associated picking

To reproduce the issue:
(Use demo data)
1. Create a product P:
    - Type: Storable
    - Tracked by lots
    - Available in POS
2. Update P's quantity:
    - 2 x Lot01
    - 2 x Lot02
3. Edit the existing POS:
    - Enable the "Ship Later" feature
4. Start a POS session
5. Add some products:
    - 1 x P (Lot01)
    - 1 x p (Lot02)
6. Process the order with the option "Ship Lated" selected
7. Open the associated delivery order

Error: The reserved lots are incorrect: 2 x Lot01 instead of 1 x Lot01 +
1 x Lot02

When creating such a POS order, if the feature "Ship Later" is used, a
method creates a procurement for each POS order line thanks to
`_launch_stock_rule_from_pos_order_lines`
https://github.com/odoo/odoo/blob/72d6431eb26654b697fc0379f4b6d7e305bb79fc/addons/point_of_sale/models/pos_order.py#L677-L680
Then, these procurements are managed by the standard process, which does
not consider the defined lots. This is the reason why it simply uses the
available quantity in the first lot.

OPW-2704352

closes odoo/odoo#81888

X-original-commit: bc59c4eb7ef6bc216474f39ef8e2634b4ab5ff42
Signed-off-by: Masereel Pierre <pim@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
2021-12-28 08:58:29 +00:00
Adrien Widart 3b31ac2a64 [REF] point_of_sale: extract method that creates SML
Part of code in `_create_move_from_pos_order_lines` ensures the creation
of the SMLs based on the SN defined from the POS session

Extracting this part of the code enables the creation of these SML on
already-created SM

Linked to OWP-2704352

X-original-commit: 648232a9b34324bbfe86e2c4cb69db127fe48a7a
Part-of: odoo/odoo#81888
2021-12-28 08:58:28 +00:00
Florian Damhaut c81d5607dc [FIX] hr_fleet: no duplicate contract renewal activity reminder
Step to reproduce:
- Have a fleet contract that need renewal

Current Behaviour:
- A new activity is created everytime the scheduler is called

Behaviour after PR:
- A new activity is only created if there is no current renewal activity present when the scheduler is called

opw-2713537

closes odoo/odoo#81919

X-original-commit: 3610069ea2c10fccf8fcc82c384a2194c4702e06
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Damhaut Florian (flda) <flda@odoo.com>
2021-12-28 08:07:47 +00:00
Guillaume (guva) ef1afc1502 [FIX] account: right account on internal bank transfer
Steps to reproduce:

- Create two bank journals Bank-1 and Bank-2
- Create one Oustanding Payments and one Outstanding Receipts account for each bank journal
- Create and confirm an internal tranfer from Bank-1 to Bank-2 for 100$
- A second payment is created

Issue:

The account on the line in the second payment is the Outstanding Payments account of Bank-1,
it should be the Outstanding Receipts account of Bank-2.

After this commit, the second payment will take into account the account set on bank journal,
and if not set, the one set on company. Otherwise, an error is raised.

opw-2711252

closes odoo/odoo#81938

X-original-commit: 51b5a9d4e56d8d2300cf1ee91f8030c57a41a856
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Guillaume Vanleynseele <guva@odoo.com>
2021-12-28 07:17:04 +00:00
Guillaume (gdi) 147f99bb04 [IMP] website: allow mega menu transparency
This PR allows the user to put a transparency effect on the mega menu.
The transparency effect did not work on the mega menu because
the container that contains the mega menu did not have transparency.
Note that the mega menu templates use a default background color
since [1] to not be transparent by default because of this commit.

[1]: 967d21a

task-2623335

closes odoo/odoo#77871

Related: odoo/upgrade#2929
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-12-27 14:59:36 +00:00
Merlin (megu) 2aedbbdd50 [FIX] payment: enable Wire Transfer as payment method
Error raised when trying to add the Wire Transfer payment method in eCommerce

Steps to reproduce:
1. Install the eCommerce app
2. Open the Website app
3. Click on "Set payments" on the eCommerce Dashboard
4. Select "Custom payment instructions", fill in the fields and save

Solution:
Remove the piece of code that raised the error

OPW-2687671

closes odoo/odoo#81929

X-original-commit: 25e153ab652f7a4bcc70e145b47bc138d9fb3790
Signed-off-by: Guillaume Merlin (megu) <megu@odoo.com>
2021-12-27 14:12:45 +00:00
Alexandre Kühn 7d3775a525 [IMP] mail: rename emojis popover to emoji list
Task-2694206

closes odoo/odoo#81905

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-12-27 12:49:47 +00:00
Alexandre Kühn bead58114d [IMP] mail: rename folder and files of emojis popover to emoji list
Task-2694206

Part-of: odoo/odoo#81905
2021-12-27 12:49:47 +00:00
Louis Wicket (wil) 51bfb9eb03 [IMP] mail: properly detect nonexisting fields
Invalid data provided at record creation were silently skipped by the
framework without triggering an error. This commit ensures that data are
no longer accidentally filtered and therefore that an error will be
raised if a key that does not match an actual field is provided.

This commit also removes the dead code that was detected thanks to these
changes.

closes odoo/odoo#81909

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-12-27 12:02:28 +00:00
Alexandre Kühn 8d2567d162 [IMP] mail: remove propsCompareDepth from useShouldUpdateBasedOnProps
Task-2695743

closes odoo/odoo#80269

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-12-27 11:14:44 +00:00
Fabien Pinckaers 14b24c338a [IMP] remove _read_template cache as it's already cached by _compile
closes odoo/odoo#81921

Signed-off-by: Fabien Pinckaers <fp@odoo.com>
2021-12-27 10:25:23 +00:00
Xavier Morel 74241b3766 [FIX] test_lint: support fstrings in sql injection checker
Those were not accounted for, leading to fstrings passing through
unflagged.

Also update the SQL checker to be stricter but smarter:

The previous version would "fail open", unknown nodes would be allowed
through hence f-strings not being flagged when they started appearing
in arg0 position, should now fail-closed, anything that's not allowed
is forbidden.

This flags a few more cases, all of which seem acceptable upon review.

However the previous version would also only resolve arg0 (in case it
had a `NAME`, to see if that resolved to an acceptable form of
query-building). The new version performs resolution during
`_check_concatenation` and should thus allow e.g. format strings to be
separate variables (though not e.g. module-level constants, yet
anyway).

In resolution, replace the ad-hoc process by astroid's built-in
`lookup` which seems to provide the same information. Slightly more in
fact, as it yields every assignment in case of e.g. conditionals, but
making use of that would require a lot more changes in the checker so
leaving the behaviour as-is for now.

It's important to *not* use `ilookup` here, because ilookup is not
"iterable" but "inferring", and we don't want values, we want
expression ASTs for analysis.

NOTE: previous improvements as well as fixes to existing code were
only implemented in 14.0, hence this being merged in 14.0 not 13.0
despite 13.0 still being supported.

closes odoo/odoo#81721

X-original-commit: 376ccf0944dae1bc53ae9c5385977c4e6b23e083
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-12-27 09:36:42 +00:00
Jeremy Kersten 6c5a93b6b2 [IMP] base: use new filter_ext parameter
Added at 49429f986a, needed to select proper assets

Closes #68043.
2021-10-12 14:55:39 +02:00
Josse Colpaert 33dfee605e [FIX] l10n_es_edi_sii: do not change the success
Before, the 'success' key was removed from the results
of the invoice processing and as such the invoice
was never put as successfully sent, but you sent it
again and again.

closes odoo/odoo#81911

X-original-commit: 853ff30b76a56bcb9af88256aac3a3ceb93bf562
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Josse Colpaert <jco@odoo.com>
2021-12-26 19:30:13 +00:00
Josse Colpaert fec1caf25d [FIX] l10n_es_edi_sii: certificate problems with newer libraries
In urllib3 1.25, an _is_key_file_encrypted method was added
where urllib3 checks if the keyfile is encrypted or not, but
urllib3 uses filenames, while we want to use the contents of cert.
So, in our case, this gave a traceback because it could not open
the file.

The final simple solution for now is to keep keyfile empty as
we store our info in certfile anyways already.

X-original-commit: f908171f91107a4972b29e575bb722c0dabf4ee3
Part-of: odoo/odoo#81911
2021-12-26 19:30:13 +00:00
Xavier Morel 8d7a9162f9 [IMP] core: set CSP header on some non-HTML resources
Core client remains incompatible with CSP, however it can't hurt to
CSP the sub-resources.

Current scheme is simplistic, however if useful of necessary it could
be made more flexible e.g. there could be a map of mimetypes to CSP
configuration, that sort of things.
2021-12-13 14:46:14 +01:00
Thibault Delavallée 14bbac3f35 [FIX] base: temporary files were not correctly attached 2021-12-23 12:50:14 +01:00
Romain Derie c88f76cab7 [FIX] website_sale: add missing method check 2021-12-21 17:14:00 +01:00
Martin Trigaux cfb9967d37 [FIX] website_forum: set return content-type
The request being of type http, the returned Content-Type was
text/html while the select2 request exepected json in the dataType
2021-12-20 13:55:00 +01:00
Martin Trigaux 4107d17b01 [FIX] website_profile,forum: avoid relative links
The origin parameter must be an absolute link (starting with a /)
To be consistent and always have a leading slash (and avoid relative
links if the developer forgot to add a leading slash)
2021-12-20 11:39:03 +01:00
Xavier Morel a6c29c44f4 [IMP] l10n_fr_fec: fix report 2020-12-15 11:31:34 +01:00
Antoine Vandevenne 5146a07ef9 [FIX] payment: avoid orphan tokens
Don't use token without the partner_id set
2021-09-21 09:47:51 +02:00
Gorash 34956c2b7c [FIX] Qweb: tag '>' char is inserted after the default content
All textual content generated by opening the tag must be flushed before
inserting the default content

closes odoo/odoo#81700

X-original-commit: effeba10787388ee0a3d153c984fab5731fc9b1a
Signed-off-by: Thibault Francois <tfr@odoo.com>
Signed-off-by: Olivier Dony <odo@odoo.com>
2021-12-25 06:30:06 +00:00
sofiagvaladze 3bcac60f4b [FIX] hr_recruitment_survey: fix creation of an empty registration
To reproduce an issue:
    Open Recruitment Form from Surveys app. Share it with a recipient.
    For example with Azure Interior.

Current behavior:
    2 registrations are created, including an empty one.

Expected behavior:
    Only 1 registration (for Azure Interior) should be created.

Task-2694600
Partial rewrite of odoo/odoo#81851

closes odoo/odoo#81903

X-original-commit: a0a626253b62f01d6bbfe56b98fdedb2317b9598
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-12-25 02:26:44 +00:00