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.
closesodoo/odoo#36702
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
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
closesodoo/odoo#34799
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: Mohammed Shekha <msh@odoo.com>
The `get_wifi_essid` function was moved to the helpers file, but the
`self` argument was not removed from the function's signature.
closesodoo/odoo#36710
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
For contacts without company, it was not possible to modify the type
and set a private address
opw-1944234
Closesodoo/odoo#31491closesodoo/odoo#36701
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
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
closesodoo/odoo#36697
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
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
closesodoo/odoo#36690
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
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
closesodoo/odoo#36432
Signed-off-by: Josse Colpaert <jco@openerp.com>
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>
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
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.
closesodoo/odoo#36593
Signed-off-by: Romain Libert (rli) <rli@odoo.com>
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.
closesodoo/odoo#36458
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
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.
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
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
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
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([])`
closesodoo/odoo#36006
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
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
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.
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.
closesodoo/odoo#36670
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
Before this commit if the name of a company retrieved from lead generation is empty, there was a traceback.
Part of Task-ID: 2069155
closesodoo/odoo#36663
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
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
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
closesodoo/odoo#36634
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
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
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
closesodoo/odoo#36398
Signed-off-by: Romain Libert (rli) <rli@odoo.com>
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
closesodoo/odoo#35632
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
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.
closesodoo/odoo#36626
Signed-off-by: Romain Libert (rli) <rli@odoo.com>