Before this commit, the design of the agenda was broken on Firefox, as the
'height: 0' property on td was ignored in Chrome and not in Firefox.
Probably a remnant that was not removed.
After this commit, both browser are displaying the same design.
Task ID: 2337855
closesodoo/odoo#57671
X-original-commit: c6c2dc41f818ebc30dca1682e5e2a8305dda2c67
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: David Beguin <dbeguin@users.noreply.github.com>
Co-authored-by: edi-odoo <edi@odoo.com>
Setting a lead to won or lost should not impact others leads' probability
until they are modified.
Tests have been added to ensure that.
Task ID: 2254543
closesodoo/odoo#57681
X-original-commit: 7edc12e366659d226d56197e09bd65d17c80bd2f
Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
Signed-off-by: David Beguin <dbeguin@users.noreply.github.com>
Purpose
=======
Get rid of the cron.
Always have an up to date frequency table to compute lead probability.
Clean PLS code and ensure to remove unnecessary code
Specifications
==============
Disable the cron:
- Increment won and lost count for lead PLS params from frequency table at
each won/lost
- The complete set of leads won't be recomputed anymore every day
- A lead probability will only be recomputed if one of the PLS parameter will
be modified (stage_id, team_id + the ones checked in settings)
- No more onboarding phase : as frequency table is always up to date and only
the modified leads are recomputed, we can drop this. (So even on onboarding,
winning or losing a lead won't impact other leads, except the ones we modify
manually afterwards)
- Add an button to force the recompute of all the lead probabilities
(kind of reset) in the settings.
The cron has been disabled by default.
Users can know choose to reactivate it if they want to continue updating their
lead probabilities on a daily basis.
Code have been reorganised for better structure and understanding.
Some code parts have been factorised to be usable in both Live Increment and
Full Rebuild mode.
In this commit, we also update probabilities using only computes
Before this commit, _update_probability was called during write and create,
to ensure both probability and automated_probability were correct. That was
necessary because of onchanges and readonly field (automated_probability
was not given to the write method while saving after a change on the lead).
After this commit, we use the force_save tag on the readonly field
automated_probability. So we ensure that write always receives the new
automated_probability value and everything can be handled directly by the
compute. Also, we force the lead to start in automated probability mode.
So when creating a new lead, both probability and automated probability are
computed and aligned.
Finally, when winning a lead, we ensure that both probabilities are aligned
(=100), so that if user take the lead back to a previous stage, the
probabilities are correctly recomputed, and the lead will not be stuck to
100%.
Also, this commit applies some fix and minor changes listed here under:
- Ensure to have always positive frequencies
- Fix lost counts for team not set in pls computation
- optimise set_won : write only once per values
Finally, include tag in frequency table even if less than 50 occurences:
Due to refactoring in which we increment frequency table at each won/lost
instead of rebuilding the frequency table each day, the tags are never added
in frequency table.
This is due to the 50 occurence conditions that avoid to create the frequency
if we have less than 50 won or lost for a tag.
After this commit, we include the tag_ids in the frequency table, no matter
the number of occurences. But, during the PLS computation, we skip the tag
frequencies if the number of occurences for this tag is under 50.
This allows to have a complete vision on the tag frequencies, even for
small number of occurences.
Task ID : 2254543
X-original-commit: cd291b79eb2d2df80899867263ec71438ab8fe87
Column mappings are updated in-place, if multiple users are importing records
of the same model at the same time, this will trigger concurrency errors.
This is made worse by the error only being reported on commit (after having
processed the entire import) and being retried automatically, so it slows down
the user and the entire system, the more concurrent imports the slower.
Log except:
INFO dbname odoo.addons.base_import.models.base_import: done
ERROR dbname odoo.sql_db: bad query: UPDATE "base_import_mapping" SET "field_name"='name',"write_uid"=%s,"write_date"=(now() at time zone 'UTC') WHERE id IN (%s)
ERROR: could not serialize access due to concurrent update
INFO dbname odoo.service.model: SERIALIZATION_FAILURE, retry 1/5 in 0.8720 sec...
closesodoo/odoo#57655
X-original-commit: 3f5e9ca625b53021c100245f5786bda4069974ad
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
before this commit, when selectioning the snippet with an invalid API
key, a traceback was triggered and the snippet was destroyed.
task-2338730
closesodoo/odoo#57689
X-original-commit: 2c5b0c6b915546ccdac2ed4248f24a4e691fadd1
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Currently, In the time off module when we try to open time off
activity from systray view it will open the wrong form view
so it shows the "Save" and "discard" button in the footer.
So in this commit, Fix it by changing the priority of primary
view which is only used for creating new timeoff from dashboard.
closesodoo/odoo#57578
Task-id: 2329080
X-original-commit: 2154e742418b6a2ff87f120d0338bc30b3d4b4dd
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
currently, whenever the view is change the picture zoomed in
and still displayed, only disappears after having refreshed the page
so, in this commit the employee picture should no longer to be
zoomed in whenever change the view
closesodoo/odoo#57576
Taskid: 2311308
X-original-commit: 8214332ccd86e52c4f18de8d5428a1a22f2ad21c
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
* Prior to this commit, images were only managed when being an image
field. No widget were used either.
* After this commit, image stored in model as url (as res.country.image_url)
can be used when specifying ':image' after the field name. The fields are
now rendered using their corresponding default widget. If there is a need
to force another widget and if the developer is sure that it is compatible,
he/she can specify it using the notation: 'field_name:widget_name'.
closesodoo/odoo#57645
X-original-commit: 18d4e3327c7152b4c3a86ba377e3357f213b703c
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
- Go to CRM > Settings and activate Leads
- Go to CRM > Leads and create 2 Leads with a different phone number
- Select the 2 created Leads and in Action menu, select Send email
- Make sure that "Lead/Opportunity: Mass Mail" is selected as template
- Send it
- Go to Contacts
2 Contacts have been created from the Leads, but both have the same phone number.
The issue comes from the override `default_get` of `res.partner` in crm module.
It is using `active_id` from context to fetch the Lead to populate Partner data.
This cannot work when several Leads are selected as the same `active_id` is used
for all of them.
opw-2333819
closesodoo/odoo#57638
X-original-commit: a84dcfb9475051082c6103f81bfa231ea50ed157
Signed-off-by: Anh Thao PHAM <kitan191@users.noreply.github.com>
There's absolutely no need to load it on every page of the website. It
probably doesn't even need to be cached on the JS side given it's used
in all of 3 actions of the portal user's security page.
Reported by jke.
Also remove leftover console.log call while at it.
closesodoo/odoo#57636
X-original-commit: 00c1c9a7258cf53f1a40938e3a928151b188de64
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
For the graph views based on reporting models (e.g sale.report), click
on a group in the chart redirects the user to an "empty" list view. Here
we use the attribute disable_linking to avoid that redirection for those
views.
Task ID: 2336960
closesodoo/odoo#57622
X-original-commit: 0b0ae92b6bdac25843ba24d767dbcab3b75703e5
Related: odoo/enterprise#13192
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Task 2297165
Set the payment reference standard to the one of the country of the
company by default.
The module l10n_be_invoice_bba has been merged into l10n_be as it was
auto_installed, it will not be problematic not being able to uninstall
it, and the order of installation of modules made it so that the
journals were created before l10n_be_invoice_bba was installed. This
caused the value to be set to 'odoo' on a fresh database instead of 'be'
For terms different than es
closesodoo/odoo#57550
X-original-commit: cb8e12aeda19373764fd01971aa9f7b24aef866c
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Some payments were 0.01€ lower on the payment terminal compared to the
amount showing in the POS.
closesodoo/odoo#57547
X-original-commit: 3fd0822f42c1a9dbe5b786a3a767da969431ddaa
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
Signed-off-by: Antoine Prieëls <aprieels@users.noreply.github.com>
* Prior to this commit, when starting to drag a new snippet from
the left panel, the auto scroll feature was triggered if the
snippet was one of the top or bottom ones.
* After this commit, the auto scroll feature will be disabled from
the left panel.
task-2307404
closesodoo/odoo#57449
X-original-commit: f1f48cdaab3dd7847e8546ad9887f24a9e2ed4c1
Related: odoo/enterprise#13139
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
We make request to iot-proxy.odoo.com every 10 secondes
while 5 minutes.
But we have a traceback if we don't have a internet connection.
So we put a 'try except' to catch error
Related 841c016913a8
closesodoo/odoo#57567
X-original-commit: 3227490e270a1f5b98ef7811edca59e9aa1b6b55
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
When purchasing a product through the e-commerce using product configurator
features such as custom attribute values, the computed product description
containing the selected values could be broken when using special values.
This commit fixes the description building by using proper DOM manipulation.
Task 2337859
closesodoo/odoo#57583
X-original-commit: c9c260553b991d97dedeed5e7027a4fca78afcea
Signed-off-by: awa-odoo <awa-odoo@users.noreply.github.com>
This commit makes it easy to generate a tour depending on a theme.
As each theme will have different tour which will recreate
the theme preview, this feature is able to create all of them.
task-2172208
X-original-commit: 6de336990d8eb1667eefcc93701dd519cec7e16c
Do not auto open the media dialog after the drop if there are images in
snippets images wall and images gallery.
task-2312878
X-original-commit: ab2dacbb844b36793df891a844e89482cf12f14e
After dropping a snippet. Scroll to this snippet if it is not an inner
snippet and if it is not dropped in a modal.
task-2332641
X-original-commit: 3385cad238a4e242e7d58827066498f07b8c626f
OptionId was previously based on data-js name. But if an option has no js
the classname was snippet-option-undefined, now we fallback on data-option-name
to have a right name, and be easily selectable by theme tour.
X-original-commit: 7b0a147cd43e8e890ebe5a882292a69a5c8c90ac
Now we only support tour in edit mode already.
We win a click on onboarding., and after the install of a theme
It avoid to have 2 tips on the same page that can be confusing
X-original-commit: 347b5ab3cfb5ebcef7c074f4a65223df0e349f2a
This commit redirect the user to the website in the edit mode once a theme has
been selected.
task-2172208
X-original-commit: f474eac4543712ae5b1c7d614f9eff9367445107
This commit add a button in a step to be able to consume it.
It allows to have optional steps that the user can skip.
Part of https://github.com/odoo/odoo/pull/44328
task-2172208
X-original-commit: 27158a0f612897e41601bf9e9d20861e9b87279f
Now that we will write tour by theme, this part is useless.
We just keep the old steps that will be not covered by future theme tour.
task-2172208
X-original-commit: 02e1b1f659d5f588cc4e52f48217f8e2c7771ad4
When the width and quality option for images was moved from the
optimize-dialog to the left-panel, it was made available on all image
types. However, width and quality options don't make sense on SVGs and
would break animated gifs. This commit makes it so that quality options
are only available on JPEG and PNG images.
closesodoo/odoo#57564
X-original-commit: 315be6f4765268eada4b39a637136c86a30720eb
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Since #43306, transient models now requires access rights.
Also fixes a little error: transient models can also refer to regular
records through m2m fields
closesodoo/odoo#57559
X-original-commit: 9106ff0e8c63accf54db2dd6ddfaf62479ded784
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
For Odoo Fin purpose:
When you click on Synchronize Now, you get a traceback.
This traceback comes from the "_get_journal_bank_account_balance"
method which performs a "self._cr.execute(...)" and a "self._cr.fetchone()".
However, it is possible that the orm may invalidate the whole
thing in the meantime because other calls are made.
This fix corrects this by grouping the "execute" of the "fetchone".
closesodoo/odoo#57555
X-original-commit: 7ab664bd8be72add3591895ef058afe7a1a9147e
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Before this commit:
The field `planned_hours` and `subtask_planned_hours` are present
twice. This causes problems with widget: different widgets are put
on different fields, but only the last on was put on all of them.
Code to edit label with hours/days is not flexible, we need to
write each possibilities.
After this commit:
All fields are present only once in the view. A new widget is
created to manage days with a factor. In this new widget, instead
of having a toggle button, we can insert a float.
When the widget timesheet_uom is set on a field, we modify his string
with hours/days.
closesodoo/odoo#57557
Taskid: 2326216
X-original-commit: 5b3804402b3ebee5abe7004b8f8caccadaabfe1e
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
This commit fixes 2 design issues regarding the Exhibitors logo in
- Rounded-circle on logos crops and can hide some part of the partner's logo:
- Remove rounded-circle property
- Bg-light behind non-transparent bg logos:
- Remove to have all logos on white background.
Task ID: 2337738
closesodoo/odoo#57542
X-original-commit: b56a4f27bc35108bbf4240714f994f670e91ae69
Signed-off-by: awa-odoo <awa-odoo@users.noreply.github.com>
Signed-off-by: David Beguin <dbeguin@users.noreply.github.com>
Usecase to reproduce:
- Create a Product A with a supplier.
- Put 10 in stock
- Create a RR with min 5 and max 10
- Create a SO for 7 products and confirm it
The RFQ is not created.
It happens because the trigger scheduler is set on picking
action_confirm. Not on move _action_confirm to avoid performance issue.
However a SO will launch procurement rules that will create moves
and confirm them. But it will never call action_confirm on the picking
itself and thus never trigger the scheduler.
closesodoo/odoo#57540
X-original-commit: 08af6a3f663abb49d2e77c706e85118a7199ef89
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
The customer display could not be loaded when no order was set.
(e.g. While showing the floor plan in pos_restaurant)
closesodoo/odoo#57531
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
As modules present on the IoT Box might change between versions of
Odoo, we want to load all of the modules present on the box as
server-wide modules (see odoo/odoo#57176).
This means that the point_of_sale module might also be loaded, even if
it's empty. To make sure that it doesn't crash when the IoT Box starts,
we need to have an empty `{}` in the `__manifest__.py`.
closesodoo/odoo#57527
X-original-commit: 154a99129e77c0220f6720318834787369c4f573
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
Signed-off-by: Antoine Prieëls <aprieels@users.noreply.github.com>
The callbacks system is not re-entrant: because we were only clearing
the callbacks after having executed them all, if one of the
post-commit callbacks commits then all the callbacks will get
re-executed (including the one which commits). Which at best can lead
to odd effects & data corruption and at worst crashing the software
because we're overflowing the stack (or maybe the other way around,
hard-crashing might be a better idea than unexpectedly calling the
same functions multiple times).
By popping the callbacks before executing them, we ensure that each
one will only get called once (unless it's explicitely re-pushed on
the stack).
closesodoo/odoo#57516
X-original-commit: 4257be4d771605ecd972bd5b04cb9c0f1163b455
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Before this commit, when discounts were enabled (through Sales >
Settings), they appeared on the Sale Orders but not in the corresponding
Invoice form view. Debug mode was required to see it among the form's
fields.
This commit fixes it by aligning with the Sale Order behaviour and
properly display the `discount` field in the form view (when the setting
is enabled) without relying on the debug mode.
BTW, on mobile there was no way to see the discount as it was only
visible in the list view... which is replaced by the kanban on small
screens. So this commit makes it available on mobile.
opw-2325978
closesodoo/odoo#57499
X-original-commit: 0ad60024c326adc7e25c71eaad2f9eccab26ee99
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Signed-off-by: Pierre Paridans <pparidans@users.noreply.github.com>
Step to reproduce the bug:
- Have more than 100 users
- Have CRM installed
- Go to CRM > Configuration > Activity Types > Create
Bug:
The Default User selection only displays the 100 first users
opw:2330339
closesodoo/odoo#57455
X-original-commit: 75eef2506ba415d3e2be5ac3c14029bba3ed26d0
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Prupose of the task is, if the user misclicks on the 'start' button to
launch the timer, he doesn't have any option to discard the timer.
So in this commit , added a 'delete' button so user can stop the timer
from wizard.
closesodoo/odoo#57316
Taskid: 2334036
Related: odoo/enterprise#13072
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>