Commit Graph
130775 Commits
Author SHA1 Message Date
Luis Torres 9dfc9ac76c [FIX] l10n_mx: account_cancel module was removed
In https://github.com/odoo/odoo/pull/36304 was removed the module
account_cancel, but missing remove the dependence. Now is
removed

closes odoo/odoo#37455

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-09-25 18:11:40 +00:00
Arnold Moyaux e7bdf82f59 [FIX] stock: empty warehouse when company is not set.
When the user do not set a company on a route and check warehouse selectable
then it's impossible to select a warehouse. It happens due to the
check_company domain ['|', ('company_id', '=', company_id)('company_id','=',False)]

closes odoo/odoo#37404

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2019-09-25 13:17:05 +00:00
Cedric Snauwaert 618d67b131 [FIX] account: revert month displayed in journal kanban activty view
Initial spec was to add month after activity name in the kanban
journal view. However this does not work when tax period is quarter
and also the month is always displayed even on other activities which
we don't want.
Reverting this commit and another task will come later to improve the
display on the journal kanban activities.

closes odoo/odoo#37277

Signed-off-by: Cedric Snauwaert (csn) <csn@openerp.com>
2019-09-27 08:11:39 +00:00
Laurent Smet f7b988744b [FIX] account: Fix several bugs in accrual accounting
- Multi-company: Fix domains on wizard / company.
- Multi-currency: Manage multi-currency when generating accrual lines.
- Moves creation: Avoid creating too much moves:
	[1-2] moves was created per line before this commit.
	[1-2] moves are created per invoice with this commit.
- Invoice type: Allow accrual only one posted journal entries.

closes odoo/odoo#37487

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-09-27 07:57:09 +00:00
Laurent Smet 006e15569b [FIX] account,mail: Fix creation message in chatter for invoices
Add a hook inside mail_thread to be able to get a custom message at
the record creation.
Override this hook in account.move to get a custom creation message
dependent of the move's type.

closes odoo/odoo#37474

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2019-09-27 08:08:04 +00:00
William Henrotin 237e0b42dc [FIX] mrp: generate wo line according to move and not product
Planning workorder will generate workorder lines according to reservation
If some lines are already created into the workorder for the current product,
The line generation will increase the quantity of the existing one instead of creating
a new one. The issue occurs when the production have some stock move with the same
product.

This commit change the condition to find workorder line candidate. Instead of searching
line with same product, we now search line with same stock move.

closes odoo/odoo#37419

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2019-09-25 12:18:45 +00:00
Antoine Vandevenne (anv) f976a10803 [FIX] sale: fix returning to sale from rental portal
This commit changes the behavior of the 'Back to edit mode' button in the customer portal preview of sales order.
If the sales order is a rental order, the user is sent back to the Rental app. If not, the button makes him return to the Sale app.
This doesn't take into account the app in which the order was opened: if a rental order was opened in the Sale app, the portal will send the user back to the Rental app.

task-2071281

closes odoo/odoo#37423

Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2019-09-25 15:58:17 +00:00
Aaron Bohy 48b76921be [FIX] web: display action title in breadcrumb
Create a simple subclass of AbstractAction (a client action), with
property hasControlPanel set to true. By default, the name of the
action should be displayed in the breadcrumb. Before this rev.,
it wasn't the case, as it displayed 'Unnamed' instead.

Bug spotted when doing an exercice for the JS smartclass.

closes odoo/odoo#37465

Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2019-09-25 20:00:16 +00:00
Laurent Smet a9309e931c [FIX] account: Fix fallback on company taxes
Revert the new behavior introduced by https://github.com/odoo/odoo/commit/9bc4a19d74185a066b7ac870b02fd1836c4392b6
We finally decide to restore the previous behavior allowing to fallback on the company default taxes.
In addition, the taxes will be overrided only if specific taxes are set on the account.

closes odoo/odoo#37406

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-09-26 09:41:56 +00:00
Pierre ParidansandRomeo Fragomeli 6ff9bd5028 [FIX] web: crash when resizing on tablet
When having a long systray (icons from different apps, mode debug,
multi-company...) the resize of the window can trigger a crash for apps
that have not too much top-level menus (e.g. Contacts).

This also happens when loading those apps.

Steps to reproduce (on an iPad, portrait):

* use a Runbot with all modules installed (12.0+)
* activate "debug mode"
* ensure that the menu/systray bar is quite full
* open the "Contacts" app
=> traceback with a "cannot call getBoundingClientRect of undefined"
error

The reason is that the resize's callback iterate over the systray/menu
items to find which one should be folded behind a "more" ("+") menu
item.

Sadly in some cases (combination of screen width, systray size, app's
number of menus) it can lead to a traceback.

This commit ensures that when looping for menu items, we don't try to
reach an non-existing item.

closes odoo/odoo#37327

X-original-commit: odoo/odoo@d7bae03299
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Co-authored-by: Romeo Fragomeli <rfr@odoo.com>
2019-09-24 09:43:42 +00:00
Xavier Morel 77099c54b6 [FIX] core: o2m modifiers in the SSF
Because the sub-record values would not necessarily get fetched
ever (whether default or stored), the computation of modifiers might
blow up if it relied on one of the un-fetched un-specified fields.

One such situation is trying to create a partner with child partners
if base_address_city is installed: the module adds a readonly attr
predicated upon the parent_id, without explicitly providing such the
field would be missing from the O2M record's values.

Closes #37176

closes odoo/odoo#37452

X-original-commit: 184d1b69eac2b78c72228c81c5c6cf8cc4a56eb4
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-09-25 16:37:19 +00:00
Rémy Voet 98b7129e20 [FIX] mail: fix email template preview action
SPECIFICATIONS

In the mail template views, remove the contextual action "Template preview"
from action dropdown. It was a duplicate of smart button in the template
form view and makes no sense in the tree view.

Task ID 2075733

closes odoo/odoo#37425

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-09-25 17:43:42 +00:00
Rémy Voet 8636fd8313 [FIX] sms: fix some usability issues
- In the portal chatter, when a message was send by sms and failed
the icon was grey. Change it to make it red when there is a failure
(revert by another task).

- In the sms composer wizard, if the sanitized number is wrong,
show 'Raoul Grosbedon (Invalid number)' instead of 'Raoul Grosbedon (False)'.

Task 2075733
2019-09-25 17:43:42 +00:00
Rémy Voet 859428ef7f [FIX] crm: correctly set phone / SMS widget on phone / mobile fields
SPECIFICATIONS

In the crm lead form view : missing mobile widget in the form.
Add it to be able to send sms from leads.

Task ID 2075733
2019-09-25 17:43:41 +00:00
Florent Lejoly 211dba4a83 [IMP] crm_iap_lead_enrich: improve settings of enrichment
Before this commit it was not possible to enrich leads manually as
only a cron enriches leads. It is considered as sub optimal since people
would like to do it manually on some leads and not activate it only for
all leads, using a cron.

After this commit an option is added in CRM settings to choose the type of
enrichment: either manual, either automatic.

In manual mode, a button appears on the lead to enrich if certain conditions
are met (email_adress present, not already enriched,...). It also deactivates
the enrich cron.

In automatic mode, the button on lead is not displayed and the cron is
activated.

A config parameter is defined in CRM as it is requested to be able to configure
it directly in CRM without having to first install the app then configure
it. A post install hook to synchronize cron status with config parameter
is therefore required.

FP/AJU request

Task 2075817

closes odoo/odoo#37367

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-09-25 17:30:04 +00:00
Kaushalya Mandaliya b7b3c33aa3 [IMP] account, *: adding domain in analytic account fields
*: hr_expense, project

Adding required domain which will allow to only select analytic accounts whose
company is same as current one or blank.

task-1966016

closes odoo/odoo#37450

Closes: #34270
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-09-25 15:58:59 +00:00
fw-bot c8d09167fd [FIX] tools: crop & resize image crashes
- When trying to access an image that need to be resized and cropped,
  the code could crashes.

  This is due to the fact that PIL expect to work with integer for
  sizes, but in some cases we provide floats

closes odoo/odoo#37442

Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
2019-09-25 15:12:46 +00:00
Mathieu Duckerts-Antoine b0d83b7346 [FIX] web: avoid multiple displays of the "same" discard warning
Partial forward port of a7a60f7c61

closes odoo/odoo#37437

Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2019-09-25 14:20:27 +00:00
laa 69ea10d2b4 [FIX] eLearning, forum : tab visibility
From Website (Frontend) --> From the Courses --> From a course (with settings course : Course type = "Documentation" & Forum mentioned):
      The tab for the forum isn't there

From Website (Frontend) --> From the Courses --> From a course (with settings course : Course type = "Documentation" &  "Allow rating on Course" disabled):
      The tab for the review is always there

From Website (Frontend) --> From the Forum --> From a course (with settings course : Course type = "Documentation" & "Allow rating on Course" activivated):
     Click the tab for the review, the returned view is the course tab and not the review tab

From Website (Frontend) --> From the Forum  --> From a course (with settings course : "Allow rating on Course" disabled):
     The tab for the review is always there

closes odoo/odoo#37436

Task-id:  2074030
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-09-25 14:14:57 +00:00
Nicolas Lempereur beb80c20bd [FIX] web_editor: change do not bold nobold after bold
If we have a content such as:

`aaa <B>bbb</B> ccc`

and you eg. change size of `a bbb c`, the c gets bold because of an
issue in the merging after style is applied.

reason: we check that the style was same as previous nodes, but because
walkpoints text[a]->B->text[bbb]->B->text[c] is expurged of duplicates
it becomes text[a]->B->text[bbb]->text[c] so we erroneoulsy think that
the node before text[c] is text[bbb] (instead of B tag)

note: 12.5 forward-port (skipping [12.3,12.4]) of 11.0 #37254 (also
contain #37345)

opw-2071930
closes #37295

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-09-25 12:18:30 +00:00
Priyanka KakadiyaandMohammed Shekha c536b369d3 [FIX] web: visible studio hooks in listview
Before this commit, there are no hooks when dragging a field over an
editable listview. This was caused by wrong computation of column
width in studio mode.

This commit isolate the computation of column width, so that studio
can override it and make the correct computation.

Task-Id 2057829

closes odoo/odoo#36959

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Co-authored-by: Mohammed Shekha <msh@odoo.com>
2019-09-25 14:43:55 +00:00
Odoo's Mergebot 458355405f [MERGE] crm : fix and ease PLS settings and flow
This commit applies multiples things:
- Fix PLS settings that were not loaded correctly (was not using technical field names)
- Add data for PLS settings to check all optional fields and set the start date.
- Set date pls field required
- use null value instead of empty for phone and email state fields to lessen the DB storage
- Remove Flanker that crashes anyway while validating a simple email address.
- Handle stage_id = False
- Remove default value for lead probability -> To let Bayes makes the magic.
- Set default pls date to today - 8 days to include all demo data.
- Set won should give 100% predicted probability

See sub commits for more details.

Task ID:2044539

closes odoo/odoo#37413

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-09-25 19:33:09 +02:00
David Beguin 9f6540c41e [FIX] crm : update both auto and manual probability in PLS cron
when runnning the PLS cron, only the automated probability was updated
with the new values.
But dissociating probability and automated probability
(for the leads that were in auto mode), breaks the autom mode and set
implicitelly the mode to manual.
(as probability and automated_probability are not equal anymore).

This commit update also the probability only in the case both fields were equal before
the cron process.

Task ID: 2044539
PR #37413
2019-09-25 14:42:31 +00:00
David Beguin a07324af17 [IMP] crm : add PLS rebuild threshold for onboarding purpose
When there are only few leads, marking a lead as won or lost changes
a lot the won/lost repartition. For onboarding purpose, the cron is launched
if the threshold PLS config param is not reached.
When the number of lead in the database reaches the PLS threshold,
the config parameter is set to 0 to avoid the useless check
of the number of lead in the dabase in the future

Task ID: 2044539
PR #37413
2019-09-25 14:42:31 +00:00
David Beguin b8401b09f8 [FIX] crm_iap_lead_enrich : fix lost semantic in lead iap_enrich process
Since the default value of probability is not set anymore,
the probability of a new lead is equivalent to 0.
In Lead enrichement, we filter out won and lost leads.
But probability = 0 is not a good ways anymore to filter out lost leads.
Lost reprensents archived leads.

Task ID: 2044539
PR #37413
2019-09-25 14:42:31 +00:00
David Beguin b8dda50aaa [IMP] crm : set automated_probability = 100 when stage won
If the stage is set to won, automated probability should = 100%
Without forcing it, it should be the case as all lead at stage won
have been won. (thanks Captain Obvious!)

But if a user mark as lost a lead that is at won stage, it will reduce the
probability of the won stage.

Also, if the cron didn't run recently, it could be that the autmomated probability
will give the same result than in previous stage (if no lead have been won at all).

Task ID: 2044539
PR #37413
2019-09-25 14:42:31 +00:00
David Beguin c9317a3f47 [FIX] crm : compute PLS probability only if stage_id is set
As PLS is based on stage flow, probability will return 0 if
stage_id is not set.

Task ID: 2044539
PR #37413
2019-09-25 14:42:31 +00:00
David Beguin da87a63d63 [FIX-IMP] crm : remove probability default value and modify default pls start date
This commit
- removes probability default value in order to activate
  Bayes predictive lead scoring by default
- set the default pls start date to today - 8 days
  to include all demo data in PLS computation

Task ID: 2044539
PR #37413
2019-09-25 14:42:31 +00:00
David Beguin 25a299dfc1 [FIX] tools, crm : remove Flanker for email validation
Since it appears that email validation feature from Flanker v0.9.0
is completelly broken (the lib explodes when calling
address.validate_address('some@address.xxx')), Flanker is then removed
and email validation will be done only using the email_normalize method.

Task ID: 2044539
PR #37413
2019-09-25 14:42:31 +00:00
David Beguin cd72fd9a3f [FIX] crm : fix and add data for pls settings and use null value instead of empty for phone and email state fields
This commit applies multiples things:
- Fix PLS settings that were not loaded correctly (was not using technical field names)
- Add data for PLS settings to check all optional fields and set the start date.
- use null value instead of empty for phone and email state fields to lessen the DB storage
- set pls start date required

Task ID: 2044539
PR #37413
2019-09-25 14:42:31 +00:00
qmo-odoo 403bf9e76f [IMP] website_links, link_tracker: Add action buttons on tree view
This commit adds two buttons on the link.tracker tree view:
  - Visit Page : Redirects the user to the visited page
  - Statistics : Redirects to the page statistics
                 (with the '+' at the end of the shortened url)
In this commit we also add some padding to the graph of the page statistics

LINKS

closes odoo/odoo#37378

Taskid: 2075858
Pr: #37344
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-09-25 14:06:24 +00:00
David Beguin c250df13f4 [IMP] website, website_sms : improves visitors views
Add send mail and send sms buttons in visitor tree view.

Task ID: 2075858
2019-09-25 11:17:26 +00:00
Aurélien Warnon 095e373501 [IMP] tools: add support for 'add_direction' parameter on '_format_time_ago'
This commit adds support for the parameter 'add_direction' on the '_format_time_ago' method
from tools.
This will allow formatting to '25 minutes' instead of '25 minutes ago'.

Preparation commit for the social 'feedback' task.

Task#2075858
2019-09-25 11:17:26 +00:00
Odoo's Mergebot a514bef889 [MERGE] sms(*): allow direct sending and improve templates
PURPOSE

Sending SMS is sometimes required as an immediate marketing tool.
Using delayed crons is not always the best user choice. Implement a
Send Now mechanism in batch SMS.

Allow people to edit sms templates. Limit that rights to some main
application managers.

Provide some fiximps on sms dependent applications.

SPECIFICATIONS

Allow to send directly SMS when doing SMS marketing

SMS Application
  * in sms composer, in mass mode: rename Send SMS to Put in queue and
    add a Send Now button by-passing the queue;
  * set Put in queue as primary, Send Now as secondary;

SMS Marketing Application
  * in mailing view for SMS: rename Send SMS to Put in queue and
    add a Send Now button by-passing the queue;
  * set Put in queue as primary, Send Now as secondary;

Tests of SMS marketing with 400 contacts to SMS indicates it takes about
10 secondes to be completed with is considered as viable.

SMS Template access rights
GROUP-------------R-W-C-D-Note
Internal User-----X
​​​Admin / Settings--X-X-X-X
Stock Manager-----X-X-X-stock.picking
Sales Manager-----X-X-X-crm.lead, res.partner
Event Manager-----X-X-X-event.registration
Sub Manager-------X-X-X-sale.subscription, res.partner
MarkAut Manager---X-X-X-no limit
Account Manager---X-X-X-res.partner (followup)

Other groups
  * Online Appointment NO TEMPLATE USED
  * Accounting Manager NO TEMPLATE USED
  * SMS Marketing NO TEMPLATE USED
  * Studio Automated Action Need Technical Settings Anyway
  * Scheduled Actions Need Technical Settings Anyway
  * Server Action Need Technical Settings Anyway

LINKS

Task 2076366 (send now)
Task 2067873 (template access)
PR odoo/odoo#37298
PR odoo/enterprise#5750

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-09-25 18:45:15 +02:00
Thibault Delavallée e875357b99 [FIX] sms: do not send sms already failed
Failed SMS should stay in error state and not be sent to IAP as we already
know it will fail. No pain, no gain.

LINKS

Task 2076366 (send now)
Task 2067873 (template access)
PR #37298
PR odoo/enterprise#5750
2019-09-25 11:14:09 +00:00
Thibault Delavallée f737a7633a [IMP] event_sms: allow event managers to manage sms templates
PURPOSE

Allow people to edit sms templates. Limit that rights to some main
application managers.

SPECIFICATIONS

SMS Template access rights
GROUP-------------R-W-C-D-Note
Internal User-----X
​​​Admin / Settings--X-X-X-X
Stock Manager-----X-X-X-stock.picking
Sales Manager-----X-X-X-crm.lead, res.partner
Event Manager-----X-X-X-event.registration
Sub Manager-------X-X-X-sale.subscription, res.partner
MarkAut Manager---X-X-X-no limit
Account Manager---X-X-X-res.partner (followup)

Other groups
  * Online Appointment NO TEMPLATE USED
  * Accounting Manager NO TEMPLATE USED
  * SMS Marketing NO TEMPLATE USED
  * Studio Automated Action Need Technical Settings Anyway
  * Scheduled Actions Need Technical Settings Anyway
  * Server Action Need Technical Settings Anyway

LINKS

Task 2076366 (send now)
Task 2067873 (template access)
PR #37298
PR odoo/enterprise#5750
2019-09-25 11:13:56 +00:00
Thibault Delavallée fcf3da44c7 [IMP] stock_sms: allow stock managers to manage sms templates
PURPOSE

Allow people to edit sms templates. Limit that rights to some main
application managers.

SPECIFICATIONS

SMS Template access rights
GROUP-------------R-W-C-D-Note
Internal User-----X
​​​Admin / Settings--X-X-X-X
Stock Manager-----X-X-X-stock.picking
Sales Manager-----X-X-X-crm.lead, res.partner
Event Manager-----X-X-X-event.registration
Sub Manager-------X-X-X-sale.subscription, res.partner
MarkAut Manager---X-X-X-no limit
Account Manager---X-X-X-res.partner (followup)

Other groups
  * Online Appointment NO TEMPLATE USED
  * Accounting Manager NO TEMPLATE USED
  * SMS Marketing NO TEMPLATE USED
  * Studio Automated Action Need Technical Settings Anyway
  * Scheduled Actions Need Technical Settings Anyway
  * Server Action Need Technical Settings Anyway

LINKS

Task 2076366 (send now)
Task 2067873 (template access)
PR #37298
PR odoo/enterprise#5750
2019-09-25 11:13:40 +00:00
Thibault Delavallée 10d5866345 [IMP] crm_sms: allow sales managers to manage sms templates
PURPOSE

Allow people to edit sms templates. Limit that rights to some main
application managers.

SPECIFICATIONS

SMS Template access rights
GROUP-------------R-W-C-D-Note
Internal User-----X
​​​Admin / Settings--X-X-X-X
Stock Manager-----X-X-X-stock.picking
Sales Manager-----X-X-X-crm.lead, res.partner
Event Manager-----X-X-X-event.registration
Sub Manager-------X-X-X-sale.subscription, res.partner
MarkAut Manager---X-X-X-no limit
Account Manager---X-X-X-res.partner (followup)

Other groups
  * Online Appointment NO TEMPLATE USED
  * Accounting Manager NO TEMPLATE USED
  * SMS Marketing NO TEMPLATE USED
  * Studio Automated Action Need Technical Settings Anyway
  * Scheduled Actions Need Technical Settings Anyway
  * Server Action Need Technical Settings Anyway

LINKS

Task 2076366 (send now)
Task 2067873 (template access)
PR #37298
PR odoo/enterprise#5750
2019-09-25 11:13:30 +00:00
Thibault Delavallée 1a8530a178 [FIX] sms: allow system users to unlink sms templates
PURPOSE

Allow people to edit sms templates. Limit that rights to some main
application managers.

SPECIFICATIONS

SMS Template access rights
GROUP-------------R-W-C-D-Note
Internal User-----X
​​​Admin / Settings--X-X-X-X
Stock Manager-----X-X-X-stock.picking
Sales Manager-----X-X-X-crm.lead, res.partner
Event Manager-----X-X-X-event.registration
Sub Manager-------X-X-X-sale.subscription, res.partner
MarkAut Manager---X-X-X-no limit
Account Manager---X-X-X-res.partner (followup)

Other groups
  * Online Appointment NO TEMPLATE USED
  * Accounting Manager NO TEMPLATE USED
  * SMS Marketing NO TEMPLATE USED
  * Studio Automated Action Need Technical Settings Anyway
  * Scheduled Actions Need Technical Settings Anyway
  * Server Action Need Technical Settings Anyway

LINKS

Task 2076366 (send now)
Task 2067873 (template access)
PR #37298
PR odoo/enterprise#5750
2019-09-25 11:13:07 +00:00
Thibault Delavallée 29d5134d3c [FIX] mass_mailing_sms: fix sms mailing retry not really working
Retry was not working for SMS marketing as it was actually not really
implemented. It now correctly unlinks failed sms and traces and reschedule
the mailing accordingly

It is also possible now to force send while being in queue mode to avoid
having to switch too much between states.

LINKS

Task 2076366 (send now)
Task 2067873 (template access)
PR #37298
PR odoo/enterprise#5750
2019-09-25 11:13:03 +00:00
Thibault Delavallée 48cc126137 [FIX] (mass_mailing_)sms: allow to directly send SMS in mass mode
PURPOSE

Sending SMS is sometimes required as an immediate marketing tool.
Using delayed crons is not always the best user choice. Implement a
Send Now mechanism in batch SMS.

SPECIFICATIONS

Allow to send directly SMS when doing SMS marketing

SMS Application
  * in sms composer, in mass mode: rename Send SMS to Put in queue and
    add a Send Now button by-passing the queue;
  * set Put in queue as primary, Send Now as secondary;

SMS Marketing Application
  * in mailing view for SMS: rename Send SMS to Put in queue and
    add a Send Now button by-passing the queue;
  * set Put in queue as primary, Send Now as secondary;

Tests of SMS marketing with 400 contacts to SMS indicates it takes about
10 seconds to be completed which is considered as ok.

LINKS

Task 2076366 (send now)
Task 2067873 (template access)
PR #37298
PR odoo/enterprise#5750
2019-09-25 11:12:59 +00:00
Thibault Delavallée 889d30e2c8 [FIX] mass_mailing_sms: make body required in sms mailings
Sending void SMS marketing is not considered as a valid use case, more
something we should prevent as each sent SMS consumes credits. Required
is put in view as we have to support void sms body for mail mailings.

LINKS

Task 2076366 (send now)
Task 2067873 (template access)
PR #37298
PR odoo/enterprise#5750
2019-09-25 11:12:57 +00:00
Thibault Delavallée e4ece3f7de [FIX] mass_mailing: unlink traces when unlinking mailings
There is no need to keep traces when unlinking mailings, being mail or sms.
Indeed even with marketing automation unlinking mailings means traces will
be lost and won't serve any statistics or reporting purpose anymore.

LINKS

Task 2076366 (send now)
Task 2067873 (template access)
PR #37298
PR odoo/enterprise#5750
2019-09-25 11:12:54 +00:00
Thibault Delavallée 31aa195efa [FIX] sms: set correct value of batch when contacting IAP sms
Batch of 10 text messages was ok for testing. Production environment should
be able to handle more of them.

LINKS

Task 2076366 (send now)
Task 2067873 (template access)
PR #37298
PR odoo/enterprise#5750
2019-09-25 11:12:51 +00:00
Thibault Delavallée cff89b09a4 [FIX] mail: make recipients unique when parsing emails
Purpose of this commit is to have recipients of an incoming email being
present only once in recipients / to. Indeed there is no need to have
duplicate entries, for example if Delivered-To is set with same content
of To.

Followup of 7b79045fab .

LINKS

Task 2076366 (send now)
Task 2067873 (template access)
PR #37298
PR odoo/enterprise#5750
2019-09-25 11:12:46 +00:00
Pierre Rousseau b969018475 [FIX] partner_autocomplete: correctly manage empty country data
Steps to reproduce:
1) Enter a vat number in a customer field (for exemple Sales Order)
2) Click on the suggestion
=> Traceback

Task-ID 2059940

closes odoo/odoo#37180

Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2019-09-20 11:15:55 +00:00
Florian Gilbert 65f657b2b2 [FIX] account: Remove helper for 'amount_by_group' field.
Task ID: 2060475

closes odoo/odoo#37435

Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2019-09-25 14:09:14 +00:00
Florian Gilbert a2493ece06 [FIX] account: Delete attrs in account.move.tree.grouped
closes odoo/odoo#37434

Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2019-09-25 13:59:54 +00:00
Arnold Moyaux 312e78581c [FIX] mrp: test race condition issue
assertRaise do not rollback and continue with a broken cursor
which could cause problem during the remaining part of the test.

closes odoo/odoo#37421

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2019-09-25 12:52:42 +00:00
5d82725f62 [FIX] web: stop defaulting on empty kanbans when you should not
1/ Write a form view with a o2m field that has its own inline tree view
(no other view exist in db for the target model)
2/ Open that view in a mobile environment
3/ Instead of having a list view, you get a kanban view. No luck for
you, since the default kanban generated by `models.py` is an empty one,
your records are *invisible* \o/

From what I can tell, the previous condition made no sense:
```
if (there is a list view and a kanban view)  <-- this seems absurd
  then (use the list mode)
elif (there is no list view but a kanban view)
 then (use the kanban mode)
else (use both modes)
```

The first condition seems absurd: it *actively* ignores a kanban view
if there is one. Even better, the list view whose existence it checks
is never there: it checks for a `tree` when it should be checking for a
`list`. In short, the first condition was *never* met, and you ended up
either with exclusive kanban mode or with both modes - even if you had
no existing kanban view for the target model...

This commit moves the normalization of `tree` into `list` before
attempting to process the x2many field's subviews. It clarify the usage
of `tree` vs `list` (cf. only use `list`) which  prevents weird edge
cases like described above.

closes odoo/odoo#36237

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Co-authored-by: Adrien Dieudonné <adr@odoo.com>
Co-authored-by: Pierre Paridans <app@odoo.com>
2019-09-25 12:50:59 +00:00