Commit Graph
129902 Commits
Author SHA1 Message Date
Joseph Caburnay c7ee7ce8e0 [FIX] pos_adyen: active constraint if the identifier is empty
Disqualify the constraint in the adyen identifier if it is empty because
it is not needed in other payment methods that are configured with other
payment terminal.

closes odoo/odoo#36702

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-09-12 05:34:09 +00:00
Joseph Caburnay a0c5a3cc4a [FIX] point_of_sale: payment terminal credentials in cash payment method
Hide all fields related to payment terminal if the payment method is
cash.
2019-09-12 05:34:09 +00:00
Mitali PatelandMohammed Shekha a3845ae3f0 [FIX] base: ask to discard before leaving settings
In a settings form view, do some changes, then click on a button
or link in the form (e.g. 'Manage Users' in General Settings).
We now ask if the user wants to discard the changes before leaving
the page.

Task 1921574

closes odoo/odoo#34799

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: Mohammed Shekha <msh@odoo.com>
2019-09-12 06:21:41 +00:00
Pierre Paridans 1609d705c2 [FIX] point_of_sale: crash on PosModel#destroy
During PosModel#destroy some undefined methods are called.

This commit replaces them with the correct one.

closes odoo/odoo#36706

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-09-11 13:09:37 +00:00
RomainLibert bc407fd18e [FIX] hr_holidays: do not create activities automatically
closes odoo/odoo#36720

Signed-off-by: Romain Libert (rli) <rli@odoo.com>
2019-09-11 14:59:26 +00:00
Yannick Tivisse 46bd223a4b [FIX] hr_contract: Fix kanban_state layout issue
closes odoo/odoo#36713

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-09-11 14:08:40 +00:00
Antoine Prieels 9fff495927 [FIX] hw_drivers: Fix get_wifi_essid helper
The `get_wifi_essid` function was moved to the helpers file, but the
`self` argument was not removed from the function's signature.

closes odoo/odoo#36710

Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2019-09-11 13:47:36 +00:00
Jairo Llopis 4497077f55 [IMP] base: allow private addresses for contacts
For contacts without company, it was not possible to modify the type
and set a private address

opw-1944234

Closes odoo/odoo#31491

closes odoo/odoo#36701

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-09-11 12:51:42 +00:00
jbm-odoo 73498572c3 [IMP] hr: Employee Profile set readonly attribute on readonly field
closes odoo/odoo#36698

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-09-11 14:00:39 +00:00
Thibault Delavallée c3b5f31307 [FIX][IMP] website_slides: move youtube dependent tour in its own tour and test
Contacting youtube API sometimes fails making falsy red runbot. In this commit
we remove video from member tour so that it tests the interface. Some demo
slides with youtube video are added in another course and new test is added
that crawls that channel.

Task 2066565

closes odoo/odoo#36697

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-09-11 12:39:26 +00:00
Jairo Llopis eebb8e1484 [FIX] *: remove buggy calls to with_context
When .with_context() is called with a dictionary as 1st positional
argument, it will replace context (and not modify the referenced keys)
It may create bugs when losing the content of the context (e.g. remove
partner's language)

This is a cherry-pick to saas-12.5 of odoo/odoo#36164 of the logistic
part as discussed

closes odoo/odoo#36690

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-09-11 11:17:50 +00:00
RomainLibert f2b4d98871 [FIX] l10n*: use standard account type instead of specific one
Some l10n were creating a specific account type for the off balance
    accounts, there is now a new account type defined for thsi in the
    account module

closes odoo/odoo#36432

Signed-off-by: Josse Colpaert <jco@openerp.com>
2019-09-10 12:42:47 +00:00
David Beguin 3cd5107316 [ADD] website_crm_livechat : add sessions stat button on lead form view
To ease the marketing and lead follow up, a stat button about
livechat sessions of the lead (that comes from the website_visitor model)
is added to the crm.lead form view.

This button displays and redirect to a list of all the sessions
from all the visitors related to the lead.

Task ID : 2057428
PR #36180

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-09-11 14:12:07 +00:00
David Beguin 7759db881d [REF-IMP] website, website_crm : handle visitors at merge leads and readd page_views stat button on leads
In order to keep all the visitors from all the leads to merge,
the relation between leads and visitors becomes a many2many.
So that after the lead merge, a lead can have multiple visitors.

This commit re-add the page view stat button that were removed
during website_visitor introduction and page tracking refactoring.
This button counts all the pages views from all the visitors linked
tho the current lead. Clicking on it redirect to the complete
navigation history, from all visitors linked to the lead.

Task ID : 2057428
PR #36180
2019-09-11 14:12:06 +00:00
jbm-odoo 0538dc99fd [FIX] web: Widget timezone mismatch without value.
When employee try to edit his detail using my profile with empty
timezone and click on "Edit" button, it show traceback. It's coming
from the mistmatch timezone widget.

closes odoo/odoo#36593

Signed-off-by: Romain Libert (rli) <rli@odoo.com>
2019-09-10 07:26:48 +00:00
Yannick Tivisse 1a0a437855 [FIX] models.py: Don't commit after fetching a translation
Purpose
=======

When trying the translate a sql_contraint message after an integrity error
we use the current cursor in a 'with', just to make a SELECT query.

That way, the cursor is commited at the end of the with statement, trying
to commit the inconsitent state of the cursor that was the reason of the
integrity error.

Just close the cursor, as we only fetch translations from the database.

closes odoo/odoo#36458

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-09-11 09:50:09 +00:00
Yannick Tivisse 5a032bb1fc [FIX] hr_holidays: Fix misleading error message 2019-09-11 09:27:42 +00:00
Yannick Tivisse a581656b00 [FIX] models.py: Raise user friendly error message on sql constraints
Purpose
=======

On a record creation, a valid and user friendly error message is raised
when a sql constraint is violated. (Eg: 'The start date must be anterior
to the end date').

On a record modification, this is not always the case anymore, since the
latest ORM modifications.

Eg: Write on a leave with a date_from > date_to, you got the postgreSQL
error, which is not understable by a classic human.

This is due to the fact that the error is correctly catched and logged,
but the result is set into the cache, triggering the execution of computation
methods, and calling _validate_fields. It is highly probable that a flush
is done in the constraint method (search, read, ...). In that case the
postgreSQL error is converted into a ValidationError, with a stringified
version of the IntegrityError, and thus is not catched by the check wrapper.
2019-09-11 09:27:42 +00:00
RomainLibert 9759b56070 [FIX] hr_holidays: allow copy of leaves and allocations
In the case of allocations, it should simply be possible to copy them

In the case of leave requests, we want to have a "beautiful" message for
the user in case he cannot duplicate the leave request (overlapping
leave requests)
But it makes no sense to not allow at copying it in case the date_from
and date_to are actually provided
2019-09-11 09:27:42 +00:00
RomainLibert 798791c435 [FIX] hr_holidays: write on date_from change request_date_from
When writing on date_from or date_to, request_date_from and
request_date_to should also change
2019-09-11 09:27:42 +00:00
RomainLibert 72817914b5 [FIX] hr_holidays: Uniformize allocation validation for responsibles
Purpose
=======

Have the same mechanism for time off responsibles between leaves and allocations.
2019-09-11 09:27:42 +00:00
RomainLibert 653cccfd60 [FIX] web: Display event name on calendar popup instead of undefined
Purpose
=======

When you edit a Time Off Request from the dashboard. The title in the header
is undefined

https://drive.google.com/open?id=1vBg9AlVCN7rc5D6DUel8hx2uY-oOfwRs
2019-09-11 09:27:41 +00:00
RomainLibert ca06a0e6b3 [FIX] hr_holidays: reset holiday_status_id when changing employee 2019-09-11 09:27:41 +00:00
RomainLibert 5a2e8f6fee [FIX] hr_holidays: set correct domain on holiday_status_id 2019-09-11 09:27:41 +00:00
RomainLibert dbf76300f9 [FIX] hr_holidays: rename stat button 2019-09-11 09:27:41 +00:00
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