Commit Graph
129877 Commits
Author SHA1 Message Date
RomainLibert 02b27c1bd7 [FIX] hr_holidays: fix the layout 2019-09-11 09:27:41 +00:00
RomainLibert 7d06ac1d69 [FIX] hr_holidays: set responsible on leave types 2019-09-11 09:27:41 +00:00
Odoo's Mergebot 6f8cace0b4 [MERGE] survey, website_slides: implement YAB2B
PURPOSE

Implement Yet Another Back2Backs, coming from FP feedback.

SPECIFCIATIONS

Improve eLearning backend
Rework survey menus
Add some demo data for certification
Clean some code bits

Task 2066646

closes odoo/odoo#36557

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-09-11 12:47:29 +02:00
mcm-odoo 247bc4aaa1 [IMP] survey: little optimization for user_input_line creation/update
Before:
  The method _get_mark called Model.exists() just after calling
  Model.browse
  This process makes 2 calls to database to do almost the same thing

Now:
  Removed the method _get_mark and directly call Model.browse

FP feedback

Task 2066646
2019-09-11 09:16:48 +00:00
mcm-odoo f1b9ce5462 [IMP] (website_slides_)survey: add demo data for certifications
This commit adds a few demo data for the certifications.

FP feedback

Task 2066646
2019-09-11 09:16:40 +00:00
mcm-odoo f2ac762f01 [IMP] survey: improve menu items
This commit removes the configuration menu in survey app. Menu items are
distributed in the other menus: questions, answers.

FP feedback

Task 2066646
2019-09-11 09:16:35 +00:00
mcm-odoo 3e4b0f3200 [IMP] website_slides: improve slides backend views
This commit improves a bit the existing backend views of the elearning
app (notably propagating content and course labeling instead of slide and
channel) and adds a pivot view for model slide.slide.

FP feedback

Task 2066646
2019-09-11 09:16:26 +00:00
Denis Ledoux 5cac9c54ff [IMP] fields: avoid __set__ multiple loops on record, and new browse records
This patch avoids to create new browse records for nothing,
(as creating new browse (__new__) is costly),
and to avoid to loop multiple times on the records
(with multiple different filtered, etc.)

This brings performance gain to __set__,
which is used when setting the value of a compute field

e.g. This improves the performances of
`env['product.product'].search_read([])`

closes odoo/odoo#36006

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-09-11 07:55:17 +00:00
Denis Ledoux 3d1c924cff [FIX] fields.py: improve computation time of records having a different value in cache
Instead of using a filtered with `cache.get`,
use a dedicated method in the Cache class to get
the records having a different value in cache then asked.

This is mainly to avoid the creation of intermediate
`browse` of 1 record, when doing `for rec in self`
in `filtered`.

Creating browses is costly, and avoiding it leads
to performance gains.

The dedicated method `get_records_different_from`
loops on the record ids, instead of on browse records
2019-09-11 07:55:17 +00:00
Denis Ledoux 0e028de72e [IMP] api: lazy_property for user, company, companies
These variable are not supposed to change within a same
environment.

The lazy property will compute these variables only
once, then store the result,
while the property were computing these variables
each time they were called.

e.g. for a 1000 iteration loop,
with `env.company`,
the company was computed 1000 times.
With a lazy property, the company will be computed one time only.
2019-09-11 07:55:17 +00:00
Antoine Prieels 0bf6fb0519 [FIX] hw_drivers: Display slowed IoT Box down
In DisplayDriver, we setup a loop to refresh the display every minute
if the url shown is not the customer display. If the customer display
was used, the loop didn't wait a minute and looped indefinitely,
without sleeping. This slowed down the whole box and explains why
receipts took a long time to print with older versions of Odoo and why
the framerate of the curomer display was so low.

closes odoo/odoo#36670

Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2019-09-11 08:38:36 +00:00
Pierre Rousseau 570566b674 [FIX] crm_iap_lead: handle empty company name
Before this commit if the name of a company retrieved from lead generation is empty, there was a traceback.

Part of Task-ID: 2069155

closes odoo/odoo#36663

Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2019-09-11 06:37:57 +00:00
Pierre Rousseau 8de0f723b6 [FIX] crm_iap_lead_website: correcly check for GeoIP
Before this commit, every time the user tried to save a rule the system displayed a message to inform that GeoIP is missing, even if GeoIP is installed.

Part of Task-ID: 2069155
2019-09-11 06:37:57 +00:00
Odoo's Mergebot e3456e50f2 [FIX] hw_drivers: Add possibility to choose a wifi network on IoT Box
Previously if you are wired connected we don't scan wifi network.

Now we scan the wifi network and add possibiliyt to select a network and use them.

Description of the issue/feature this PR addresses:

Current behavior before PR:

Desired behavior after PR is merged:

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

closes odoo/odoo#36634

Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2019-09-11 11:57:20 +02:00
lejeune quentin d4fa24c2bc [IMP] hw_drivers: Add possibility to choose a wifi network on IoT Box
Previously if you are wired connected we don't scan wifi network.

Now we scan the wifi network and add possibiliyt to select a network and use them.
2019-09-10 14:14:27 +00:00
lejeune quentin 9c10d7a28e [FIX] hw_drivers: Fix unmount of cups folder
To add or modify printer the /root_bypass_ramdisks/etc/cups/ need be writeable.
And /root_bypass_ramdisks/etc/cups/ = /etc/cups/
But when we make 'sudo mount -o remount,ro /' we put the /etc/cups/ and so
/root_bypass_ramdisks/etc/cups/ folder on read-only.

After all 'read-only' command we make another command to put cups folder writeable
2019-09-10 14:14:27 +00:00
lejeune quentin aa18bcc14d [FIX] hw_posbox_homepage: Removes unnecessary POS devices
Previously, we showed POS and IoT devices.
Now all POS devices are converted to IoT devices.

So the 'get_pos_devices_status' function is useless
2019-09-10 14:14:27 +00:00
lejeune quentin 9433151fcf [FIX] point_of_sale: Remove useless wget
We remove 2 wget which have become useless
2019-09-10 14:14:26 +00:00
lejeune quentin d098981b46 [FIX] hw_drivers: Use helper for Keyboard driver
We have implemented helpers that are not used in the KeyboardUSBDriver
2019-09-10 14:14:14 +00:00
lejeune quentin fb81292d31 [IMP] point_of_sale: Use last version of Raspbian for the build of IoT Box
We use the last version of Raspbian; Strech for the build of IoT Box
2019-09-10 12:26:18 +00:00
jbm-odoo 34038b7412 [FIX] website_slides: Fix kanban view with group by
id=2069603

closes odoo/odoo#36603

Signed-off-by: Romain Libert (rli) <rli@odoo.com>
2019-09-10 08:51:16 +00:00
Meghna Jaswani e2e3ad78bf [FIX] hr_presence: change error message on sms button
In this commit, the error message has been changed
because on clicking sms button it shows field value inserted
for Work Mobile. Hence word phone was changed to mobile.

task:2065143

closes odoo/odoo#36398

Signed-off-by: Romain Libert (rli) <rli@odoo.com>
2019-09-04 05:22:10 +00:00
RomainLibert c0febb02d8 [IMP] lunch: Improve the product dashboard
The default image for the lunch product should be the one from the
category (added an image on the categories).

In case there is no image either on the product either on the category,
in the kanban view there should be a specific image (fork and knife
image)

Added some data in order to always have something displayed in the
kanban view

Fixed the layout of the dashboard

Bug fix, in `_check_wallet` there was a flush missing

Bug fix, `product_id` should be a many2one, not an integer field and the
orm should be used in order to avoid problems when favoriting products

This is a back2basics task

Task 2048246

closes odoo/odoo#35632

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-09-11 08:59:12 +00:00
jbm-odoo 5cddbbf9f2 [FIX] web + hr: Kanban view fix o_text_overflow
Fix o_text_overflow class (in contact for example).
Add class o_text_overflow in hr_employee view to avoid email to
be too long.

closes odoo/odoo#36626

Signed-off-by: Romain Libert (rli) <rli@odoo.com>
2019-09-10 12:20:37 +00:00
jbm-odoo 163abbb849 [FIX] hr_recruitment: Top margin for 'published' ribbon
Fix margin top for 'published' ribbon in recruitment when using
group by.

closes odoo/odoo#36598

Signed-off-by: Romain Libert (rli) <rli@odoo.com>
2019-09-10 08:21:37 +00:00
Joseph Caburnay 525fa5a221 [FIX] point_of_sale: clicking tips label
This commit implements the correct behavior of clicking
the label of boolean field - should toggle the checkbox
and not display list of product.

closes odoo/odoo#36256

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-08-30 07:01:58 +00:00
Hiral Bhavsar 1d2559ce64 [IMP] sale_expense, web: hide 'search more..' from m2o dropdown
Purpose
========
In expense, we now allow any simple employee (no sales access rights) to
select sales order. Technically, the name_search is done in sudo mode,
to allow simply fetching the name_get of record.

The problem is that the m2o field widget displays the "search more"
option and click on that will open a modal executing a "search_read"
which is causing access error as the user doesn't have read access on
SO.
As we want to restrict the visible information from the SO(only name_get)
to all user, we can't hack the search_read too.

Specification
=============
To prevent user frustration, we need to remove the "search more" option.
Thus, make a private function which one have 'search more..' option
related stuff and create a new widget for sale_expense, override that
function which one is returing values as it is without any modification.

task-2057714

closes odoo/odoo#36152

Signed-off-by: Jérome Maes (jem) <jem@openerp.com>
2019-08-29 12:56:24 +00:00
Pierre Rousseau 4242ddd7a8 [FIX] crm_iap_lead_enrich: correctly get payload
Before this commit, int was compared to a string when trying to retrieves company data in the payload.

Part of 2069155

closes odoo/odoo#36601

Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2019-09-10 09:02:42 +00:00
Martin Trigaux 6c7c97a6b6 [FIX] mail: add missing sports
If you accept soccer, accept running and biking

closes odoo/odoo#36627

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-09-10 12:56:08 +00:00
fja-odoo 0caf14a96d [FIX] website: fix nested menu creation
If the menu's parent is a newly created menu it will have a temp string
id which was failing to be parsed as an int and thus falling back on the
root menu as its parent.

This was broken by the new mega menu feature introduced with
https://github.com/odoo/odoo/commit/1345702258adbfbee0d780dc22e552395e6d1df7

task-2069365

closes odoo/odoo#36606

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-09-10 14:45:24 +00:00
qsm-odoo 8025205bb4 [IMP] web_editor, *: introduce wysiwyg frontend loader
* website_forum, website_profile

- Share some code between website_forum and website_profile by exposing
  a function in web_editor to instantiate a wysiwyg instance on a
  textarea

- Use no-lazy loaded JS to add a visual loading effect while the
  wysiwyg is not yet available.

This is made in preparation of task-2024197
(see https://github.com/odoo/odoo/pull/35749)

Thanks to @stefanorigano

closes odoo/odoo#36581

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-09-10 12:12:28 +00:00
Lucas Lefèvre 50d2f188f8 [FIX] web: Display archive action if active in view
Since ee5e972, "Achive" and "Unarchive" actions are
automatically displayed in the actions dropdown
if the record has an `active` field.
The "Archive" action is shown if `active=True`, and
"Unarchive" otherwise.

However, if the record has the `active` field but
it's not in the view, the form controller think
`active=False` because `undefined` is falsy.
Therefore, the "Unarchive" action is always shown.

If `active` is not in the view, neither "Archive" nor
"Unarchive" should be shown.

closes odoo/odoo#36551

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-09-10 11:46:01 +00:00
Lucas Lefèvre 55a4910b2e [FIX] hr: Redirect to company employee profile
Only one employee per company and per user is allowed.
Based on the company the user is logged in, "My profile"
should redirect to the employee profile of the current
company.
If the user has no employee in the current company,
"My Profile" redirects to the simple "Preferences" screen.

Currently, it always redirects to the employee in the user's
main company (`user.company_id`)

This issue is a consequence of a5b6f31 which uses the context
to know the current company instead of `user.company_id`.

Specification
=============

Un-store the employee_id field on the res.users model.

To achieve this, we need to implement a _search method for this field.

That way, each time we try to access to the employee_id value, the
returned employee depends on the context.
2019-09-10 11:46:01 +00:00
Lucas Lefèvre c55c3e7388 [FIX] hr_holidays: Restrict employee with leave deletion
It's currently not possible to delete an employee who has leaves
=> traceback.

The employee_id field is set to NULL in the leave table which
breaks the `type_value` constraint (same for allocation).

It should not be allowed to delete an employee with leaves:
for legal puposes in some countries, a record of employee
leaves must be kept.

Instead of deleting the employee, it should be archived.
2019-09-10 10:41:59 +00:00
Julien Castiaux d930a78f35 [FIX] snailmail_account: external pingen test
Commit 4d64e553b8 introduced an 'mt-3' in the address layout of the
external background layout to fix a problem related to the display of
phone numbers.

That fix introduced an error with the pingen external post service. It
requires the area where the destination address is printed to be blank,
due to the mt-3, the background image was visible instead of that blank
area.

As removing solely the mt-3 doesn't break the first problem and solve
the second, it is safe to remove it.

Before this commit, no message was logged to help finding out why the
test was failing.

The `requests.raise_for_status` method raises an error on both 400 and
500 status code. We don't want the test to break in case pingen screw
up their side so 500 errors are just logged. 400 errors still raise an
exception.

closes odoo/odoo#36504

Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2019-09-10 13:42:10 +00:00
lejeune quentin 1d15892eaf [FIX] hw_posbox_upgrade: Fix broken link
We fix 3 links broken in the upgrade web page of the IoT Box

closes odoo/odoo#36500

Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2019-09-06 08:21:37 +00:00
Raphael Collet 1315a1a82c [FIX] fields: clash with automatic fields and inheritance
Consider a model M that defines `display_name` as a computed stored
field, then an extension of M that introduces a mixin model A before
that definition in the MRO of M's class.  The model A is expected to
have an automatic, non stored field `display_name`, while M must have
its non-automatic, stored field `display_name`.

closes odoo/odoo#36427

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-09-10 13:29:15 +00:00
Odoo's Mergebot 3076ea8b10 [FIX] pos_{*}: Different fixes for receipt printers
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

closes odoo/odoo#36386

Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2019-09-10 18:17:52 +02:00
Yenthe666 2977b2c5a8 [IMP] hr_recruitment: fix typo's and improve source terms
closes odoo/odoo#36040

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-09-10 12:59:28 +00:00
qsm-odoo 64c943b8a8 [REF] website: reorganize the snippets order a little
Part of https://github.com/odoo/odoo/pull/36515

closes odoo/odoo#36515

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-09-10 11:49:34 +00:00
qsm-odoo 623d7358d8 [REF] web_editor, *: review the whole snippets options UI system again
* website_form

Now, the snippets options are still displayed in the left panel but all
the parent options are also shown (and do not require to toggle them
anymore). On hovering them, the overlay style is turned in preview mode
(even for the sticky one) allowing to see which part of the DOM the
option is editing.

Part of https://github.com/odoo/odoo/pull/36515
2019-09-10 11:49:34 +00:00
qsm-odoo 53e428aa45 [REF] website: remove anchor option on columns
The anchor option was available on column so that you can target a
column which wraps on a new line in mobile... but we decided to remove
the feature as it complexify the UI.

Also fix a small bug: it was not possible to hit "save" when not
changing the anchor name of an element (an error message was displayed
to say it is already used in the page... while it is in fact used by
itself).

Part of https://github.com/odoo/odoo/pull/36515
2019-09-10 11:49:34 +00:00
qsm-odoo fb6b7013c9 [REF] web_editor: transform border-like move handles into button handle
Part of https://github.com/odoo/odoo/pull/36515
2019-09-10 11:49:34 +00:00
qsm-odoo 092409edc1 [REF] web_editor, website: review UI labels and icons
Part of https://github.com/odoo/odoo/pull/36515
2019-09-10 11:49:34 +00:00
qsm-odoo 1d22cac139 [FIX] web_editor: make dashed purple overlay visible over purple
When hovering a set of options we display a purple dashed overlay, the
problem is that it was not visible over purple-like colors. Now it is
an alternance of purple and white.

Part of https://github.com/odoo/odoo/pull/36515
2019-09-10 11:49:34 +00:00
qsm-odoo d174ed0a83 [IMP] website, *: combine first dropzone and editor messages
* web_editor

When starting a drag and drop in the editor, a series of dropzones
appear to indicate to the user where he can drop the block being
dragged. In the website editor, when an editable structure is empty,
it is filled with a message to indicate we can drag and drop something
in there. The problem was that this message and the design that comes
with it disappeared when starting a drag and drop as it was replaced by
the editor dropzones. Now, the 2 are combined: when a dropzone appears
in an empty editable structure, the message and its design are kept and
just changes color and animation to match the one of an editor dropzone.

Part of https://github.com/odoo/odoo/pull/36515
task-2057320
2019-09-10 11:49:34 +00:00
Antoine Prieels 0a551bd243 [FIX] pos_epson_printer_restaurant: IoT printer selected
When selecting an Epson ePOS printer, the POS tried to print of a
printer connected to an IoT Box.

This happened because the override of create_printer was executed
before its declaration in pos_restaurant.
2019-09-06 09:12:25 +00:00
Antoine Prieels 1e06b56c84 [FIX] point_of_sale: Support RTL languages
The layout of the printed tickets was wrong when using an RTL language.
We fix this and use an older version of html2canvas because the new one
introduced layout issues.
2019-09-06 09:12:25 +00:00
Antoine Prieels e5c66b758a [FIX] point_of_sale: Receipt color after print
The color of the displayed receipt slightly changed after clicking on
"Print Receipt".
2019-09-03 13:51:30 +00:00
Antoine Prieels f9b52670e8 [FIX] pos_{*}: Reprint receipt with ePOS printer
The "Reprint receipt" button was not showing if an ePOS printer was
selected.

When the pos_reprint module was installed, the "Reprint Receipt" button
was always present, even if the checkbox in pos_config was unchecked.
2019-09-03 13:51:30 +00:00