Forbid locking the fiscal year or period in case there is an open POS session into it. Without that, it will be impossible to close these sessions, as the lock date will not allow posting accounting entries for them.
Also forbid to create a session before lock date, as it would be impossible to close.
closesodoo/odoo#28257
Signed-off-by: Cedric Snauwaert (csn) <csn@openerp.com>
Since the switch to jQuery 3, Odoo uses native promises in its JS. Some
mistakes were made in the website app during conversion from old jQuery
deferred to native promises.
- `this` -> `self` when wrapping in a promise
- `.always(fct)` -> `.then(fct).guardedCatch(fct)`
- a function returned sometimes a jQuery deferred, sometimes a native
promise. This made the caller fail when using `always` or fail
when using `guardedCatch`
closesodoo/odoo#31887
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This error is there to help developpers realize their view has not
been loaded due to an error.
However, we have cases where we define actions containing views
that only exist in Enterprise to avoid creating an entire bridge
module just to add one view to an action.
The error was triggered in this case which resulted in a red build
for the click all runbot test, even though this was not really a
true error, as it was intended.
This commit changes the error to only appear in debug=assets such
that it will no longer put the click all runbot tour red while
still providing help for the developper trying to debug his view
since he will need to be in debug=assets to debug his view anyway.
closesodoo/odoo#31884
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Let's assume the following scenario on an action with two multi
records views (e.g. kanban and list). In the kanban view, activate
a domain or groupby, switch to list view, remove the domain or
groupby, switch back to kanban: the domain or groupby is still
applied (even though it's no longer displayed in the search view).
This is due to the jQuery update (ab56e637b7) and the use of
native Promises (always async) instead of old jQuery 1.11 Deferreds
(which where sync when already resolved). In the new version, the
domain/context/groupby were added to the params a 'tick too late',
so the view was updated without that information (and thus the old
domain/context/groupby were kept).
Issue reported on the jquery update pad.
closesodoo/odoo#31859
Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
The table edition feature of pos_restaurant was using an old lib
that was never updated to newer versions of jQuery by its author.
For unknown reason, this library went unnoticed when we updated our
codebase to jQuery 3.
Since this library is impossible to update per se, I decided to
remove it entirely and replace it by calls to jQuery.ui.
However, the point of this lib was to handle touch events, which
jQuery.ui does not. For this, this commit introduces a new
library which translates touch events to their click counterparts.
Tested on:
- Chrome (Windows, MacOS, Linux, Android, iOS)
- Firefox (Windows, MacOS, Linux, Android, iOS)
- Safari (MacOS, iOS)
- Edge (Windows, iOS)
- IE11 (Windows)
- Samsung Internet (Android)
closesodoo/odoo#31719
Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
Some customers need to have a float instead of a in for the percentage
of the margin taken on the delivery. So we modified the integer value
into a float.
Until now, only fedex was providing return label printing, and as we
want to integrate it with other carriers, we have mande a generc
mecanism to easily implement it with new ones.
We've also added an option that allow to print return label from portal
if one has been generated on delivery.
The portal template that add the tracking number on the picking in the
sale order report in portal is still in website_sale_delivery, even if
the portal does not need the website anymore. More over, the inherited
template has been moved from website_sale_stock to sale_stock.
So to be consistent and not forcing having website for a feature that
doesn't need it, we move this template inheritance in delivery
Purpose
=======
The 'service_tracking' selection field on the 'product.template' model in the 'sale_timesheet' module
had its 'task_new_project' option renamed to 'task_in_project'.
If one or more sale_order_line have a product configured with this option, a new 'project_id' field appears
on the sale_order under the 'Sales Information' section.
When a project_id is selected, the analytic account on the sale order is automatically changed
to this project's analytic account.
This allows handling more use cases on sale_order:
- If a sale_order_line has a service product with that new option and no project_id configured on the sale_order:
-> create a new project based on the configured project_template_id and then create a task in that project
(same behavior as before)
- If a sale_order_line has a service product with that new option and a project_id is configured on the sale_order:
-> directly create a task in the selected project_id
The behavior does not change for the 3 other options ('no', 'task_global_project' and 'project_only').
Specs
=======
- Add project field on sale order in "other infos" tab, shows only when a product on the SO has the option activated
- If projec is selected on SO, create task in this project, otherwise it creates a new project (as before)
- Rename 'task_new_project' into "task_in_project"
- Allow to have the new option with project template
- Selectable projects on Sales Order are `billate_type` in 'no' and 'task_rate'
- Never link SO's project to SO or AA
- Add onchange on project_id to select this project's analytic account on the SO
- Non stored computed field to check if at least one SOL has the new option
Use cases
- 2 SOL with new option (no template) will create 2 tasks in SO's project
- 2 SOL with new options (one no template, one with) + 1 SOL "create new P no T" --> create 2 tasks in SO's project and one new project
Task #1915660closesodoo/odoo#29772
Signed-off-by: Jérome Maes (jem) <jem@openerp.com>
Task #1915660
Purpose
=======
Analytic Account field of a project should not be visible for non-members
of the "analytic.group_analytic_accounting" group.
This is now consistent with the other analytic account fields of the application.
Task #1915660
Purpose
=======
If one or more sale_order_line have a product configured with this option, a new 'project_id' field appears
on the sale_order under the 'Sales Information' section.
When a project_id is selected, the analytic account on the sale order is automatically changed
to this project's analytic account.
This allows handling more use cases on sale_order:
- If a sale_order_line has a service product with that new option and no project_id configured on the sale_order:
-> create a new project based on the configured project_template_id and then create a task in that project
(same behavior as before)
- If a sale_order_line has a service product with that new option and a project_id is configured on the sale_order:
-> directly create a task in the selected project_id
The behavior does not change for the 3 other options ('no', 'task_global_project' and 'project_only').
Specs
=======
Add project field on sale order in other info tab, shows only when a product on the SO has the option activated
if projec its selected on SO, create task in this project
Tech Spec (jem)
=======
On product:
- rename 'task_new_project' into "task_in_project" (help message precise either new project (based on template) or
SO's project is prior
- allow to have the new option with project template
On sale order:
- non stored computed field to check if at least one SOL has the new option.
- if so, display project field
- selectable project are billate_type in 'no' and 'task_rate' (TBC for the 2nd)
[awa: also add 'analytic_account_id' != False in domain]
- setting project on SO should change the AA of the SO.
[awa: add onchange on project_id to select this project's analytic account on the SO]
- Never link SO's project to SO or AA
[awa: do not touch the project_id's sale_order_id and analytic_account_id fields for this use case]
- 2 SOL with new option (no template) will create 2 tasks in SO's project
- 2 SOL with new options (one no template, one with) + 1 SOL "create new P no T" --> create 2 tasks in SO's project
and one new project
Actually, when running browser_js tests, the test automatically fails
when a console error is seen.
In some cases, an exception can be thrown during a tour but without
console error. In that case, another type of devtools protocol event is
fired: Runtime.exceptionThorwn. This event is not catched by the
browser_js test.
With this commit the above mentioned event is catched and the test is
directly considered as failed.
closesodoo/odoo#31555
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
During the event tour, the save button is clicked before the drag and
drop is finished and cause an uncaught exception.
With this commit, an extra trigger is used to check the presence of the
dirty flag that is set when the page is changed and is ready to be
saved.
When a move is created in a picking through the scrap button, it must
not be visible in the picking, and should be accible through the
stat button showing the srap.
Now to hide, those moves from the picking view, we are checking that the
move has a different picking type than the one on the picking, which can
lead to invisible moves, that are not in the picking view because they
have a different picking type and not in the scrap stat button because
they don't have scrap object.
To fix this behavior, we are hiding from the picking the ones having a
scrap object linked instead of the one having a different picking type
closesodoo/odoo#31810
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
commit 4697d74480 update our bootstrap version to 4.3.1, one change of that version is that
bootstrap now escape the content of popover and title removing the table element. https://blog.getbootstrap.com/2019/02/13/bootstrap-4-3-1-and-3-4-1/
This result in the popover in the reconciliation widget being empty.
Therefore since the content of the popover was safe as it was rendered by Qweb.render, we disabled completely the sanitizer
for the popover in the reconciliation widget.
closesodoo/odoo#31797
Signed-off-by: Cedric Snauwaert (csn) <csn@openerp.com>
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>
After the update of jQuery, crashes were no longer displayed (in
dialogs) on browsers using the unhandled-rejection-polyfill lib
(e.g. firefox). This was due to a bad conversion from ES6 to ES5.
Issue reported on the jquery update pad.
closesodoo/odoo#31767
Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
Purpose
=======
The 'service_tracking' selection field on the 'product.template' model in the 'sale_timesheet' module
had its 'task_new_project' option renamed to 'task_in_project'.
This is a preliminary renaming for task #1915660.
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>
It's better to always have a relevant name in the image URL for SEO.
Also make sure there is always an alt on the image.
closesodoo/odoo#31705
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Before this commit, you can configure tracking for consumable type
product. Now, tracking and date settings are hidden when the product's
type is set on consumable.
Also, resets tracking when change type on consumable.
We chose to not enforce this constraint in the model because we consider
it a bit overkill and we did not want to block migrations.
Task #1938594closesodoo/odoo#31355
Signed-off-by: Simon Lejeune (sle) <sle@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>