Current behavior :
If we click on the icon rather than the label we got a crash
Steps to reproduce :
- Enable Online Payment and configure an acquirer and add the possibility to save the card
- Go to the Website and Log in (e.g. as `Marc Demo`)
- Go to your account (from dropdown menu > `My Account`)
- Manage you payment methods and add a new one
- Try to delete the newly added payment method by clicking on the trash icon in the button
Reason :
Currently, we rely on the `target` property of the event (triggered after clicking on the button).
The problem is that, as in this case, if a button has an HTML element as a child and we click on this child, `target` property will target the child whereas in this case we want to retrieve the button and not the child.
Using `currentTarget` property instead of `target` allows us to retrieve the button no matter what since `currentTarget` always refers to the element to which the event handler has been attached.
OPW-2660186
closesodoo/odoo#80253
X-original-commit: e8ec4fb6aa9ee4796d486a3d32e6a9a5e1382548
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Claude Thibault (thcl) <thcl@odoo.com>
Consider upgrading module 'base' on a database with millions of 'res.partner' records.
The upgrade of country and country state data makes a very costly search to reverse
the dependencies of the non-stored computed field 'contact_address', just for the sake
of invalidating its value from cache, which is most probably not present at all. The
cost of the search is so high that it may prevent from upgrading the module (timeout).
closesodoo/odoo#80251
X-original-commit: b7f9d0b7c3dfbca0f4897a650983a298da811ce1
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
This PR introduce activity_box_model to handle the activity_box component logic.
part of task-2579306
closesodoo/odoo#79993
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Before this fix, the "Track costs & revenues by project" option is missing
from the project module if both project and invoicing are installed.
Now, this setting is shown on the project module until accounting is installed,
as expected. It is then shown in the settings of the account module.
task-2695812
closesodoo/odoo#80045
Related: odoo/enterprise#22370
Related: odoo/upgrade#3051
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Steps to reproduce:
-In a database with french accounting,
- The fields cash_basis_transition_account_id and invoice_repartition_line_ids are not well configured
opw-2669061
closesodoo/odoo#80229
X-original-commit: 17b9a2046502fffd9a21d6da3fff82a7dae54256
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
Signed-off-by: Guillaume Vanleynseele <guva@odoo.com>
Purpose of this commit to improve generic UX for the project app.
So, In this commit done following changes:
- add 'subtask_effective_hours' and 'total_hours_spent' fields in the page of
subtask in task form view.
- change invisible attrs to column_invisible attrs for block_by page in task
form view.
- add 'task in progress' subtype for project.task and move 'stage changed'
subtype above 'task blocked'.
- remove the 'is_close' field and all its references from project.task.type.
- unarchive all of its tasks when the user unarchives the task stage.
- sort projects on 'is_favorite'.
- internal users following the project automatically follow its updates and
their notification preferences propagated accordingly.
- duplicating a task will duplicate all of its subtasks.
- move parent task field in extra info page of task form view.
- change the label of 'edit' to 'view' in the burger menu of project kanban view.
- user can delete task without sale_order validation error.
- add constraints for 'seller_ids' field.
- add remaining_hours_so field in task tree view.
- add unusual_days in task calendar view.
- add 'no content helper' in action of burndown chart.
task-2536044
closesodoo/odoo#74018
Related: odoo/enterprise#19880
Related: odoo/upgrade#2801
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Co-authored-by: Kartik Chavda <kcv@odoo.com>
Before this commit the "first" template key was selected by default
before the default options were being considered. Because of this,
setting a specific default template key was always ignored since a
template was already selected.
After this commit the widget keeps track of which value is actually a
default one, allowing for setting a specific default for the template
key.
task-2680578
closesodoo/odoo#80207
X-original-commit: 84130ffb5c7f728e7e61d6979d78c496c473947e
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
The project overview is a significant technical debt
as it is a custom qweb view. It is quite limited:
It is not possible to group the data, to filter on dates,
SOs or Field Service projects.
Improving this is very difficult and would require weeks
of development that are not worth it.
In any case, all the information provided by the project overview
can be found elsewhere. The stat buttons of the report are basically
duplicates of the ones from the project form view.
Therefore, we are removing this report and its twin,
the Project Costs and Revenues.
In addition, analytic items lack context for the user to understand
what generated a certain cost or revenue:
there is no link to the source document;
the entries are not categorized (e.g. it is not easy to understand
if a cost comes from a timesheet cost, a purchase order or an expense);
the billable type group by works fine for timesheets but then all
the other entries are flagged as Undefined, which is not very helpful;
there is no option to easily isolate costs from revenues.
task-2646234
See odoo/enterprise#20936closesodoo/odoo#76553
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
PURPOSE
This commit consolidates UTM usage across all applications.
Global purpose is to avoid having undesired side-effects, such as unlinking an
utm.source/utm.medium/utm.campaign and at the same time cascading the deletion
to various records without noticing.
SPECS
ALLOW MORE PEOPLE TO CLEAN UTM RECORDS
Currently, not even the system administrator can delete utm.mediums and
utm.sources (he can only delete campaigns).
These were considered as "technical records", but allowing some cleanup is
a good idea since these records are often automatically generated and can
create a lot of unnecessary noise in the database.
That's why we now allow the following groups to delete all UTM records
(sources, mediums and campaigns):
- group_system
- group_mass_mailing_user
- group_social_manager (enterprise)
PREVENT DELETION
For some use cases, removing an utm.source/utm.medium/utm.campaign would
cascade delete the related record, which was unintended / hidden side effect.
These combinations were secured by preventing to unlink:
- mailing.mailing source_id field
Trying to delete the utm.source will throw an error message
- mailing.mailing medium_id field
Trying to delete the utm.medium will throw an error message
- hr.recruitment.source source_id field
Trying to delete the utm.source will throw an error message
ADDING CLEAN ERROR MESSAGES
When trying to delete an UTM record that is linked with ondelete="restrict", we
improved the error message to give a clear explication to the user, e.g:
"You can't delete these UTM sources as they are linked to the following
mailings in the Mass Mailing APP, and deleting the source would break the
statistics: Newsletter"
SPECIFY 'ondelete' strategy
For a lot of uses of sources/mediums/campaigns, the 'ondelete' strategy was not
specified, leading to the confusion of "is this really how we want to handle
this?".
A lot of ondelete="set null" have been added in various field definitions to
ensure that this is the desired and logical strategy we want for that
specific model.
PREVENT REMOVING HARDCODED UTM RECORDS
In some functional flows, UTM records are hardcoded using their direct
record reference.
This is notably the case for the recruitment process and its creation of
aliases, and for the Email / SMS Marketing flows.
As deleting them would break these flows, we prevent their deletion in a
"api.ondelete" method.
ENFORCE NEW RULES WITH TESTS
A lot of python tests have been added to make sure we enforce the decisions
taken here above.
LINKS
ENT PR odoo/enterprise#19048
Task-2459480
closesodoo/odoo#72239
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
In this commit I provide a way for any part of the webclient to load a complete bundle of assets, JS and CSS.
The primary goal is to lazy load the complete o_spreadsheet package, including the library and all the custo that odoo includes
in it.
the endpoint /web/bundle/bundle_name will return a json structure describing the path to the JS and CSS files that have been generated by the client.
Those can then be loaded with the loadJS(...) function like any library.
The advantage of using a bundle, is that all the dependencies are respected inside that bundle.
closesodoo/odoo#76361
Task-id: 2576814
Related: odoo/enterprise#21804
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
PURPOSE
Allow sales reps to add a closing note to their lead while it is being marked
as lost. This is currently already done by a lot of sales reps but manually
with the "Log a Note" button.
SPECIFICATIONS
In ``Lost Reason`` model: add a new html field allowing to log a note on the
lost leads. Below the m2o, add an Extra Comment field where users can add a
"closing note". When the wizard is submitted, log this message as a note on
selected records.
Allow to link this feedback to the tracking done when marking as lost to have a
single message. Tracking is currently done by accumulating changes in a
structure (see ``env.cr.precommit.data`` usage with ``mail.tracking.<name>``
key). In the end those values are used to generate a message with tracking
value and a subtype. In this merge we allow to manually set a body used as a
message for the tracking message. This is used in the lost wizard to merge the
tracking and the feedback message.
Correctly name lost_reason field on lead. As this is a many2one, it should end
with an ``_id`` suffix. Otherwise we may think this is a char field, which was
probably the case at one point.
While working on tracking, rename tracking methods and clean dead code.
This should not change anything, just renaming some old code.
Task-2671709
closesodoo/odoo#78648
Related: odoo/upgrade#2944
Related: odoo/enterprise#21795
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
PURPOSE
Concatenate feedback message and tracking when marking a lead as lost. This
currently generates 2 consecutive message about the same change, having a
single one is better from an UI point of view.
SPECIFICATIONS
Allow to link a body to a value change tracking. Tracking is currently done
by accumulating changes in a structure (see ``env.cr.precommit.data`` usage
with ``mail.tracking.<name>`` key). In the end those values are used to
generate a message with tracking value and a subtype.
In this commit we allow to manually set a body used as a message for the
tracking message, adding a new ``mail.tracking.message.<name>`` key. It is
used when posting or logging the tracking message, simply propagated as body
to ``message_post`` or ``message_log``.
In crm we use this when losting a lead through the dedicated wizard. A bit
of custom html allows to have a nice display.
Task-2671709
Part-of: odoo/odoo#78648
Purpose is to have tracking methods beginning with ``_track``, indicating
those are tool methods used for tracking. It helps organizing the mail thread
file and having short but precise method names.
We also remove the usage of ``mail_track_log_only`` context key that is not
used anymore in the code. It allows to shorten a bit the code and make it
easier to read.
Task-2671709
Part-of: odoo/odoo#78648
As this is a many2one, it should end with an ``_id`` suffix. Otherwise we
may think this is a char field, which was probably the case at one point.
Task-2671709
Part-of: odoo/odoo#78648
PURPOSE
Allow sales reps to add a closing note to their lead while it is being marked
as lost. This is currently already done by a lot of sales reps but manually
with the "Log a Note" button.
SPECIFICATIONS
In ``Lost Reason`` model: add a new html field allowing to log a note on the
lost leads. Below the m2o, add an Extra Comment field where users can add a
"closing note". When the wizard is submitted, log this message as a note on
selected records.
Add tests, allowing to test both the wizard and this new feature.
Task-2671709
Part-of: odoo/odoo#78648
Tracking is generated using commit hooks, meaning they are really sent when
the commit ends. This is done to ease values aggregation and accumulation
through various record updates. In some tests we therefore have to manually
flush the tracking, otherwise it is not created and posted. Notably tests about
lead lost wizard were not flushing and therefore not generated the tracking
messages. Those tests will be improved in future commits, cleaning them is
therefore a necessary step.
We also specifically add some tracking flush in mail performance tests. This
is to be sure we measure impact of a write and tracking separately from
previous transactions. Seems everything is working as intended as warmup and
query counters already perform flushes. Here we simply flush at the end
of the setup to be sure all base is clean before starting tests.
Task-2671709
Part-of: odoo/odoo#78648
PURPOSE
Improve eLearning list views and settings UI. Better split standard views from
reporting views.
SPECIFICATIONS
- Lighten the "operational" list views which should not be cluttered with a ton of KPIs.
Keep those for the reporting views (which in turn need to display some data).
- Reorder settings options for a better cleanup.
See sub commits for more details about the changes.
Task-2607467
closesodoo/odoo#76930
Related: odoo/enterprise#22072
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit improves the list view of the contents under reporting menu
to make it simpler. Since we don't want to allow multi-edit here this commit
adds a different list view for reporting and binds it with the action.
Also, the action now excludes the sections from the result, and applies
default filter to see 'Published' content while landing as other content will
probably have no interesting statistics.
Also added float time widget for `completion_time` field.
TaskID-2607467
Part-of: odoo/odoo#76930
This commit makes the reporting courses list view simpler, which now has
following fields:
- name
- user_id
- total_views (updated string to `# Views`)
- rating_avg_stars (updated string to `Average Review`)
- total_time (displays total)
- members_count (displays total and updated string to `# Attendees`)
- members_done_count (displays total and updated string to `# Completed`)
- product_sale_revenues (added from website_sale_slides with monetary widget)
This commit also adds a 'Published' filter to course search view
which is applied by default in report action for the courses.
TaskID-2607467
Part-of: odoo/odoo#76930
This commit improves forums and forum posts list views. The changes are listed
below.
Forums list view:
- optional hidden `total_answers` and `total_favorites`
- added `slide_channel_id` and `visibility` fields
- added sum for `total_posts` and `total_views`
Forum posts list view:
- added badge widget on `state` field for better decoration
- added sum for `views` and `child_count`, updated their label to
'# Views' and '# Answers'
- removed `favourite_count` field
- moved `website_id` field at last as optional hidden
- added title for the demo data in which title was missing.
TaskID-2607467
Part-of: odoo/odoo#76930
This commit improves the survey list view in eLearning certifications to make
it simpler. This is done through a new primary view, inheriting from the base
one in order to keep changes localized. The main changes are:
- removed the trophy icon from 'Certification' button as each of them
here are certificates only
- improved string of `title` field to 'Certification Title'
- added `user_id` field with many2one_avatar_user widget after `title`
in the base tree view (survey.survey_tree)
- updated strings from 'Success Ratio' and 'Avg Score %' to
'Success Ratio (%)' and 'Avg Score (%)'.
- moved `answer_done_count` field after `answer_duration_avg`
- removed the field `answer_count`
- added float time widget to the field `answer_duration_avg`
in the base tree view (survey.survey_tree).
TaskID-2607467
Part-of: odoo/odoo#76930
This commit makes the content list view simpler, which now has following fields
- name
- channel_id
- category_id (optional, default hidden)
- user_id (with "many2one_avatar_user" widget)
- is_published
- date_published
- completion_time (displays total and added float time widget)
Note that the view is now multi-edit, but we only want to update 'user_id' and
'is_published' fields in batch. So all other fields are readonly.
We have removed tracking from `date_published`, `website_published` field and
added tracking for `is_published` field. This information is sufficient.
TaskID-2607467
Part-of: odoo/odoo#76930
This commit makes the course list view multi-edit (except 'name' field)
and moves the 'website_id' next to 'user_id'.
In form view: inside options page we have moved `enroll_msg` under to
`enroll_group_ids` to have all enroll options well displayed.
TaskID-2607467
Part-of: odoo/odoo#76930
- Create a partner with 2 bank accounts: BNK1 and BNK2
Wrong flow with vendor bill:
- Create an vendor bill => BNK1 is set by default
- Change BNK1 to BNK2
- Register a payment
=> BNK1 is proposed by default instead of BNK2
Wrong flow with customer invoice:
- Set BNK3 on your company
- Create a customer invoice
- Register a payment
=> BNK1 is suggested instead of BNK3
closesodoo/odoo#80175
Issue: 2683197
X-original-commit: ec0d807b2b6ff3596d9b591bd8ec7d8889d41d8a
Signed-off-by: Olivier Colson <oco@odoo.com>
Signed-off-by: Laurent Smet <las@openerp.com>
The commit 3862d5aae1df72d3585f915e8a2a2626322e74ad has changed the class
set on the root node of the graph renderer but has not adapted a css rule
used in the board app to ensure that the graph views have the correct
height. We fix that situation.
closesodoo/odoo#80047
X-original-commit: b08bc57d5ba2e0da17a452189d584574fb2f9832
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
Since 40f1ae87e1436192a70a8a7432eb72d379cfa6dc, a view added to the board application would not
have the correct domain:
- the action domain was not kept in the saved domain
- the saved domain was kept dynamic, leading to possible crashes
e.g. a condition like ("user_id", "=", uid) in the saved domain
would make crash the dashboard app.
We fix the problem and add a test.
X-original-commit: 7e77bb74bfa1bfef92c6d385dedc2d89e0040780
Part-of: odoo/odoo#80047
During the refactoring of the legacy control panel done in d679cd0d8ba9a2420e81a42a698763e9be2327e1,
the method "_addToBoard" was renamed as "addToBoard", but a call to _addToBoard
was left, breaking the keyboard navigation. We fix that situation.
X-original-commit: 6aa10e8c9118eba3c19563431c57912108fe12b9
Part-of: odoo/odoo#80047
Before this commit, picking a range of dates by clicking on
the end date field set the wrong date on the start date field.
This was because the option "related_end_date" was used
on the end date field instead of "related_start_date"
Replacing the "related_end_date" by "related_start_date"
on the end date field fixes the issue.
closesodoo/odoo#79997
X-original-commit: 8402e55e0db474ee64e641866d8c76302fb1ef4e
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
The state value 'open' does not exist on model account.invoice.report
opw:2666887
closesodoo/odoo#80206
X-original-commit: 2e7c667f56f84c9bd516711685ca886ff25a5965
Signed-off-by: William André (wan) <wan@odoo.com>
As an HR officer, when you create an allocation of one day for a user,
you need to be able to put a time off on that person, following the allocation.
But for the moment, we got an error saying there is no valid allocation on that day.
If you create an allocation of 1 day, you need to be able to put a time off on
that specific day without any error message.
task-2696771
closesodoo/odoo#80196
X-original-commit: 60f691bbac660d47404b35242303288880f084f7
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Before this commit, since we promote the use of route without trailing / for
best SEO (fee0113), we remove the trailing / during a redirect to avoid an
extra request.
Unfortunately, it will break some route with trailing / in case of multi lang.
So we remove this optimization, it will increase potentially number of http
request before to get the final url, but it will allow to continue to support
trailing slash in v15.
This commit partially revert the commit ae35117
closesodoo/odoo#80191
X-original-commit: 84d2f5b57ccf3dbcefebdbc795ab1872bc1504b9
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Reproduce :
- Install modules Purchase, Accounting, Project, Sales Timesheet
- In Accounting settings, activate option Analytic Account
- Create a Project and link it with an Analytic Account
- Create a PO then Vendor Bill with this Analytic Account
- Check the Overview for the Project associated with that Analytic Account
- The amount of the bill will show in the "Other Costs" field of the Profitability section
- Go back and add a Credit Note for the vendor bill
Issue :
- The amount of the PO still shows in the "Other Costs" section, where it is expected to be balanced (zeroed) by the Credit Note.
Solution :
- Don't take into account the Vendor Bills for whioch a Credit Note exists.
opw-2527655
closesodoo/odoo#80187
X-original-commit: 848f71f22d50d443adfa7c5544e48d25e80dabd9
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Whenever the qweb plugin modified the dom for rendering purposes,
the mutations were observed but shouldn't. The reason was that the
reference to the editor was missing in the plugin and therfore it did
not call `observerUnactive` and `observerActive`.
Task-2695658
closesodoo/odoo#80182
X-original-commit: e973526ffe6deba778a613eb4053ba3017f9fb00
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Before this commit, going to a form view using the breadcrumb menu did
not retrieve the record id. The record id was not present in the url.
So, if you reloaded the page, the record was not displayed anymore.
closesodoo/odoo#80174
X-original-commit: 3eeaa6b1c6f54be9a87e67140ab57fe8f3a61407
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Steps to reproduce:
- Create a journal with a custom currency
- Create a statement line
- Create a reconciliation model button putting the residual to a random account
- Reconcile the statement line using the button
=> The amount lands inside the debit/credit instead of amount_currency
Introduced by:
https://github.com/odoo/odoo/commit/5ad660877f485d741a0120e07eb73178f59d2dfc#closesodoo/odoo#80173
X-original-commit: fc9b8dc6611d761f2c8778254dcbad52091404dc
Signed-off-by: Olivier Colson <oco@odoo.com>
Signed-off-by: Laurent Smet <las@openerp.com>
- Use fully qualified column names to avoid ambiguities.
- Remove the useless usage of `row_number()`. The ID of the timeoff can
act as ID. It also allow the removal of the `ORDER BY` clause which
accelerate the query execution
- Correctly compute the timezone. Gettting the timezone of the current
user at build time led to invalid data.
closesodoo/odoo#80172
X-original-commit: fed5b8e4ebafd4002d66d1c748ea4e2b2f650f21
Signed-off-by: Christophe Simonis <chs@odoo.com>
Co-authored-by: Christophe Simonis <chs@odoo.com>
In one week, this test failed about 4 times, seems mainly on nightly
enterprise. Let us update counter accordingly.
closesodoo/odoo#80164
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
On large databases, the `postcommit` hook for Google|Microsoft Calendar
was taking up to 10% of a leave validation even if the user has the sync
disabled.
This commit disables the postcommit hook for new leaves, as the event will
be synced through the cron eventually.
closesodoo/odoo#80160
Taskid: 2693265
X-original-commit: 88884292e105eab2c36b2a334c617ac4978fa79c
Signed-off-by: Arnaud Joset <arj@odoo.com>
Signed-off-by: Kevin Baptiste <kba@odoo.com>
The `ir_import_module` module is used by users to upload custom module
data via a zip file. The zip file can contain xml data, xml views and
static files.
Before this commit, the "import module" feature of this module was
broken since the imported module's manifest was lost after the import
was performed.
Now, 'ir.asset' records are created along with the attachments pointing
to the imported static files.
closesodoo/odoo#80120
X-original-commit: ec77577796e72707fbb2077f05067428cebc3c7f
Signed-off-by: Julien Castiaux <juc@odoo.com>
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
Steps to reproduce the problem:
- Create a storable product tracked by a unique serial number.
- use the product in a delivery
- try to print the "Picking Operations" document
Problem:
Traceback is triggered because we cannot use two fields in a "t-field"
opw-2692226
closesodoo/odoo#80140
X-original-commit: f478c9f48bc4f8adc0f455df1795de9672a40b78
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
Steps to reproduce the bug:
- Create a BOM:
- set the quantity of the finished product and component as more than 1
- save > print > BOM Structure
Problem:
The report generated shows the qty and cost for production of 1 unit of product, regardless of the BOM quantity
opw-2691632
closesodoo/odoo#80145
X-original-commit: d08b0abd56a04a23e155b345bf1796a031321f2f
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
Steps to reproduce the issue:
- Install "eCommerce" module
- Create 2 attributes with 'Variants Creation Mode' is Never and
one of them should have at least 2 values.
- Create a product and add the two attributes as variants and
one of them should have at least one value
- Go to configure variant and select the first attribute and
exclude one or more values from the second variant
- Go to the website and change the variant to a value from the one
you excluded and add to the cart directly (you should be fast).
Issue:
Product with a not possible combination is added to cart.
Cause:
Not checking if the combination is possible before adding to cart.
Solution:
When adding product to cart, if element with class
".js_add_cart_variants" is present and have children,
trigger _getCombinationInfo to retrieve last combination info,
then add it only if the combination is possible.
opw-2569109
closesodoo/odoo#80134
X-original-commit: 7667d4ea32f758d062d0a0820dfc5bd6d0d084b4
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Nasreddin Boulif (bon) <bon@odoo.com>
The fields `employee_type` and `user_id` were not properly replaced in
the view.
closesodoo/odoo#80130
Taskid: 2694143
X-original-commit: 4d4309507911ae2440d4989df364c292ca285652
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Kevin Baptiste <kba@odoo.com>
*: web_editor, website_sale
This commit adds the abibility to get an image thumbnail based on the
video provider URL and to avoid duplicating the regexes. It also
improves those URL regexes.
All the regexes are kept in a python tools file and are called in JS
using an RPC.
task-2154812
closesodoo/odoo#44537
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: ras-odoo <ras@odoo.com>
Co-authored-by: bbh-odoo <bbh@odoo.com>
The use-case that motivated this fix is the deletion of a project task
with many subtasks. The field 'project_id' on tasks is recursively
computed, and some automated action must be executed when its value
corresponds to a given project.
The issue occurs when the domain of automated actions is evaluated by
method search(), because the latter flushes the fields to search on,
which are also the ones being recomputed. Combined with the fact that
recursive fields are not computed in batch, this leads to a huge amount
of recursive calls between the automated action and flush().
The execution of task.unlink() looks like this:
- mark 'project_id' to compute on subtasks
- delete task
- flush()
- recompute 'project_id' on subtask1
- call compute on subtask1
- in action, search([('id', 'in', subtask1.ids), ('project_id', '=', pid)])
- flush(['id', 'project_id'])
- recompute 'project_id' on subtask2
- call compute on subtask2
- in action, search([('id', 'in', subtask2.ids), ('project_id', '=', pid)])
- flush(['id', 'project_id'])
- recompute 'project_id' on subtask3
- call compute on subtask3
- in action, search([('id', 'in', subtask3.ids), ('project_id', '=', pid)])
- flush(['id', 'project_id'])
- recompute 'project_id' on subtask4
...
closesodoo/odoo#80141
X-original-commit: e2788b580ef15ef3083ac919737a46d850143832
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>