When journals of type bank are created, default accounts are also
created, and an account code is automatically generated. However, the
number of possible automatic account codes is very limited, because only
100 different codes may be generated, and the error message "Cannot
generate an unused account code" is shown.
To solve the above, the number of possible account codes is raised up to
10,000 different possibilities.
closesodoo/odoo#31681
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
When register a payment, and choosing a payment acquired.
Before this commit, the payment post process had to wait until a cron
run (every 10 minutes).
Now, The post process is executed instantly after the payment, if the
payment is not yet done, the post process will be executed in the next
cron run.
Co-authored-by: Toufik Benjaa <tbe@odoo.com>
opw-1928834
closesodoo/odoo#31732
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
vals may be an empty dict
This may happen a write is done on a computed field, the call to _write will
be empty (still needed to update write_uid/date).
Before this commit, all fields were read in the read call.
This was unecessary and may produce acess-rights errors or other side effect
(e.g. in odoo/enterprise#3778 the technical field ticket_count was read, even
if not present in the view or the write call)
Only compute old_values on the fields that are modified
Fixesodoo/enterprise#3778
opw-1949911
closesodoo/odoo#31737
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
If the content is too long, it overflows badly.
Since the height is fixed, the flex doesn't work well.
opw 1924145
closesodoo/odoo#31717
Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
In case company is not set on the model related to the template,
we should not try to retrieve it when creating the associated partner.
Fine-tuning of a46138cb01
opw-1947334
closesodoo/odoo#31607
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
When creating a cart on the website, the website company was not
considered which could end up with the selection of a fiscal position
linked to a wrong company since the method is called in sudo.
closesodoo/odoo#31673
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
This widget does not exist anymore since the merge between the all widgets
(new view refactoring).
closesodoo/odoo#31643
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Before 11.0 the kanban view used to have its own widget registry. It is not the
case anymore, but there are still leftovers from the past. For example, the
widget `kanban_label_selection` is still used in many views, even though it is
now called `label_selection`.
As we are in a stable version, a fallback has been added for it in the field
registry.
Similar to odoo/odoo@5401c15Closesodoo/odoo#30904Closesodoo/odoo#25928
The departments being already rendered according to the hierarchy,
only the name of the department should be displayed (e.g. 'Direct
Sales' instead of 'Sales / Direct Sales'.
closesodoo/odoo#31353
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
When a slide is seen by user, it should be marked as completed
(according to its type), and the user completion for the course
is updated. But for public user, we don't want those RPC calls
to be done, as completion for visitor makes no sense.
This commit also hide progressbar when current user is public.
Task-1942852
closesodoo/odoo#31700
Signed-off-by: Jérome Maes (jem) <jem@openerp.com>
This commit makes the 'Fullscreen' page a complete odoo
widgets. We decided to split it into some sub widget:
- Fullscreen: will be the master piece, handle communication of
components, displaying slide content, setting slide as completed,
handling server RPC calls, ....
- Sidebar: responsible for slide navigation, based on the table of
content. (prev, next, keyboard naviguation, ...)
- VideoPlayer: display content for Youtube video and handling player
event to auto set as completed, ...
The DOM of this page is still rendered serverside. DOM was cleaned in
order to be less complex and less deep. CSS style was also reviewed
to decrease line of code.
Fullscreen is now completely using Quiz widget with events triggered.
Task-1942852
Commit ef03db9ed added back the reset_templates functionality and some tests in
Odoo 12.0.
Commit fcb972db9 skipped one of the tests in Odoo saas-12.2 as there was a race
condition (new editor).
Commit 7c045dda0a fixed the race condition in Odoo 12.0 even if the error never
showed, it was safer.
Now that the fix got forward-ported to Odoo saas-12.2, we can add back the
skipped test.
closesodoo/odoo#31780
Signed-off-by: Christophe Simonis <chs@odoo.com>
Purpose
======
This merge implies several small tweaks on the survey views, mainly to add support for the new certification fields.
Show the quizz_passed field in the answers views
-------------------------------------------------------------------
The quizz_passed field is now more important because it determines whether
a certification has been successfully taken or not.
The quizz_passed field is added in:
- The search view of user_input
- The list view of user_input
- The form view of user_input (along with the score)
Fix survey statistics computation
-------------------------------------------
Fix the shared dict in the survey statistics computation that
causes surveys to incorrectly share the same stats when computed in batch.
Add a stat button on survey to show the certified count
------------------------------------------------------------------------
Add a stat button on the survey form view showing the amount
of answers with the quizz_passed field set to True.
It allows to quickly see people that have been granted the certification.
On click, the stat button redirects to the answers list view with the "Quizz passed"
filter defaulted to True.
Task-1936539
closesodoo/odoo#31467
Signed-off-by: Jérome Maes (jem) <jem@openerp.com>
- The fetch of recently/most clicked links was not working due to the
fact that the widget handling this feature had not parent, thus not
having access to ajax.rpc to make rpc calls.
closesodoo/odoo#31712
Signed-off-by: Christophe Simonis <chs@odoo.com>
Information was already present, let us use it instead of having access issues
on membership.
Commit linked to task ID 1941250 and PR #31708.
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
When displaying a channel content all its slides are displayed in a
list view or cards view. Even slides current user cannot read because
he is not member of the channel are displayed, even if there is no link
(and access rights prevent them for effectively accessing the slide).
Purpose is to display a channel content without giving access through
ACLS at its slides.
However this domain computation was not correctly matching real use case
* publishers should see everything;
* public users should not see unpublished slides;
* members not publishers should not see unpublished slides unless they
uploaded it;
Commit linked to task ID 1941250 and PR #31708.
Purpose of this commit is to have a method allowing to fetch slides
and have them ordered by category with some info on the category. It
fully supports uncategorized slides.
This commit also fixes the lessons list view of a training course. When
having rights to edit the channel the category name was not editable.
We now use a real browse record allowing to edit the category names
directly in this reorderable list view.
Commit linked to task ID 1941250 and PR #31708 .
Display
* improve color of trophy displayed on top of course main page (success if
course done, warning while working on it);
* correctly fetch and display karma/xp points on course lesson list. It is
either gain of next try, either awarded points depending on slide
completion;
* fix control buttons in course main page (prev, next, set done,
set completed, fullscren), notably correctly set them disabled;
Linting / Code
* put demo in no update;
* rename some parameter in website_slides_survey to avoid conflict between
quiz (on a slide) and certification (a survey);
Commit linked to task ID 1941250 and PR #31697.
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
In order to se the 'next rank card' and the user karma on user's profile page,
not only the first rank is needed but also higher ranks. Otherwise everyone
will be 'Newbie', even the admin.
Moreover it is easier to update existing data for things like rank than having
to figure out how it works.
Task ID : 1941250
PR #31697
This commit sets the completed flag to True for a slide of type certification
when this certification is succeeded (quizz_passed set to True).
Also, the Download certification button has been added to the fullscreen mode
if the certification is passed by the user.
Task ID : 1941250
PR #31697
If there are too much users to show on the page and to avoid performance
issues, a pager is now applied on the all users page.
A new pager based on website_pager is added in order to ease the navigation
through the potential high number of pages. 'Go to first page' and 'Go to last
page' buttons have been added and the design of the pager have been adapted
to be more integrated into the new eLearning platform.
Also add the pager on the slide page if search category is applied. The pager
was already computed in the controller but not displayed.
Task ID : 1946160
PR #31697
Purpose
=======
This commit adds a stat button on the survey form view showing the amount
of answers with the quizz_passed field set to True.
It allows to quickly see people that have been granted the certification.
On click, the stat button redirects to the answers list view with the "Quizz passed"
filter defaulted to True.
Purpose
=======
The quizz_passed field is now more important because it determines whether
a certification has been successfully taken or not.
This commit adds the quizz_passed field in:
- The search view of user_input
- The list view of user_input
- The form view of user_input (along with the score)
Purpose of this commit is to perform a cleaning and upgrade of the lesson
view in front-end when not using the fullscreen mode. This page had not
been updated since eLearning addition.
A method is added on slide model to have a protected method computing quiz
related information on a given set of slides, notably potential karma gain,
gained karma and number of attempts. It is mainly a code move from controllers
now working in batch.
Some linting is also done, notably a badly-named file.
See original eLearning task for main specifications [1].
Commit linked to task ID 1941250 and PR #31657.
[1] See task ID 1902304
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
To avoid exception:
TypeError: Mixing apples and oranges: gamification.badge() - gamification.badge.user(1,)
when rule_auth of a badge is set to `having`.
opw-1945440
closes#31436closes#31595
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Since f8b38f64d dictionaries "groupbys" are the same object between the
pivot model instance and the headers menu.
But this causes an issue in 12.0 since when there is no results, the
headers menu groupbys is truncated and now being the same object, the
pivot model instance is also truncated.
So succedding search that find results would possibly have lost the
groupbys which is unexpected and breaks some 12.0 tests not expecting
it.
With this changeset, the groupbys are not truncated anymore.
Without the change, the added test fails with:
Column groupby not lost after reload after empty results
expected: { "pivot_column_groupby": [ "customer" ],
"pivot_measures": [ "__count" ], "pivot_row_groupby": [] }
result: { "pivot_column_groupby": [], "pivot_measures":
[ "__count" ], "pivot_row_groupby": [] }
closes#31644
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Since those taxes are missing a sequence and they're at the bottom of
the data, they're being taken as the default ones for the mexican chart
of accounts. However, the default taxes for sales and purchases should
be IVA 16%.
closesodoo/odoo#31651
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
The generation of the deffered revenues took initially 471s.This
improvement permit to reduce the time to 72s (behave Cprofiler).
The issue was related to the fact that all the message post and logs
invalids the cache. It results that several read requests were
repeated multiple times.
closesodoo/odoo#31750
Signed-off-by: Denis Ledoux <beledouxdenis@users.noreply.github.com>
To reproduce:
1. go on list view
2. open record in form view
3. come back on list view
4. switch to kanban
5. open record in form view
6. click on breadcrumb
Before this rev. we were back on the list view, and not the kanban view.
This is due to the fact that the breadcrumb was not updated when switching view,
(if a controller was already existing) so the form view control panel breadcrumb
was still referencing the wrong (list) controller.
This bug appeared with the control panel refactoring, which is now managed by
the view itself (and not the action manager as previously).
Task 1932646
closesodoo/odoo#31598
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
- Since the commit 5fcf891e07 an issue has
been introduced in the `analytic.account.analytic` name_search method.
In some cases searching through analytic accounts will return no
results when it should.
The issue is due to a bug in `expression.py` that doesn't correctly
handle the fields in `auto_join`.
The issue is described here https://github.com/odoo/odoo/issues/25175
and will be fixed by the ORM team.
closesodoo/odoo#31628
Signed-off-by: Christophe Simonis <chs@odoo.com>
Inline (base64) embedded images are not supported by most mail
clients (gmail on top of them), this fix save those images as
attachments and replace the src tag with the url of the
generated image so the image correctly renders.
opw-1929940
closesodoo/odoo#31532
Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com>
- `hr.leave` and `hr.leave.allocation` should have the same record
rules, otherwise leave approval behavior can be unpredictable.
As a Holidays Team Leader:
For example you could see the approve button on a leave but cannot
approve it because the `_check_holidays` fails
closesodoo/odoo#31620
Signed-off-by: Christophe Simonis (chs) <chs@odoo.com>