Commit Graph
133826 Commits
Author SHA1 Message Date
Yannick Tivisse 19482aff8e [FIX] sale_timesheet: Fix undeterministic crashing test
Purpose
=======

Launch the test at 00:05:00.

Then when opening the advance payment wizard, the field
date_invoice_timesheet would be set to yesterday, instead of
today.

Adapt the default value on the wizard, and the related tests.

closes odoo/odoo#45023

Taskid: 2178983
X-original-commit: 0a46e92cf742ca811b1685860619dba1d0dc7bd5
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2020-02-10 16:21:03 +00:00
Johan Demaret Rivarola 0d5fcdc1c7 [FIX] base: clear cache before read access check
When reading binary content such as `image_128` on `res.users`,
`AccessError` should be raised when necessary.

Steps to reproduce:
  - Populate cache in superuser mode.
  - Access cached field with public user.
  - Read access is allowed but should not.

Concrete example:
  - Unpublish `demo` user.
  - Access `/slides` with `public` user.
  - The template data is generated as `sudo`.
  - The same data is then accessed as `public`.
  - AccessError should be raised when requesting
    `/profile/avatar/<int:user_id>` but is not.

Closes #43826

closes odoo/odoo#45033

X-original-commit: e0112db4d6131751475365ab4c42de848f925dce
Signed-off-by: Christophe Simonis <chs@odoo.com>
2020-02-10 17:43:11 +00:00
Samuel Degueldre 7cc6fdf365 [FIX] website_blog: fix next post loading animation
Previously, when clicking on the next post at the bottom of a blog post,
a spinning loader circle would always appear in the bottom left of the
screen in an incorrect position. This commit removes that spinner.

This commit also adds support for the half-screen cover size, which
until now would animate as though it was full screen. All in all this
just makes the transition animation much more seamless, which was the
point of having it in the first place.

task-2166790

closes odoo/odoo#44198

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-02-10 17:03:33 +00:00
Denis Ledoux 6caecbc86d [FIX] doc: typo in 398a3d7efeef379c524d2c417f5dbec94fb2915a
closes odoo/odoo#45025

X-original-commit: ba1acb26608eed6c1eeff7effc07451efe4dfa79
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2020-02-10 16:23:48 +00:00
Romain Derie e05bf2e230 [FIX] website: delete page on cascade when deleting a website
The user is never able to delete a website, since there is at least one page,
the homepage, which is bootstraped during website creation.
From that point, even if nothing was done on that website, it was not possible
to remove it.
As website deletion is already a technical thing (debug mode), and since
website.page do not make sense without their website, removing those on cascade
will allow the user to remove a non-modified website.

task-2092845

closes odoo/odoo#45018

X-original-commit: ba6206baae7e3defbb6d28bcfe48eb5bed38d4c7
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
2020-02-10 15:48:36 +00:00
Romain Derie 9894b36ea7 [FIX] website: prevent crash when 'force_website_id' has been deleted
As an admin or website publisher, you have the possibility to switch website in
the navbar. This will force a website in your session*.

If this website is removed at some point, your session will be broken as the
dispatch will lead to a traceback, trying to read un unexisting website.

* There is other way to have the website forced in the session: theme install,
  go to website from settings, create website from settings..

opw-2092845

X-original-commit: 835d1201b8a26168bb003a5fc664e692005cb0a2
2020-02-10 15:48:35 +00:00
qsm-odoo 0ac7d67c5f [FIX] web_editor: fix gallery blocking the editor after image reordering
When snippets deeply alter the DOM (e.g. image reordering in gallery),
the related option might be destroyed since they are referencing old
DOM. If such a case occurred, the destroyed option was still waiting for
an option update response by the editor before being considered as
finished... which then never occurred and blocked the editor.

closes odoo/odoo#44998

X-original-commit: 9eeea4c4107dc15984c475582d5ee58a17cd2568
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-02-10 14:28:34 +00:00
Kevin Baptiste 32a8b4dce3 [IMP] crm: make unlink optional in merge_opportunity
closes odoo/odoo#44997

X-original-commit: a8094108a4e469f5bc4a3ba541ede7a61f28d522
Related: odoo/enterprise#8311
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-02-10 14:27:58 +00:00
jvm-odoo de7a0b3240 [FIX] website_blog: fix share link on blog posts
Issue

	- Install Blog
	- Go on a Blog post
	- Customize > Enable Share links & Sidebar
	- Click on a social share link

	Redirected to #

Cause

	The website_blog.js has been refactored fron v12
	to v13, it seems that the onShareLink method has
	been forgotten in the event handlers.

Solution

	I added it and make it working with the actual view.

OPW-2170706

closes odoo/odoo#44992

X-original-commit: 0e90afb789690be3723f0c3522b50b2ce7dfb8e5
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-02-10 14:11:01 +00:00
Samuel Degueldre 99427c2c5a [FIX] web_editor: fix apply-to methods not being awaited
When the apply-to data attribute was first introduced, a mistake was
made when storing the results of the methods calls, using _.each instead
of _.map to associate each target element with the promise of the method
execution, as a result, Promise.all would resolve immediately instead of
waiting. While there are no currently documented bug caused by this,
they are just waiting to happen.

This commit fixes that.

closes odoo/odoo#44988

X-original-commit: 32271be1f696c11b3e5157426b8f7c9efa93134b
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-02-10 13:48:40 +00:00
fja-odoo 574bf9bb12 [FIX] web_editor: fix color palette custom color behaviors
Selecting a css color equals to a theme color via the custom color
was not selecting the theme color.

Opening and closing the custom color without picking a color was
unselecting the selected color.

Now the custom color picker has the selected color as default even if it
does not appear in the palette as selected. This was appearing in the
parallax snippet as no custom color is displayed.

closes odoo/odoo#44986

X-original-commit: 0c8be24ac72c223c12eadbdcf635628f203a6766
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-02-10 13:48:19 +00:00
qsm-odooandfja-odoo ed999bc88e [FIX] web_editor: fix image removal inside image gallery
Since we use Promise instead of jQuery deferred, the onRemove method
class was no longer triggered before the actual removal of the elements.

Original fix with https://github.com/odoo/odoo/pull/43918
This PR is the same with the async/await form, not breaking the history
of half of the removeSnippet method's lines.

closes odoo/odoo#44963

X-original-commit: 37941159c82d487ff172f0e6b27028f23ab32810
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: fja-odoo <fja@odoo.com>
2020-02-10 11:43:00 +00:00
fja-odoo 1ebc4661dc [FIX] web_editor, *: unblock editor after any option dialog closing
*: website

Some dialog promises were not resolved on close, blocking the editor.

closes odoo/odoo#44953

X-original-commit: 20f97470cdc59a817526305806e94b222f26a0f2
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-02-10 10:54:02 +00:00
Swapnesh Shah 591861faf0 [IMP] base: Use correct reference
Follow-up on https://github.com/odoo/odoo/commit/22f02af6bf002324ebafc38d4eefeda60063247a
Use the correct reference for the file.

closes odoo/odoo#44919

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-02-08 15:00:26 +00:00
Swapnesh Shah 5e63519c66 [FIX] hr: Remove unnecessary argument
Followup on 5ce8f1e375
Before this commit, There would be traceback on Launching Plan with `Responsible` set to `other` and No `Responsible Person` defined on activity due to Extra argument.

In this commit, We remove that extra Argument.

closes odoo/odoo#44965

X-original-commit: 009e5526ee398415693d1d3df8f3c2ac546fd258
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-02-10 11:52:59 +00:00
David Beguin 9c9032e664 [IMP] (im/website)_livechat : hide and clean empty livechat sessions
Purpose
=======

Whenever a visitor start a livechat session but finally close the session
without sending any messages, the livechat session is empty and stay in DB.
Livechat session counter counts all the sessions (with and without message)
but when opening the sessions tree view, the view is filtered by default on
session with messages. There is no reason to see the empty sessions as it
does not give any information (except "the visitor hesitated to start
livechat and finally did not" which is quite useless info)

The goal is to keep only sessions with messages.

When the visitor is closing the livechat window, if the session is empty,
the session should be deleted. But what happens if a visitor start a livechat
session, send no message and just leave the website without closing the
livechat window ? --> empty live chat session will remains in database.

The ir_autovacuum already handle the deletion of empty sessions to main a
clean DB.

Specifications
==============

- Apply 'with messages' domain on session count in the livechat channel view
- Apply 'with messages' domain on session count in the lead view
- Apply 'with messages' domain on livechat session view
- Remove With message filter
- Remove Without message filter

- If send message on a deleted session :
    just tell the visitor that operator is not available anymore
    AND delete livechat session cookie (as he waited 1 day to send a message)

Empty sessions becomes invisible : not possible for users to see empty session
(in count or in views) and cron is cleaning empty sessions every day.

This commit also adapts visitor session count and view accordingly.

Task ID: 2146962
PR #41065

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-02-10 11:46:05 +00:00
Goffin Simon 5a3c4f0742 [FIX] purchase: Purchase report filter
The filter for Purchase orders in the Purchase report did not filter out Sent RFQ,
despite the fact that they were not really ordered yet.

opw:2158248

closes odoo/odoo#44892

X-original-commit: 201cfb46462590bb2460bc76317e37742c789fae
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2020-02-07 15:47:03 +00:00
Michael Mattiello (mcm) 8750efef27 [FIX] web: kanban quick record creation
When grouping records in kanban view, if a quick create widget was
already opened, clicking on the "+" to launch another quick creation
would crash.

Fixes https://github.com/odoo/odoo/issues/44680

closes odoo/odoo#44949

X-original-commit: b482df17058e6f2117b616e6b152a7f2c90dc121
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-02-10 10:29:44 +00:00
oco-odoo 5b74306a17 [REF] mass_mailing, project: remove deprecated '_period_number' attribute
This parameter declared on mailing and project classes is not used anymore.
Let us remove it to clean model definitions.

closes odoo/odoo#39401

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-02-10 11:11:55 +00:00
fda-odoo 53dc9208e0 [FIX] documentation: typical command to launch odoo is not usable
The typical command to launch odoo in the install documentation is usable as it is after following the complete instructions.
There is two changes done here:
- Remove the ../my_modules from the command, as it is a directory not used in the page at all.
- Remove the db-filter option not mandatory since the 11.0 version and add a '-d' argument. This will create the db instead of showing the database selector to the reader.

closes odoo/odoo#44899

X-original-commit: 6a5d43dac042d76a12d1757962a0aec641fa1ae8
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2020-02-07 16:33:14 +00:00
fja-odoo 67d9eafd2e [FIX] website_form, *: fix new website form
* = website_crm, website_hr_recruitment, website_sale

Changing label position on existing field was replacing the label with
the default one.

Redirection message was not updating the overlay

Going from show message to redirect without hidding the mesage made the
form d-none

When a select field's label's position was changed the select was not
editable anymore.

Some other miscellaneous fixes

task-2191409

closes odoo/odoo#44911

X-original-commit: 3cf87cc1cb179598cecb736728378e330d3b2e22
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-02-07 18:34:34 +00:00
Nicolas Martinelli faac525e62 [FIX] website_sale: get correct fiscal position
Make sure `force_company` context key is set on the SO in all cases.
Indeed, when the context key is not properly set, an incorrect fiscal
position can be retrieved in:

https://github.com/odoo/odoo/blob/cc557f1e4de88466d0d159c5edf1a606a0c0bc6f/addons/account/models/partner.py#L99-L100

This is for example the case when we go through the route
`/shop/confirm_order`.

opw-2186682

closes odoo/odoo#44451

closes odoo/odoo#44933

Original-signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
X-original-commit: 5691e733e2d860baa012140fc35d3f39ddf747c8
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-02-10 09:00:15 +00:00
oco-odoo 1de22e9c4e [FIX] l10n_eu_service: wizard: don't copy tags when creating the service tax for the selected EU country
This restores the behavior for 12.0; we don't want those amount within the national tax report.

closes odoo/odoo#44894

X-original-commit: bd21046f9259f0c755deeba8a1d207da6578e957
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2020-02-07 16:06:04 +00:00
Martin Trigaux 40667755b1 [FIX] website: restrict access to route
This route was public by mistake, probably introduced to test during
ddf32f4 but no reason to make it public, public user has not the write
access on models anyway.

Courtesy of Swapnesh Shah

closes odoo/odoo#44915

X-original-commit: 66ac96b25aa4cf2b074f6c06b57ed8be72d6d647
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-02-07 19:51:09 +00:00
Nicolas Martinelli 16525d5b56 [FIX] hr_holidays: incorrect number_of_hours_display
- Go to Settings > Technical > Resource > Working Times
- Have a Resource Calendar RC with Average hour per day != 8.00
- Have an Employee E with Working Hours == RC
- Leaves > Configuration > Leave Types
- Have a Leave Type LT with Take Leaves in Hours
- Leaves > Managers > All > Allocations
- Create an Allocation A with Employee E and Leave Type LT
- Enter any number in Duration

The number of hours entered changes as we leave the field.

Being totally honest, what happens here is not clear at all, but using
the corresponding `resource_id.calendar_id` field seems to fix the
problem.

opw-2191795

closes odoo/odoo#44903

X-original-commit: e239b354da9fa072e03e4d1186927fa3d74bcfe6
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-02-07 17:15:29 +00:00
Nicolas Seinlet 73c6863d3a [FIX] base_automation: avoid access right issues filter domains
If some filter domains use M2O to models current user cannot access,
using sudo() permit to filter even when user cannot access linked
models.

for the accuracy of the fix, add a unit test which reproduce the exact
reported bug.

closes odoo/odoo#44923

X-original-commit: 30e2153539643491fad889811a54a8e580fa9c58
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-02-08 18:55:15 +00:00
Thibault Francois 4673a04c94 [FIX] base: don't swith back with su=False in _name_search
When you have su == True in your env and you call _name_search
    the _name_search was switching back to su = False
    when you call with_user with the same user or with None

    To reproduce the issue, take a model where a user has
    no access.control.list allowing to read the model
    call name_search with sudo.

X-original-commit: 8755269f9877e039663adaec8500b530b6d67c68
2020-02-08 18:55:15 +00:00
Raphael Collet c732a5e44f [FIX] ir_model_access: missing flush() before SQL query
X-original-commit: ba1d04ac8a23a2f3cfad7f332dab96f7e460eb53
2020-02-08 18:55:14 +00:00
jvm-odoo fe6a45945a [FIX] web_editor: trigger content_changed when updating alt or title
Issue

	- Install Website
	- Go on your website
	- Add text block with image
	- Change ONLY the image's alt and/or the image's title text
	- Save dialog
	- Save page

	Not saved

Cause

	The element doesn't become dirty after changes in alt dialog.

Solution

	Trigger content_changed to make the element become dirty.

OPW-2189909

closes odoo/odoo#44885

X-original-commit: 4f1712075fbc4d95d83690fbcfe72f9b72260254
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2020-02-07 15:04:57 +00:00
Ernesto Tejeda ef4bf7c936 [FIX] account: call method with expected singleton recordset
closes odoo/odoo#44877

X-original-commit: 4c5aea410577fab3166d3f05951ac0886406bd24
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2020-02-07 14:29:44 +00:00
Nicolas Martinelli 4b58342743 [FIX] utm: record creation
Make sure `is_website` is an existing field of the model at creation.

opw-2192139

closes odoo/odoo#44870

X-original-commit: 5daf25f2c693c17e75223f8e3502d5c4121cb3b5
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-02-07 14:03:09 +00:00
Victor Feyens bfad367afe [IMP] doc: some precisions/fixes
closes odoo/odoo#44869

X-original-commit: c8c311b8d463d1db7f3700c1bb5dac076abab905
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-02-07 14:00:13 +00:00
Victor Feyens 3e9b73b1ee [IMP] doc: document the api.model decorator
X-original-commit: efa3a148cb178693b73af054cd6e19870d068454
2020-02-07 14:00:12 +00:00
Laurent Smet ddfb12d063 [IMP] account: Improve fixes https://github.com/odoo/odoo/commit/ab1ae1a854eab4a38aa2866bfc9d8ca9aa4013be
Explanation about flushing in action_switch_invoice_into_refund_credit_note:
Because the 'type' is set before 'amount_total', 'amount_total' is recomputed with the
wrong type and then make the condition badly evaluated.
For some reason, the field wasn't badly recomputed before:
https://github.com/odoo/odoo/commit/020e2a5e85036976b309b439582d70b5b775e54f

closes odoo/odoo#44868

X-original-commit: a82e62d1925ebfd4f49360fdc5f3a8d28de5a0d9
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2020-02-07 13:48:22 +00:00
Jorge Pinna Puissant 271a4b79a3 [FIX] sale, website_sale: salesperson emails from assignation of online so
- install e-commerce;
- In the website settings, orders followup, set a salesperson;
- By something as a public user;
- Pay the order.

Before this commit:
- 2 emails where create to assign the salesperson to the SO, but these
    emails didn't have a from and the salesperson didn't receive the
    emails.
- 1 email was also create to assign the salesperson to the contact, this
    mail is not necessary.

Now, only one email that assigns the salesperson to the SO is sent,
with a correct from address.

opw-2189683

closes odoo/odoo#44861

X-original-commit: 7c08eb158858b9573d3d84a0b54df0bfca754105
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2020-02-07 13:19:27 +00:00
Arnaud Joset a98f0af9e2 [FIX] mail: _finalize_tracking was not properly flushed
Before this commit, no recompulation were performed at the end of the
tracking procedure.  This is because the main flush() occurred before
the tracking of values.  The absence of flushing is problematic in the
case where the tracking is used to create/update records.

closes odoo/odoo#44851

X-original-commit: c60da49a1d81fa73b60135185d5b706eec771475
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-02-07 12:43:44 +00:00
qsm-odoo ef03b02af6 [FIX] web_editor, website, *: editor notify method must be synchronous
* website_form

Some technical explanations:

The method became async because the `setTarget` call which was in there
became `async` since it performed an UI update. As this method being
async is a problem with some snippets, it is best to keep it synchronous
for now. For this, the UI update in `setTarget` is removed and becomes
the responsibility of the caller. Nothing relied on it except one code,
which is solved by calling `onFocus` before the UI update which occurs
on focus, as it is already the case in master.

closes odoo/odoo#44850

X-original-commit: 53bba0660237abbcadc9675fd89ec94a2a31e130
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-02-07 12:43:25 +00:00
Samuel Degueldre 91fb0d3020 [FIX] website: fix number of column option broken layout
Normally, the number of column option adjusts the width of each column
after changing their number so that they always fit in one row. In
previous versions, the sequence of the code was correct thanks to
jQuery's deferreds executing their then callbacks synchronously if the
promise was already resolved. However, native Promise objects always
put their then callbacks in the microtask queue, and this was resulting
in the column width classes being recalculated before their number had
actually changed.

This commit fixes that by calculating the width of the columns based on
how many columns there will be after addition/removal. It also
introduces a new field on the option that is used to update the UI so
that it displays the correct number.

closes odoo/odoo#44849

X-original-commit: 58804d6ea375629b07748bc442eaccc401c56d1b
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-02-07 12:34:06 +00:00
Nicolas Martinelli e8a580f3b7 [FIX] point_of_sale: round prices
- Activate 'Round Globally'
- Create a 21 % tax included in price
- Create a product costing 21.5
- Add the product in a pos order, make the payment

The `price_subtotal` is saved as `17.768595`, while it should be
`17.77`.

When these amounts are added in [1] (coming from [2]), it can lead to an
inconsistency in the final computation, preventing the closing because
of an unbalanced journal entry.

Actually, the total and the subtotal must always be rounded following
the currency precision, as done in [3] and [4].

It was probably not causing an issue before 13.0 since the creation of
the journal entry from the POS was different.

[1] https://github.com/odoo/odoo/blob/b22935caa3df824bc56a0828da9bee921bca5a5b/addons/point_of_sale/models/pos_session.py#L381
[2] https://github.com/odoo/odoo/blob/b22935caa3df824bc56a0828da9bee921bca5a5b/addons/point_of_sale/models/pos_session.py#L557
[3] https://github.com/odoo/odoo/blob/b22935caa3df824bc56a0828da9bee921bca5a5b/addons/account/models/account.py#L1654
[4] https://github.com/odoo/odoo/blob/b22935caa3df824bc56a0828da9bee921bca5a5b/addons/account/models/account.py#L1740

opw-2181486

closes odoo/odoo#44834

X-original-commit: 0896afdc814937621fe6323bf16d461582207217
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-02-07 09:55:59 +00:00
wan e77015011c [FIX] account: find reference move for sequence domain
We only want journal entries with an actual sequence to be used as
reference, otherwise we can't deduce the reset periodicity of the
journal.

closes odoo/odoo#44833

X-original-commit: a57a0edae27a93aadf8fe8c95ae45ab91ec9aa31
Signed-off-by: wan <william-andre@users.noreply.github.com>
2020-02-07 09:34:20 +00:00
Nicolas Martinelli ea11aae8d6 [FIX] stock: show total routes label
On product categories, the `total_route_ids` field is shown without
label. This is confusing for end users since the same route seems to
appear twice.

opw-2173783

closes odoo/odoo#44821

X-original-commit: 91bc6464132d4525325cc7a376788b7226e1a723
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-02-07 07:43:11 +00:00
Jorge Pinna Puissant 0af58af300 [FIX] point_of_sale: long product name print receipt in safari
Before this commit, when printing in safari a receipt that contains
products with long names, parts of the name were overlapped. This occurs
because, in safari, the library that transforms the html into text
mismanages the spaces.
This is a well known problem, see : niklasvh/html2canvas#1654

Now, the name is printed correctly in safari, same behaviour than the
others browsers.

opw-2169656

closes odoo/odoo#44819

X-original-commit: 263131f49828d2d8f2177bae15d0af84af341c37
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2020-02-07 07:28:09 +00:00
Simon Lejeune e2b42f3718 [FIX] stock_landed_costs: flaky tests
We chose the vendors by searching random res.partner but sometimes
partners of another company are returned, making the _check_company
mechanism raise an error.

closes odoo/odoo#44815

X-original-commit: 1cfcf21efa888720f9c34b337532251db6fd0089
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-02-06 20:50:58 +00:00
Simon Lejeune 93b2377656 [FIX] stock_landed_costs: reconciliation with vendor bill
in anglo saxon accounting
- receipt products through an rfq
- when creating the vendor bill of the rfq, directly add a landed costs
  product
- post the vendor bill then create the landed cost, validate the landed
  cost
- the aml of the LC is not reconciled with the aml of the vendor bill
  for the lc product because the "You are trying to reconcile some
  entries that are already reconciled." error.

We fix this by filtering out the already reconciled aml.
Not that the flow is behaving as expected if the landed cost is created
in another vendor bill, such as the tests were doing. We thus add
another test.

opw-2184988

X-original-commit: 1e78527ac5295563e9610ad9ddd98834998285f3
2020-02-06 20:50:57 +00:00
Nicolas Martinelli 25e382755d [FIX] stock: default location for scrap
- Create a default value for 'Source Location' or 'Scrap Location'
- Create a Scrap Order

the default value is not taken into account since it is overridden by
`_onchange_company_id`.

We avoid changing the location in case the company matches.

opw-2189578

closes odoo/odoo#44812

X-original-commit: 5c544adbcf0f0af67b29a39c191e190a59fed90c
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-02-06 19:33:19 +00:00
Nicolas Martinelli 95300401ab [FIX] account: 100% tax
- Create the following tax:
  Tax Computation: Percentage of Price Tax Included
  Amount: 100 %
  Included in price
- Create an invoice, add a product with this tax
- Save

A ZeroDivision error is raised.

opw-2186998

closes odoo/odoo#44810

X-original-commit: 0b11474a168037b5469176433256759916e8276b
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-02-06 19:25:09 +00:00
Andrea Grazioso (agr-odoo) 090748c3b1 [FIX] purchase: specific search alter order duplication
1) Go to purchasing, and in the search area type "8888"
2) Click on the little arrow next to "Search Product for: 8888"
3) Select "[FURN_8888] Office Lamp"
4) Choose Purchase Order PO00009 which has FURN_8888 on the second line:
5) Choose Action > Duplicate

The 1st line end up with the searched product, not the original product.
This happens because the search add the context key
'default_product_id'. By chance the product.product model has a
'product_id' field which may happen to be not filled.
This cause the model api to look for a default value in the context and the
first line of the order get overridden.

Removing the specific key from the env solve the issue

opw-2188429

closes odoo/odoo#44802

X-original-commit: ed6ac9c63b4e8a5815e2f46693ababbde4a82919
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-02-06 18:37:54 +00:00
Adrian Torres f61262eb08 [FIX] core: delay constraint application in case of upgrade
closes odoo/odoo#44800

Co-authored-with: Xavier Dollé <xdo@odoo.com>
X-original-commit: bc2bb5e03c2b32d4ee1b0597ea5889c17d2b0e0e
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2020-02-06 18:28:29 +00:00
Jérémy Hennecart f6a1437aeb [FIX] website_slides: fix ui for quiz creation and update on mobile
Before, the buttons to save, cancel or update quiz in eLearning frontend
as well as icons weren't displayed correctly.

Now, all elements are displayed correctly on mobile or on computer, more
responsive and better displayed.

Task 2153990
PR #42846

closes odoo/odoo#43328

X-original-commit: 4d986beb7192c34c133d8d5d02ff62bd159f202a
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-01-27 10:56:17 +00:00
Nicolas Martinelli fc1020c4fb [FIX] stock: validate inventory
Highlight the 'Validate Inventory' button only if there is at least one
inventory line.

opw-2187225

closes odoo/odoo#44793

X-original-commit: 95da1ac1a35ad748ba5adb755b89731595e78b2f
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-02-06 18:00:08 +00:00