Commit Graph
139336 Commits
Author SHA1 Message Date
Christophe Monniez a431ee3f52 [FIX] calendar: use a contextual timestamp in test
When the test starts after 00:00:00 UTC, the test fails.

closes odoo/odoo#60891

X-original-commit: c62acb48ac3ae11180a6817321664fb01833d3bd
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2020-10-28 11:38:42 +00:00
Xavier Dubuc 59ecc564e0 [FIX] mail: do not consider message with subtype as empty
task-2362022

closes odoo/odoo#60890

X-original-commit: 65ffb692164d5370411059dca63223c08c8dc81f
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-10-28 11:38:16 +00:00
Christophe Monniez 56105b65db [FIX] test_event_full: add a step after event registration
When an event is registered during the tour, a link is clicked without
waiting for any result.

As a consequence, the tour stops and the browser cookies are cleaned.
This leads to random failures because sometimes the remaining requests
generated by the link click have enough time to be completed and
sometimes not.

With this commit a simple step is added, that waits for the clicked link
page to be loaded.

closes odoo/odoo#60885

X-original-commit: b261ab598c7a18bbe6590114aa171d61ea9c2767
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2020-10-28 10:51:51 +00:00
Pedro M. Baeza f79af04c98 [FIX] delivery: Fallback to commercial partner's delivery method
Fine-tune of #59524.

If the delivery address doesn't have any delivery method assigned, you get an
undesired change of behavior: no delivery method is populated in that cases.

Note that the delivery method is not a commercial field that is propagated from
parent to children.

With this patch, we get a very similar behavior, which is fallbacking to the
commercial partner's delivery method if there's no delivery method in the delivery
address.

The only different behavior will be if the order partner is different from the
commercial partner of the delivery address.

closes odoo/odoo#60881

X-original-commit: 682b2e6c214b73f67e849df927bd4bda0af31d5a
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-10-28 10:10:11 +00:00
Priyanka Kakadiya c97e6c1a2f [IMP] mail: remove empty context from rpc
PURPOSE

we need to pass empty context so it can be overriden in session.js. we should be
able to not specify any context and let session handle it.

SPECIFICATION

- removed empty context from thread rpc
- as there is already managed empty context in session, so no need to manage
  empty context in rpc

LINKS

Task 2243187
PR https://github.com/odoo/odoo/pull/54512

closes odoo/odoo#54512

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-10-28 05:33:31 +00:00
Nicolas Martinelli e4cd2e45ca [FIX] crm: mark as lost
The 'Mark as lost' server action raises an AccessError when executed by
a non administrator.

Due to de4213b771

opw-2371490

closes odoo/odoo#60866

X-original-commit: b80e44bac5de3ccffad42917307bb5f049a7bec6
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-10-27 18:42:46 +00:00
lejeune quentin eb8d283358 [FIX] point_of_sale: Fix issue for IoT upgrade
When we want to upgrade the IoT box to the lastest version
we need install kpartx to the third partition.
However the source are not up to date and we can't fetch
the package.

So we must update this partition before fetch the package

X-original-commit: 83ec693cc2c4b92b29cdee6f63b283655c2633df

m

X-original-commit: f486e61c36cb39b7b79faf018f5b8ac0448e284c

m

closes odoo/odoo#60655

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2020-10-27 08:29:16 +00:00
Joren Van Onder 9a9be7b0b7 [FIX] payment_authorize: make it possible to pay after closing popup
Closing the Authorize.net popup with the little "x" doesn't call the
responseHandler. Looking at the documentation (and source) of
AcceptUI.js it seems there's no clean way to detect this.

Because of this the "Pay & Confirm" button remains disabled, requiring
the user to refresh the page.

To solve this don't disable the button at all. Presumably it was added
to avoid issues when spamming the button with clicks on a slow
connection. But simulating this with a slow connection doesn't cause
any issues.

When AcceptJS is not yet loaded it's loaded with web.ajax.loadJS(). It
correctly handles parallel calls before loading is finished and
returns the same promise. AcceptJS correctly ignores subsequent click
events on the button, because it immediately blocks all clicks on the
body (and grays it out).

Using a MutationObserver was also considered but this approach is much
less messy.

opw-2367166

closes odoo/odoo#60870

X-original-commit: 63f759b63284efc5fb9f5dc7dfbe4e2aed982ad0
Signed-off-by: jorenvo <jorenvo@users.noreply.github.com>
2020-10-27 22:30:36 +00:00
Jairo Llopis c84c17fea3 [FIX] base: replace useless vat index with regular one
The custom vat index name matched the name that the system uses for automatic
indexes (when a field has `index=True`).

But the `vat` field  was created with `index=False`, and this means that the
ORM would execute a `DROP INDEX IF EXISTS res_partner_vat_index` when updating
any addon that touches the `res.partner` model. Since this model is so
ubiquitous, this resulted in a ton of unnecessary `DROP INDEX` + `CREATE INDEX`
queries when updating any database.

What's even worse is that dropping or creating an index needs a complete
semaphore lock of the whole table, so if you're updating a high-traffic HA
production instance while it is running, you have a very high rate of concurrency
failures, because almost everybody is going to be using the `res.partner` model
in some way almost all the time.

A deeper investigation reveals that the index itself was useless. It was added in
a6e1eb9 and apparently meant to be used for optimizing name_search(). But even
though a6e1eb9 modified name_search(), it did the substitution in Python[1], so
in practice the database had no way to recognize the pattern and never used the
index. The specificity of that index makes it useless for other cases too, so it
can simply be dropped to save space.

Further, considering that the `vat` field is a common search criterion, it
actually makes sense to enable a normal index on that field, by setting
`index=True`. Neither dropping the index nor creating the default one has any
impact on existing databases, so it's safe in a stable series. A new
installation or a forced update will be necessary to benefit from the changes.

~~Finally, because the bad custom index had the same name as the regular one, an
upgrade script is foreseen to drop the old one before letting the ORM re-create
it properly.~~

Fwd-port note: the upgrade script and version bump were reverted as a
consequence of the unforeseen consequences in #60771.

1: https://github.com/odoo/odoo/blob/a6e1eb9f0ad285fac7d0ca0b9f89f046d78ec9c7/odoo/addons/base/models/res_partner.py#L710

@Tecnativa TT26303

Closes #60346
See also: #60771

closes odoo/odoo#60862

X-original-commit: 2f4a7de3d25cec36ac3b85e3f33122728346c206
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
2020-10-27 17:34:40 +00:00
Xavier Dubuc 454ecb46c9 [FIX] mail, im_livechat: allow to reopen closed chat in discuss
task-2346862

closes odoo/odoo#60859

X-original-commit: 063aa1deccdd6b53d1ab7de68921c95ecf60581c
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-10-27 17:14:00 +00:00
Achraf (abz) 6f8d9ab39b [FIX] mail: Do not send log notes to customers
Issue

    - Install "CRM"
    - Create new lead
    - Set X to customer
    - Send a log note

    X receives log notes by mail

    Reproducible on Project and CRM

Cause

    The customer sends a list of partners who will receive an email
    even when it is a log note

Solution

    Send the list of partners only when it is an email and not a log note

opw-2369280

closes odoo/odoo#60855

X-original-commit: 4e660dfdf40a36eed7123bcea2452874238fddd8
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-10-27 16:23:42 +00:00
LiLEE 5b79e43ef0 [FIX] google_recaptcha: take argument 'action' into effect
Take argument _action_ of method _verify_request_recaptcha_token into effect.
Otherwise it always sends 'website_form' as recaptcha action to google
recaptcha service to verify the token, this would lead to failure.

closes odoo/odoo#60854

X-original-commit: f29a625857128617c2d4d795e648d5ad1f7ab8a4
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-10-27 16:23:20 +00:00
Nicolas Martinelli 691c14c070 [FIX] account, purchase, sale: portal access error
- Install account / purchase / sale
- Ceate an internal user without any access rights
- Go to `/my`

A 500 error is raised because of an AccessError.

When the user has no access rights to any of the mentioned applications,
the `search` call returns an AccessError.

We prevent the access error and return 0 as a fallback.

opw-2367559

closes odoo/odoo#60849

X-original-commit: 54ef98c613219aba3bda41817f7767261b8092d2
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-10-27 15:36:48 +00:00
Nicolas Martinelli 77d3c1e8fe [FIX] base_setup: Default Access Rights
Prevent crash in case `base.default_user` has been deleted.

Note that the user shouldn't be deleted in a first place, but that's
another discussion...

opw-2360615

closes odoo/odoo#60821

X-original-commit: 7342cadcfe8d85edb8a53aef0ecc402dbbc7e935
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-10-27 12:54:49 +00:00
Goaman 60e165e60b [IMP] wesbite: add comment in tour
closes odoo/odoo#60784

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2020-10-27 15:29:28 +00:00
Goaman 1981f175a6 [IMP] website: remove unused reference 2020-10-27 15:29:23 +00:00
Raphael Collet 9e6df0fb71 [FIX] core: reinstall hooks after setting up models in registry
Before this patch, adding a field on a custom model discards all
automated actions on that model.  The explanation is relatively simple.
When models are set up in the registry, the classes of custom models are
dropped then recreated.  Given that automated actions are implemented as
monkey-patches on model classes, the setup of models simply loses those
monkey-patches, which explains why they stop working on custom models.

The fix introduces an `_unregister_hook()` method, that is expected to
clean up what has been done in `_register_hook()`.  When the registry is
ready (i.e., not being loaded), the setup of models first invokes
`_unregister_hook()` on models, proceeds with the setup, and finally
invokes `_register_hook()` to reinstall the hooks.

OPW 2362308

closes odoo/odoo#60833

X-original-commit: 67152bf82da2674179297d32e4cec9dd534fa0c9
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-10-27 13:59:20 +00:00
Priyanka Kakadiya c3c01633ce [IMP] mail: open partner/employee form on chat header click
PURPOSE:

It often happens that someone will send you a message, but you don't actually
know who is the person within the company. In this context, it would be
practical to have direct access to that person's public user or employee form
in order to get more information.

SPECIFICATIONS:

on hover, display the name of the user is bold + underlined
if the user clicks on the name, redirect to:
 - the employee form if the hr module is installed and if the user is
   linked to an employee
 - else redirect to the partner form

LINKS:

closes https://github.com/odoo/odoo/pull/58754
task 2252924

closes odoo/odoo#58754

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-10-27 04:56:29 +00:00
Laurent Smet 422d5d3e09 [FIX] account: Fix useless test introduced by https://github.com/odoo/odoo/pull/60614
closes odoo/odoo#60766

X-original-commit: bba6f1989bedf8799e93f676e872628f884a5f4b
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2020-10-26 17:03:07 +00:00
Joseph Caburnay 6b443b7981 [FIX] l10n_in_pos: receipt rendering error when company has no country
To reproduce:

1. Start with empty instance with point_of_sale (no demo).
2. Install Indian localization from Invoicing.
3. Start a pos session with that config.
4. Sell a product.
5. Assign a customer to the order.
6. Invoice the order during payment.
7. Validate. [BUG] Empty receipt is shown in the receipt screen.

This is because of empty country field of the pos.config's company.
We modify the check for country code in the receipt template to
account for empty country as fix.

closes odoo/odoo#60814

X-original-commit: 86423e2da90e1d023bd616cbc719c80f087a4206
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Signed-off-by: Joseph Caburnay (jcb) <caburj@users.noreply.github.com>
2020-10-27 11:15:26 +00:00
Joseph Caburnay e380ed010e [FIX] point_of_sale: empty name check when editing customer info
User is not allowed to save an empty name for the customer details.
If tried, an error message is shown. This feature has been accidentally
dropped after the pos-owl-refactoring. We are restoring this behavior
in this commit.

closes odoo/odoo#60813

X-original-commit: 025d2c9685af74f7ef00530966cb5fb306a31085
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Signed-off-by: Joseph Caburnay (jcb) <caburj@users.noreply.github.com>
2020-10-27 11:15:01 +00:00
Ivan Yelizariev // IEL 544228786c [REF] base: delete dead code
No longer needed since 7288b4779a

closes odoo/odoo#60758

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-10-27 10:51:00 +00:00
Dharmraj Jhala 6d757f5a69 [IMP] crm : re-organize crm settings
PURPOSE

Improve ui in CRM settings to ease user understanding and using settings.

SPECIFICATIONS

This commit re-organizes some crm related settings groups for better
usability by interchanging their positions and by putting related
groups together.

Crm PLS warning improvement: https://tinyurl.com/y67ug3fr
  * Reword PLS explanation and button (followup of 9a57a7edfb)

Settings cleanup: https://tinyurl.com/y5lwqwe6
  * Move "Leads" option on the right, next to Recurring revenues;
  * Move "Incoming Emails" below "Leads";
  * Switch "Visits to Leads" and "Outlook CRM Extension";

LINKS

TaskID - 2351582

closes odoo/odoo#60264

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-10-27 10:50:38 +00:00
std-odoo 01ceca36b2 [IMP] digest: change the logic from "Last day" to "Last 24 hours"
Purpose
=======

Change the logic of the KPI "Day-1" to "Last 24 hours", so new freshly
created data in the free trial are included in the statistics (same for
last week and last month logic). This requires to change from date-based
computation to datetime-based.

Change the URL of the "connect" button from "/web/login" to the root
URL (so the user is not stuck if he didn't activate yet his database).

Task ID-2359406

closes odoo/odoo#60166

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-10-27 11:11:54 +00:00
Jeremy Kersten 0a948f67ec [FIX] website: fix recursive list in _enumerate_page
Each time the function is called, we append to the same persistent object.

closes odoo/odoo#60808

X-original-commit: d8790cce3e4a23d2b6b1c32d48d5df14fbdcfd33
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-10-27 10:23:25 +00:00
Jeremy Kersten 71f42e274d [FIX] website: favicon use STATIC_CACHE_LONG that is a real year
365 * 24 * 60 is not a year, but year/60 ;)
While we fix it, it is the good time to change and use the dedicated
http.STATIC_CACHE_LONG that exists for it.

closes odoo/odoo#60807

X-original-commit: bb4d5bebaf926cbdf6f8842cd1ca0e5850523bf5
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-10-27 10:22:56 +00:00
Jeremy Kersten e0ec0e0369 [FIX] website_event: fix sitemap for /event/<>/community route
If you don't install website_event_meet_quiz or website_event_meet_quiz,
the route will not have sitemap defined.

Now we force the sitemap to False by default.
And let the override choose the presence or not into the sitemap.

It will remove the warning, if your are running test only on website_event
No Sitemap value provided for controller <bound method EventCommunityController.community of
<odoo.addons.website_event.controllers.community.EventCommunityController object at 0x7ff889bd3668>>
 (/event/<model("event.event"):event>/community)

closes odoo/odoo#60806

X-original-commit: 7c7c40f6248b15274afd0cd75d0be28d1ccb1e8f
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-10-27 10:22:31 +00:00
Nicolas Martinelli b5332aca63 [FIX] sale: group SO with section in single invoice
- Create SO 1:
  - Section A, sequence 10
  - Product A, sequence 11
- Create SO 2:
  - Section B, sequence 10
  - Product B, sequence 11
- Select both SO
- Create the invoice

The resulting invoice lines are organized as follow:
- Section A, sequence 10
- Section B, sequence 10
- Product A, sequence 11
- Product B, sequence 11

This is obviously not expected as it messes up the organization of the
lines.

This happens because the sequences of the SO lines are kept at invoice
creation, while it is necessary to resequence the invoice lines to keep
them organized.

To do so, we loop on the invoice lines before their creation in order to
assign a sequence corresponding to the order in which they have been
added in the list. Since the invoice lines are added one SO after the
other, this allows us to keep the appropriate ordering.

Note that we only resequence if there are less invoices to create than
SO, meaning that several SO have been merged. Indeed, in case a single
invoice is created from a single SO, there is no need to resequence.

This assumption is not completely true: if not all selected SO were
invoiceable, the number of invoices created is also smaller than the
number of SO. However, resequencing should be safe so in the worst case
we might resequence an invoice while it was not necessary.

We also leave the possibility for third-party addons to alter the
resequencing thanks to the `_get_invoice_line_sequence` method.

opw-2363443

closes odoo/odoo#60789

X-original-commit: 97c2f5ea51a669830b3e6d6d2d7d857742a41481
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-10-27 08:38:20 +00:00
Swapnesh Shah 3b35c7366e [FIX] sale_stock: display qty_at_date_widget on form view
Before this commit,Widget "qty_at_date_widget" was only displayed on Sales order line form view.

Now we are showing Widget "qty_at_date_widget" on Sales order line form view as well.  (https://prnt.sc/v5inaw)

closes odoo/odoo#60797

X-original-commit: c5b72032d97df28c4797ea3b21995d685b3006aa
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2020-10-27 09:38:11 +00:00
Dharmraj Jhala 9a57a7edfb [IMP] crm : improve crm settings usability
This commit fixes few of the strings / layout for the settings related
to CRM and makes it less technical and thus more understandable and
also updates the required translation strings.

TaskID - 2351582

closes odoo/odoo#60790

X-original-commit: 55b05ed5e2cf083ac1e6d807d59e5533f4fb94b6
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-10-27 08:48:01 +00:00
William Henrotin 1f4d7ba7ba [FIX] stock: update description_picking with picking type
This commit updates the description_picking on stock moves once the
picking type is changed. This is needed to merge stock moves at
confirmation. The description_picking field chosen on the merged move is
the 'minimum one'. Empty string will always be chosen that way, so we
lose the information.

closes odoo/odoo#60762

X-original-commit: a3dad0f892b5394124763ceb13305fca745c95b9
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2020-10-26 16:14:52 +00:00
Benoit Socias 58857ebb1d [FIX] website_sale: repair the website sale dashboard layout
Before this commit the layout of the website sale dashboard in community
was broken because it contained nested h2 headers

After this commit the layout of the website sale dashboard in community
is back to normal

Related to #26067

closes odoo/odoo#60763

X-original-commit: 299d6ecd6e27f252c54370f59b2c4707014d7abb
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-10-26 16:15:21 +00:00
IEL ccd5c2bc80 [FIX] pos_cash_rounding: fix "almost zero" error
TLDR: zero is not always zero in js

STEPS:

* On your POS, add a Cash rounding > Rounding precision 0.10 > Rounding method
DOWN
* Set a product with a Unit of Measure with 3 decimals (kg for instance)
* In POS:

  - Make an order for 0.514 kg at 429.99€ + 0.510 kg at 429.99 + 0.60€
  - The total of the order is 440.90 (exact total would be 440.90976)

BEFORE: The total to pay is 440.80

AFTER:  The total to pay is 440.90

WHY:

* var total = round_pr(this.get_total_with_tax(), this.pos.cash_rounding[0].rounding);

  // 440.90000000000003

* var rounding_applied = total - this.get_total_with_tax();

  // 5.684341886080802e-14

---

opw-2357917

closes odoo/odoo#60754

X-original-commit: 262a9dc935d74b30ffeaff6d6d88aac150793d6e
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2020-10-26 14:56:48 +00:00
Antoine Guenet c875a163e5 [FIX] mass_mailing: hide all panels on show themes
closes odoo/odoo#60562

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2020-10-22 15:54:25 +00:00
IEL 5a7deba4ff [FIX] account: show payment_reference in draft invoices
It was hidden in
https://github.com/odoo/odoo/commit/d1bbf11af27e4ce12b025ef22e397302ee6336c2

But customers actually need it.

opw-2358111

closes odoo/odoo#60746

X-original-commit: e676f5813455896b2bf853404228d11b02f58a15
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-10-26 14:15:43 +00:00
Adrien Horgnies 6adac428b4 [FIX] payment_stripe: hide disabled local payment methods
If a merchants didn't enable a local Payment Method Type (PMT) on Stripe
 side (such as bancontact), his customers eligible for it (ex.: Belgian
 and paying in EUR) won't be able to pay using it.

This commit fixes this issue by adding a condition on the payment icons
 assigned to Stripe: if the payment icon related to a given payment
 method is not listed as a supported payment icon, the related payment
 method is not offered to customers, unless the payment icon does not
 exist at all.

User can enable PMTs through (Payment Acquirers > Stripe
 > Configuration > Supported Payment Icons). This concerns: ideal,
 bancontact, eps, giropay and p24.

 This solution is not entirely satisfactory but it isn't possible to
  fetch enabled PMT from Stripe.

opw-2335482

closes odoo/odoo#60740

X-original-commit: 1d0f23599bbd425c81131a5f6c1c22531ffcd0ee
Signed-off-by: Antoine Vandevenne (anv) <AntoineVDV@users.noreply.github.com>
2020-10-26 13:26:21 +00:00
Jeremy Kersten 532a22667f [FIX] base, website_sale: vietnam zip not required
Zip cannot be required if not in format address.
It will break ecommerce, because the customer cannot
validate the adress because zip code is not displayed but required.

Fix case in JS where field is not display to avoid traceback.

This commit closes #58950

closes odoo/odoo#60704

X-original-commit: 2d31892081a48c521357cef974ea23fc9228a39e
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-10-26 09:22:28 +00:00
Thanh Dodeur bfd018fd8c [FIX] mail: prevents crash when completing self repeating activities
Before this commit, completing an activity that was automatically
generating new activities was causing a crash as no action is returned
when they are completed.

This commit fixes this issue by handling the case where no action is
returned.

opw-2361674

closes odoo/odoo#60732

X-original-commit: ce6f6fb4e04746d28e1b959d50f50a855c7a3049
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-10-26 11:49:00 +00:00
Thanh Dodeur 56c222c8e6 [FIX] mail: adds a test for the chatter of new records
This commit adds a test for the fix odoo/odoo/pull/58769 that
ensures that the chatter is properly cleared when creating a new record.

task-2348472

closes odoo/odoo#60731

X-original-commit: 5e46850072f142fb17b72d8738dc4f1c60e3a786
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-10-26 11:48:30 +00:00
yhu-odoo a0868bc1ec [IMP] (mrp,stock)_account: using correct account when unbuild a MO
Currently when unbuild a MO, we create journal entries the same as
receiving components (add credit to input account) and deliver
finished product (add debit to output account). But since the
unbuild is just a revesal of the MO, the journal entries should
alse be revesals.

In this commit, when unbuild a MO, for the journal entry about the
component change, we add credit to the output account, and for the
journal entry of the finished product change, we add debit to input
account make sure the journal entries are also reversals.

Task 2312828
PR #58150

closes odoo/odoo#60730

X-original-commit: 83a3230706e1e2f4eaf9718156647821341d192b
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2020-10-26 11:48:02 +00:00
qsm-odoo f25b0aae39 [FIX] web: preload font awesome font for frontend layouts
This commit adds an easy improvement fixing a page speed warning: the
font awesome font (declared in a font-face in assets_common) can be
preloaded.

The only problematic point was that font-awesome defines the font by
a series of URL using different font formats. Only one can be
preloaded (otherwise you would load files for no reason). As all Odoo
supported browsers use the woff2 format, we only preload that one. At
the cost of a warning for other browsers which use a different format.

task-2350647

closes odoo/odoo#60715

X-original-commit: 60c787679260a97c58f399af1a51d7549429f979
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-10-26 10:09:15 +00:00
Thomas Dieuzeide 8c988631e6 [FIX] base: avoid deprecation warning
Using or importing the ABCs from 'collections' instead of from 'collections.abc'
is deprecated since Python 3.3, and in 3.9 it will stop working.

closes odoo/odoo#60728

X-original-commit: b6907f8fad3b27400a4c2e4a046ed0f02869f863
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Signed-off-by: Thomas Dieuzeide <tdi-odoo@users.noreply.github.com>
2020-10-26 11:20:09 +00:00
Nicolas Martinelli 227bd5d8bf [FIX] project: add follower as project user
- Create a user A with access rights to Project set as 'User'
- As user A, add a follower to a task

An AccessError is raised.

It happens because `allowed_user_ids` has the group
`project.group_project_manager`.

Since a Project User is allowed to set followers on a task, it is
legitimate to set the appropriate portal user as allowed.

opw-2369674

closes odoo/odoo#60725

X-original-commit: 5ee045b2532ce97094dea2fe6b5e354585d67691
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-10-26 11:01:58 +00:00
Aaron Bohy 887bc757b5 [FIX] web: update owl to last version
This commit updates owl from v1.0.10 to v1.0.13

See [1], [2] and [3] for the list of changes.

[1] https://github.com/odoo/owl/commit/8da68e925b3baf00f671dd0435bc463d234031d7
[2] https://github.com/odoo/owl/commit/392185ab6740c8872ca6f19cc71e059b36d3a727
[3] https://github.com/odoo/owl/commit/d615ffd81b0b0c80780fcf022316769e10dc5dc1

closes odoo/odoo#60724

X-original-commit: 610d5b86114dfc877a3a3650cd54cc7ec2327ab8
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-10-26 11:01:33 +00:00
Andrea Grazioso (agr-odoo) b5d4e77b2c [FIX] sale_timesheet: fix task creation when no tasks
Create a sale order with a service configured with
- Service Invoicing Policy: Timesheets on tasks
- Service Tracking: Create a new project but no task
Save and confirm. Access the project and the tasks via smart button.
Create a new task.

The task will not be saved under the current project because there is no
data reference in context.

opw-2355547

closes odoo/odoo#60692

X-original-commit: 51ce1d6ca479b4d851eacef70212bf890588e1c7
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
2020-10-26 08:08:19 +00:00
Swapnesh Shah 1e9de61d81 [FIX] purchase: confirm receipt date if needed
Before this commit, There would be Traceback (AttributeError: 'bool' object has no attribute 'date')
on `Confirm Receipt Date` If order has no `Receipt Date`.

Now, Button `Confirm Receipt Date` will be hidden if there is not `Receipt Date` to confirm.

Closed #60222

closes odoo/odoo#60723

X-original-commit: 6f37f489b065d5534709c0eaf6c647ab5ad469df
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2020-10-26 11:01:05 +00:00
2160418674 [FIX] web_editor: do not show overlay for invisible elements
When a snippet is out of the viewport or hidden, the overlay should
not be visible. Two distinct cases we had:

- When the page is scrolled, the header is sometimes hidden thanks to
  tranform: translate(0, -100%); for some kind of effect -> the header
  is thus still visible but out of the viewport, any selected snippet
  inside that header would still have this overlay enabled so we would
  see the move and delete button on the top of the screen.

- When the page is scrolled, with the vertical header, some part of the
  header are hidden for the affixed version. If any snippet in those
  hidden elements was selected, the overlay is still visible floating.

task-2312878

closes odoo/odoo#60658

X-original-commit: 8a949019fd39c6c07ae5827462ee96e15f3190a1
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: Benjamin Vray <bvr@odoo.com>
Co-authored-by: Thanh Dodeur <tso@odoo.com>
2020-10-26 08:27:25 +00:00
Swapnesh Shah 1e4d033b89 [IMP] repair: remove duplicate access
Access of model `stock_production_lot` was already given to the group
group_stock_user in the module stock, with the rule
access_stock_move_user

closes odoo/odoo#60680

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-10-26 09:02:09 +00:00
Goffin Simon f458ffe5f6 [FIX] website_sale_wishlist: Product with sale_ok = False in wishlist
Steps to reproduce the bug:

- Let's consider a sellable product P published on the shop
- Let's consider a portal user PU adding P in his wishlist W
- Set P with sale_ok = False (meaning unsellable)
- With PU try to see W

Bug:

A 430 error was raised because the product P was not sellable

opw:2362184

closes odoo/odoo#60540

X-original-commit: 8646b0049808036422fec200163a8a4ff1d0df43
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2020-10-22 13:30:03 +00:00
Andrea Grazioso (agr-odoo) f55639dfac [FIX] website_sale_coupon_delivery,sale: validate taxcloud after carrier
change

Configure taxcloud, 2+ delivery carrier, card payment
Go to the website shop
Add product to cart
Checkout with USA address
On the Confirm Order page, the tax is computed via TaxCloud and shown on the right.
Pay via payment acquirer site

The Subtotal (without taxes) is sent to the Payment Acquirer instead of the Total

This occur because when selecting delivery carrier coupon lines are
recomputed. To be on the safe side with taxcloud, taxes are excluded before
recomputing coupon lines, but never added in this specific flow.

opw-2338103
opw-2362493
opw-2353048

closes odoo/odoo#60570

X-original-commit: f220e66d707654ee76dc343685dee8c2dda68dd5
Related: odoo/enterprise#14351
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-10-22 18:00:23 +00:00