Commit Graph
127612 Commits
Author SHA1 Message Date
Andrea Grazioso (agr-odoo) 364f01b447 [FIX] stock_picking_batch: blurry barcode in report
From the Inventory (stock) application go to Operations>"Batch Pickings"
Create or open an existing Batch Picking and click on "Print".

A report will be generated containing the barcode associated with the
operations. The barcode cannot be read from a barcode scanner because
it's too blurry (probably because of the low quality it contains
an unnatural greyscale).

When this report is generated from the template, a request to generate
the barcode is sent to the controller, which invoke the procedure to
create the png image on the fly with a set of parameters embedded into
the request.
If the width and height parameters are too low the result is a low
quality image, so the solution is to pass higher parameters and then
resize the image via "style" attributes.

Note that the same solution is applied in multiple templates.

opw-2045949

closes odoo/odoo#35752

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-08-16 09:23:00 +00:00
Nicolas Martinelli 6b6d290a5b [FIX] account: no candidate in reconciliation model
Make sure we don't execute the method with an empty list of candidates
to avoid a zero division.

opw-2049881

closes odoo/odoo#35723

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-08-14 12:10:31 +00:00
Goffin Simon 9e6f342e06 [FIX] {purchase,sale}_stock: Not possible to see a SN on an other company
Steps to reproduce the bug:
- Let's consider two company C1 and C2 and a user U allowed for this two companies
- Create a storable product P tracked by serial number
- Create a PO in C1 with P and deliver it with a serial number SN
- Go to Inventory>Master data>Lots/Serial Numbers
- Change your current company to C2
- Click on SN

Bug:

An access rights error was raised because the system tried to compute SO and PO linked to SN
with the moves of all the companies. So the record rule "stock_move multi-company" was
raised.

opw-2049093
closes #35694

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-08-14 11:49:15 +00:00
Andrea Grazioso (agr-odoo) f8978fc235 [FIX] odoo: zlib error in PyPDF2
Pdf files created with third party tools could trigger an exception in
several modules that attempt to manipulate them (see example below).

```
File "/usr/lib/python3/dist-packages/PyPDF2/pdf.py", line 2239, in mergePage
self._mergePage(page2)
File "/usr/lib/python3/dist-packages/PyPDF2/pdf.py", line 2277, in _mergePage
originalContent, self.pdf))
File "/usr/lib/python3/dist-packages/PyPDF2/pdf.py", line 2199, in _pushPopGS
stream = ContentStream(contents, pdf)
File "/usr/lib/python3/dist-packages/PyPDF2/pdf.py", line 2673, in __init__
stream = BytesIO(b_(stream.getData()))
File "/usr/lib/python3/dist-packages/PyPDF2/generic.py", line 845, in getData
decoded._data = filters.decodeStreamData(self)
File "/usr/lib/python3/dist-packages/PyPDF2/filters.py", line 346, in decodeStreamData
data = FlateDecode.decode(data, stream.get("/DecodeParms"))
File "/usr/lib/python3/dist-packages/PyPDF2/filters.py", line 111, in decode
data = decompress(data)
File "/usr/lib/python3/dist-packages/PyPDF2/filters.py", line 49, in decompress
return zlib.decompress(data)
zlib.error: Error -5 while decompressing data: incomplete or truncated stream
```

This is caused by the decompression function used by default in PyPDF2
which uses a limited buffer, unable to store all the data.

The solution, as per
[zlib documentation](https://docs.python.org/3/library/zlib.html#zlib.decompressobj),
is to use an intermediate ```decompressobj``` object to handle
the decompression.
However we do not directly control the library, which is also used
multiple times in the codebase so we decided to apply a fix directly into
the core module instead of patching every call.

opw-2048029

closes odoo/odoo#35646

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-08-14 11:55:53 +00:00
Andrea Grazioso (agr-odoo) 85e1d8e67f [FIX] mass_mailing, website_mass_mailing: empty section in settings
Install Email Marketing (mass_mailing) without Website.

From Email Marketing app, under Configuration -> Settings
the section "Mailing List" is empty.

This is not the expected behavior: any empty section should not be
visible.

To avoid breaking some third-party app which could rely on the element
'<div id="mailing_list" class="row mt16 o_settings_container"/>'
we choose to hide the title of the affected section, re-enabling it when
the appropriate app is installed.

opw-2045481
--
I confirm I have signed the CLA and read the PR guidelines at
www.odoo.com/submit-pr

closes odoo/odoo#35491

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-08-14 11:57:46 +00:00
Laurent Smet 50774af70d [FIX] account: assert_balanced in multi-company/multi-currency
The decimal precision must not be dependent of the current company's decimal places. E.g:
Create a move Z in the company A where decimale precision is 5.
Switch into the company B having a decimale precision of 8.
Edit the move Z, an error can appear because the decimale precision is now 8 instead of 5.

closes odoo/odoo#35572

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-08-14 09:42:44 +00:00
Abridbus 2fc46a064d [FIX] mail: removing whitespace on message_id from incoming mail
Because of a whitespace character present at the beginning of the message_id of some mails,
they were fetched twice.

From the SQL side, we see that Outlook is formatting the header following the RFC822
by allowing the header to look like:

Header:<CRLF>
<whitespace><hash_of_msg_id>

From RFC822:
"Each header field can be viewed as a single, logical line of ASCII characters.
For convenience, the field-body portion of this conceptual entity can be split
into a multiple-line representation" (abr.)

It was also possible to find out by checking the logs.
One or two whitespace(s) can be seen before the hash of the msg_id.

The following commit is making sure we use and save the message_id without the whitespace
by stripping them off on the coming mail.

OPW-2006806

Applying CHS solution to avoid crash on empty header.

closes odoo/odoo#35682

Signed-off-by: bve-odoo <Abridbus@users.noreply.github.com>
2019-08-14 07:47:04 +00:00
Christophe Simonis 3972e9ea3e [FIX] hr: remove redefined record rule
Actually revert commit 7b1a894573

closes odoo/odoo#35698

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-08-13 14:03:14 +00:00
Nicolas Seinlet 0855f94181 [FIX] website_crm_partner_assign: force date format as format is forced in XML
https://github.com/odoo/odoo/blame/saas-12.3/addons/website_crm_partner_assign/views/website_crm_partner_assign_templates.xml#L674

closes odoo/odoo#35697

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-08-13 14:02:48 +00:00
Nicolas Martinelli 07da48216f [FIX] stock_account: coherent field type
In case `move_line_ids.location_id.company_id` or
`move_line_ids.location_dest_id.company_id` is not set, the fallback
value is `False`. Indeed:

```
>>> True and False or True
True
```

This makes `company_from.id` or `company_to.id` crash.

We keep the logic but change the condition:

```
>>> False if True else True
False
```

opw-2045628

closes odoo/odoo#35695

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-08-13 13:05:01 +00:00
Patrick Tombez a2b98e94be [FIX] website_sale_comparison: Fix category order
Use category sequence to order them instead of their order of appearance in
the list of sequence ordered attributes

closes odoo/odoo#35610

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-08-13 11:31:10 +00:00
Romain Derie 2f361bec36 [FIX] website(_*): better ondelete management on website_id
Before this commit, every model having website_id would have the default
`set null` as ondelete value for that field. Exception for `ir.ui.view` and
`website.redirect` which are set to `cascade`.

This meant that deleting a website would basically transform all its specific
records into generic ones.
That would lead to unwanted behavior, such as multiple `ir.attachment` with
same URL, when 2 websites had been theme-customized. Deleting one of the
website would result in later crashes when trying to open theme customization
in the remaining website(s), since those website would find their specific scss
custom attachment as well as the generic one from the deleted website.

Probably more behavior might be problematic when deleting a website before this
commit.

To summarize the choice of this commit implementation, every model not existing
outside website module are set to `cascade` (website.redirect, website.menu,
product.wishlist..).
The rest should be in restrict, as we don't want to delete a whole forum, blog
or job, which should probably be managed case by case to decide what to do.
Thus, restrict is a good choice to notify user of what should be handled.

Some exception remains, ir.ui.view should be delete on cascade while sale.order
should be set to null.

opw-2038414
opw-2035249

closes odoo/odoo#35398

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-08-13 10:02:32 +00:00
Nans Lefebvre 119ca24d60 [FIX] account: fix invoice line default taxes at account onchange
If there is no product on an invoice line, there is an onchange to ease tax
input that prefills the line with the account default taxes.
Because this is a relational field (a many2many), field = recordset
is as valid as field = recordset.ids, but the semantics is different.
In the second case, the id list is added with 4 commands, not a 6.
So the default taxes are only added, and none are ever removed.
Note that the ORM behaviour changed; this .ids was historical,
but before (v10) it did remove other taxes.

opw 2046112

closes odoo/odoo#35657

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-08-12 13:49:08 +00:00
Christophe Simonis 76a52bdbfb [MERGE] forward port branch 11.0 up to b59369d1e6 2019-08-12 15:00:28 +02:00
Raphael Collet 59c59cd8a0 [FIX] field: compute transitive dependencies over non-stored fields
In other words, when a field F depends on a non-stored field G, it also depends
on G's dependencies.  This guarantees that whenever a dependency of G is
modified, F will be invalidated and marked to recompute (if necessary).

The transitive closure of dependencies is not computed over stored fields.
Anyway stored fields already trigger the recomputation of their dependent
fields during their recomputation.  The performance impact on the loading of a
registry is negligible (less than 1%), and the increase of recomputation
triggers is small (less than 10%).

(cherry picked from commit 3fbd86bcbe)

opw-2033493

closes odoo/odoo#35636

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-08-12 09:18:31 +00:00
Jorge Pinna Puissant cb3c2e64c3 [FIX] partner_autocomplete, web: autocomplete error when suggested company has a country
- Change the company's country to Finland;
- Go to Contacts and click on Create;
- Tick the Company box above the Name field;
- Start typing into the Name field;
- Click on a company with a VAT number under its name.

Before this commit, a Traceback appears. This occurs because the
response of the request with the suggested company has the fields
'company_name' and 'company_code' and these fields are not in
res_partner.

Now, the suggested company is parsed to correctly field the country
field.

opw-2049636

closes odoo/odoo#35631

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-08-12 08:39:07 +00:00
Goffin Simon a53ca4f949 [FIX] sale_timesheet: Sales user not allowed to create invoice linked to timesheets
Steps to reproduce:
- Create a service product P with invoicing policy = Timesheets on tasks,
Service Tracking = Create a task in a new project and Re-Invoice Policy = No.
- Create a SO with P and confirm it
- Go to the task created for the SO and assign an employee on it.
- Valide the related analytic line in the timesheet module
- Create a user U with the following rights: Sales: 'User: all documents',
Project: 'Manager' and no right in Employee.
- Log as U and try to invoice the SO

Bug:

An access rights error was raised

opw:2044659

closes odoo/odoo#35656

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-08-12 13:50:43 +00:00
Odoo Translation Bot b59369d1e6 [I18N] Update translation terms from Transifex 2019-08-11 03:07:39 +02:00
Nicolas Martinelli 392f6f2b2b [FIX] purchase: default user_id on bill
- Create a PO, change the Purchase Representative (`user_id`)
- Create the corresponding vendor bill

The `user_id` of the PO is not transferred to the invoice.

There is no reason to not keep the value.

opw-2046963

closes odoo/odoo#35611

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-08-09 14:31:18 +00:00
Igor Ishchenko 829adf7234 [IMP] base_iban: add support of IBAN code for Ukraine
closes odoo/odoo#35643

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-08-12 10:27:38 +00:00
Igor Ishchenko ed106f5dcc [CLA] Signature for igoris 2019-08-12 10:22:32 +00:00
Christophe Simonis 0a0b4829d2 [MERGE] forward port branch saas-11.3 up to 76a52bdbfb 2019-08-12 15:59:04 +02:00
Reinaldo Ramos 0d4feadef8 [ADD] base: Add Angolan language
Add Angolan code in order to use Angolan specific translations in Odoo.
The main terms are the same but the technical terms are different

Closes odoo/odoo#35592

closes odoo/odoo#35600

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-08-12 07:24:37 +00:00
Reinaldo Ramos e301d4de2b [CLA] Reinaldo Ramos signs personal CLA 2019-08-12 07:24:22 +00:00
qsm-odoo f7e83b69c6 [FIX] website_event: clean local events snippet before save
The local events snippets is an empty HTMLElement which is filled by
JavaScript on page loading. Before this commit, the filled content was
saved in database. This does not create a real problem as the content
is reloaded as soon as the page loads but you can see old events
flickering before the new events are actually loaded.

Now the snippet is cleaned before saving. This also allows to add
default content with a custo so that it is shown during the events
loading (as we are currently doing on odoo.com...).

closes odoo/odoo#35597

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-08-09 11:34:21 +00:00
Christophe Simonis 7321c8e260 [MERGE] forward port branch 11.0 up to dff2e242a5 2019-08-08 15:00:43 +02:00
Kevin Baptiste 0b25547fc6 [IMP] hr_holidays: add domain on active time off
Add a domain to only count active holiday allocations on the employee's
profile.

TaskID: 2048672

closes odoo/odoo#35547

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-08-08 06:43:24 +00:00
Laurent Smet 68a13c99fd [FIX] account: Fix taxes computation for intracomm
Suppose an amount of 1000 with tax 21% having +100%, -100% as repartition:
In that case, the condition preventing a rounding issue must be ignored because
the sum of factors is 0%, not 100%

closes odoo/odoo#35681

Signed-off-by: Josse Colpaert <jco@openerp.com>
2019-08-13 09:37:00 +00:00
RomainLibert 499d3efa7c [FIX] l10n_ae: remove tag_ids
closes odoo/odoo#35652

Signed-off-by: Romain Libert (rli) <rli@odoo.com>
2019-08-12 12:41:16 +00:00
Robin Heinz 95c8e55232 [FIX] point_of_sale: wrong pricelist price on receipt
Before this fix, we had the wrong origin price when we were using
pricelist not showing discount and additionnal discount. The price was
the main one of the product instead of the price with pricelist applied.

Task-Id: 2025886

closes odoo/odoo#35644

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-08-12 11:00:10 +00:00
Laurent Smet e0d18f222e [FIX] account: Fix compute_all of taxes when dealing with refunds
closes odoo/odoo#35608

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2019-08-12 06:46:20 +00:00
mcm-odoo 319f07743e [FIX] website_slides_forum: add link to "home" forum
This commit adds a link to go to the "home" forum to "Forum" tab in question
page.

Task 2026846

closes odoo/odoo#35637

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-08-12 09:58:14 +00:00
mcm-odoo 85e8de1dc8 [FIX] website_{portal, rating, slides): fix navigation tabs color
Text colors were white on a white background which can be difficult to read
in some extreme cases. Sort of.

Task 2026846
2019-08-12 09:57:12 +00:00
Jinal PatelandMohammed Shekha f0fdfbf44e [FIX] web: add support for TRUE_LEAF and FALSE_LEAF in ModelFieldSelector
before this commit, domain selector widget does not support
TRUE_LEAF and FALSE_LEAF i.e. [(1, '=', 1)] and [(0, '=', 1)] respectively,
the reason is the chain part of the domain i.e. field name has value 1/0 and
we don't have field name like 1 and 0 in domain and hence ModelFieldSelector
don't accept it

after this commit, domain selector can handle this special two domains which is
[(1, '=', 1)] and [(0, '=', 1)], add support for chain with 1/0 in ModelFieldSelector

task- 1998145

closes odoo/odoo#35603

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>


Co-authored-by: Mohammed Shekha <msh@odoo.com>
2019-08-09 12:32:27 +00:00
Alexandre Kühn a72b23f6b5 [FIX] mail: register thread window after append in DOM
Before this commit, we may have the following error:

`TypeError: Cannot read property 'html' of undefined`

This happened in the following scenario:

Terminology:
- in multi-tab environment, there is a master tab and slave tabs
- master tab fetches notifications from the server and forwards them
to slave tabs

State:
- 2 logged-in users: Michell & Marc
- Mitchell has open 2 browser tabs
- Mitchell has a pinned private conversation with Marc

Steps:
- Mitchell has focus on a slave tab
- Marc posts several messages to Mitchell in very quick succession

=> Mitchell gets crash error above.

This issue is caused by chat window being registered in mail manager
while it has not been mounted to DOM. On receiving 2nd new message,
it has to re-render chat window header in order to update displayed
unread counter. However, this fails due to chat window having no DOM
node yet.

This commit solves the issue by mounting chat window to DOM before
being registered in mail manager. That way, on receiving 2nd new
message, it does not trigger a re-render on chat window that
is about to be mounted to DOM, since it has not been registered yet.
Note that the displayed unread counter will be correct, because it
uses the up-to-date unread counter on mount.

Task-ID 2050108

closes odoo/odoo#35601

Signed-off-by: Martin Geubelle (mge) <mge@openerp.com>
2019-08-12 08:31:15 +00:00
Odoo Translation Bot 452a4497c1 [I18N] Update translation terms from Transifex 2019-08-11 06:07:52 +02:00
Ankita Raval 6e5186c8f9 [FIX] point_of_sale: chatter is broken in pos session
The chatter was not displayed correctly on the pos session because of
missing fields in the view. We've added those missing fields.

TASK-ID: 2030754

closes odoo/odoo#34651

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-08-09 15:15:07 +00:00
wan d1fab53f07 [FIX] account: group payment
The commit https://github.com/odoo/odoo/pull/32198/commits/c9ec53b4e2373c08d944aac3a6bff2519cb5b13e removed the ability to make one payment for multiple invoices and forced to make one payment per invoice. We should have the ability to choose
Also, reinforce the security for multi company by ensuring the user can
only select a journal from the company the invoices are in, and by
ensuring one can only register payments for invoices issued by one
company.

closes odoo/odoo#35569

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2019-08-09 14:59:32 +00:00
Shreya Thakrar e0b8e5e0e7 [FIX] website_rating: fix review display in mobile
In mobile view, review display layout is not clean. Stars string is too short
and progressbar is also too short. This is because we have visibility hidden
for 'Remove Selection', visibility property takes space.

In this commit we give more space for stars / text, and in mobile we add an
icon instead of 'Remove Selection' string.

Task 2047409

closes odoo/odoo#35598

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-08-09 11:47:07 +00:00
asa-odoo 3bd03e27bb [FIX] website_slides: fix quiz completion blocking users in fullscreen
Once a quiz is completed in elearning fullscreen view a pop-up is displayed.
Due to z-index it makes a black overlay on full-screen, so that we can not
click anywhere on the screen.

In this commit we update z-index value fix the issue and make screen clickable.
Website menu is also still clickable.

Task: 2044221
2019-08-09 11:43:44 +00:00
Nicolas Seinlet 3af0b3387f [IMP] hr_recruitment: use search_count to count
closes odoo/odoo#35584

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-08-09 08:22:54 +00:00
Mathieu Duckerts-Antoine ba4ce71bf5 [FIX] web: favorites have unique descriptions
In the favorites menu, it was possible to create two
favorites with the same name (contrarily to the
specifications). The root cause of the problem was that
the submenus of the favorites menu were not updated at
all. This commit fixes that situation.

closes odoo/odoo#35495

Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2019-08-07 15:24:06 +00:00
Mathieu Duckerts-Antoine 691a8a690c [FIX] web: toggle favorite correctly updates other filters status
When toggling a favorite filter, the options used by
the active date filters/groupbys and the field created
via autocompletion were not correctly cleared, leading
to strange situations. This is fixed by this commit.
2019-08-07 15:10:57 +00:00
Nicolas Martinelli dff2e242a5 [FIX] document: PDF indexing
Backport from 12.0, commit : 1b753b0d53
note: there was also report of PDF content blocking that when indexed
blocked an instance worker indefinitely

Since PyPDF2 gives bad results for PDF indexing, stop using it since it
raises more issues than it helps users.

opw-2044679

closes odoo/odoo#35310

closes odoo/odoo#35525

Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2019-08-07 11:30:51 +00:00
jem-odoo 5d64a5114e [FIX] project_timesheet_holidays: multi company issues
Partial backport of ef1afb7b69

Task-1999686
Closes #35520

closes odoo/odoo#35526

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-08-07 09:18:47 +00:00
Shreya Modi 752b2553c6 [FIX] mass_mailing: remove unsupported color picker on mailing lists
-There is unsupported color picker which is not required to differ
mailing lists thus removing it.

task-2042384

closes odoo/odoo#35494

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-08-07 12:45:33 +00:00
Goaman b384a00fe2 [FIX] web_editor: Do not remove block
Do not remove block in _removeNextEmptyUnbreakable.

Before this commit, when you tried to remove insert a character in
a td, with an empty td after the first one. The function
_removeNextEmptyUnbreakable removed the empty td. It was for
example breaking snippet in the website and mass_mailing.

closes odoo/odoo#32096

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2019-08-07 15:00:25 +00:00
David Monjoie d0e8059330 [FIX] web_editor: disable custom handling for Safari MacOS 2019-08-07 10:09:28 +00:00
David Monjoie 5578b98ad7 [FIX] web_editor: fix selecting snippet template text 2019-08-07 08:49:47 +00:00
David Monjoie 97e6b7f126 [FIX] web_editor: fix snippets preview on drop not displaying 2019-08-07 08:49:46 +00:00