Commit Graph
139476 Commits
Author SHA1 Message Date
svs-odoo d44b95fd45 [FIX] stock: empty reusable package
When using reusable package in chained transfers, indicates the package
should not be propagated for the next moves `result_package_id`.
This change has no effect by itself, but it's used in enterprise by
https://github.com/odoo/enterprise/pull/13146/commits/611b2c0b188ab9906eb21feab087a1794bd2d015 when Picking Batch is enabled
and barcode app is installed.

task-2333834

X-original-commit: 6677f501d5a1717af8da08a7e235d87aeb85f862
2020-11-05 09:19:03 +00:00
Andrea Grazioso (agr-odoo) c97e605457 [FIX] sale: keep card info on form save
Configure card payment provider (stripe, Authorize, etc) in test mode
Allow the customer to decide if saving payment info
Go to web shop, fill cart and checkout
Select provider and check "save payment method"

After payment the card info is not saved:
the related check variable is overridden in the process.

Note: this occur only when using the provider site.
S2S payment via Odoo follows a different flow

opw-2335237

closes odoo/odoo#61351

X-original-commit: dc18fdba1d4e0d38df0ebce4eed46f8ad08f4821
Related: odoo/enterprise#14597
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
2020-11-04 16:37:30 +00:00
Benoit Socias 91419a811a [IMP] web_editor, website_form: put add action in front of other options
Before this commit the add field actions are in the middle of the editor
top options

After this commit the add field actions are in front of the editor top
options

task-2367124

closes odoo/odoo#60996

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-11-03 07:24:46 +00:00
wan c036af067f [FIX] account: do not prepend company name for mail alias
We still keep the behavior for later companies.
It was originally added here 41f119d532

closes odoo/odoo#61353

X-original-commit: 9ba396afa68884f477096d3e7f3c824ff97f3aac
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: wan <william-andre@users.noreply.github.com>
2020-11-04 16:50:34 +00:00
wan ba3fe233af [FIX] base: move email and website of main user to demo
Task 2368901

X-original-commit: 414175bf7787c033ae8b5c730a2ae8aa019d94fd
2020-11-04 16:50:33 +00:00
Thibault Delavallée c6207a38b6 [IMP] mail: allow to specify a new parent when using message_change_thread
Purpose of this commit is to allow to attach moved messages from a thread
to a new parent. This allows notably to keep references if message
hierarchy is not kept as it is.

LINKS

Task ID-2083049
COM PR odoo/odoo#49129
ENT PR odoo/enterprise#9715
UPG PR odoo/upgrade#1883

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-11-05 08:12:21 +00:00
David Beguin abe68c9fb8 [IMP] web: add margin for statusbar_buttons icons
Before this commit, when adding a icon to a statusbar button, there was no
margin between icon and text. This makes button not very nice as button is
very near to the text itself.

After this commit, for readability purpose, a margin has been added to the
icons of a statusbar button. Statbutton margin has been chosen to keep
things coherent through form buttons.

LINKS

Task ID-2083049
COM PR odoo/odoo#49129
ENT PR odoo/enterprise#9715
UPG PR odoo/upgrade#1883
2020-11-05 08:12:17 +00:00
svs-odoo 42ade5e8dc [FIX] mrp: traceback when no date_planned_start
Checks the MO `date_planned_start` is set to do the onchange.
Also, add `product_id` in the onchange trigger because the produce delay
can be different for each product and so the MO `date_planned_finished`
must be recomputed also when the product change.

task-2359839

closes odoo/odoo#61295

X-original-commit: b48d0047f6a0a3084739e8991f32aae4a2b399c2
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2020-11-03 17:04:15 +00:00
svs-odoo ddbc10f8b1 [REM] purchase: remove unused import
closes odoo/odoo#61291

X-original-commit: d4d06b47c58b82a4757d56ffcdfc11a2d01b3ea1
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2020-11-03 16:19:12 +00:00
svs-odoo ccee9eaf8c [FIX] purchase: purchase order sort order
Removes the field `date_order` from the `purchase.order` order because
it tends to make the feeling the PO's sort order is kind of random.

task-2367965

X-original-commit: 4cd45b5baa2d78b059e14fbb61298dcdccacf040
2020-11-03 16:19:12 +00:00
Nicolas Martinelli a79e44efb0 [FIX] hr_holidays: time labels naming
In a 12-hour clock:
- 00:30 is 12:30 AM
- 12:30 is 12:30 PM

opw-2374394

closes odoo/odoo#61321

X-original-commit: c25805189ea221cbcf1ef81ed9e250d14a3c1a80
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-11-04 12:13:32 +00:00
Pierre Masereel f2a1e74d08 [FIX] pos_cash_rounding: allow rounding only cash method
When you enable the cash rounding in POS, all your payment methods are
rounded in the POS.

In some countries, only the cash methods must be rounded, so we enable
here the possibility to activate the rounding only on the cash methods.

OPW-2373516 and OPW-2366101

closes odoo/odoo#61312

X-original-commit: 9b03fd67f856ec8e5b37652a5ed551ec159973e5
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2020-11-04 10:32:51 +00:00
Achraf (abz) daa777bb01 [FIX] website_event: Prevent event block title to be edited
Issue

    - Install "Website" and "website_event"
    - Try to add Event block

    The title is editable

Cause

    The contentEditable attribut is enabled

Solution

    Disable the contentEditable attribut

opw-2367538

closes odoo/odoo#61355

X-original-commit: 77ffd6343be21ef188046f138493e1e807090c48
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Achraf <abz-odoo@users.noreply.github.com>
2020-11-04 17:33:40 +00:00
Goffin Simon c555cdca62 [FIX] point_of_sale, project: Smart buttons to count on partner
Unify the behavior for smart buttons on res.partner view form

Let's consider generic records R on a specific model M

- All the R of the children and archived children of a contact C must be counted in smart button of M
in the form of C

- Clicking on the smart button of a contact C must display all R of the children and archived
children of C

closes odoo/odoo#61241

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2020-11-03 10:30:44 +00:00
Susana b4e95a7206 [ADD] l10n_cl: add chilean company demo data
closes odoo/odoo#61347

X-original-commit: 7cc252908b33b7d77d45d0630464e203b25b09dc
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-11-04 15:57:59 +00:00
Benjamin Vray 2ca115f650 [FIX] web_editor, website, website_mass_mailing: center bg images
Before this commit, background images were not centered by default.
It was especially annoying on mobile device. We created a new class
to center background image and we added it on all the snippets with a
background image except those with a parallax effect because they
already have a background-position in inline style.

task-2318526

closes odoo/odoo#60430

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-11-04 14:53:37 +00:00
Laurent Smet 3f50f9ce39 [FIX] account,point_of_sale: Set invoice 'paid' directly when fully reconciled wo payments
When the invoice is fully reconciled but not using payments, set the 'paid' status on invoices.

closes odoo/odoo#61339

X-original-commit: 052324cca4ec8682f065a4158e86fc113b0242e0
Related: odoo/enterprise#14590
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-11-04 14:47:30 +00:00
Laurent Smet a498497962 [IMP] account: Allow skipping statement line on payments
A classic payment uses the outstanding account to create the line that needs to be matched later with a statement line.
In some cases, the user doesn't want to encode twice the same transaction, e.g. when encoding a cash payment, and want to create directly a payment impacting the cash account to skip the 'statement line' step.

X-original-commit: 2b472fd59e8eebbc2cf1f592cf6e657f2ae9e778
2020-11-04 14:47:29 +00:00
Moens Alexandre fef82f3c97 [FIX] base: API documentation link
opw-2374318

closes odoo/odoo#61326

X-original-commit: c1f43707c6e9efc7321b71120df45f2e2cf7ee82
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-11-04 12:59:47 +00:00
IEL e342d2027b [FIX] web: allow report assets regeneration via debug menu
WHY: you may have wrongly compiled assets for reports (e.g. if you didn't have
rtlcss installed on first run)

closes odoo/odoo#61324

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2020-11-04 12:23:06 +00:00
Didier (did) 1da252d0a3 [FIX] mail: backport fix from the required field PR
https://github.com/odoo/enterprise/pull/13883
task-2323665

closes odoo/odoo#61320

X-original-commit: 7ead0bf2e3e15ec161415bfa270a2c42a66fbbe3
Related: odoo/enterprise#14585
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-11-04 12:12:49 +00:00
xO-Tx 5f9c2bdfea [IMP] website_sale: set product variants from search filter
In the shop when the product page is loaded, the variants are now selected
from search attributes if filter is applied.

Since we have a hash containing variants unique id in product url, we can
apply variants from search filter attributes in url instead of default ones.

+ fix filter style

Now:
When you filter in /shop the product on color black, and click on the product
desk (first variant in white), you are now redirected to the product with color
black selected

This commit closes #47117 and is related to #22982

task-2369420

closes odoo/odoo#61317

X-original-commit: 5064bfa85dcf35410ed0e0053b675debf6883484
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-11-04 11:24:53 +00:00
David Monjoie 34892f3cd0 [IMP] web_editor: update Jabberwock library to commit de13ed7e
Changelog:
[IMP] DomLayout: Some errors are logged without doing an automatic undo
[FIX] Build: add back odoo-integration
[FIX] Core: snapshots do not alter the operation of memory slice switches
[FIX] polyfill: ensure shadow caret position fallback in contenteditable
[FIX] Dom: properly target deepest in a siblingless shadow

closes odoo/odoo#61314

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2020-11-04 11:19:05 +00:00
Gorash 7a717b221c [FIX] web_editor: fix shadow selector for Safari 2020-11-04 10:43:19 +00:00
qsm-odoo b761191446 [FIX] base: restore t-field inheritance via non-xpath node
Commit [1] made a stupid mistake forgetting nodes with the t-field
instruction can also have the position attribute in case of inheritance
without xpath node.

... It did not crash because there actually is no case of it in the
current codebase, but this is used by some custo on our prod however.
The test introduced by mentioned commit has been extended to crash,
should this specific case be broken again.

[1]: https://github.com/odoo/odoo/commit/92ef3b2dd4655913198d10d06598b799fdcae6d0

closes odoo/odoo#61288

X-original-commit: b05c7f1e8054be4e74289ac366e0ddcc7da2228e
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-11-04 11:31:54 +00:00
fw-bot c1e0b03d8b [IMP] website: make homepage tour, available on homepage only
Homepage tour starts with a very generic step 'drop snippet'
So, you can be in the middle of another tour and see the step of homepage tour.
This doesn't fix all cases, but make conflict less frequent.

E.g.

go to step 4 of tour event
click on save (before doing the step 5)
click on edit
Element is no more dirty (because save before step 5) so the step 5 not visible,
Tour with higher sequence (== lower priority) become visible. (e.g.: homepage)

Forward-Port of bca6cf2693d38c76b1af08398a3125bb16b59c15

closes odoo/odoo#61157

Related: odoo/design-themes#416
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-11-04 09:54:08 +00:00
qsm-odoo f81cb46b3d [FIX] web_editor: unblock the editor after dropping the "Quotes" snippet
Before this commit, when the user dropped the "Quotes" snippet, the
editor was not allowing to drop any more snippet (see [1]). This was
because the editors initialization related to the drop of the "Quotes"
snippet was not able to be fully performed. Indeed, it is composed of
carousel items, themself containing images. As some of those carousel
items are hidden, the images they contains are too... and some options
actually wait to access their naturalWidth. As the images are lazy
loaded since [2], we were thus waiting infinitely.

[1]: https://github.com/odoo/odoo/commit/277f39904e7218bef2dd23b1c5b719ce8660008f
[2]: https://github.com/odoo/odoo/commit/617c716aeafd7bbc776d81da134a9b25329f08c9

closes odoo/odoo#61308

X-original-commit: 2e37befbf84f0f587774d4c2fa095487148b549b
Signed-off-by: Samuel Degueldre <sdegueldre@users.noreply.github.com>
2020-11-04 08:39:29 +00:00
Goffin Simon 50c99055cc [FIX] fleet: Fleet Management Report
Steps to reproduce the bug:

- Go to Fleet > Reporting > Cost
- Select the pivot/graph view

Bug:

The elements in the table/graph were clickable

opw:2360528

closes odoo/odoo#61296

X-original-commit: bf80334699773f080f41dc234ac170a384c75ea4
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2020-11-03 17:04:37 +00:00
Pedro (pno) a0ebb46098 [FIX] {base, coupon, crm, event, mass_mailing, product, project, sales_team, utm, web}: prevent long texts from overflowing
Previously, in multiple modules, long names would result in an overflow of text.
With this commit long texts should appear like this: [aaaaa...] instead of
going out of their boxes.

Various views are updated, depending on which fields we wanted to prevent
from overflowing and the probability they do so.

Task ID-2325219
PR odoo/odoo#57713
PR odoo/enterprise#13226

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-11-04 07:32:27 +00:00
Jérémy Hennecart 16908e9eac [FIX] crm: correctly recompute dynamic depends when emptying crm.pls_fields config parameter
When we clear the configuration parameter crm.pls_fields unlink method is
called. In order to have a correct dynamic compute based on this parameter
we need to re-evaluate the depends. This is done by overriding unlink of
ir.config_parameter, like already done at create and write.

Task-2196200

closes odoo/odoo#61293

X-original-commit: d04cc4df4ec28816aeb6d1d7c7fc0e547fd13fa5
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-11-03 16:43:37 +00:00
Laurent Smet a011dcc0bd [FIX] point_of_sale: Always use VAT account for tax lines
As the POS doesn't manage CABA entries, don't use the temporary CABA account.

closes odoo/odoo#61250

X-original-commit: 5f3b8108888d019b0a66b47472b98c04889d343b
Signed-off-by: Josse Colpaert <jco@openerp.com>
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-11-03 11:26:11 +00:00
nie 54b3cd2b15 [FIX] pos_sale: Traceback showing info about POS sales team invoicing
Steps to reproduce the bug:
- Assign a sales team to a new POS
- Go to Sales > Orders > Sales Teams

Bug:
Traceback:
TypeError: unsupported operand type(s) for +: 'int' and 'NoneType'

opw:2371276

closes odoo/odoo#61292

X-original-commit: 6d41376ae0f17fd582daa6ac78de05cd1255d7b4
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: backspac <backspac@users.noreply.github.com>
2020-11-03 16:19:42 +00:00
Laurent Stukkens (LTU) 76489303c8 [IMP] hr_contract: ease contract management through contract history
Before this commit:

    It was complicated to manage the contracts as they were all displayed in
    one view.
    When the contract was a time credit one (which is by definition a temporary
    situation) the data used was based on the time credit and not on the full time
    equivalent. This usually forced the HR to create fake new contracts without
    time credit for the appraisals.

After this commit:

    A new report will ease the followup of contracts with the time running.
    It comes with a new view that highlight the reference information which
    allow to easily manage credit time. Simulation is also made on FTE data which
    eases HR work.
    This commit also fixes a bug in the simulation with the meal voucher (only one
    was taken into account in the summary right panel.
    The wage on signature is now populated when the document is signed.

Closes odoo/odoo#58120
Related PR: odoo/enterprise#13384, odoo/upgrade#1802

task-2326407

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-11-03 15:08:45 +00:00
Sébastien Geelen (sge) 292b03a990 [FIX] web_editor: fix the image gallery snippet
closes odoo/odoo#61254

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2020-11-03 11:48:29 +00:00
Antoine Guenet fcd2f942c2 [FIX] web_editor: disable snippet in preview mode on mouse leave options
closes odoo/odoo#61030

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2020-10-30 10:54:37 +00:00
Antoine Guenet a6b7d082e8 [FIX] web_editor: properly deactivate snippets and reactivate the last
Some lines had been wrongly (re-)moved during the process of integration
of Jabberwock. This restores them. Among other things, this fixes the
issue that made the popover snippet options still appear when the
snippet was invisible.
2020-10-30 10:12:43 +00:00
xO-Tx 3ab48f5f56 [FIX] web_editor, website: restore footer visibility option
Making the footer visible after having made it disappear was not
possible anymore because of [1].

Part of https://github.com/odoo/odoo/pull/59624
task-2312878

[1]: https://github.com/odoo/odoo/commit/61ffe97d03deae0aee72568311c453d1cd3470c8

closes odoo/odoo#61275

X-original-commit: fab31e378d2069ff6f2bd18365de2f116a43b872
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-11-03 14:16:31 +00:00
qsm-odoo 585f269212 [FIX] website: fix footer/header item move
Using the handle to move elements from footer/header anywhere
in the page would make the main element disappear with endless
content loading animation.

The end of the drag and drop executes a serie of methods :

_destroyEditors > cleanForSave > toggleTargetVisibility

Since the "cleaning for save" is called for all snippets and the footer
doesn't contain a 'o_snippet_invisible' class, the "onTargetShow" method
is called... but actually hide the footer because the "onTargetShow"
implementation was so that it clicks on the visibility checkboxes
regardless of its current status.

Part of https://github.com/odoo/odoo/pull/59624
task-2312878

X-original-commit: 5488916657f9cd4041abdcbe3fc615174df6cb49
2020-11-03 14:16:30 +00:00
Swapnesh Shah 144dd15505 [IMP] website_sale: respect view mode on action website product
Before this commit:
Going to Website / Products
--> Products will open `tree` at first position while it should open `kanban`
view based on given `view_mode`.

After this commit:
>e remove explicit `view_id` and add view ref in `context` so it opens `kanban`
at first and respects given view_id as well.

This commit closes #50349

closes odoo/odoo#61273

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-11-03 14:05:06 +00:00
oco-odoo b66c4fd0f7 [FIX] account: reconciliation widget: make invoice matching reconciliation models work with write-off lines
Use case:

1) Create an invoice matching reconciliation model, matching 90% percent of the amount, with a write-off line applying a 100% write-off of the remaining amount.

2) Create a 100€ invoice

3) Create a bank statement with a 90€ statement line whose payment reference corresponds to the one of the invoice

4) Click 'reconcile' on the bank statement

On enterprise, this crashes when preparing the data to give to the reconciliation widget, as the write_off_vals key is not set properly by the call to _apply_rules.

OPW 2367754

closes odoo/odoo#61265

X-original-commit: 1dd6199519b4ad5b5b17dfa17965ededcecb6da4
Related: odoo/enterprise#14563
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2020-11-03 13:23:08 +00:00
Anh Thao Pham (pta) 8dcb312650 [FIX] point_of_sale, pos_restaurant: fix full product name
- Go to Point of Sale > Configuration > Attributes and create an Attribute:
  * Attribute Name: Attribute X
  * Variants Creation Mode: Never
  * Attribute Values: Value Y, Value Z
- Create a Product (i.e. Product X) available in POS with the created Attribute and Values
- Configure a POS and enable the following options:
  * Is a Bar/Restaurant
  * Product Configurator
- Open POS Session and select a table (i.e. Table 1)
- Select Product X and a value for Attribute X
- In the order summary, the value of the attribute appears after product name
- Go to Floor plan
- Go back to Table 1
The values of all attributes don't appear anymore in order summary

In POS front-end, when adding a product, the name of all chosen attributes values
are registered in a variable named "description".
The full product name displayed in the order summary is generated from display_name
of the product and this "description" variable.
When moving to floor plan, ongoing orders are saved in DB and reloaded when moving
back to a table.
As "description" is not saved, regenerating full product name from display_name of
product and "description" is not possible.
However the generated full product name is saved in DB and can be retrieved.

opw-2371965

closes odoo/odoo#61266

X-original-commit: df3061f6e8061cf039bf083f649b7585c8c31df4
Signed-off-by: Anh Thao PHAM <kitan191@users.noreply.github.com>
2020-11-03 13:24:16 +00:00
Romain Estievenart f00fcbfca6 [FIX] web: datepicker inside a dropdown
Steps to reproduce:

1. Go to Project
2. Filter > Add custom filter > Last Updated on
3. Click on the date field and use the date picker to change the value
4. The dropdown is closed and you lost your selection => BUG

This bug was due to a conflict between owl and bs dropdown (e4f87710),
to prevent this bug, we added a check to ensure there are no open
bootstrap calendar inside the current dom.

Note that if you click outside the dropdown, the datepicker is already
closed when you go through this code. It means that the datepicker will
not be present in the DOM anymore and the dropdown can be closed too.

opw-2373573

closes odoo/odoo#61262

X-original-commit: 73dfc1f7a8e2197fcdd4053ec57c260576593a15
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Signed-off-by: res-odoo <res-odoo@users.noreply.github.com>
2020-11-03 12:50:41 +00:00
Thibault FrancoisandAlex Tuyls 0356e543c2 [FIX] odoo_referral(_portal): remove referral
Remove referral feature.
remove odoo_referral and odoo_portal feature

closes odoo/odoo#60927

X-original-commit: dda0bb499b0964b3a1750431255ecfef6cc9eb46
Related: odoo/upgrade#1889
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Thibault Francois <tfr-odoo@users.noreply.github.com>
Co-authored-by: Alex Tuyls <alt@odoo.com>
2020-11-03 10:20:42 +00:00
Rémy Voet (ryv) 725232bb1a [FIX] purchase: fix bug in purchase list overview
In the overview of purchase, click on "To Send" will raise a traceback.
Fix the clean of 2d2783d7ee .

task-2372196

closes odoo/odoo#60916

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2020-10-29 10:06:56 +00:00
Pierre Masereel 30139007f9 [FIX] point_of_sale: validate pickings when kits are sold
When you are selling a kit in point of sale, the genrated picking is not
validated.

It is not validated, because the moves are not confirmed, before we set
a quantity done, and so the moves are not exploded and it result to the
impossibility of  calling action_done on the picking.

To avoid this problem, we are confirming the moves created, and then set
the quantity done on the moves generated from the
confirmation.

closes odoo/odoo#61260

X-original-commit: 4f2f347c8b21b78efaa702d1b3c91b7f88dd88e0
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2020-11-03 12:35:41 +00:00
Julian Roussieau 093e86cde6 [FIX] stock_dropshipping: singleton in dropshipping rules
When you want to obtain `dropship_picking_type`, it is possible to have
several results. This will lead to an error when doing
`dropship_picking_type.id`.

```
dropship_picking_type = self.env['stock.picking.type'].search([
    ('company_id', '=', company.id),
    ('default_location_src_id.usage', '=', 'supplier'),
    ('default_location_dest_id.usage', '=', 'customer'),
])
```
The fix ensures that `dropship_picking_type` contains only one element.

closes odoo/odoo#61256

X-original-commit: 3e3b1b335ced1ff20129172e6a7b2b0dcbe1a20d
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2020-11-03 12:09:30 +00:00
Josse Colpaert ffcc8b9e77 [FIX] l10n_it_edi: ondelete param on one2many does not make sense anyways
closes odoo/odoo#61211

X-original-commit: cea51cfc4b00eff472bf0ba3d61704fb8537e9c6
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2020-11-02 17:29:03 +00:00
Martin Trigaux 51527987c0 [FIX] base: verify the rights on individual records too
The access rights of a model was checked but not the records themself.
In case a user has access to a model but not to a specific record, he
should not be able to execute a server action on it.

Correct the ir.rule on private partners to be also verified for other
operations than read.
While it was not possible to actually write on it (due to side effects
of ORM where write implies a read operation),
check_access_rule('write') was working on a private address

closes odoo/odoo#61253

X-original-commit: b0028c05d6ba9c67f16992ddb446eea6a854d099
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-11-03 11:48:41 +00:00
Martin Trigaux 73830169d5 [FIX] base_automation: access action fields using sudo
The user executing an action triggering an base automation may not
have access to the base.automation record itself (regular employee or
portal)

Added test test_on_create_restricted failed before this patch as the
portal does not have the rights to read the base.automation record

Fixes odoo/odoo#59680

X-original-commit: 33a7142f298eeda7808d6d07e80231836442a0ce
2020-11-03 11:48:40 +00:00
IEL 3c7694b409 [FIX] *: fix image parsing error on saving res config
WHAT: apply 93a7695f65baf00d1f82481d6a2a97e6c11940a8 for all res.config.settings
menus

WHY: the same reason as in 93a7695f65baf00d1f82481d6a2a97e6c11940a8:

	When saving, a read is called. By default, read has
	bin_size to true to avoid performances issues.
	It will return the image size instead of the content

it may lead to image dissapearing or "Incorrect padding" error

HOW:

    find . -iname "*.xml"|xargs grep "\"context\".*'module'" -l | xargs sed -i "s/\(\"context\".*'module'.*\)\}/\1, 'bin_size': False}/"
    git checkout  -- addons/base_setup/views/res_config_settings_views.xml

---

PR for General Settings: https://github.com/odoo/odoo/pull/47297

opw-2346644

closes odoo/odoo#61215

X-original-commit: 7c55efa88b72bd1f3f0f32f7f738e2fda5aa4abd
Related: odoo/enterprise#14547
Signed-off-by: Ivan Yelizariev // IEL <yelizariev@users.noreply.github.com>
2020-11-02 18:25:20 +00:00