Commit Graph
130325 Commits
Author SHA1 Message Date
Geoffroy Larue e2e85cb93a [IMP] project: project form view
Move and relabel the Privacy field and its various options to improve usability.

Task-2047389      Closes #36360
2019-09-18 12:05:19 +00:00
MaxLarue f5596bb8fe [IMP] sale: fix action_view_invoice in batch
action_view_invoice is made to work on empty/single/multi records, but there are context keys used to provide defaults when creating invoices in the next view. However when those fields are different among the origin sale orders, we get an error, because the record set's values is accessed like in a single record.

In this record we add the default_* context keys only if the recordset is of length 1, so it keep working as before for single/no records. And it doesn't crash when coming from multiple sale orders with different fields.

related task 2047389
2019-09-18 12:05:19 +00:00
MaxLarue 48f3bb8ee9 [FIX] project: fix project overview filter
Project overview was broken since the display name field on project search view was renamed into simply name, but a context key was used to enable it, which was not updated

related task 2047389
2019-09-18 12:05:19 +00:00
MaxLarue ecd8d38fdc [FIX] sale_timesheet: fix action_timesheet_from_invoice
The action_timesheet_from_invoice was not working anymore, it was redirecting to a list of all timesheet instead of only those linked to the actual invoice. It seems like the action was using a filter since it passed a search_default_* key in the context, but that filter is nowhere to be found. In order to fix the action, it was converted int a python method which gave access to the active move id.

related task 2047389
2019-09-18 12:05:19 +00:00
MaxLarue 8291fae0ef [IMP] hr_timesheet: rename allow timesheet into timesheet
Since this settings widget is a check-box it is already obvious that this field turn on or off a feature. Plus it makes the field easier to translate and the form view a little bit lighter.

related task 2047389
2019-09-18 12:05:19 +00:00
MaxLarue 5c03820f87 [IMP] industry_fsm: change date displaying on kanban cards
This commit changes the display of dates on kanban cards. It is now conditional.
Depending on the date versus actual date we conditionally set the color.
Depending if the record are grouped by date, we format the date as a date or as a time.
If the task is an fsm task we show the planned date begin otherwise we display the deadline.

From which App            |         project          |           fsm          |
-------------------------------------------------------------------------------
task.is_fsm               |     y      |     n       |     y      |     n     |
-------------------------------------------------------------------------------
task.fsm_state == 'done'  |  y  |  n   |  y  |   n   |  y  |   n  |  y  |  n  |
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
display deadline          |  n  |  n   |  y  |   y   |  n  |   n  |  y  |  y  |
-------------------------------------------------------------------------------
should it be colored?     |  n  |  y   |  y  |   y   |  n  |   y  |  y  |  y  |
-------------------------------------------------------------------------------
display city   ?          |  n  |  n   |  n  |   n   |  y  |   y  |  y  |  y  |

extra case: in fsm, if the records are grouped by date, we display time only in red, if the task is late, taking the time into account.

Task-2047389      Closes #5388
2019-09-18 12:05:19 +00:00
Raphael Collet b3bc7af0ea [FIX] point_of_sale: multiple installs inside a single request
The modification of a helpdesk team may trigger the installation of some
modules.  The code was calling multiple times the installation of
modules (once per module to install), and this was triggering cache
misses on computed fields (probably because of a completely inconsistent
cache/registry).  We have grouped all the modules to install into a
single installation, and this fixes the issue.

Co-authored with Samuel Degueldre <sad@odoo.com>

closes odoo/odoo#37059

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-09-18 09:27:52 +00:00
Kevin Baptiste 520ebd3c89 [FIX] hr_org_chart: reduce width on public profile
Prior to this commit, the org chart was taking 2/3 of the available
width. This commit aims at reducing the space used and to be consistent
with the private employee profile.

closes odoo/odoo#37052

Taskid: 2073361
Signed-off-by: Romain Libert (rli) <rli@odoo.com>
2019-09-18 08:21:38 +00:00
Adrien Dieudonne 29bbdc9aa5 [IMP] web: PivotView: display grouped columns on mobile
Before this commit, only "Total" column was shown on mobile and
it wasn't possible to add another one.

(1) Now, we let the user to add it even if he probably will have to
scroll horizontally.

(2) The "Flip" button has been reintroduced like in desktop.

(3) By default, the old behavior will remain the same (only one
colum will be displayed) but to avoid frustrating for users
who always have to add manually columns to see the same information
as in desktop; you can use favorite filters.
In this case, all columns will be displayed.

Task ID : 1945893
opw-1935645

closes odoo/odoo#37057

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2019-09-18 09:09:13 +00:00
qsm-odoo 371daf1682 [REF] website_blog: review cover saving method
Use a simple write RPC instead of a dedicated controller route.

closes odoo/odoo#37030

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-09-17 14:58:52 +00:00
Martin Trigaux f4d5a7fe8b [IMP] base: improve test coverage
The forbidden cases were not tested, making it harder to detect

closes odoo/odoo#36846

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-09-18 08:40:12 +00:00
Cedric Snauwaert b0ddc0fda1 [FIX] account: fix css of pencil to edit tax on vendor bill
Before when creating a vendor bill with a tax 15% and a price unit less than 87, the widget to edit the tax amount was wrongly displayed, the pencil and amount was broken into two lines. This fixes this behavior by ensuring that the all block stays together using the css property white-space: nowrap

closes odoo/odoo#37049

Signed-off-by: Cedric Snauwaert (csn) <csn@openerp.com>
2019-09-18 08:09:38 +00:00
Meghna Jaswani 2ac5f8b21f [FIX] product: remove strong tag from errors
Validation and user errors do not support
html tags anymore.
This commit removes the last strong tags present in
such errors.

Task ID: 2061442

closes odoo/odoo#36231

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-09-18 08:06:44 +00:00
Simon Lejeune d1814891fe [REF] mrp_subcontracting: manage backorder
closes odoo/odoo#37046

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-09-18 07:15:32 +00:00
Simon Lejeune deeb17cef0 [REF] mrp: improve error message in run_manufacture 2019-09-18 07:14:53 +00:00
Arnold Moyaux 167fd934a8 [FIX] mrp_subcontracting: empty BoM if no subcontractor
_bom_subcontract_find return a BoM of typer subcontractor for
any partners if the subcontractor is not set. The real behavior is
to not create a subcontracting order if the partner is not set.
2019-09-18 07:14:53 +00:00
Arnold Moyaux 93c53265ed [FIX] mrp_subcontracting: multi company 2019-09-18 07:14:53 +00:00
Arnold Moyaux 186b512023 [FIX] mrp_subcontracting: allow to return to subcontractor 2019-09-18 07:14:53 +00:00
laa 69b3b4bcd6 [FIX] mass_mailing: edit text content and transform the form tag view
- correct some errors in the text field
- transform the utm.tag.view.form view to utm.tag.view.tree view to allow direct tag editing

closes odoo/odoo#37008

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-09-17 12:01:11 +00:00
Jairo Llopis 73363e24e5 [FIX] Increase werkzeukg version
Repeat #22988 before v13 is released.

Until #35085 is fixed and we can use 0.15.x, at least with this patch people installing Odoo v13 with these requirements will no longer hit #18052.

closes odoo/odoo#36553

Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
2019-09-09 11:18:06 +00:00
Odoo's Mergebot 062e57ea49 [FIX] hw_drivers, hw_posbox_upgrade: IoT Box fixes
- The upgrade page shows the last commit that is present on the box. If
the message commit was too long, the layout was broken.

- In the latest version of Raspbian, when no display is connected to the
HDMI port, `tvservice -n` finds a display named "Unk-Composite dis".
Therefore, the `distant_display` was not created.

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

closes odoo/odoo#37044

Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2019-09-18 09:45:20 +02:00
RomainLibert 16c17bc108 [FIX] hr: onchange department don't reset manager
We should avoid reseting the manager_id on the employee when there is no
manager defined on the department

Also updates the department form view in order to display the fields
better

closes odoo/odoo#37028

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-09-17 14:54:24 +00:00
jbm-odoo dd5f6cb897 [FIX] web: Reload page after archive with action
For the moment, when we click on (un)archive and if the toggle_active
retrieve an action to execute, the page isn't reloaded at the end.

id=2072891

closes odoo/odoo#37027

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-09-17 14:35:52 +00:00
RomainLibert 164feadb42 [FIX] hr: stop planning acitivity if user has no access
Since the introduction of the public/private employee model, having an
acitivity defined on hr.employee (the private one) for an employee that
has no rights to read it is useless.

Task id 2072987

closes odoo/odoo#37021

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-09-17 13:30:16 +00:00
qsm-odoo 721bf25543 [FIX] website: fix slideshow and styling gallery options
- When the 'square' option was selected, it was not marked as active
  with the checkbox icon.

- The slideshow speed was not marked as active correctly and the option
  was not working anymore (this was due to other improvements made to
  the gallery snippet recently that revealed the bug).

task-2070647

closes odoo/odoo#37011

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-09-17 14:34:47 +00:00
Florent Lejoly 983bc39f5d [FIX] crm_iap_lead_enrich: small typos
-changed '0' to 0 as probability is an int
-typo that could have caused issues between data of iap  et lead (city <-> city and postal_code <-> zip)

closes odoo/odoo#37004

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-09-17 11:29:45 +00:00
Odoo's Mergebot 2476be9bf9 [MERGE][ADD-IMP] website_* : apply multiple improvements on visitor
PURPOSE

Perform a back2basics on recently-merged and recently-under-merged website
visitor concept. Main points to add are sending emails and sms to visitors
as well as improving integration.

SPECIFICATIONS

Applies various improvements:
  - Add graph view on visitors;
  - Remove welcome message if chat request usecase;
  - If a visitor is online: line is green / if offline: line is red (in the
    list view);
  - Visitors list view: add first / last connection fields and remove
    time_since_last_action;
  - Avoid useless leave notification if the livechat channel is empty;
  - Delete the first message "hello, how may i help you?" on a live chat
    request when I start a live chat;
  - Send mail to visitor linked to res.partner or linked to a crm.lead. New
    simplified wizard to post_message on lead or on res_partner if any
    (priority to lead). If the lead has a res_partner and not the visitor, set
    the partner on the visitor If the lead has no partner, create a partner
    based on the lead and link it to the visitor;
  - send a sms to a visitor if the visitor is linked to a least 1 lead that
    has a mobile number or a phone number or is linked to a res.partner with
    mobile number. As in contact form from website, there is only a phone field
    and not a mobile one, we allow to send sms if the lead phone field is
    filled;

Fixes :
  - ACLS on website_visitor_page model (for im_livechat_group_user)
  - Update visitor lang if visitor change the website lang.
  - Create visitor twice when translated website (due to rerouting)

See sub commit for more informations

LINKS

Task ID : 2070272

closes odoo/odoo#36290

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-09-17 18:25:40 +02:00
David Beguin 83e67319f0 [FIX] website_crm : fix lead's visitor page views
since e33172e832,
visitor_page_ids have been renamed into website_track_ids.
But the renaming of this field has not been applied on all usages.

This commit applies the renaming to usage in website_crm.

Task ID: 2056080
PR #36290
2019-09-17 14:12:22 +00:00
David Beguin e6b5aae210 [FIX] website,website_livechat : restore chat request feature
since e33172e832,
a chat request could not be sent to a visitor as the website was not
set anymore on the visitor and the mail_channel could then not be
assigned to a livechat_channel (using the website_id).

This commit restore the feature using the new temporary model
website.visitor.lastconnection.

Task ID: 2056080
PR #36290
2019-09-17 14:12:22 +00:00
David Beguin 858a92d2f2 [ADD] website_crm_sms : send sms to visitor linked to a lead
This commit allows to send a sms to a visitor if the visitor
is linked to a least 1 lead that has a mobile number or a phone number.
As in contact form from website, there is only a phone field and not a mobile one,
we allow to send sms if the lead phone field is filled.
This is not very smart though.. But as 95% of the people around the world are
typing their mobile number into a phone field, this will do the work in a
statistically significative way.

Task ID: 2056080
PR #36290
2019-09-17 14:12:21 +00:00
David Beguin 7c842e7c98 [ADD] website_sms : send sms to visitor if linked to partner
This commit allows to send a sms to a visitor if the visitor
is linked to partner that has a mobile number.

Task ID: 2056080
PR #36290
2019-09-17 14:12:21 +00:00
David Beguin 78c3952c3e [IMP] website_crm : send mail to visitor that have lead
This commit allows to send an email to a visitor if the visitor
is linked to at least 1 lead that has a valid email address.
If multiple leads have valid email address, email field on visitor
will contain a comma separated list of the leads' valid emai addresses.

Task ID: 2056080
PR #36290
2019-09-17 14:12:20 +00:00
David Beguin 73505303f8 [IMP] website : send mail to visitor linked to res.partner
This commit allows to send an email to a visitor
directly from the visitor form view if the visitor is linked a
res.partner that a valid email address

Task ID: 2056080
PR #36290
2019-09-17 14:12:20 +00:00
David Beguin 6f5abf933b [IMP] website,livechat : apply various imp and fix on visitor views
Applies various improvements:
  - Remove welcome message if chat request usecase.
  - If a visitor is online: line is green / if offline: line is red (in the list view)
  - Visitors list view: add first / last connection fields and remove time_since_last_action
  - Avoid useless leave notification if the livechat channel is empty

Fix
  - ACLS on website_visitor_page model (for im_livechat_group_user)
  - ACLS on website_visitor and website_visitor_page model (for sales_team.group_sale_salesman)
  - Update visitor lang if visitor change the website lang.
  - Create visitor twice when translated website (due to rerouting)
  - Avatar for visitor banner in discuss. (image_64 instead of old image_small)

Task ID: 2056080
PR #36290
2019-09-17 14:12:19 +00:00
David Beguin a9a1181434 [IMP] crm : factorise get_lead_by_confidence_level to prepare next commits
In order to prepare the send mail to visitor that are linked to leads,
getting lead by confidence level must be factorised to avoid code duplicates.

Task ID: 2056080
PR #36290
2019-09-17 09:34:32 +00:00
Alexandre Kühn b2247ab72f [FIX] im_livechat: show message history
Revision on https://github.com/odoo/odoo/commit/923fb7aa05f0e9e0e67440073993ec36bb0f5f53

Commit above fixed an issue since v11.0 that display duplicated
messages on a website livechat window.

Forward-ported broke the livechat in v12.0 due to refactoring of mail
https://github.com/odoo/odoo/commit/cd34f6de727d5b3858420cff3c9d3c5995c4e75c

This commit correctly adapts fix for v12.0+.

opw-2070911

closes odoo/odoo#36921

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2019-09-17 09:34:32 +00:00
svs-odoo aa791a646b [FIX] maintenance: company id of generated request
When an user generate new maintenance request, the company id was the
user's one, which can cause issue if the company of the user and of the
equipment aren't the same. Now, the company id of the request is took
from the equipment if it has one.

closes odoo/odoo#36927

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-09-17 08:30:13 +00:00
svs-odoo aed58b4b9a [IMP] maintenance: onchange on company_id
On a maintenance request, when the `company_id` is changed, reset the
`maintenance_team_id` if it doesn't fit the company anymore.
2019-09-17 08:30:13 +00:00
Aurélien Warnon 7b8178693e [FIX] mass_mailing: avoid computing statistics when creating campaigns
When creating a new mass mailing campaign, the _compute_mailing_items method made a SQL request on an empty recordset.
This resulted in a SQL request error ("id in ()").

This commit checks if there are self.ids to compute before executing the SQL.

closes odoo/odoo#36872

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-09-13 13:28:45 +00:00
17237ff31c [IMP] website, *: allow to set background video to snippets
* web_editor

This commit adds support to set background videos to all the snippets
that already support setting background images (except on parallax
background for now).

task-1920630

closes odoo/odoo#36261

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: Varun Raval <var@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
2019-09-17 12:06:17 +00:00
sri-odoo ee8106bd7a [REF] hr_skills: Improve skills and résumé design
closes odoo/odoo#37003

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-09-17 11:43:04 +00:00
qsm-odoo 57f92e2a8b [FIX] website_blog, *: restore blog/post cover edition
* web_editor, website

Editing the cover images or sizes was not working anymore. When it
worked, it was thanks to the 'o_dirty' class appearing magically on a
cover part... and that magic seems to be gone.

This commit fixes the problem by adding the 'o_dirty' class on all
elements whose content is changed, not only the editable ones (this is
the case for the blog cover: it is a non editable element whose bg
image can be changed).

Note: this also fixes the edition of multiple covers (of different blogs
or posts) at the same time (this could be backported in 12.0 if needed).

closes odoo/odoo#36999

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-09-17 11:15:42 +00:00
wan ef46378cd3 [FIX] web: remove absolute position on autoresize
Before this commit, it was set to position absolute, in order to make
sure it is not visible. But it is not really necessary. Also, it was
harmful in some situations, for example the web_ribbon is missplaced
in edit mode (apparently in webkit based browsers).

The issue was detected on the invoice form, when it is paid and we are
going in edit mode.

A fix is to set the height of the dummy text area to 0 instead of
putting its position to absolute and out of the screen.

closes odoo/odoo#36965

Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2019-09-17 10:13:55 +00:00
jem-odoo 7b0d0745dd [IMP] project: create project on the fly from task
We don't see any opposite use cases, so let's do it.

Task-2065079

closes odoo/odoo#36538

Signed-off-by: Jérome Maes (jem) <jem@openerp.com>
2019-09-17 06:51:23 +00:00
MaxLarue c67ec927fc [IMP] project: show stage description in task kanban
We now use the 'group_by_tooltip' mencanism to show stage
description when 'hover' the name of a stage in the kanban
of project.

Task-2065079
2019-09-17 06:51:23 +00:00
MaxLarue 049d6616e9 [IMP] sale_timesheet: timesheet list from sales order
This commit ensure that the list view is shown when the user wants to
see the timesheet of a sales order. Indeed, the action used adds group
by and grid view (enterprise), which was not usefull for end user to
get a complete overview of the timesheets linked to that SO.

Task-2065079
2019-09-17 06:51:23 +00:00
MaxLarue 21a51d04c3 [FIX] sale_timesheet: display timesheeted quantity correctly on sale order
There was a stat-button on sale orders coming from a task with
timesheet that displayed the quantity of timesheets linked to the
origin task. This stat-button was re labeled with the rimesheet uom
(hours/days/...) but the field still displayed the number of
timesheets instead of the total timesheeted amount in the correct
uom.

This commit introduces a new computed field on the sale order, which
computes the amount of time on timesheets depending on the used uom.

The compute method uses the product_uom_hour record as it is the uom
in which the amount is stored on the model, that record is guaranteed
to exist as it's model unlink method was overridden to prevent
removing working-time uom.

Task-2065079
2019-09-17 06:51:23 +00:00
RomainLibert dde0746725 [FIX] web: avoid having context twice
In case the context was manually passed to report_download, #36839
would pass the context keyword argument twice to report_routes.

That is not allowed in python so we update the current context with the
custom context from the report and pop the custom context from the
arguments

closes odoo/odoo#36989

Signed-off-by: Romain Libert (rli) <rli@odoo.com>
2019-09-17 08:52:56 +00:00
Raphael Collet a6ec6ca0e2 [FIX] models: do not prefetch forbidden fields in read()
closes odoo/odoo#36985

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-09-17 08:36:44 +00:00
svs-odoo f5e04ee4b4 [IMP] stock: default company on SN/LN receipt
When creating a new SN/LN from a picking of receipt type, adds a default
`company_id` in the context.

closes odoo/odoo#36972

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-09-16 15:07:01 +00:00