Commit Graph
140847 Commits
Author SHA1 Message Date
svs-odoo f6da4d57bc [FIX] stock: display generate serial number
Before this commit, the field to generate serial numbers in the
detailed operation move view wasn't displayed.

closes odoo/odoo#37197

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-09-20 11:00:50 +00:00
Hetal Dhanak 921c48bdb0 [IMP] base: update demo data(address) for partner.
Purpose of the commit is to adapt demo data for the maps view
as we currently have a cluster of pins, which doesn't showcase the feature.

So updated the address of the main partners.

Task-2041896

closes odoo/odoo#36179

Closes: #36179
Signed-off-by: Jérome Maes (jem) <jem@openerp.com>
2019-09-20 09:40:47 +00:00
Christophe Simonis ae1cabdd34 [FIX] account: correct tests amounts to reflect reality
closes odoo/odoo#37183

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-09-20 09:03:30 +00:00
Christophe Simonis 38ac47f578 [FIX] core: correct record values comparison in tests
Do not consider the whole record as matching the expected values once a
float match.
2019-09-20 09:03:30 +00:00
RomainLibert d5276ad10a [FIX] hr_holidays: do not show the title in edit mode
We should avoid showing the title in edit mode as it doesn't get updated
automatically.

closes odoo/odoo#37193

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-09-20 09:58:14 +00:00
Mathieu Duckerts-Antoine 149d2a3d60 [FIX] web: always show the graph view button "Stacked"
With the actual code, some computations are done
in the graph renderer to determine if it is worth
to show the "Stacked" button in the graph view control
panel for the data on hand. It turns out that that
problem is not satisfactorily addressed and is quite
hard from a usability perspective. We prefer to restore
the old behavior as long as we don't have better ideas.

closes odoo/odoo#37188

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-09-20 09:23:24 +00:00
RomainLibert d0c1db764c [FIX] hr_holidays: change constraint message
The message for the validity of the leave type was not clear enough,
this commit makes it clearer.

closes odoo/odoo#37191

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-09-20 09:46:52 +00:00
RomainLibert 51ace5d1a5 [FIX] hr_contract: some information should not be copied
closes odoo/odoo#37186

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-09-20 09:19:28 +00:00
jbm-odoo 2acff81c83 [FIX] hr_holidays: Avoid too long number in header dashboard
In time off dashbord, due to python precision computation we can
have amount of days like 9.9999998. This commit make a rounding
after 2 digits and doesn't add new 0 at the end.
For example:
3 -> 3
3.1 -> 3.1
3.14 -> 3.14
3.141 -> 3.14

closes odoo/odoo#37182

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-09-20 08:59:45 +00:00
Florent Lejoly 397f86b962 [FIX] website_slides: remove creation of quizz in reporting
Currently in the slide.question view it is possible to open a form
to create new questions for quizzes, but it is impossible to fill the form with
the required information to create a new question. So the create button has no purpose.
This as "slide_id" is required but can't be set in the form.
Now the option to add question from the reporting tab 'Quizzes'
is removed as the questions (with the answers) are added in the form from
slide.slide.

closes odoo/odoo#37117

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-09-19 08:36:46 +00:00
wan 978f9ce2c6 [FIX] account: onchange in reconcile model
The onchange on tax_ids and second_tax_ids was only recomputed when
tax_ids changes (duh) so the variables show_force_tax_included and
show_second_force_tax_included were not set when coming back to the
formm after having saved a line with one tax.

closes odoo/odoo#37111

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2019-09-19 08:12:32 +00:00
Krunal Trivedi 78c0934f76 [FIX] website_slides: display bug after submitting quiz
After submitting the quiz, buttons and validation content was rendering  on top
of the quiz instead of under it. This display bug is fixed in this commit.

Task-2072564

closes odoo/odoo#37040

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-09-18 06:00:01 +00:00
Julien Mougenot 43d91c289a [FIX] base: document layout reset colors button
Fixed the button allowing to reset to the logo colors in the
document layout configurator.

Before this commit, the custom_colors boolean asserting that
the colors used by the layout are different than the ones computed
from the logo and used to revert to those colors was in readonly
and couldn't be toggled.

Now, the boolean is editable and allows to revert the colors properly.

Task 2072557

closes odoo/odoo#36968

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-09-16 14:30:07 +00:00
Simon Lejeune d5111aec9f [REF] sale, sale_stock: dates
Remove the "sale.group_sale_order_dates" group and settings, all the date
fields are always displayed but we put schedule_date and commitment_date
(for which the label was renamed "delivery date") on the same line (with
a design to make the schedule date looks like a suggestion for the
delivery date).

task 2057802

closes odoo/odoo#37174

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-09-20 07:02:22 +00:00
Martin Trigaux 543a5523a3 [FIMP] base: remove all translations when writing False
This "bugprovement" resolve the old issue of writing on a translatable
field a falsy value.

Before this commit, only the translation value was removed. When no
translation is present (or when the value is not set), the value is
retrieved directly from the source field.

Before 18d9c2cab2, it was still possible to go around this issue by
removing manually all ir.translation entries and writing with a user
in en_US.
This is no longer possible as writing on a translatable field always
uses translations when in multi-language environment, without
exception of en_US.

When writing a falsy value on a field, the expected behaviour is to
reset the value and see that falsy value after saving, not the old
value stored on the source model.

Remove all translations and force to update the column.

Removing one individual translation is still possible in the
translation popup.

Task id: 2062415

closes odoo/odoo#37077

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-09-18 14:56:41 +00:00
Simon Lejeune 2425c7b223 [FIX] mrp: set planned date when creating order through procurement
If it isn't set manually, it defaults to now and the result is not
consistent with planned date end. We make it an hour before totally
subjectively.

closes odoo/odoo#37173

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-09-19 15:03:21 +00:00
mreficent c101708636 [DEL] hr_attendance_presence (remnant)
https://github.com/odoo/odoo/commit/f6fdde96bddfedf8764cd8a73089e44340d476ae deleted the module, but https://github.com/odoo/odoo/commit/e9d989827686d1089c1ea1c9a6b47b62a09e2de4 added a remnant due to a bad rebase.

closes odoo/odoo#37170

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-09-19 18:43:46 +00:00
RomainLibert e1eca412fb [FIX] hr_contract: change the company when changing employee
closes odoo/odoo#37164

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-09-19 15:37:54 +00:00
Xavier ALT bea0a9edfe [FIX] base, *: ensure name_search() returns lazy name_get() result
To avoid slowing down search like "{relational_field}" contains "{value}"
we always need to return the lazy name_get() for each [_]name_search method

closes odoo/odoo#36735

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-09-11 17:11:33 +00:00
Arnaud Baes 81e198aa5d [IMP] stock: Warning on internal picking types.
As there's technically no way to hide partially a selection field,
we raise a warning when the user set a `stock.picking.type` as
internal without having the setting `stock.group_stock_multilocations`
enabled.

closes odoo/odoo#37129

Taskid: BugsLogistics
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-09-19 13:36:00 +00:00
Arnaud Baes 5ac0c268b2 [FIX] purchase: wrong source document browsed.
For some reasons, when the `mail_compose_message` wizard tries to
read the name of its source document, the id and the model are
sometimes mismatched as a `purchase.requisition` or a `purchase.order`.
To avoid this we force the `active_model` and `active_id` in the context of `action_rfq_send` to be always referring to the current `puchase.order`.

closes odoo/odoo#37097

Taskid: BugsLogistics.
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-09-19 09:15:26 +00:00
Sébastien Theys b6288e5446 [IMP] *: remove image_64 and clean views
There are too many image sizes. Since they are stored resized this takes time to
generate when saving a new image, it's more rows on the attachment table, more
files on the disk, ...

64px is close enough to 128px that it can be removed without a big impact on
download size.

It will even reduce download and number of requests when both images are
displayed because now only one has to be downloaded and then benefit from cache.

The difference between the two is typically around 1.5kB which is negligible
these days, especially when the request overhead is around 0.5kB already, not
even taking into account other factors such as latency.

If a 64px image must absolutely be returned, it is still possible to pass the
size parameters to the image route. But the current guideline is to handle
resizing in the views when necessary.

Views
=====

- remove width and height attributes when existing CSS rules are overriding them
  (eg. `.oe_kanban_avatar` in the right context)
- add CSS rules instead of width and height attributes when possible
- use `object-fit: cover;` where width and height are forced to avoid distortion
  of non-square images
- for products, use `object-fit: contain;` instead, keep ratio but without crop
- add new CSS rules where the expected size was max 64px*64px before due to the
  image size itself
- remove `img-fluid` where using size classes to avoid conflicting rules

task-2060865

closes odoo/odoo#36147

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2019-09-19 10:23:39 +00:00
Nicolas Martinelli e3d2b018c2 [FIX] website_event: track publishing
When an event is published/unpublished, the 'Is Published' value appears
twice in the chatter.

This is because `website_published` is defined as a related of
`is_published`, and `is_published` is tracked. The button calls
`website_publish_button` which triggers a `write` on
`website_published`, the latter triggering a `write` on `is_published`.

The situation is quite exceptional: we usually don't define a related on
a field of the same model. Therefore, we can simply change the field
tracked.

opw-2073804

closes odoo/odoo#37128

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-09-19 09:46:30 +00:00
Nicolas Lempereur 5c408dd442 [FIX] web_editor: element inline bar over modal popover
In the inline editor (eg. task description), the inline bar of an
element (eg. link or image) has higher bootstrap z-index than modal that
can be opened via this bar (eg. croping window for an image, link
editing for a link).

So the bar would be over the modal opened by the bar which is
unexpected.

This was solved in 12.3 f2969923 by setting the inline bar to z-index of
$o-wysiwyg-zindex (defined to 1000).

This is the equivalent of 12.0 #37119 fix.

opw-2073761
closes #37125

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-09-19 09:46:08 +00:00
William Henrotin de2725c173 [FIX] stock: remove dummy field from depends_context
This commit removes 'location' and 'warehouse' from the api.depends_context
of _compute_quantities() as:

1. They are not needed. They are never changed in a single transaction in the current code
2. The ORM doens't support the fact that they are sometimes passed as list instead of integer

closes odoo/odoo#36788

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-09-19 08:00:14 +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