Commit Graph
140847 Commits
Author SHA1 Message Date
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
Anh Thao Pham (pta) 06ca464458 [FIX] website_sale: fix fiscal position update in eCommerce cart
- Install website_sale
- Go to Website > Products > Products and create a Product with "Tax 15.00%" (i.e. Product X)
- Publish the Product on Website
- Go to Invoicing > Configuration > Fiscal Positions
- Create a first Fiscal Position:
  * Fiscal Position (Name): Fiscal Position A
  * Tax Mapping: Tax 15.00% => Tax 15.00%
- Create a second Fiscal Position:
  * Fiscal Position (Name): Fiscal Position B
  * Tax Mapping: Tax 15.00% => Tax 0.00%
- Create a Portal User (i.e. User X)
- Go to Contacts and edit User X to set his Fiscal Position to Fiscal Position A
- Connect with User X
- Go to online Shop and add Product X in the cart
- Open "My Cart" => Taxes are displayed correctly
- Process checkout and enter an address, but do not pay
- Disconnect
- Change Fiscal Position of User X to Fiscal Position B
- Reconnect with User X and open "My cart"
- Open "My Cart" => Taxes are displayed as if the Fiscal Position has not been changed
The prices and taxes in the cart are still based on the previous fiscale position.

To fix that, fiscale position of SO will be compared to fiscale position of user,
even if user has not changed.
Howerver, as it is a specific use case, it will only be done if "sale_order_id" is not
in session anymore.
Also the cart from user's last visit will not be reloaded, but a new one will be created,
as it is done when used pricelist is not available anymore.

opw-2300330

closes odoo/odoo#60587

X-original-commit: bd77d0ca35a0ab724d235aca989b9c2357a25caf
Signed-off-by: Anh Thao PHAM <kitan191@users.noreply.github.com>
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-10-23 07:48:09 +00:00
Nasreddin (bon) 17bee9e723 [FIX] account, l10n_ar, l10n_cl: web_studio broken due to dynamic view call
Issue

	- Install "Accounting" & "Studio" modules
	- Go to "Accounting" and switch studio editor
	- Go to "Reports" tab and select "Invoices" report
	- Click on any block to edit.

	Not possible to edit document.

Cause

	Studio cannot parse dynamic `t-call` and therefore not able
	to render the corrects hooks to edit the report.
	The issue has been introduced by this commit: https://github.com/odoo/odoo/commit/5c5710ae8ea045569fd94504f9d8dd5209f7b662

Solution

	In the corresponding localization report template,
	add an 'Inheritance Specs' (position="after") that will add a condition
	where it will retrieve the rigth report name
	in case localization enabled.

opw-2362257

closes odoo/odoo#60660

X-original-commit: ee1580a85c9942e9a98748fa568f9f664c67a320
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
2020-10-23 17:20:09 +00:00
Laurent Smet 1738273e4a [FIX] account: Fix unbalanced journal entry when switching payment terms
When switching immediate payment term to 30% advance then back to immediate payment term, the receivable line is back to its previous value.
This is due to the '_get_fields_onchange_balance' that is not updating correctly the business fields since price_subtotal == amount_currency.
So, when `writing`, debit/credit are removed from the dictionary because the values are the same as before. However, `price_unit` hasn't be updated with the new value and remains as its previous value.
It leads to a recomputation of accounting fields regarding the business fields and then, trigger the unbalanced journal entry.

closes odoo/odoo#60654

X-original-commit: 18b5ad16a442404061b1028c2ffd82f179beaba3
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-10-23 15:51:28 +00:00
Achraf (abz) 25345a8219 [FIX] l10n_latam_invoice_document: Add credit note to invoice
Issue

    - Install "l10n_latam_invoice_document"
    - Try to add a credit note to any invoice

Cause

    "l10n_latam_manual_document_number" is unitialized when
    "l10n_latam_use_documents" is equal to False

Solution

    Init "l10n_latam_manual_document_number" to False

opw-2366298

closes odoo/odoo#60656

X-original-commit: 6b5f40f4310f02204d98c58d45f92a27c7fad7c1
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-10-23 16:03:04 +00:00
fw-bot a420046a52 [FIX] website_mail_channel: fix load more replies
On a thread with at least 21 replies, click on "show N more replies".
The first time, it does the last 10 replies.
Click again: it appends the same batch of 10 replies to the thread.
The button loads the replies starting from the last reply id,
but this id is not updated after load.

This is because the code searches for a `p.well` in the DOM
assumed to be the `o_mg_read_more` parent (see c40f184).
However, commit 59237ea removed the `.well` class of the parent.
The new button is not found, the old button is not removed, and so it goes.

Forward-Port of 4536764ad52b5b

closes odoo/odoo#60647

X-original-commit: 69dd830a15da2d7e43e6040e26d960d2e941002e
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-10-23 15:20:46 +00:00
Didier (did) c9ff3672ca [FIX] mail: force the model when creating basic thread
fw of ca6cc05cec13f2e3f1d6555491c3180e9ff3ace2

closes odoo/odoo#60645

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-10-23 15:34:07 +00:00
Didier (did) dd91d2a6c2 [FIX] mail: incorrect value for partner id.
fw of b70e3456baf22fd08ed037bdc1b19214803ac51c
2020-10-23 15:33:45 +00:00
Didier (did) e0075664fd [FIX] mail: handle the case when the user id isn't and array.
fw of 9be44c5de2b86d56871a1ef5326ada24afceec6c
2020-10-23 15:33:45 +00:00
Julien Giannone 461ae4fc5e [FIX] mail: filter commands used in composer based on channel type
closes odoo/odoo#60644

Task-id: 2343850
X-original-commit: caaf436bdf1f72634bf8a83672c6f683e0013713
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-10-23 15:04:52 +00:00
Nicolas Galler fbd24823e7 [FIX] product: archiving last variant must archive product template
Behavior prior to this fix:

When archiving the last variant on a template, the product template
stays active (contrary to the comment indicating that `toggle_active`
will archive the related product.template if there is only one active
`product.product`).

Behavior after the fix:

When archiving the last variant on a template, the product template is
archived.  When un-archiving that variant, the product template is
unarchived as well, without un-archiving the other variants.

Note: this is a remake of a fix implemented in 77e5472c041e, as that fix
did not correctly count the inactive variants.

opw-2349862

closes odoo/odoo#60641

X-original-commit: 01160ee5e7f726f3035c566a13e26825236dedfd
Signed-off-by: Nicolas Galler <nicocrm@users.noreply.github.com>
2020-10-23 14:32:09 +00:00
Vanneri 5540d20e00 [FIX] sale_management: Pricelist singleton error while choosing optional product
closes odoo/odoo#60627

X-original-commit: b6ced2e13e328539b086067a836d1e0fba3990b7
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-10-23 13:26:43 +00:00
lejeune quentin cf9b5e93e5 [FIX] point_of_sale: Update IoT Box version to 20_10
We release a new version of IoT Box.
So we need to update the version.

closes odoo/odoo#60626

X-original-commit: d60a5896e7adaeddf0f41e28d43f9688149927ac
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2020-10-23 13:19:46 +00:00
lejeune quentin 6e0f6cd312 [IMP] point_of_sale: Change raspbian to raspios
We change the OS from Raspbian to Raspberry Pi OS

So we change all occurence of raspbian to raspios

m

X-original-commit: f54f02e208f7f96e89a0b2a68c57570edb0c75d5
2020-10-23 13:19:45 +00:00
lejeune quentin 51ceeb178a [IMP] point_of_sale: Build IoT from new Raspberry Pi OS
We update the image to build the IoT from Raspbian to Raspberry Pi OS

X-original-commit: 185eafee904ec3812e838f57db16e83ccc5c91f9
2020-10-23 13:19:45 +00:00
Didier (did) 66dca07144 [FIX] mail: add test to the suggested recipient feature
task-2343795

closes odoo/odoo#60625

X-original-commit: a76a576ad25c928e006812cf20423a592de03b30
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-10-23 13:19:20 +00:00
Nicolas Galler bb9d5667b5 [FIX] calendar: accepting meeting invite from email
Behavior prior to the fix:

When accepting a meeting invite from the invitation email, if not logged
in, an Internal Server Error is received.  Additionally, if already
logged in, an Internal Server Error is also received (albeit for a
different reason)

Behavior after the fix:

Accepting (or declining) the meeting invite works and shows the
accepted/declined meeting.

opw-2366173

closes odoo/odoo#60617

X-original-commit: d44d9e58b2cd5530e15e2a8c5055b18d2d8395e7
Related: odoo/enterprise#14361
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Signed-off-by: Nicolas Galler <nicocrm@users.noreply.github.com>
2020-10-23 12:28:45 +00:00
William Henrotin ca782a540e [FIX] mrp: change depends to trigger compute
The _compute_is_planned() method was only triggered at the workorder
creation and not at the modification of date_planned_start or
date_planned_finished.

This commit change the depends fields to trigger the compute at right
time.

closes odoo/odoo#60620

Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2020-10-23 12:26:15 +00:00
Sébastien Theys 562fdd67f2 [FIX] mail: do not return members of channels in channel_info
This PR has 3 parts:

The members fix itself, which is necessary for performance reasons especially
at init messaging, as per described in the task.

Adding the partner name in the typing payload, because due to not knowing all
members anymore, it is necessary to properly display who is typing.

Restrict restoring scroll position only if the corresponding scroll height is
available, to make the scroll feature and particularly the corresponding tests
more robust.

task-2360020

closes odoo/odoo#60616

X-original-commit: 91ce61ba568d83190e7ed2c168fd56101474683b
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-10-23 12:27:57 +00:00
Antoine Vandevenne (anv) 1a509642b9 [FIX] doc: fix broken anchor
closes odoo/odoo#60612

X-original-commit: 50b8e83597ec07e091e1a4b62184e148ddcfb6c5
Signed-off-by: Antoine Vandevenne (anv) <AntoineVDV@users.noreply.github.com>
2020-10-23 11:41:40 +00:00
Aurélien Warnon 0bac777154 [FIX] website_slides: hide "responsible" label if no responsible assigned
This commit makes a small adjustment to the course view to hide the responsible
label in the course description if none is set.

As this field is not required on the slide.channel model, it's not necessary to
show a useless label when it's not set.

Task 2368573

closes odoo/odoo#60611

X-original-commit: 7114e13736d41f2350b14367704bf14c23cf9c0d
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: awa-odoo <awa-odoo@users.noreply.github.com>
2020-10-23 11:41:15 +00:00
Nicolas Galler ac9c9529b5 [FIX] product_email_template: use superuser account to send email in su mode
Behavior prior to the fix:

The email template associated with a product on an invoice placed via
the web portal is sent with no email_from, resulting in a failure.  The
reason is that before 13.0 .sudo() before sending a mail would send it
as superuser user (which was the intention in this case), but since 13.0
for the same intention we need .with_user(SUPERUSER_ID).

Behavior after the fix:

When sending the product email, if we are in SU mode, we'll switch to
the super user account, emulating the pre-13.0 behavior.

Similar fix to b12bcfbb1b

opw-2346415

closes odoo/odoo#60584

X-original-commit: 43718d0694d8d0c7b53e3511cb8523a645ebddb1
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Signed-off-by: Nicolas Galler <nicocrm@users.noreply.github.com>
2020-10-23 07:17:53 +00:00
IEL 1aae1f0205 [FIX] web_editor: disable embedded video for html fields in backend
TLDR: the videos doesn't work anyway, but nobody noticed it for years; at the
same time there is no easy way to fix it

STEPS:

* create a record with html field, e.g. project.task
* add an embedded video (File/Image icon)
* save

BEFORE: video doesn't work

AFTER: there is no option to add embedded video anymore

WHY:

* iframe tags are removed before storing html in database, so after saving a
record, embedded video doesn't work anymore
* possible fixes to activate embedded videos in backend:

  * new field attribute sanitize_iframe=False

  * adding iframe on client side -- the problem is that the backend doesn't
  have mechanism to use animation in html fields like it's done in
  website: https://github.com/odoo/odoo/blob/ced500e9bcbb5c84033463689d135ad4c7dc4f39/addons/website/static/src/js/content/snippets.animation.js#L623-L632

---

opw-2353103

closes odoo/odoo#60477

X-original-commit: 2dcbac08effcedafbcf50610355752030902b16d
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Ivan Yelizariev // IEL <yelizariev@users.noreply.github.com>
2020-10-22 08:18:59 +00:00
Jorge Pinna Puissant 7b06e6c8b6 [FIX] account_edi: allow attachment and error in same document
Allow having in an attachment as well as an error in the same document.
This will allow to see the document that generates the error, and easy
the process of debugging.

closes odoo/odoo#60599

X-original-commit: 7313e9823fffcac747af633b9b1694aa661dfa1f
Related: odoo/enterprise#14357
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2020-10-23 09:09:21 +00:00
Jérémy Hennecart 588086235e [FIX] base,calendar: fix calendar reminder
The purpose of this commit is to have reliable calendar event reminder.

Before, the reminders was not send directly and was instead put in mailing
queue, which was leading to some delay. This is due do mail_notify_force_send
context key being force to False when being in cron mode. However here we
do not want to have calendar cron scheduling emails, then mailing cron
sending them as it implies two delays.

In order to try to send reminder mails as soon as possible compared to their
schedule let us send mails directly during the calendar cron.

Task ID-2331999

closes odoo/odoo#60598

X-original-commit: 232a3c4c65dd60215a5def010da8559a9ffb2378
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-10-23 09:08:54 +00:00
Thibault Delavallée 6c280e1fd8 [FIX] base: remove duplicate call to cron.run
Oversight of conflict solving in forward port 9d1909f228aef664669152c16091a188377ee8bd

X-original-commit: 2656b855a817e5fd9270392bbf62b3117376fa34
2020-10-23 09:08:54 +00:00
Robin Heinz bc67e6bf55 [IMP] point_of_sale: Add serial number on pos invoice
When we make an invoice with the point of sale, we now include the serial numbers on the invoice template if the option is ticked.

closes odoo/odoo#59516

Task-id: 2349339
Related: odoo/upgrade#1830
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2020-10-23 09:28:34 +00:00
Victor Feyens 1b67affe7d [FIX] *: avoid direct references to countries
Ensure the code works fine even if countries are deleted.

Also consider "re"-created countries after deletion, by only considering
the country code, not the data reference.

This should reduce support requests related to deleted countries, and
ease the resolution of such problems by the users themselves.

TASK ID - 2368842

closes odoo/odoo#60558

X-original-commit: 037012bc4e2935eb00a7f353529bb7ec55066733
Related: odoo/enterprise#14347
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-10-22 16:17:26 +00:00
Florian Pose 0dd3b70690 [CLA] signature for IgH
closes odoo/odoo#60420

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-10-23 08:13:06 +00:00
Jorge Pinna Puissant 71e25dac16 [FIX] account_edi: add list of edi documents
This commit will add a new tab in the account move view with the list of
the edi documents for this move. The tab will only be visible in debug
mod. This is done to help the debugging and the error finding when there
is a problem with an edi document.

closes odoo/odoo#60246

X-original-commit: 2e01da4713f9ee68813b248a8b88f367785fc937
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2020-10-19 09:59:12 +00:00
Christophe Monniez c7130babb3 [IMP] packaging, l10n_dz, l10n_ro, survey: integrate Debian fix
With this commit, the executions bits are fixed on some xml, csv and ttf
files. The fix was initialy made at the Debian packaging level.

As xlwt is now in Debian buster, the overide is removed.

The linked fonts in Debian package are now removed in one line to
simplify the code.

closes odoo/odoo#60583

X-original-commit: f31bdc0ae16698306a776332f3aa4aaa1cade764
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2020-10-23 07:17:29 +00:00
Andrea Grazioso (agr-odoo) 0e6272819a [FIX] point_of_sale: use payment date for cash statement lines
Open POS
Make some cash transaction
Close POS
Repeat for some days and close the session

Cash statement lines will be saved with the closing date, even
if the payment entries are saved with their payment date

opw-2347645

closes odoo/odoo#60385

Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
2020-10-21 13:24:01 +00:00
Denis Ledoux 839c1857fe [FIX] l10n_latam_invoice_document: skip document_type computation on install
Skip the computation of the field `l10n_latam_document_type_id` at the module installation.

The case has been detected during an upgrade from Odoo 12.0 to Odoo 13.0,
but the case could really well happen outside the context of an upgrade,
for instance when you create a new subsidiary in Chile or Argentina
while you already have a lot of accounting entries in your other subsidiaries
(e.g. Odoo S.A. opens a new office in Chile and has to install `l10n_cl`)

Without this, at the module installation,
it would call `_compute_l10n_latam_document_type` on all existing records
which can take quite a while if you already have a lot of moves. It can even fail with a MemoryError.

In addition, it sets `_compute_l10n_latam_document_type = False` on all records
because this field depends on the many2many `l10n_latam_available_document_type_ids`,
which relies on having records for the model `l10n_latam.document.type`
which only happens once the according localization module is loaded.
(e.g. `l10n_cl/data/l10n_latam.document.type.csv`)

The localization module is loaded afterwards, because the localization module depends on this module,
(e.g. `l10n_cl` depends on `l10n_latam_invoice_document`, and therefore `l10n_cl` is loaded after)
and therefore there are no records for the model `l10n_latam.document.type` at the time this fields
gets computed on installation. Hence, all records' `_compute_l10n_latam_document_type` are set to `False`.

In addition, multiple localization module depends on this module (e.g. `l10n_cl`, `l10n_ar`)
So, imagine `l10n_cl` gets installed first, and then `l10n_ar` is installed next,
if `l10n_latam_document_type_id` needed to be computed on install,
the install of `l10n_cl` would call the compute method,
because `l10n_latam_invoice_document` would be installed at the same time,
but then `l10n_ar` would miss it, because `l10n_latam_invoice_document` would already be installed.

Besides, this field is computed only for drafts invoices, as stated in the compute method:
`for rec in self.filtered(lambda x: x.state == 'draft'):`
So, if we want this field to be computed on install, it must be done only on draft invoices, and only once
the localization modules are loaded.

It should be done in a dedicated post init hook,
filtering correctly the invoices for which it must be computed.

Though I don't think this is needed.
In practical, it's very rare to already have invoices (draft, in addition)
for a Chilian or Argentian company (`res.company`) before installing `l10n_cl` or `l10n_ar`.

```
Traceback (most recent call last):
  File "/src/odoo/13.0/odoo/service/server.py", line 1190, in preload_registries
    registry = Registry.new(dbname, update_module=update_module)
  File "/src/odoo/13.0/odoo/modules/registry.py", line 86, in new
    odoo.modules.load_modules(registry._db, force_demo, status, update_module)
  File "/src/odoo/13.0/odoo/modules/loading.py", line 423, in load_modules
    loaded_modules, update_module, models_to_check)
  File "/src/odoo/13.0/odoo/modules/loading.py", line 315, in load_marked_modules
    perform_checks=perform_checks, models_to_check=models_to_check
  File "/src/odoo/13.0/odoo/modules/loading.py", line 202, in load_module_graph
    registry.init_models(cr, model_names, {'module': package.name}, new_install)
  File "/src/odoo/13.0/odoo/modules/registry.py", line 364, in init_models
    env['base'].flush()
  File "/src/odoo/13.0/odoo/models.py", line 5458, in flush
    self.recompute()
  File "/src/odoo/13.0/odoo/models.py", line 5875, in recompute
    process(field)
  File "/src/odoo/13.0/odoo/models.py", line 5859, in process
    recs.mapped(field.name)
  File "/src/odoo/13.0/odoo/models.py", line 5266, in mapped
    recs = recs._mapped_func(operator.itemgetter(name))
  File "/src/odoo/13.0/odoo/models.py", line 5225, in _mapped_func
    vals = [func(rec) for rec in self]
  File "/src/odoo/13.0/odoo/models.py", line 5225, in <listcomp>
    vals = [func(rec) for rec in self]
  File "/src/odoo/13.0/odoo/models.py", line 5690, in __getitem__
    return self._fields[key].__get__(self, type(self))
  File "/src/odoo/13.0/odoo/fields.py", line 2329, in __get__
    return super().__get__(records, owner)
  File "/src/odoo/13.0/odoo/fields.py", line 995, in __get__
    self.compute_value(recs)
  File "/src/odoo/13.0/odoo/fields.py", line 1109, in compute_value
    records._compute_field_value(self)
  File "/src/odoo/13.0/odoo/models.py", line 3968, in _compute_field_value
    field.compute(self)
  File "/src/odoo/13.0/odoo/fields.py", line 579, in _compute_related
    record[self.name] = self._process_related(value[self.related_field.name])
  File "/src/odoo/13.0/odoo/models.py", line 5699, in __setitem__
    return self._fields[key].__set__(self, value)
  File "/src/odoo/13.0/odoo/fields.py", line 1070, in __set__
    self.write(protected_records, value)
  File "/src/odoo/13.0/odoo/fields.py", line 2564, in write
    cache.update(records, self, [cache_value] * len(records))
  File "/src/odoo/13.0/odoo/api.py", line 768, in update
    field_cache.setdefault(record_id, {})[key] = value
MemoryError
```

Upgrade request 49495

closes odoo/odoo#60573

X-original-commit: f2a08faa1e65cb381315cbd5d1a359901e8b7deb
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2020-10-22 20:49:20 +00:00
Thanh Dodeur e77e205252 [FIX] bus, mail: fix im_status for archived partners
Before this commit, archived and deleted partners had not their
im_status being updated automatically. There were some issues
with this, notably:

- odoobot 'bot' status was not displayed in chatter
- im_status of partners becoming archived were not updated.

This commit fixes both issues.

task-2329591

closes odoo/odoo#60567

X-original-commit: 63b081c49da089c839479b807de8c0cea45221da
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-10-22 17:23:13 +00:00
Jeremy Hennecart 00b77514c3 [FIX] base: update lastcall with manual cron execution as with automated execution
Cron holds a lastcall field and context key allowing to compute an accessible
range of processable records based on last execution. This lastcall value is
updated when cron runs automatically. Manual call currently does not update.
It makes sense to do the same update in manual call than with automated calls.

Moreover lastcall context key is also updated. It is used notably in calendar.
Otherwise only mails linked to "today" are taken into account, leading to
reminder issues.

Task ID-2331999

closes odoo/odoo#60559

X-original-commit: 9d1909f228aef664669152c16091a188377ee8bd
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-10-22 15:52:43 +00:00
Alexandre Kühn 46d4bdc041 [FIX] im_livechat: visitor sees typing notification of operator
task-2359991

closes odoo/odoo#60553

X-original-commit: 4ff9ff09193390d9b39b15046855f94a98ad8409
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-10-22 15:08:46 +00:00
Sébastien Geelen (sge) 2d2f8e6562 [FIX] web_editor: adapt iframe Qunit test to new editor
- iframe editor Qunit test

closes odoo/odoo#60551

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2020-10-22 15:16:15 +00:00
David Monjoie 7e03e8ea14 [IMP] web_editor: update Jabberwock library to commit a7ba7c34
Changelog:
[FIX] Template: ensure an overflow on the template container
[FIX] OdooWebsiteEditor: On mobile, shows the boudary box inside
[FIX] Odoo: double clicking on a link allows you to edit it in full
2020-10-22 15:16:14 +00:00
Antoine Prieels 798621ae5f [FIX] pos_restaurant: Order change receipts alignment
The alignment of quantity and product name was off when the product
name was split into multiple lines.

opw-2360424

closes odoo/odoo#60547

X-original-commit: 58404f299f7fa9128758b4b7830a6393c64ad085
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Signed-off-by: Antoine Prieëls <aprieels@users.noreply.github.com>
2020-10-22 14:21:22 +00:00
Benjamin Vray 8ca7aa5d3c [FIX] website, portal: fix language selector inline
This commit align vertically the copyright text and the inline
language switcher items. This commit also add a padding on
list-inline-item in the language selector. Because before this commit,
there was no space between lines if the list was to be displayed on
multiple lines.

Part of #59581

task-2312878

closes odoo/odoo#60527

X-original-commit: a8c4ca8a942d94557db5b95f42344fee71faf6e2
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-10-22 13:06:15 +00:00