Commit Graph
142111 Commits
Author SHA1 Message Date
Julien CHEVREAU (JCU) d5270c1c8a [IMP] account: check non reconcilable accounts for configured journals
Beforehand, users could configure an account as non reconcilable
even when it was configured as a payment credit or debit account
in a journal. This prevented journal items to be reconciled

Now, when a user tries to set an account as non reconcilable,
we check if there is no journal with a payment credit or debit account
set to this particular account. If there is at least one journal,
then we display an error message stating the journals names and ids
that the user would have to modify before changing the account
configuration.

closes odoo/odoo#69317

X-original-commit: 87c207f3a408abb93d9b8378ef4aa1744935d86d
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: Julien CHEVREAU <Julien-CHEVREAU@users.noreply.github.com>
2021-04-15 12:40:17 +00:00
Nicolas Seinlet b2a3471293 [FIX] project: fix count for task with NULL project_id
This commit fixes a regression introduced in #62577 .

Tasks are only taken into account iff their project_id is in self.ids.

closes odoo/odoo#69303

X-original-commit: 5be4970ddec2d9052d3b044e6e156aef94442c9a
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-04-15 10:48:43 +00:00
Goffin Simon 88957afca0 [FIX] mail: Wrong signature of function export_data
Steps to reproduce the bug:

- Go to Settings > Technical > Messages
- Select some records and export it

Bug:

A traceback was raised because

PS: When exporting data, the function export_date is called from web/controllers/main.py
with the attribute raw_data

opw:2504763

closes odoo/odoo#69308

X-original-commit: 69b27ac3f778b99a7d583ee6a9e8607a36d0a3b2
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2021-04-15 11:35:03 +00:00
Ivan Yelizariev 900373a237 [FIX] sale_timesheet: speed up computing is_service on installation
on large database module installation may be aborted because of timeout error.

---

opw-2475335

closes odoo/odoo#69298

X-original-commit: f66fc7b9c410e60ab08ccb3882d39631e4d1eccc
Signed-off-by: Adrian Torres (adt) <adt@odoo.com>
Signed-off-by: Ivan Yelizariev // IEL <yelizariev@users.noreply.github.com>
2021-04-15 09:58:31 +00:00
d1b54c2edd [FIX] base: assets cannot load on Windows
Assets can not be loaded on Windows due to the OS path separator
character ´\´.

This commit fixes it.

Specifically:

- `os.path.split` needed to get changed because it only serves to split
  the last part of the path (equivalent to `str.rsplit(os.path.sep, 1)`).
  What we want instead is to replace all `os.path.sep` by `"/"`.

- for a template file, when verifying that the path is safe we were
  trying to determine if it was including the string `{addon}/static/`.
  It should have been converted to the correct OS representation of a
  path. Now it is.

- `_get_paths` method should return the OS-style paths for the template
  files and the web-style path for others.

closes odoo/odoo#69290

X-original-commit: e8e724ad6c754484bc5f03ce3262d2337e476d42
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: Lucas Perais <lpe@odoo.com>
Co-authored-by: François Georis <fge@odoo.com>
2021-04-15 08:52:36 +00:00
Ravi Gohil 27e72a9bbd [IMP] l10n_ch: added English and updated translation
- records in XML files are now in English language instead of French
- translation for the same will be loaded through *.po files for French, German and Italian
- improved translation for French, German and Italian languages

closes odoo/odoo#67512

Task: 2391988
Related: #67512
Related: odoo/enterprise#16944
Enterprise: https://github.com/odoo/enterprise/pull/16944
Signed-off-by: Josse Colpaert <jco@openerp.com>
2021-04-15 08:58:16 +00:00
Goffin Simon f0e1da98a6 [FIX] account_edi_ubl: payment_reference not available in efff format
Inspired from http://www.datypic.com/sc/ubl21/e-cac_PaymentMeans.html

opw:2468492

closes odoo/odoo#69267

X-original-commit: e4a657e46cd189bc7ffcf3f94f26f942e6f99d57
Signed-off-by: William André (wan) <wan@odoo.com>
2021-04-14 16:05:26 +00:00
Nasreddin (bon) e8f6256141 [FIX] portal: display discounts on quotation pdf for portal user
Issue

	- Install "Sale" app
	- Acivate "Discounts" feature in settings
	- Create a quotation to a portal user (ex: Joel Willis)
	- Add a product with a discount then send
	- Logout then login as 'Joel Willis'
	- Go to 'My account' then 'Quotations'
	- Select the quotation just created and print it

	Discount not display in pdf file.

Cause

	The current env.user when rendering pdf is the portal user.
	To display discount, current env.user must have group
	'product.group_discount_per_so_line' who is not the case
	even when using sudo() on report template.

Solution

	Since Odoo 13.0, the sudo() function does not return the
	superuser by default but instead the current user
	with a bypass on access rights.
	Therefore, must add `.with_user(SUPERUSER_ID)` on report.

opw-2501337

closes odoo/odoo#69272

X-original-commit: 5dde19c92ecee8ac0238bb5c8e71263840534c28
Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
2021-04-14 16:51:12 +00:00
William Henrotin 67e575e6fd [FIX] mrp_account: copy extra_cost to backorder
In a subcontracting flow, a production order is created to reflect the
subcontractor work. An extra cost is set on this production order
corresponding to the purchase order line price unit. If the
subcontracting product is tracked, we may create some backorder to save
all the lot/serial numbers. As the extra_cost is not copied, the first
lot/serial number will have the corresponding stock valuation layer with
the correct quantity. The following ones will only have the cost of the
components as value.

closes odoo/odoo#69245

Opw: 2487450
X-original-commit: 262c2ba8773c698ccde499b095794ab0fc780699
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2021-04-14 15:05:37 +00:00
Munaf Khan 82526e8a1f [FIX] fetchmail: prevent onchange for erasing server name
currently, in fetchmail while create an incoming
mail server, Set a server name while being in POP
or IMAP server type and Switch to "Local" server type
the server name is erased.

with this commit, the value of the server name
should not be erased with onchange.

closes odoo/odoo#69250

Taskid: 2258523
X-original-commit: cf102783b43a44a38565768129ef414758a71fc6
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-04-14 11:57:14 +00:00
qmo-odoo bcb3edd35b [FIX] calendar: Invalid leaf in join route
This commit fixes an invalid leaf in join route
Follows up: https://github.com/odoo/odoo/pull/68022

LINKS:

closes odoo/odoo#69242

Taskid: 2499471
Pr: #69103
X-original-commit: 9e4cba257d0d44fa52d6783e67a363e5cf6b7735
Related: odoo/enterprise#17677
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-04-14 10:28:18 +00:00
JF Aubert 6f182eeeab [FIX] stock: allow change of reference unit of measure
closes odoo/odoo#57485

Related: odoo/enterprise#17365
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-04-14 13:14:10 +00:00
oco-odoo eaf5d86fe7 [FIX] base_vat: patch orm limitation
https://github.com/odoo/odoo/pull/68253 fixed a bug in check_vat that caused it not to run any check when called on a partner with no country.

However, doing this caused another issue because of an ORM limitation: when writing vat and country_id with a single write() on the res.company, two distinct write are triggered on the related res.partner, one for each field. Both those write trigger the check_vat constraint.

Depending on the order in which the keys of the dictionnary passed to res.company's write were ordered, country_id could or could not be written before vat. If vat was written first and did not start with a country code, the write() on res.partner failed the constraint, because country_id wasn't set yet. This was wrong, but used to pass as there was no country_id on the partner, before https://github.com/odoo/odoo/pull/68253 fixed that.

To circumvent the issue, we now allow entering any vat number without performing any check if it does not start with a country code and no country_id is set on the partner.

closes odoo/odoo#69243

X-original-commit: 7036b671228fdb5986b4f62a610a2e4d4132b8b1
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2021-04-14 10:29:00 +00:00
Julien Castiaux ee7287430f [REF] base: ir_ui_view get_view_arch_from_file
I had troubles understanding how was the function working, I decided to
rework it a bit, ended up rewritting much of it. I hope this new
implementation is easier to understand.

closes odoo/odoo#69233

Task: 2463632
Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com>
2021-04-14 11:19:33 +00:00
Aaron Bohy facd78d5f3 [FIX] web: onchange: send correct nested x2manys values
Commit [1] recently fixed an issue with nested x2many fields and
onchanges: in some cases, all field values weren't sent to the
server as they should.

However, there is a small issue with this fix. We didn't correctly
apply the default value to option `changesOnly`: when not given,
it was considered false, whereas in this particular function it
should have been true.

It caused an issue in the following scenario:

Have a form view with an x2many field (say A) displayed as a list.
In the list, there is another x2many field (say B), and (whatever
its type) a field C with an onchange. When the user changes C, the
onchange is performed, and we send to the server the value of all
fields. In particular, in the row, we send the value for the
many2one field pointing to the main record (the inverse field of
the x2many relation). The value for that field is basically the
whole record, containing itself field A. For field A, the value is
a list of commands, and for the updated record, it is a command 1.
Before this commit, in the values sent for this command, field B
was the empty array, even if it wasn't empty.

This issue was reproducible in account.move, on an existing record
having already a line in invoice_line_ids (this is field A). In
that line, tax_ids (this is field B) must have a tax which is
included in the price. When changing the quantity of the product,
the subtotal wasn't correctly computed.

[1] https://github.com/odoo/odoo/commit/a8b43d02066b2299ac2f4b88056c37725e9ce6cd
opw~2489755

closes odoo/odoo#69227

X-original-commit: 3f54ca3e29d1537f66c6a3b56494dc065d9230e9
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-04-14 09:01:34 +00:00
Antoine Guenet fef5c6eff7 [ADD] website: tour adding a megamenu item to top menu
closes odoo/odoo#69223

X-original-commit: 480986ad21b0df4e1ca63bd6e5ef97c6d7f7bf29
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-04-14 08:28:05 +00:00
Antoine Guenet 46ff93fdab [FIX] website, web_editor: properly init and save new menu entries
X-original-commit: 31063c117a46cb77efe9e4d2ad3d8bd19940dc2f
2021-04-14 08:28:05 +00:00
Julien CHEVREAU (JCU) 0cf8df4f3f [FIX] account: Check Move Status Before Posting
Beforehand, if two users independently opened a draft
invoice on their respective sessions, then both of them
clicked on the "Post" button, then the invoice was
posted twice.
On a more general aspect, the view currently "prevents" users
from posting moves several times, but technically speaking,
nothing stops users from posting moves several times.

Now, after checking that the user indeed has the right to post
a move, the next check is about verifying that the move is
not already posted.

opw-2479201

closes odoo/odoo#69178

X-original-commit: b7db7db283d7b9d167201b791e6282b022d59c40
Related: odoo/enterprise#17658
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Signed-off-by: Julien CHEVREAU <Julien-CHEVREAU@users.noreply.github.com>
2021-04-14 08:37:32 +00:00
wan fcdbb3c2f8 [FIX] l10n_lu: add taxes for ATN
Necessary Corrections for benefit in kind (ATN 17%) & Tax Report

task-2500543

closes odoo/odoo#69165

X-original-commit: 9c573d09a5f935d6cec5776c2dfc90a04732847c
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Signed-off-by: William André (wan) <wan@odoo.com>
2021-04-13 10:28:14 +00:00
Sunil Shrimali 612845686c [IMP] crm: add probability on lead tree view
Currently, in crm probability field is not displaying
in lead tree view. with the removal of lead scores,
the probability is now the tool we want users to see
as their "quality indicator" for their leads.

With this commit, we now display probability field
(optional="hide") in lead tree view, also probabilty
label changes to "Probability (%)" in Leads and Pipeline
Tree view.

closes odoo/odoo#68680

Taskid: 2496347
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-04-12 14:07:52 +00:00
Josse Colpaert 241c758bbc [FIX] account_edi: disable prediction when importing invoices.
closes odoo/odoo#69177

X-original-commit: 1502612c5d7f7516091e7e9dd2dba47cb0fccf25
Related: odoo/enterprise#17605
Signed-off-by: William André (wan) <wan@odoo.com>
2021-04-13 12:49:45 +00:00
David Beguin a888b8ee4a [IMP] survey: allow host to go to previous question in session
PURPOSE
=======
For now, the host can't go back to the previous screen on a live session.
Why would he want to go back? Misclick, want to display again the result, other

SPECIFICATION
=============
On a live session, let the host go back to the previous screen.
Do not "restart" the questions but display the graph with the results.
This back capability is independant of the "back button" survey option.
Even if the back button is disabled on the survey configuration, the host must
still be able to go back during a session.

Task ID: 2351759

closes odoo/odoo#59659

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-04-09 11:47:20 +00:00
Achraf (abz) 832125bd8c [FIX] purchase: Update correctly the price according to UoM
What are the steps to reproduce your issue ?

    1. Create Product with Purchase Vendor(s) set
    2. Create Units of Measure that are bigger than (10kg/50kg in tests)

What is currently happening ?

    If you put a vendor that is listed in product form, when changing purchase unit from kg to 10/50kg price is updated
    If you put a vendor not listed, it gives cost price which is correct, but does not update price according to unit of measure.

What are you expecting to happen ?

    Update correctly the unit of measure when the vendor is not listed

opw-2494769

closes odoo/odoo#69196

X-original-commit: d531e8a5e4d84fe6daa9110d076b0fc601a0b4d9
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
Signed-off-by: Achraf <abz-odoo@users.noreply.github.com>
2021-04-13 15:52:08 +00:00
Nicolas Bayet da435ceff1 [FIX] web_editor: update toolbar
closes odoo/odoo#69194

X-original-commit: 82072abe8f22a2326c32905c7d8b827aebadb4bb
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-04-13 15:46:28 +00:00
Nicolas Bayet b10b77b7c2 [FIX] web_editor: update call of applyColor
X-original-commit: f1c34a15fb1bf78ea745ca915065ccdb75ae0a8e
2021-04-13 15:46:28 +00:00
Nicolas Bayet 4e34a17575 [FIX] web_editor: update odoo-editor lib to commit 2d94352
X-original-commit: 201ef89c07adcbed0dd16b7553f804b793ef8224
2021-04-13 15:46:27 +00:00
dht-odoo 4a98c0d59c [FIX] {test_}mail: properly handle deletion of mail notif from composer
Before this commit:
When someone sends mail with help of mail_composer(mail.compose.message)
without having a mail template set, mail is not deleted after being sent
(and causes unwanted/unexpected burden on DB). This bug was introduced
with commit[1], where auto deletion was disabled if template is not set
on the composer.

After this commit:
If there is no mail template set on the composer, or if the template is
set and 'auto_delete' is enabled on that template, the mail sent from
composer will be deleted after being sent successfully.

A context key is added to allow controlling this behavior. It is notably use
to check query counters differences.

commit[1] - https://github.com/odoo/odoo/commit/8a026e26c6ae25e3fdb5369a7fa3343d70fab782#diff-898a3d5c08a567c1a7b82c026a213d796e850e376cbdb1c9e7936409f440d37aR257

Task id: 2484915
PR odoo/odoo#68870

Original Pr #68403

closes odoo/odoo#69203

X-original-commit: d54973ee1b4457e3d1c0c8d9bf226928530d8b30
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-04-13 16:41:53 +00:00
William Henrotin 62dcc193fe [FIX] stock_account: get unit_cost in sudo mode
Commit ad5ac19218 adds a sudo() in the
test condition but not inside the condition.

Close #69144

closes odoo/odoo#69197

X-original-commit: 7cd23a2cd464ccdfcb028b4f2c948654634b973c
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2021-04-13 15:53:36 +00:00
Thibault Delavallée b7c3bfa5b3 [FIX] calendar_sms: fix double version number in manifest
closes odoo/odoo#69187

X-original-commit: aef40635c09adf6d32a7da6770fb9b40dc49e949
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-04-13 14:51:25 +00:00
Antoine Guenet 386875cf3d [FIX] web_editor: prevent traceback on select image
Trying to select the contents of a content-less element should select
the element itself instead.

closes odoo/odoo#69173

X-original-commit: 6905eaad2ccaa782e3dce99b9581ed0194c37db9
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-04-13 12:30:39 +00:00
Antoine Guenet 500ebb0687 [FIX] web_editor: ensure editor's floating toolbar is visible in modals
Bootstrap sets a z-index of 1050 for modals while the editor's floating
toolbar has no set z-index and is therefore invisible in modals. This
ensures the visibility of the toolbar in bootstrap modals.

closes odoo/odoo#69160

X-original-commit: 9cd4eb6db072fd55d47240260e63fd5923b3bddb
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-04-13 10:08:32 +00:00
Antoine Guenet 4a1d776243 [REF] web_editor: prevent duplicate code in LinkDialog and LinkTools
LinkTools were recently introduced to provide a new UI from link editing
within a sidebar where there is one. It was implemented separately from
the existing LinkDialog despite them having a lot of code in common. In
order to prevent future discrepancies between them, this commit
introduces the Link widget which contains the common logic for link
editing, to be extended by LinkTools and LinkDialog (via an intermediary
widget).

closes odoo/odoo#69137

X-original-commit: 5415ea46f8d3ee4732111a21b0cd9fa8bdb9526e
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-04-12 16:11:14 +00:00
Ivan Yelizariev 0a2f1a1176 [FIX] stock_account: decrease number of queries in _run_fifo_vacuum
_run_fifo_vacuum may take significant time. This will slow down any operations
related to stock (Inventory Adjustment, POS Session closing, etc.) or even
block them due to timeout error. So, decreasing execution time is quite
desirable. This commit is doing it by decreasing number queries:

1. prefetch all_candidates before for-loop to avoid using `search` in each
iteration
2. move code about updating standard_price after the for-loop

---

opw-2499032

closes odoo/odoo#69112

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-04-12 12:28:36 +00:00
Josse Colpaert f986a0e4c5 [FIX] l10n_pe: add electronica to the report name as it is a legal obligation
See also #17550 in enterprise

closes odoo/odoo#69051

X-original-commit: 68ca0884d07854ca227a20427d53068e2fcce3f5
Related: odoo/enterprise#17591
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Signed-off-by: Josse Colpaert <jco@openerp.com>
2021-04-09 14:35:31 +00:00
Andrea Grazioso (agr-odoo) 1cf1445d3b [FIX] account: count in dashboard statement lines marked 'to_check'
1. Reconcile of a bank statement, checking the "To
check" box on the manual operation before validation
2. Go to accounting dashboard

The statement line will not be counted in the "to check" action.
This occur because the action only filter on reconciled moves

This reverts commit 6b0017ffda.

opw-2475663

closes odoo/odoo#69135

X-original-commit: 4f2ba741af913c36dd944070b6cbe5aaf682ced6
Related: odoo/enterprise#17637
Signed-off-by: William André (wan) <wan@odoo.com>
2021-04-12 15:57:22 +00:00
Ivan Yelizariev 5ddf7c6fde [IMP] doc: replace pyflame with py-spy
pyflame is archived and not maintained since July 2018
https://github.com/uber-archive/pyflame/commits/master

closes odoo/odoo#69128

X-original-commit: 9864fb6a159f5f145421b4e51b6125e25a69e7c9
Signed-off-by: Adrian Torres (adt) <adt@odoo.com>
Signed-off-by: Ivan Yelizariev // IEL <yelizariev@users.noreply.github.com>
2021-04-12 13:51:16 +00:00
JF Aubert b71a62b515 [IMP] purchase: Purchase order portal view
Show the purchase orders which are in state "RFQ sent" on the portal
using two separate blocks (Requests for Quotation & Purchase Orders)
as done in Sales (Quotations & Sales Orders)

closes odoo/odoo#61035

Task: 2035476
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2021-04-07 13:49:46 +00:00
Arnold Moyaux 51d612fa3c [FIX] stock: inventory adjustement for user
Fix the access for stock user to stock.quant.
Since the inventory adjustement feature has been moved on
the stock.quant. The user should be able to write on them to
make their count. However we kept that a stock user can't validate
an inventory nor modify quantities on product

closes odoo/odoo#69006

X-original-commit: 6b8d40ec494dfbcaaef0da438692c76d0088f671
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-04-08 17:52:44 +00:00
Florent de Labarre e98d75c883 [FIX] stock : show complete name of location
closes odoo/odoo#69005

X-original-commit: d4206d4a4a4cc527351a1c9cea0af0cf53dfd500
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-04-08 17:42:10 +00:00
Odoo's Mergebot 4a3f68b817 [FW][MERGE] (website_)event: improve Online features display and use
PURPOSE

Add a few minor usability features as well as a few layout adjustments for the
'event' modules.

SPECIFICATIONS

Add "Hide and show" feature for the tracks.

Add a dynamic countdown for the tracks.

Provide various changes and improvements on frontend layout display
next to intensive user testing and feedback.

See underlying commits for more details.

LINKS

Task-2347597
COM PR odoo/odoo#69102
ENT PR odoo/enterprise#17612

closes odoo/odoo#69117

Forward-port-of: odoo/odoo#69102
Related: odoo/enterprise#17621
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-04-12 14:05:18 +02:00
Julien Banken 0f50285cf6 [IMP] website_event_track[_live]: add visual & usability improvements to event.tracks
PURPOSE

This commit adds several minor visual improvements to the event.tracks
frontend and backend views as well as a few quality of life changes to
ease usability.

SPECS

- Add "hide and show" feature for tracks

In the event homepage, all the tracks of the selected event will be
displayed. As the tracks are grouped by day, some sections will only
contain tracks that have already taken place. If there are a lot of
tracks, it might be better to fold these sections to reduce the payload
of the page. That way, the user will be able to see the upcoming tracks
more easily.

With these changes, a new chevron icon will be added above each section.
When the user clicks on it, the user can fold and unfold a section.
By default, the section containing tracks that have already taken place
will be initially folded.

- Add partner tag line

The user may need to know more about the speaker before attending a
talk. The user may wonder: Who will give the talk ? What is his/her
field of expertise ? Where the speaker comes from ? To answer these
questions, we will display: the name, the job position and
the company name of the speaker.

- Add replay suggestion when no suggestion can be provided

When a video ends and no suggestion can be provided, the player will
display an empty cover to hide the Youtube suggestions. With these new
changes, the cover will now suggest the user to replay the video when
no suggestion can be provided.

- Dynamic count down for incoming tracks

When the user accesses a track that will start in several hours, an alert
will indicate the remaining time before the beginning of the track.
Unfortunately, this alert is not dynamic: If the user keeps the page in
a tab and come back later, the alert will not be updated and will display
an incorrect estimation.

The changes address this issue: The timer will now be updated dynamically
as the time goes on. When the countdown reaches 0, the alert will
automatically be removed from the dom.

- Fix links of the agenda view

In the agenda, the title of a track can be a link. When the user hover
it, the cursor of the user will now turn into a clickable hand only if
the track is accessible.

- Remove the default date for the new tracks.
- Set a default duration of half an hour for the new tracks.

LINKS

Task-2347597
COM PR odoo/odoo#69102
ENT PR odoo/enterprise#17612

X-original-commit: 6804b8a92c03db09c2694150f968d8056492a1d4
2021-04-12 10:39:58 +00:00
Julien Banken 98f46907c2 [IMP] website_event[_track|_meet|_exhibitor]: improve various frontend event layouts
PURPOSE

This commit generally improves some of the event application layouts.

SPECS

- Add new rules to handle long text properly.
- Set a maximum height for the dropdown menu.
- Minor margin and padding adjustments.
- Reduce border radius of status badge.
- Remove the rounded corners of the cards.
- Remove the "wishlist" terminology.
- Fix the href attribute of the event name.
- Fix image distortion of the sponsor cards (backend).
- Hide viewer count when there is no viewer.
- Limiting the expansion of the meeting room aside block.
- Various other minor changes coming from user testing

LINKS

Task-2347597
COM PR odoo/odoo#69102
ENT PR odoo/enterprise#17612

X-original-commit: cfbe1096ec34411a7abe9a9510dc4289e15db1cb
2021-04-12 10:39:58 +00:00
Julien Banken c2b099ef76 [IMP] event: remove the dates from the urls and the default name of the events
PURPOSE

Previously, the url of the events contained the start and end date of
the event. This link can be sent by email. If an administrator changes
the start or the end date of the event, the event will still be accessible
via the provided link. However, the user can be misled because the dates
of the url will no longer match with those set on the event. To avoid
confusion, the start and the end date will be removed from the url.

SPECS

- Remove the start date and the end date of the event from: (1) the urls
  and (2) the default name of the events.

NOTE

Note that URLs are backward compatible as only the ID is really used to
find a record through routes.

LINKS

Task-2347597
COM PR odoo/odoo#69102
ENT PR odoo/enterprise#17612

X-original-commit: 60be7bb337804f2fa59003d6e5dc70ecc9750427
2021-04-12 10:39:57 +00:00
Julien Banken 17edf6712d [IMP] website_event_track: ask for notifications when favoriting a track
PURPOSE

When a user adds a track to his/her favorites, we really want to make
sure that the notifications are activated so that he/she can be
notified when a track is about to start.

The "Set Favorite" button of the tracks will now propagate a new event
that will notify the notification manager that a new push notification
request should be issued immediately.

SPECS

- Trigger a new event when the user adds a tracks to his/her favorite.

LINKS

Task-2347597
COM PR odoo/odoo#69102
ENT PR odoo/enterprise#17612

X-original-commit: 0e28bfdea3938b1d76cb62223b84f155a6ce75d7
2021-04-12 10:39:57 +00:00
Aurélien Warnon b7b7ca38c4 [FIX] website_event_track: put partner_biography back on track proposal
Small oversight of #60847 where the "partner_biography" field was mistakenly
removed from the frontend track proposal form.

This commit simply re-introduces the field back into the form and saves it when
submitting the event.track proposal.

Task-2500455

closes odoo/odoo#69116

X-original-commit: cef6d91190de0c305c2f7a45b87717db28a9c7db
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: awa-odoo <awa-odoo@users.noreply.github.com>
2021-04-12 10:39:39 +00:00
Benjamin Frantzen (bfr) 6af91e0f92 [FIX] account_edi_ubl: remove wrong move creation when importing xml
The move was created before its type was determined and the type was ignored. This could cause an issue when this method was called directly if 'default_move_type' was not set in the context (the move would therefore be an entry).
Thankfully, this shadowed another bug: when determining the type of the invoice, the context was ignored, and therefore if the file was imported as an invoice, the type determined was 'in_invoice' instead of 'out_invoice', this didn't cause any problem since the type was ignored. This commit fixes that also.

closes odoo/odoo#69110

X-original-commit: cba93b5b300ade03940c3737c5ad231f163c322c
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: bfr-o <bfr-o@users.noreply.github.com>
2021-04-12 08:53:05 +00:00
Michael Mattiello (mcm) b73545ff2a [FIX] web: no bounce button form field/label click
Since commit [1], a delay was added to "debounce" the quick edit to
check if the user did a click or a select.
Because of this delay, the edit button now bounces when clicking on
a field or label.

In this commit, we check if the user clicks on a "quick editable"
field or a label to prevent bouncing.

[1] https://github.com/odoo/odoo/commit/2939ea4dd4736e659cc3e4df2226a3b08ac8ec48

closes odoo/odoo#68835

X-original-commit: 755a02135049f22e1e8db356169b5224f00c1f92
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2021-04-06 13:50:07 +00:00
Raf Geens 0a62fce86e [FIX] base: Report which PDFs can't be read
PyPDF2 can't read some PDFs due to bugs, lack of fault-tolerance and not
supporting some encryption schemes. When invoices are uploaded directly
through the Invoices / Accounting app, that will fail for those files
because it will try to read part of them. When invoices are uploaded
through the Documents app, they're not read, which means the customer
can end up in a situation where read and merge operations (like when
printing a selection of original vendor bills) will fail.

The structural solution for this is to replace PyPDF2 with a more capable
 library, like pikepdf: https://github.com/odoo/odoo/pull/64356 .

This change is too impactful for stable, and there are compatibility
concerns as well.

A possible workaround is merging the PDFs we can and bundling the rest
together in a zip file. This is possible on the level of just
_merge_pdfs, but the PDF extension and mimetype are pretty hard-coded
and the changes required to switch them to ZIP based on what happens in
_merge_pdfs seem too impactful.

Instead, this fix detects as early as possible if the PDFs can't be
read and reports it to the user. The excluded PDFs can still be
downloaded individually. In this way the user has a workaround
and does not need to resort to trial and error to figure out which PDFs
are causing the problem.

Related tickets: 2359929, 2389679

closes odoo/odoo#69082

X-original-commit: e935cf55975e4bbffcfe29dcfe51b3a91dd0aeab
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2021-04-09 18:55:54 +00:00
Odoo's Mergebot 43ff49dc19 [FW][MERGE] (test_/mass_)mail: improve composer and mailing tests
Purpose of this merge is to

  * merge and clean mail.compose.message related tests currently located
    in two files;
  * improve those tests and add more detailed checks about generated
    mail.mail and sent emails;
  * add some docstrings and parameter explanation in mail helpers, tools
    and asserts;
  * test sent emails in mass mailing and marketing automation tests in
    addition to traces and mail.mail;

This merge targets 14 to have a coherent test suite for mail_* features
through 14+ versions.

Task ID-2500615
Prepares Task ID-2484296 (improve markers use in Jinja)
Prepares Task ID-27033 (support QWeb in templates)
Prepares Task ID-2377974 (clean trace and status management in mass mailing)

closes odoo/odoo#69052

Forward-port-of: odoo/odoo#69004
Forward-port-of: odoo/odoo#68874
Related: odoo/enterprise#17593
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-04-12 10:55:18 +02:00
Nicolas LempereurandKamen Zhekov 38464f5aaf [FIX] web_editor: have transcoder apply text-decoration
The transcoder (transforming CSS rules into inline CSS for mail clients)
was not working for text-decoration property because it would transform
text-decoration values in:

{'text-decoration-thickness': 'normal', 'text-decoration': none}

And the regex that ensures we don't add duplicates check if there is:

"(^|;)\s*text-decoration"

so if there is text-decoration-thickness, text-decoration is not added.

The regexp could be changed to:

"(^|;)\s*text-decoration[^\w-]"

but we already have special case for other text-decoration-* properties.

With this change we should get text-decoration applied in:

- edit mode (was already the case)
- readonly mode (new)
- mail client (only if mail client does not override it)

As a side note: text-decoration-thickness seems to be rather new[^1] so
at one point in time there was probably no issue.

[^1]: https://developer.mozilla.org/docs/Web/CSS/text-decoration-thickness

opw-2496490

closes odoo/odoo#69078

X-original-commit: f4f1b890e15e98d9a7e72586faf73327d3f7b716
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Co-authored-by: Kamen Zhekov <kzh@odoo.com>
2021-04-09 18:24:21 +00:00