Commit Graph
126256 Commits
Author SHA1 Message Date
Thibault Delavallée 32c2af2376 [FIX] mass_mailing: correctly find partner email in mass mailing
In mass mailing access to partners when performing a mass mailing has been
done in batch to speedup computation [1]. Emails are put into a dictionary
allowing to find back the email based on partner_id.

However the matching between the partner and its emails is done using a
shortcut using the current document ID as partner ID. It works when performing
a mass mailing on partners but fails when performing a mass mailing on models
having message_get_default_recipients not returning only emails. Currently
in saas-14 main models return only emails (crm, event, mailing contacts) but
other models may encounter issues (applicants, tickets).

This commit fixes it by correctly matching partner id and its found email.

[1] See 65ed4553a5
2019-04-08 15:18:18 +02:00
Christophe Simonis e831064d93 [MERGE] forward port branch 10.0 up to 6431e366a8 2019-04-08 15:12:52 +02:00
Pierre Paridans 75c219bfdf [FIX] mail: chatter's button alignment and composer width on mobile
Buttons "Send message / Log note / Activity" are on two lines instead of
one. In addition there is a 1px glitch on the attachment icon.

Also long attachment name on tiny screens (i.e. iPhone 5) breaks the
composer layout: horizontal scrollbar appears.

The two-line buttons effect is related to a change (fix) in Bootstrap
4.2 which removes the white-space: nowrap on .btn. It was originally
introduced in Odoo through https://github.com/odoo/odoo/pull/29949.

Reference: Original Bootstrap PR https://github.com/twbs/bootstrap/pull/27010

Task ID: 1946573

closes odoo/odoo#31939

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2019-04-08 12:31:16 +00:00
Jalpesh Patel e524a25004 [FIX] digest: fix m2m typo that would not do whats expected
m2m ORM operation (4, id, _) was not correctly used, resulting in an
unexpected behavior. Instead of adding the record, it would add the record and
also the res.user(4,).

As that used is generally the public user, without an email address, that bug
would not be that critical but if that res.user(4,) does not exist (eg deleted),
then the code simply crash as it tries to read user 4 from db.

closes odoo/odoo#32425

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-04-08 09:30:41 +00:00
Christophe Simonis fef49061ea [MERGE] forward port branch saas-11.3 up to 4c61621efb 2019-04-08 19:52:29 +02:00
Thibault Delavallée ebba721130 [FIX] mass_mailing: fix statistic state computation
Replied / Bounced / Opened states should be computed prior to Sent state.
Indeed Sent is the default state once the email is sent. Then replied,
bounced and opened are states that happen after sending the email. It
is therefore necessary to re-order the state computation to correctly compute
the statistic state.

Related to task ID 1924711
Linked to PR #32496

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-04-08 12:39:41 +00:00
Thibault Delavallée b0491c4445 [FIX] mass_mailing: correctly find partner email in mass mailing
In mass mailing access to partners when performing a mass mailing has been
done in batch to speedup computation [1]. Emails are put into a dictionary
allowing to find back the email based on partner_id.

However the matching between the partner and its emails is done using a
shortcut using the current document ID as partner ID. It works when performing
a mass mailing on partners but fails when performing a mass mailing on models
having message_get_default_recipients not returning only emails. Currently
in saas-14 main models return only emails (crm, event, mailing contacts) but
other models may encounter issues (applicants, tickets).

This commit fixes it by correctly matching partner id and its found email.

Related to task ID 1924711
Linked to PR #32496

[1] See 65ed4553a5
2019-04-08 12:39:18 +00:00
Andrey Semko 986e405457 [CLA] signature for andriisem
closes odoo/odoo#32490

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-04-08 10:26:36 +00:00
Mohammed Mahgoub 8ac788adff [FIX] doc: Steps to install website theme in v12.0
Correct the instructions needed to install a website theme
In 12.0 the steps have changed

closes odoo/odoo#31886

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-04-08 12:41:14 +00:00
Mohammed Mahgoub 8f5a0d782f [CLA] signature for Mohammed Mahgoub 2019-04-08 12:38:15 +00:00
SimoRubi 6431e366a8 [FIX] web: call method with correct record
_compute_website_url can only be called on singletons
It should not be called with self but the record we are iterating on

closes odoo/odoo#32369

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-04-08 09:26:01 +00:00
Odoo Translation Bot 7887dd8727 [I18N] Update translation terms from Transifex 2019-04-07 06:20:48 +02:00
Christophe Simonis 3f95b074e9 [MERGE] forward port branch saas-12.2 up to f2be461f09 2019-04-05 18:46:10 +02:00
Jorge Pinna Puissant bb17098172 [FIX] mail: only display errors linked to message of current user
fine-tuning commit 1120bffb66

Before this commit, the search on message_has_error (used when clicking
on a failure notification) only display errors linked to message of the
current user. Also, the filter Has_error is true, in the messages view
in technical menu only display the message with errors of current user.

Now, the filter Has_error is true display the message with errors of all
users. The search on message_has_error behave as before.

opw-1958813

closes odoo/odoo#32462

Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2019-04-05 13:20:21 +00:00
Adrian Torres 3f3d2b2773 [FIX] base: prevent module operations while cron is running
closes odoo/odoo#32234

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-04-05 13:10:35 +00:00
Sébastien Theys 742fa44fe9 [FIX] product: fix speed of closest combination
Before this commit, the code would try to loop over all possible combinations
following their sequences, until it found the requested one, which could be
extremely slow if there was a lot of combinations.

Now if the given combination is possible, we skip that useless looping and
yield it directly.

To reproduce this: create a product template with millions of possible
combinations (using dynamic attributes) and try to add to cart a combination
that would be found late in the looping. Before the commit, the request would
take too much time.

opw-1958623

closes odoo/odoo#32433

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-04-05 09:48:07 +00:00
Nicolas Lempereur 924beddeb1 [FIX] sale_management: translate quote template t&c
On a quotation template, the "Terms and conditions" (note) field may
override the company terms and conditions.

The company terms and conditions is translatable is translatable at
least since 2013 (a510050ba) but the quotation template terms and
conditions has never been translatable.

With this changeset the quotation template terms and conditions are
translatable (so when used on a partner in the lang of the partner for
the quotation).

opw-1960728
closes #32236

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-04-09 09:31:25 +00:00
Christophe Simonis 5521b05a04 [FIX] account: do not force users on B2B group on update
Followup of 552da8dc8d (#32200)

opw 1950833

closes odoo/odoo#32472

Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
2019-04-05 17:05:15 +00:00
Nans Lefebvre abc45b19d0 [FIX] mail: remove attachment as main at unlink
If an user unlinks an attachment,
it doesn't remove it as message_main_attachment_id.

opw 1950403

closes odoo/odoo#32347

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-04-05 13:43:28 +00:00
Nans Lefebvre 6a5dab9c64 [FIX] mail: reload the record when uploading attachments if post_refresh is set to always
When post_refresh is set to 'always', the displayed record is entirely reloaded
each time a message is posted in the chatter.
However no such thing exists for when attachments are uploaded.

This is of use e.g. when in the view there are fields that have attributes that
depend on computed fields, themselves dependent on the record's attachments.

One such case is the OCR.

opw 1950403
2019-04-05 13:42:55 +00:00
Nans Lefebvre c791981abc [FIX] mail: only register as main attachment if main not already set
Commit a26496b6e7 registered an attachment added through the widget as record's
message_main_attachment.
This to make the OCR feature available for such attachments.
However we copy more closely the behaviour in message_post,
which only puts the attachment as main if there isn't already a main.

opw 1950403
2019-04-05 13:42:39 +00:00
Nicolas Martinelli c89b8451c2 [FIX] stock: inventory report
Avoid overlap between address and title in case of a long address.

opw-1966325

closes odoo/odoo#32546

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-04-09 11:32:43 +00:00
Lucas Perais (lpe) cdc150d0a3 [FIX] board: fixed height for graph svg container
Commit 9214d78152 is a bit old and made
huge white spaces between graphs

Commit 89931d1749 introduces
a dedicated svg container, on which we can set a fixed height

The 250 px comes from what is being done in the web_dashboard app
with commit odoo/enterprise@1638e5d481

OPW 1944857

closes odoo/odoo#32522

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-04-09 10:32:19 +00:00
Nicolas Lempereur a540f7864a [FIX] account,sale: colspan revert part of e2e27b41a
In e2e27b41a variable `colspan` and several `<t t-set="colspan"/>` were
removed replacing `t-att-colspan="colspan"` with `colspan="99"`.

- sale_management.sale_order_portal_content_inherit_sale_management has
  `<t t-set="colspan" t-value="colspan+1"/>` overidding the portal view
  sale.sale_order_portal_content which so may result in error 500
  because colspan variable does not exist

- when doing a customization adding a column, adding:
  `<t t-set="colspan" t-value="colspan + 1"/>` was the expected behavior
  which after colspan change would break

So this changeset reintroduce `<t t-set="colspan"/>` tag up to not
including master, they will have no effect but possible existing xpath
or use of the variable colspan will no longer cause an error.

note: for 12.0 up to saas-12.3 (not necessary in master)
opw-1965886
closes #32539

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-04-09 08:29:39 +00:00
Aaron Bohy 7d31b863ca [FIX] web: list: re-evalute modifiers depending on id
In an editable (main) list view with modifiers depending on the
record id, add a new record. While the record isn't created yet,
the modifiers were correctly evaluated. However, they weren't
re-evaluted when the record was saved (thus getting an id), and a
reload of the view was necessary for the modifiers to be correctly
applied. With this rev. they are now correctly re-evaluated when
the record is saved.

closes odoo/odoo#32483

Signed-off-by: Martin Geubelle (mge) <mge@openerp.com>
2019-04-08 11:32:18 +00:00
Aaron Bohy 8d34eb1328 [FIX] web: editable list: shift-tab and readonly fields
Before this rev., navigating with shift-tab didn't produce the
expected result when there were readonly fields on the way. For
instance, pressing shift-tab on a field:
- to the right of a readonly field: the focus was kept in the
  current field, whereas it should have been moved to the first
  editable field to the left of the readonly one
- in the editable first cell of a row, with a readonly field in
  the last column: the focus was moved to the previous line,
  which is ok, but on the first editable cell of it, whereas it
  should have been on the last editable cell.

@KangOl this commit needs to be forwardported up to saas-12.2, not
later (the code slightly changed in saas-12.3, and we did another
version of the fix).
2019-04-08 11:32:18 +00:00
Laurent Smet 1a871d7243 [ADD] l10n_be_edi: allow import of XMLs as Vendor Bills
Task 1823110
New module to import bills in the belgian e-invoice format.

Author: las@odoo.com
Co-Author: wan@odoo.com

closes odoo/odoo#24303

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-04-05 09:08:09 +00:00
Vincent Schippefilt eebb0c6152 [FIX] web: corrected the order of icons in systray
Since the merge of JQuery 3, the building of systray icons is non
deterministic.

After this fix, the menus are loaded correctly in order.

Task-ID: 1960741

closes odoo/odoo#32382

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-04-05 10:13:41 +00:00
Christophe Simonis f2be461f09 [MERGE] forward port branch saas-12.1 up to f2d0995362 2019-04-05 10:50:56 +02:00
Damien Bouvy a25abec95c [FIX] orm: don't crash on index creation
For existing installations, creating indices might not always be
possible, e.g. if you have a Text/Char field that has an index=True
set on it in a field override and pre-existing rows longer than
the pg supported size , the index creation will fail.

Instead of failing miserably during the schema modification, simply
log the problem instead and keep going.

closes odoo/odoo#32442

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-04-05 07:53:07 +00:00
Hetal Dhanak 8b7f88edd2 [IMP] stock : Route button on consumable products
-Previously, route state button was visible only on stockable products but now it'll be visible on consumable products too.
This task is related to task id: 1945832

closes odoo/odoo#31623

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-04-05 07:02:54 +00:00
Sapan Zaveri 1208d7f839 [IMP] base: contacts email and phone clickable
Purpose of  this task is,
Before this task, the customer was able to click on on the email of a contact from the res.partner view.
But, he wasn't able to click on this same email when the modal of a contact was open.

For the phone it's the opposite. You can't click on the phone from the res.partner view but well from the contact's modal.

So, I made both the fields clickable in both (res.partner view and contact's modal)

Task ID: 1965730
Closes: #32586

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-04-10 13:10:15 +00:00
Mitali Patel b50ffac657 [IMP] sale_management: fill the mandatory field 'applied to' with 'sale order' when create new confirmation email template
Purpose of the task is to fill the mandatory field 'applied to' when create new confirmation email template
from quotation template.

Related Task ID #1934678 closes #31350

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-04-11 05:18:07 +00:00
qsm-odoo 54ae48f2ce [IMP] website: make text snippet's col full width
task-1967273

closes odoo/odoo#32609

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-04-11 04:50:49 +00:00
Swapnesh Shah f5c6c68165 [FIX] stock: Fix typo on field's attribute
closes odoo/odoo#32562

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-04-09 20:06:03 +00:00
Kirti Choudhary 0152e95eb3 [IMP] hr_timesheet: hide remaining hours if planned hours not set
If the planned hours are not defined on a project.task, the remaining hours should be hidden.

Task ID - 1930975

closes odoo/odoo#30802

Signed-off-by: Jérome Maes (jem) <jem@openerp.com>
2019-04-10 09:26:29 +00:00
Kazantcev Andrey 6b73d23f7a [IMP] http: code cleaning
reuse current_thread result
No needed to call threading.current_thread() on evry arg setting

closes odoo/odoo#32000

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-04-10 07:18:59 +00:00
Heckad 1656557e81 [CLA] signature for heckad 2019-04-10 07:16:42 +00:00
Cedric Snauwaert 60dc5df281 [FIX] l10n_be: remove duplicated tax groups
There was one tax group per tax which was strange, so remove all duplicated tax group and only keep one tax group per tax percentage (0%, 6%, 12%, 21%)

closes odoo/odoo#32517

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-04-08 13:57:19 +00:00
Suraj Shukla dc2a93792a [IMP] web: properly set margin for the kanban dropdown
While everything looks pretty perfect without this commit,
setting margin on `.dropdown-toggle` and not on its parent
`.o_dropdown_kanban` itself will cause glitches in Studio.

While selecting the dropdown using Studio, the class responsible
for displaying outline (that indicates the selection) is applied
on '.o_dropdown_kanban', which is okay, but the actual child is
positioned using margin, so the outline on parent div looks ugly.

This commit fixes the issue by applying the margin on the proper
selector.

Task 1916583

closes odoo/odoo#30049

Signed-off-by: Martin Geubelle (mge) <mge@openerp.com>
2019-04-09 12:44:01 +00:00
Suraj Shukla 13222fcd68 [IMP] web: better ModelFieldSelector layout
This commit improves the usability of ModelFieldSelector widget
with following points:
- add a placeholder on the input for searching fields
- add more height to the same input for consistency
- properly show 'X' sign within header

Task 1916583
2019-04-09 12:42:40 +00:00
mgh-odoo b993a2d9c8 [IMP] website_sale: restrict deleting/archiving pricelist for ecommerce
Before this commit, if none of the pricelist is available for the website
then frontend ecommerce will crash. This issue is arrived from #30675 PR.
The reason behind crash is, if there is no pricelist associated with
the website then the ecommerce will not get the currency and breaks the
frontend shop.

This commit will restrict user from making those changes which breaks the
frontend shop. We will ensure that atleast one pricelist is available for
each website.

task-1966811
Closes: #32534

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-04-10 06:49:37 +00:00
Christophe Simonis 214e819c1b [MERGE] forward port branch saas-14 up to 6e0c89867e 2019-04-04 19:34:35 +02:00
Christophe Simonis 6e0c89867e [MERGE] forward port branch 10.0 up to 60592561d7 2019-04-04 18:33:42 +02:00
wan 6940cfddbc [IMP] account: visible but not required bank account on payment
When making a manual payment with account_sepa we want to allow people to add a bank account as it might display the European QR code for banking app, but this should stay optional.
So we made sure that the conditions making the field visible and required weren't the same.

part of task #1918423

closes odoo/odoo#32198

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-04-04 12:46:20 +00:00
wan 3c2e3b8c5a [REF] account: simplification of payments objects
simplification of payments objects and refactoring of the code

* registering payment(s) from the list of invoice now generate a single payment per invoice selected
* no more abstract object for payments/payment wizard as the logic is now really simple:
    - group_invoices option is now removed and we never try to group payments based on the currency/customer of whatsoever (see above),
    - the payment amount is the full residual amount of invoice and users cannot change it anymore
* partner_bank_account_id not required as soon as visible (depends on the payment method)
* refactoring to name tags and allow easier inheritance via xpath

part of task #1918423
2019-04-04 10:42:41 +00:00
William Henrotin 2190568d9e [IMP] mrp: suggest lot on workorder
On a manufactoring order, 'checking availability' will make the reservation of
the components to consume. If those components are tracked by lot or serial numbers, the
reservation will also set a available lot/sn on the move lines and workorder lines.

The reservation already works on product produce wizard lines and workorder line
(form view). We need this commit as preliminary work to being able to suggest them
on the workorders tablet view too.

In case of requesting the reservation after planning the production (applying
reservation on already created workorder lines and checks), we deleted all lines
not yet consumed. They are then recreated with the reservation.

The user can obiously still use the lot/sn he wants by changing it onto the
workorder.

Task : 1891864

closes odoo/odoo#28020

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-04-04 11:32:42 +00:00
William Henrotin 7556938fc7 [IMP] mrp: multiple finished product lots
This commit allows the user in charge of manufacturing products to
split his production into different lots if this production is done via
workorders. Using a lot in a workorder will adds constraint to all the
other ones. It will also prefil the final lot field and matching quantity
to produce for futur workorders.

This commit uses workorder lines (in another one2many as standard workorder_line_ids)
to register lot/serial number and produced quantity. Prefill lots and
quantities are all read from those lines

Task : 1891864
2019-04-04 11:13:41 +00:00
William Henrotin 108ee65af2 [IMP] mrp: block creating lot from workorder/produce wizard
When registering lot or serial number for a component in a workorder,
the manufacturer can create it on on the fly. We would like to give this
ability a restriction depending on the picking type.
This commit blocks the creating by default but leave the possibility to
tick a new checkbox on the manufacturing picking type to allow the
creation of lot and serial number for components inside the production process.

Task : 1891864
2019-04-04 11:12:29 +00:00
Thanh Dodeur f2d0995362 [FIX] mail: fixes document viewer's url preview
This commit fixes the document viewer: the document viewer
was altering the `type` key of attachment objects, this issue was causing
matching errors in some cases.

With this commit, the document viewer widget uses its own key `attachment.fileType`
to store the information that used to override `attachment.type`

closes odoo/odoo#32414

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2019-04-04 10:35:54 +00:00