Commit Graph
142252 Commits
Author SHA1 Message Date
Sébastien Mottet (oms) f89f17c168 [IMP] website: add data-snippet attribute on rendered snippets
Add the 'data-snippet' attribute on each snippet rendered
by the configurator when building website pages.

closes odoo/odoo#69706

X-original-commit: 7c203eda4210eec7db476aa5ac056150b795b921
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Sébastien Mottet <smottet@users.noreply.github.com>
2021-04-22 15:02:29 +00:00
wan 002f89bd84 [FIX] account: never set default for invoice_date
For customer invoices:
* do not set default date because if you prepare an invoice (and it gets
  a default date), then validate it the next day, the date will be wrong
* set the date when posting if it wasn't set, because why not?

For vendor bills:
* do not set default date because you rarely encode a bill at the bill
  date. Forcing the user to enter it reduces risks of user error
  (duplicated vendor bill)
* do not set it when posting, same reason.

opw-2492862
Related #68368
Closes #68367

closes odoo/odoo#69639

X-original-commit: 41041d8016d11f017d92d28f32ab2cf42f1349a9
Related: odoo/enterprise#17866
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: William André (wan) <wan@odoo.com>
2021-04-22 08:16:08 +00:00
Julien Banken 0bc56aa7a2 [IMP] phone_validation: improve mobile/phone search
PURPOSE

This commit aims to simplify the phone filter of the lead search view
to better manage phone numbers containing letters.

SPECS

The current phone filter will remove all non-digit characters from the
input string. When the user enters an american phone number containing
letters, the filter can sometimes return phone numbers that do not match
exactly with the provided input string.

eg: If the user types "hello123" in the search bar, the filter will
return all phone numbers matching with "%123%". This pattern will indeed
match with "hello123" but it will also match with many other phone numbers
containing only "123".

To fix the issue, the phone filter will no longer trim all non-digit
characters from the input string. The filter will be more standard and
will better manage phone numbers containing letters.

LINKS

Task ID-2424185
COM PR odoo/odoo#64078

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-04-23 13:15:49 +00:00
Julien Banken 4b8c55697c [IMP] crm: add tests for phone / mobile search
This commit aims to add tests to ensure current behavior of seach on
mobile/phone field. Some unsupported cases are commented to highlight
current feature state.

LINKS

Task ID-2424185
COM PR odoo/odoo#64078
2021-04-23 13:13:47 +00:00
David Monjoie 1551a459cb [FIX] web_editor: update Odoo Editor lib to commit f031cf78
closes odoo/odoo#69761

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-04-23 12:30:49 +00:00
Sébastien Geelen (sge) 6c095fbee5 [FIX] web_editor: Fix floating toolbar position when inside a iframe 2021-04-23 12:20:08 +00:00
Sébastien Geelen (sge) 1158e7f99f [FIX] web_editor, mass_mailing: remove snippets from plain text mail 2021-04-23 12:18:04 +00:00
Sébastien Mottet (oms) fb5506cad0 [FIX] website: handle configurator images download timeout
The timeout for images download from unsplash is set to
3s. The exception raised when this limit is reached was
not correctly handled.

closes odoo/odoo#69758

X-original-commit: abca5f73c9e2b992f2638341e81bcb01d86872a6
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-04-23 12:13:23 +00:00
Xavier Morel 95128e6472 [FIX] web: test broken in Firefox
This is arguably a 20 years old Firefox bug (at the very least an
under-specified area of the spec where Firefox's behaviour is
technically allowed under spec but not super useful or convenient):
`window.getSelection()` simply doesn't work when invoked on a form
field: https://bugzilla.mozilla.org/show_bug.cgi?id=85686.

Getting the selection data more explicitly by looking up the focused
form element, then checking *its* selection, seems to work fine and be
cross-browser.

Also focus() the input while at it: according to MDN

> Calling element.select() will not necessarily focus the input, so it
> is often used with HTMLOrForeignElement.focus.

And jQuery doesn't really document whether `select()` will implicitly
`focus()`, so better safe than sorry.

closes odoo/odoo#69579

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2021-04-21 06:22:48 +00:00
Xavier Morel f6790b9895 [IMP] web: drop event during click() dispatching if disabled
Causes the failure of [0] on FF as it expects that clicking a disabled
button does nothing, which is what happens for Chrome, but the event
is dispatched for Firefox.

Asking the internet it looks like Firefox is in the right here:
click() ultimately calls dispatchEvent (directly), dispatchEvent
should go through even on disabled event. This was specifically fixed
in Firefox[1], and there is an issue opened against Chrome[2] (cf
also: spec discussion[3]).

There's an other issue which mentions inconsistencies between the
actual browser and WPT[4], but for us Chrome always 100% does the
"wrong" thing.

Anyway add a disabled flag in click, though I don't know that it's the
right fix, and it may need to be added to other events as well?

[0] https://github.com/odoo/odoo/blob/c89cdcf11c66e80c33cd77edceaee7eb59a704b3/addons/web/static/tests/fields/relational_fields/field_many2one_tests.js#L2044
[1] https://bugzilla.mozilla.org/show_bug.cgi?id=329509
[2] https://bugs.chromium.org/p/chromium/issues/detail?id=1115661
[3] https://github.com/whatwg/html/pull/5805#issuecomment-672960163
[4] https://bugs.chromium.org/p/chromium/issues/detail?id=1116161
2021-04-20 14:11:30 +00:00
Xavier Morel fe8204a48d [FIX] web: overspecified test
Testing what's literally just a native feature seems odd, but in this
case it's also way over-specified: Firefox's error message for the
conversion of a symbol to a number is

    can't convert symbol to number
2021-04-20 14:10:31 +00:00
Dhruv Patel 11b85c7c13 [FIX] mail: small image attachment preview too small for its box
In the chatter, the attachment preview image size is fixed with 160*160
but the actual preview area is 200*200px so the image is not filling correctly.
It appears padding around the image, especially visible when hovering it.

So with this commit, We should make sure to use a properly sized image in the
preview. we have to also provide the perfect resolution and preview for
the small images without upscaling incorrectly. For large images, it should be
display based on the aspect ratio.

Task : 2483885

closes odoo/odoo#69755

X-original-commit: 08f152bb9ceb6bd4560aa177b392b0420162e131
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-04-23 11:12:18 +00:00
Adrien Widart 15cc585904 [FIX] sale: display correct order line value
To reproduce the error:
(Need sale_management)
1. In Settings:
    - Line Subtotals Tax Display: Tax-Included
2. Create a tax T:
    - Included in Price: True
3. Create and save a SO
    - Add a line with T
4. Switch to mobile view

Error: The amount of the order line is incorrect, it does not consider
the option from step 1.

OPW-2484646

closes odoo/odoo#69737

X-original-commit: 8c21d57d62377b7b1a9bac8857177bc05ab885d6
Signed-off-by: Adrien Widart <adwid@users.noreply.github.com>
2021-04-23 09:16:53 +00:00
Adrien Widart b6fc91d243 [FIX] google_calendar: force notification sending
Suppose both Google Calendar and Odoo Calendar are synced. Google will
not send any invitation to attendees when the user creates an event from
Odoo.

This fix requires Google to notify attendees when an event is created,
modified or cancelled.

OPW-2501413

closes odoo/odoo#69735

X-original-commit: 48cc3ed28e51ce34c1740f9b394d971234e0bdbe
Signed-off-by: Arnaud Joset <arj-odoo@users.noreply.github.com>
2021-04-23 09:10:40 +00:00
Benjamin Frantzen (bfr) b27614b136 [FIX] account_edi_ubl: extracting the pdf from the imported xml doesn't raise an exception any more when creating a new invoice
Before this commit, when an attachment was present in the xml (pdf) and the import was to create a new invoice, it crashed when trying to post the pdf on the not-yet existant invoice.

This commit also fixes:
- In the tests, `create_invoice_from_file` didn't handle the subfolder parameter correctly
- `create_invoice_from_file` now returns the created invoice

closes odoo/odoo#69722

X-original-commit: e81457501f4815a4d9add7a56a9dfe66a7656269
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: bfr-o <bfr-o@users.noreply.github.com>
2021-04-22 16:57:12 +00:00
Julien Mougenot 08bb6e2e50 [FIX] im_livechat: Convert external_lib assets
Before this commit: some assets in im_livechat have not been converted
to the new manifest asset declaration system.

This commit converts these assets.

closes odoo/odoo#69612

X-original-commit: b6e1945a20b69dfc7cf83cd4380e92d949665093
Related: odoo/enterprise#17851
Signed-off-by: Christophe Simonis <chs@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-04-21 15:49:57 +00:00
Julien Mougenot c20e5ad072 [FIX] base_import: Convert test.xml assets
Before this commit: some testing assets in base_import_module have not
been converted to the new manifest asset declaration system.

This commit converts these assets.

X-original-commit: 3509493e8d0c0106f1dfc7dabe2e3edeec98fbd7
2021-04-21 15:49:57 +00:00
Ivan Yelizariev 038fdcabe0 [FIX] mrp: optimize _compute_used_in_bom_count
previous implementation works slowly for products with many variants.

Performance Test
================

* ~5 K product.template
* ~14 K product.variants
* ~12 K mrp.bom
* ~414 K mrp.bom.line

Reading time for the field on a product with ~1000 variants

Measuring total request time:
* Before 9,5 sec
* After:
** without module upgrade 1,5 sec
** with module upgrade 0,3 sec

Measuring query execution in psql:
* Before 7,2 sec
* After:
** without module upgrade 0,7 sec
** with module upgrade 0,001 sec

---

opw-2494423

closes odoo/odoo#69293

Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
2021-04-15 09:15:16 +00:00
Andrea Grazioso (agr-odoo) b937c3fdfa [FIX] purchase_product_matrix: avoid crash on product reorder
Open a purchase order with several lines
Switch to Edit mode
Use the movement arrow on the left of a line to move it upward/downward
At the end of the operation a traceback will popup

opw-2508480

closes odoo/odoo#69724

X-original-commit: 0d7c9db6d17e3268ae01a5b2d79b513c5b24a34f
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
2021-04-22 17:51:47 +00:00
Leonardo Pavan Rocha 8cae451d58 [IMP] web: makes signature scale to canvas size to avoid mobile/desktop inconsistency
In the sign app, if a signature is saved in mobile resolution, when the user tries to sign a document in desktop, the size that is shown is the mobile size, which is strange for the user.
This PR is an odoo change and it modifies the library method that adds the image to the canvas, resizing the image to the canvas size.

task-2479787

closes odoo/odoo#68160

Signed-off-by: Arnaud Joset <arj-odoo@users.noreply.github.com>
2021-04-22 12:53:59 +00:00
Antoine Guenet 0c02549186 [FIX] web_editor: properly hide the toolbar when needed in iframe
This fixes a bug in mass mailing, that made the toolbar still visible
while the selection was not in an editable area. It was due to a jquery
selector targetting the top document instead of the iframe's document.

closes odoo/odoo#69707

X-original-commit: 5e3cda847a42561ae709cb792d3e612f8a5e66dc
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-04-22 15:03:05 +00:00
Benjamin Frantzen (bfr) 2acad2e022 [FIX] l10n_nl: add missing fields kvk and oin on the res_partner view
closes odoo/odoo#69696

X-original-commit: 98c57ce5a22fac6d7ec18a021a60cfa657d1b5b5
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: bfr-o <bfr-o@users.noreply.github.com>
2021-04-22 14:00:23 +00:00
Antoine Guenet db420f14e9 [FIX] web_editor, website: ensure editor toolbar doesn't hide dropdowns
A colorpicker in an option positioned above the toolbar in a snippets
menu would be hidden by the toolbar because of the toolbar's z-index.

That z-index is only needed when the editor is in a modal.

The bug this commit fixes only arises when the toolbar is in a snippets
menu.

This applies the z-index only when there is a snippets menu in the page.
To accomplish that we need the "editor_has_snippets" class that the
website module applied to the body. For the sake of harmony within Odoo,
that class is now applied by snippets.editor so that no matter the
module, if there is a snippets bar, the class is on the body of its
document.

closes odoo/odoo#69680

X-original-commit: b1aa9c6093cea918337d5600ff9b16b7dd80de23
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-04-22 12:02:31 +00:00
Nicolas Lempereur dd9d4c2566 [FIX] sale: reposition tooltip to avoid resize flicker
Same reason that cdb7a8ad7647649ad8f595454aa9dc0464117568

The tour bubble animation might cause the page to flicker since the
scrollbar might appear disappear depending on size of modal / browser.

opw-2469248

closes odoo/odoo#69652

X-original-commit: 7405d2a38728d11a5a96c115d7c0c0320dd5ac8e
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2021-04-22 09:44:30 +00:00
Goffin Simon 71301b8bbf [FIX] account_batch_payment: Payment method on payment not available
Steps to reproduce the bug:

    - Let's consider a journal J with inbound payment methods PM1 and PM2
    - Create an inbound batch payment with Bank = J
    - The default payment method will be PM2, change it to PM1
    - Create a payment P in the batch content (payment_ids)
    - Save

Bug:

    A UserError was raised: The batch must have the same type as the payments it contains.
    because when setting a partner on P the function _compute_payment_method_id defined in module account_check_printing
    was triggered and the first available payment method was set.

opw:2495487

closes odoo/odoo#69683

X-original-commit: 683c3fd267162c93cb278fd903152ac387e6aba6
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2021-04-22 12:16:29 +00:00
Adrien Widart c322a8b537 [FIX] stock: make warehouse list scrollable
On a product's Forecasted Report page, if the company has a lot of
warehouses, when the user opens the drop-down list to select another
warehouse, the list will exceeds the window height and won't be
scrollable. The user will have to zoom out to see the rest of the list.

`o_dropdown_menu` class is used to add required attributes:
https://github.com/odoo/odoo/blob/a622936ab09497086f43715e546a1b33418d0ee3/addons/web/static/src/scss/dropdown_menu.scss#L7-L8

OPW-2480784

closes odoo/odoo#69672

X-original-commit: aaf8192180846162ebacf3309ca8fb06677e520d
Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
Signed-off-by: Adrien Widart <adwid@users.noreply.github.com>
2021-04-22 11:24:03 +00:00
Achraf (abz) 10e7c9eece [FIX] sale_coupon: Allow coupons to correctly allow several free products
What are the steps to reproduce your issue ?

    1. Add a coupon program with the following condition sale_ok == True & name == 'Large Desk'
    2. Add 'Buy 1 get 2 free' 'Large Cabinet'
    3. Create a quotation with 1 Large Desk and 2 Large Cabinet
    4. Add the coupon code

What is currently happening ?

    Promotion will only remove one * Large Cabinet price instead of 2

What are you expecting to happen ?

    Promotion remove two * Large Cabinet price

Why is this happening ?

    The products quantity was mixed with the reward products quantity

opw-2496940

closes odoo/odoo#69671

X-original-commit: 5c4785212fce2c97047d97e96ccbbe32e3681f59
Signed-off-by: Achraf <abz-odoo@users.noreply.github.com>
2021-04-22 11:31:35 +00:00
Swapnesh Shah ccbab1a1ea [FIX] mrp: remove workorder_ids on removing bom_id
Method `_onchange_workorder_ids` will create workorder_ids
for the the selected bom but it was not re-setting it on removing
BoM.
It was causing issue on `_action_confirm` as Bom for the selected
WO will not be found.

closes odoo/odoo#69662

Fixes: #68261
X-original-commit: 13832912daafad7c472d7414eaacede9e302e787
Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
2021-04-22 10:30:21 +00:00
Nicolas Lempereur 17428749b4 [FIX] web: find scrollingElement despite rounding
In mass mailing edition, in some configuration of:

- being in a modal or not
- size of window
- zoom level

we might get an error when getting the scrolling element.

For example when editing a mass mailing, if I set my viewport to 595
pixels height and have a 90% zoom, the editor is broken.

This is because in SnippetsMenu.starts  `$().getScrollingElement()`
doesn't find an element that has the height of body. In my use case body
height is 329.111 pixels, and scroll height is 328 pixels.

Testing different zoom level and viewport height, the maximum difference
I was able to get was 1.25 so this commit increase to 1.5 the maxmimum
difference.

opw-2455727
opw-2469174

closes odoo/odoo#69664

X-original-commit: c7a4cca4a082af7c6b33a70d4b19e700e4d487e7
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-04-22 10:32:05 +00:00
Jeremy Kersten 844f6e95e5 [FIX] gift_card: fix compute name and typo
Courtesy of @willmakenoise

Commented on commit ae7e1f64f8

closes odoo/odoo#69658

X-original-commit: 88beb09b736e4a51d64bf35cbb29c2cb739e4d06
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-04-22 10:08:37 +00:00
Raphael Collet f7d5d11238 [IMP] core: do not add magic and inherited fields on abstract models
Magic and inherited fields are not really useful on abstract models.
The _inherits specification is used anyway by models that inherit from
those abstract models.

The main goal of this change is to prepare a refactoring of models where
fields are no longer duplicated on the registry classes, but fields
defined on classes are used directly.  But this new design cannot be
applied to all fields: a field being overridden simply cannot be used
directly.  This branch improves the situation by avoiding unnecessary
field overridings.

closes odoo/odoo#69372

Related: odoo/upgrade#2409
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2021-04-22 08:59:36 +00:00
Raphael Collet 93d2321b6b [REF] core: simplify definition of concurrency field 2021-04-21 13:36:52 +00:00
hur@odoo.com 4959fdd2bb [FIX] mrp: Kit Operations on parent MO without operations
Usecase to reproduce:
- BOM PROD 1 -> No operation -> KIT COMP 1
- BOM KIT COMP 1 -> at lease one operation

Create a MO and confirm it -> Traceback.

It happens because workorders_by_bom[production.bom_id] will try to
find the bom related to production order. However they don't exist but
it will create the entry [BOM PROD 1] = mrp.workorder()

The [0] will be call on each values of the list afterward and raise
the traceback

opw-2477269

closes odoo/odoo#69651

X-original-commit: edabb86a306c4dda088b39f163de5668b5d90392
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-04-22 09:43:04 +00:00
Antoine Guenet 459d4e27a8 [FIX] web_editor: ensure dropdown menus in toolbar are fully visible
Dropdown menus (eg.: font-size) had their contents cropped if space was
lacking underneath the toolbar. With this the user can scroll down to
see the rest of it if needed.

More info: https://github.com/twbs/bootstrap/issues/23378

closes odoo/odoo#69644

X-original-commit: d360b751acfc1649673739b185b635732cf5b78f
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-04-22 09:11:23 +00:00
Thibault Francois e564b0d8da [FIX] google_(account|calendar): Concurrent Synchro
Each time the calendar view of event.calendar is loaded,
the synchronization with google calendar was launched
and if a user open many tabs, it can lead to deadlock

Solution: Check for lock before launching the synchro,
if the transaction cannot acquire the lock, it's proably
because another synchro already started

closes odoo/odoo#69540

X-original-commit: 101598fae6fc32a49bb6d422a82b621a81201cb5
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-04-20 12:23:10 +00:00
Arnold Moyauxandsimongoffin 2a07d7b8f9 [FIX] mrp_subcontracting, stock: Resupply Subcontractor on Order
Steps to reproduce the bug:

- Let's consider a consumable product P with a subcontracted BOM B
- Let's consider that B is subcontracted by a partner S and B has a storable component C
- C has the route Resupply Subcontractor on Order and has a partner SUP as supplier
- Create a purchase order PO with 1 P to S and confirm PO
- A delivery order DO1 is created with C to S
- Change the ordered quantity on PO and set 2 instead of 1

Bug:

DO1 was canceled and a new delivery order DO2 was created with only 1 C instead of 2

It happens due to merge move, when updating the PO line a new rule is
trigger and create the object in this order:
- Move Sub-Stock(finished) -> Subcontract Order -> Move Stock-Sub(comp)

Then the action_confirm is trigger and will run _merge_move
on object from left to right order. But when the move Sub-Stock is
merged, everything is write in the first move and the new move is
unlink. It result by canceling all the following object (so the new
subcontractor and the Move Stock-Sub). It was not an issue for the
subcontracting since the write of stock.move is overridden in order
to update the order quantity when the move quantity is updated.
However in this case the rule are not triggered in order to create
the moves that ressuply the subcontractor.

In order to avoid this mess, this PR prevent the merge in case of a
subcontracting move.

opw-2419222

closes odoo/odoo#69553

X-original-commit: c6447e724b9df3c25c5a5306fc902dfc5dcd6bb8
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Co-authored-by: simongoffin <sig@odoo.com>
2021-04-21 15:23:05 +00:00
Anh Thao Pham (pta) fbc32db828 [FIX] sale: avoid re-invoicing invoiced SO lines
- Create a product:
  * Invoicing Policy: Delivered quantities
  * Re-invoice Expenses: At cost
- Create a SO with the created product in Order Lines
- Make sure the subtotal of the SO line is equal to 0, by setting an Unit Price to 0
  or by applying a 100% discount
- Confirm SO and create an invoice (Regular invoice)
- Post the invoice
A new line with the same product and the same delivered quantity is added to the SO.

It is not possible to invoice a SO line with a product having an expense policy and
a subtotal equal to 0, without having it reinvoiced to the SO.

This fix will prevent account move lines linked to a SO line from being reinvoiced.

opw-2479560

closes odoo/odoo#69623

X-original-commit: b41cf0077c9a6d1d74cc0c7987c0edcc58e368d1
Signed-off-by: Anh Thao PHAM <kitan191@users.noreply.github.com>
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2021-04-21 15:11:17 +00:00
oco-odoo f8ca384ba7 [IMP] account: error message when no country can be inferred for taxes when installing the CoA
Generic chart of accounts such as Syscohada don't have any country_id set. When installing them on a company without any account_fiscal_country_id, no country could be assigned to the account.tax being created, hence crashing, as country_id is required on account.tax. We now prevent that by raising a more comprehensive error.

closes odoo/odoo#69593

X-original-commit: a253bf331b2448194106523b9c3d753fb6ddd04a
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2021-04-21 09:42:22 +00:00
Gorash aa47eda087 [IMP] web: add mode qweb in ace
Add a new parser in the ace for the qweb highlight. This makes it possible
to visualize the qweb tags and the part of code.
Used in the website and in xml fields.

closes odoo/odoo#69609

Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2021-04-21 12:15:01 +00:00
Nicolas (vin) 7519a500cf [FIX] snailmail_account: avoid a traceback when validating addresses
When trying to send&print a move without partner_id, which can be done
from the tree view of the account moves, a traceback will be raised when
 the address is being validated.

This change will make sure to avoid that and also shows that the adress
is not complete in the wizard if needed.

closes odoo/odoo#69602

X-original-commit: 0ce5f8617fdcf3601f937c35660563cb3c79fbbe
Signed-off-by: William André (wan) <wan@odoo.com>
2021-04-21 11:00:34 +00:00
Swapnesh Shah e710db21fd [FIX] mrp: correct report name
Before this commit,
It was always displaying `BoM Structure & Cost` for BoM Structure and
BoM Structure & Cost report.

With this commit, we are displaying correct report name based on report type.

closes odoo/odoo#69595

X-original-commit: e47f7db5ead8719d76f5fe1afd451f0ce113864b
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-04-21 10:08:27 +00:00
Anjali 1d8b34760c [FIX] mass_mailing{_sms}: fix various views for proper behavior
This commit fixes few views related to mass mailing for ensuring their
proper behavior. The changes are listed as below:

 - in the mass mailing form view (view_mail_mass_mailing_form), made the
   mailing_type field readonly if the mailing is not in draft state to
   prevent switching the type once mailing is launched.
 - in the mass mailing sms form view (mailing_mailing_view_form_sms), made the
   'body_plaintext' field readonly if the mailing is in sent/done state to
   prevent sms content modification after the sms are already sent

Task ID-2390284
COM PR odoo/odoo#62740
ENT PR odoo/enterprise#15098

closes odoo/odoo#69600

X-original-commit: 94f1994c08d3a54f6358c31634ff27532da2a569
Related: odoo/enterprise#17846
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-04-21 10:38:22 +00:00
Nicolas Lempereur 67f9ce9f51 [FIX] website: allow "Search..." translation
Strings in python expression in 't-att-placeholder' are not translated
automatically.

opw-2467404

closes odoo/odoo#69559

X-original-commit: 8f8d55ee4e773884ab35e11bfd0573d7997f3ad3
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2021-04-20 15:17:11 +00:00
Achraf (abz) 31730d74c8 [FIX] mass_mailing: Traceback on mass mailing list merging
What are the steps to reproduce your issue ?

    Try to merge two mailing lists

What is currently happening ?

    Traceback

opw-2504230

closes odoo/odoo#69601

X-original-commit: 66af485530cfc2f5e224b70850b011f0c05743d0
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-04-21 10:38:57 +00:00
Nicolas Seinlet 229e6cfb1a [FIX] portal: ensure only one "grant access" action
In a migrated db without this fix, you have twice "Grant portal access"
in partner form view, one will fill the partner in the wizard, the other
will launch the wizard without any pre-selected partner.

closes odoo/odoo#69586

X-original-commit: 6c321814dac1f17fa9a1f3f1b6d59c6d45a8cc0d
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-04-21 08:49:46 +00:00
Odoo's Mergebot c4cc2b5941 [MERGE][IMP] web,coupon: improve inline domain editor display within modals
PURPOSE

Inline domain editor`s selector should be visible outside of modal (dialog
/ popup). This change has to work globally.

CURRENT

When inline domain editor is used in any modal (dialog) its details are
hidden inside model body. we have to scroll-down in model-body for accessing
domain-editor selection. Inline editor`s overflow is visible only
in coupon module, but this should be the default behavior.

SPECIFICATIONS

Changes overflow property of model-body if domain widget is used as
inline_model. The Inline domain editor`s selector (drop-down) will be
visible outside of modal-body.

TaskID ID-2480625

closes odoo/odoo#68586

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-04-21 11:11:27 +02:00
Sunil Shrimali 424f7e96cb [IMP] coupon: adapt the changes from domain widget
The domain field widget is now adapted to set visible overflow on modal if it
iss inline. With that changes, the custom controller for coupon generator is
not needed anymore.

With this commit, we remove the code related to custom controller
of coupon generator that used to set visible overflow on the modal.

Task ID-2480625
COM odoo/odoo#68586
2021-04-21 07:49:42 +00:00
Sunil Shrimali 7c2fb9bb16 [IMP] web: set visible overflow on modal for inline domain editor
When we have (inline) domain widget within a modal, user can not see
all the fields because overflow is hidden on the modals by default.
This is not ideal behavior.

With this commit, when the inline domain editor is opened with field
widget within a modal, we allow field selector to overflow by
manually setting visible overflow on the parent modal. The changes
are inspired by 'DomainSelectorDialog'.

Task ID-2480625
COM odoo/odoo#68586
2021-04-21 07:49:12 +00:00
std-odoo d3db46f06f [IMP] mail_plugin: return the "is_company" field
Purpose
=======
Return the "is_company" field for the <res.partner>, so when the partner
has no image, we can display the appropriate placeholder image
(person for non-company and buildings image for company).

Task 2496443

closes odoo/odoo#69562

X-original-commit: 37766d3ef32816f332cd285cce8dbb1fa5e4b66a
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-04-20 15:51:29 +00:00
Pierre Masereel ba12b74a0b [FIX] point_of_sale: fix pricelist discount display
When a pricelist is set to display a discount, it also display the price
difference when the price is increased for a reason.

To avoid such an anoying behavior, that'll show that the price of a
product as been increased by aplying a discount, we only show the old
price when it has been decreased.

closes odoo/odoo#69572

X-original-commit: 45a2a36f3f0a94731d44de201f0cd3d88f50b2b3
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2021-04-20 23:45:13 +00:00