Purpose is to clearly separate various available demo surveys, their user
inputs and input lines. It is easier to update and maintain those demo
data in several files than hidden in big files or CSV files. No change
should occur with this commit as this is only some data manipulation.
We also quickly cleanup some demo data in this commit. Notably
* remove unnecessary user inputs;
* improve passed / succeeded statistics by improving or adding right
answers;
* fix some typos;
Task-2634805
PR odoo/odoo#72298
Adapt css to allow a nice display of ribbon widget on kanban.
Task-2634805
PR odoo/odoo#72298
Co-Authored-By: David Beguin <dbe@odoo.com>
Co-Authored-By: Mariska Archielli <ram@odoo.com>
The kanban view allows to instantiate widgets but not to give attributes as
options. Fine tuning some widgets require to be able to control them directly
from XML declaration using options and attributes.
Task-2634805
PR odoo/odoo#72298
Co-Authored-By: David Beguin <dbe@odoo.com>
Co-Authored-By: Mariska Archielli <ram@odoo.com>
Show breadcrumb on the shop page if eCommerce Categories are enabled or not
enabled on the left, and there is one category selected visible in the URL.
task-2488865
closesodoo/odoo#72149
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Generate timesheet entries for each employee when a global time off is created
if module_project_timesheet_holidays is true.
This only impacts the employees with the corresponding resource calendar
The entries are linked to the project and task set in the settings.
The number of hours timesheeted corresponds to the timeframe during which both the global time off
and the working hours of the employee overlap (same behavior as for regular time off).
If the global time off is modified or deleted, the timesheet entry is adapted accordingly.
Task-2352428
Closes#67021
Co-authored-by: Laurent Stukkens (LTU) <ltu@odoo.com>
Co-authored-by: jdoutreloux <jud@odoo.com>
4eafd78847 was not correctly adapted with new editor.
The `removeClass` and the css for that class was left in the code but the code
in charge of adding that class was just removed, breaking the behavior.
closesodoo/odoo#75786
X-original-commit: e59f91d74ad07430a4942efeeb479a538993c918
Signed-off-by: Antoine Guenet <Zinston@users.noreply.github.com>
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
We are referring to TicketScreen and OrderManagementScreen.
The two screens almost serves the same purpose. There is not much reason
to keep them separate. We combine the two in this commit. Basically,
we remove OrderManagementScreen and its components. Some are kept and
moved to the TicketScreen.
Task-id: 2481404
Part-of: odoo/odoo#75322
Revert the outstanding and destination accounts when the accumulated
bank payment amount is negative. We do this because account.payment
model doesn't accept negative amount.
Part-of: odoo/odoo#75322
Bug
===
The arguments model and res_id were declared on the method but never
used. This method was supposed to be callable from the model and not
from the records with those 2 parameters.
Make this possible.
Task-2599676
closesodoo/odoo#75779
X-original-commit: 07dbd96b3736efe84b670a7b4d45dd6cd07b14f9
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
A recent commit allows mail subtypes to be hidden depending on the
record fields. This allows us to hide the dependency changed subtype if
the option is disabled.
Closesodoo/odoo#75749
Task-2628818
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Commit [1] introduced a new "image" option instead of fixing the "img"
option which already existed. Also it created a <img> tag with a "fa-fw"
class which does not make much sense. Also, our system with data-img
actually creates a <svg> tag so that the color of the icon is the one
decided in our SCSS instead of the one hardcoded in the image and so
that there is an hover effect.
[1]: https://github.com/odoo/odoo/commit/02ccad3200187724d5f133842032981fb91f7465closesodoo/odoo#75743
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Behavior before the commit: when clicking on the info button from the control buttons, if no orderline was selected, a traceback error happened.
After the commit: nothing happens when clicking on the product info button when there's no orderline.
Related task id: 2518884
closesodoo/odoo#75728
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Behavior before the commit: the product information popup could not be called by clicking on the info button from the product item in mobile version. This happens because of the border in the `active` css state of the product item. When clicked, the product item has a 50px border which hides the info button for a micro second.
After the commit: Product information popup can now be called from the product item.
Related task id: 2518884
Part-of: odoo/odoo#75728
Before this commit, the sync buttons refactored in https://github.com/odoo/odoo/pull/68700 would appears in all calendar views (sale,time-off,...).
This commit only displays them in the calendar event view.
closesodoo/odoo#75702
Taskid: 2633415
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Review Work Order pop up design:
- add mo reference and Components tab at first
Manufacturing Readiness:
- set 'When all components are available' as default
closesodoo/odoo#75675
Task: 2527408
Related: odoo/enterprise#20515
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
before this commit:
The approver can access all timesheets which is not coherent.
after this commit:
improved the labelling of the timesheet app's roles, modified the menu according
to role of User.Aprrover now can access his own timesheets only by click only
available option 'My timesheets'.
TaskID - 2531321
closesodoo/odoo#74242
Related: odoo/enterprise#19858
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
*: web, website
This commit redesigns the editor toolbar improving its visual appearance
and introducing substantial changes wherever it is rendered.
== "Into-sidebar" design
The grid layout has been refined, improving its components allocation.
For the sake of visual simplification, "list-type" buttons have been
unwrapped from their original dropdown. For the same reason the button
to create a new table has been removed (users will have to use the
command-bar to create a new table).
Table's options have been moved to a section "ad-hoc", visible only when
a table is selected.
== Floating design (backend only)
The toolbar is now white to match the command-bar design.
In order to simplify frontend inheritance, the floating toolbar now uses
grid layout.
== Colorpicker
The generic code necessary for each design has been moved from
'wysiwyg_snippets.scss' to 'wysiwyg.scss'.
The style is now controlled by css variables allowing to customize
critical design properties without the need of SCSS overrides.
By default the design is white(-ish) to match the floating toolbar,
while in 'wysiwyg_snippets.scss' the variables are customized to get the
typical sidebar's dark feel.
Note: despite the task main objective was just to improve/fix the
design, this aimed to simplify design inheritance and reduce the css
too. While inheritance has been improved reducing the amount of
overrides, the attempt to reduce the css partially failed (in the final
lines count must be considered that a new sidebar section has been
created).
The reason is that we currently suffer from a deep and complicated
inheritance structure for this component. The xml template uses default
bootstrap classes that are styled differently depending if loaded in a
community or enterprise environment. This approach leads to overrides
that must cover all the scenarios while further customization must be
taken in account too 'cause the toolbar can be rendered into the sidebar
with a totally different design.
A possible solution would be to detach from bootstrap directly in the
lib using custom classes names, and then @extend these classes
differently according to the current environment but probably not a good
idea as we want the toolbar to use bootstrap for in-website editors (so
they can match the theme correctly) but this has to be reviewed as well
anyway. To be checked.
Part of https://github.com/odoo/odoo/pull/73565
task-2496339
closesodoo/odoo#73565
Signed-off-by: Antoine Guenet <Zinston@users.noreply.github.com>
The "floating" and the "into-sidebar" toolbar designs are visually very
different but share the same XML template.
Prior to this commit we relied on SCSS overrides to achieve the two
designs, meaning that any new rule added in wysiwyg.scss was supposed to
be followed by an override in wysiwyg_snippets.scss.
This approach led to glitches and undesired behaviors, especially
considering that all customizations we apply are already overrides of
the standalone OdooEditor lib (that, by the way, applies its own
overrides on top of bootstrap too...).
This commit will add the 'oe-floating' class by default, and will
remove it when the toolbar is rendered inside the sidebar.
This approach allows to target the floating design when needed only, and
consequentially will leave the '.oe-toolbar' selector for the code
shared between the two designs.
Part of https://github.com/odoo/odoo/pull/73565
task-2496339
Part-of: odoo/odoo#73565
A jinja marker is used as email_to but is actually not evaluated. Instead
we can set the right value directly.
Task-2573334
closesodoo/odoo#75770
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
When a public user subscribe to a mailing list, a traceback is raised.
Introduced with refactroring odoo/odoo@2d359b909b
Task-2599676
Part-of: odoo/odoo#75770
Since c53724ebc3, the contact image in contact kanban view for a shipping
or delivery contact type would be the regular placeholder instead of the truck
or money image.
Now, by using the new avatar system, we restore that behavior.
+ we also use that new avatar system to cleanup some code in the kanban in the
form view (`child_ids` field in `Contacts & Addresses` tab). That part was
working fine but wasn't using the new system and needed extra code.
closesodoo/odoo#75709
X-original-commit: a97cbdd033391af75628bed50accfef11c73687c
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
If you create an sale order with a section line you see the button add delivery.
closesodoo/odoo#75570
X-original-commit: 1db92688d9e7bf0843edfd248ffef89c38bb66f0
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Currently, 'My Activities' menu (under CRM > Sales) is accessible only
by the sales manager. However, this menu should be accessible to the
sales user also. The existing records rules make sure that the menu
will display salespersons' own documents only and so there seems no
data leak in this case.
So with this commit, we make the 'CRM > Sales > My Activities' menu
available for the salesperson as well.
Task-2624721
closesodoo/odoo#75521
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
* Refactor the use of Mutex. We remove the unnecessary resolves and
rejects. The excess rejects trigger the unhandledrejection event
handler.
* Make sure that the validation of order is not broken when the error
is about connections (aborted or lost).
* In Chrome, we introduce a set of methods to handle
"unexpected errors". Prior to wowl, POS just augments the CrashManager
to show the right popup. But since CrashManager is no longer supported,
we have to introduce a way to handle those unhandled errors.
closesodoo/odoo#73725
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
The chrome.comp.start() call also involves iot device loading
which is dependent on Gui to show error when there is any.
In this fix, we call configureGui when the Chrome instance is
available and before calling start.
Part-of: odoo/odoo#73725
Steps to reproduce the problem:
- Connect as admin
- Create a new employee, e.g: “Employee1” for company “My Company (San Francisco)”
- Create a new time off request for this employee, and select a time off type linked to the company "San Francisco"
- create a user and do not give him access to the company “San Francisco”, e.g: “user1”
- Log in as “user1”
- Go to time off > Managers > Allocations > remove default filter
Problem:
user1 is able to see the time off allocation of “Employee1”, even though he does not have access to My Company San Francisco.
Solution:
Add multi-company rules for the “hr.leave_allocation” model to display only the time off allocations to which the current user has access
A rule has already been added for "hr.leave" model:
https://github.com/odoo/odoo/blob/0f3281e3b1dc943b81d79d2a8f82fca7b95b8186/addons/hr_holidays/security/hr_holidays_security.xml#L65-L70
opw-2535709
closesodoo/odoo#75211closesodoo/odoo#75725
X-original-commit: 90ef15043c7d9c35a22dd7f3c10c78774b6e816a
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Djamel Touati <DjamelTouati@users.noreply.github.com>
Side effect of https://github.com/odoo/odoo/commit/69cc2911b52fd17b37fb71544574f63cf09dd17e.
On a lead, there is a smart button allowing to see his page views on the website.
In case we have many views, we are grouping them by page. Currently, the check on
the pages is made through field page_ids which is restricted to Website Editor
access group. We should allow a regular salesman to see page views without error,
and this can be achived by using field website_track_ids.page_id instead.
closesodoo/odoo#75761
X-original-commit: 76e1d609ad0e6d9a3dd2703185f4b87759823c70
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Alex Tuyls <alt-odoo@users.noreply.github.com>
If for any reason the initial linked question of one possible answer was
changed and if one existing survey has already been answered using that
possibility, we currently got an Internal Server Error while we should
simply just ignore these answers when getting the statistics of that
survey.
closesodoo/odoo#75758
X-original-commit: 87096c284872f9aa99f5ae9096cee92663c4933e
Signed-off-by: Alex Tuyls <alt-odoo@users.noreply.github.com>
The parent method _get_computed_account in the account module it already forces
the company to get the correct account, but in the stock_account module the method
is overriden when dealing with anglo-saxon accounting. In the latter, the company
is not being forced, so it leads to multi-company errors.
The fix simply enforces the correct company to prevent the error.
closesodoo/odoo#75747
X-original-commit: beba7c5b377e5aaf5ccb1d52e6b8c3bcf49468d3
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Steps to repodruce:
- Install 'Accounting' module
- Set user language to French
- Create journal entry
- Set a date before 2000. Example : 01/01/1999
- Insert some journal items
- Save the journal entry
Issue:
Error message is raised :
```The journal entry cannot be saved : "The Date (01/01/1999) doesn't match the Numéro (OPD/1999/01/0001).```
Cause:
Incomplete regex: parsing only years who begin with 20 or 21.
https://github.com/odoo/odoo/commit/26a43f23ec2b2490aec0731e25568703729581f0#diff-67b6f8b23970c1b18fc5e7f82b7585ad82e7bace885cdd78274837a4876a6a9fL24-R25
Solution:
Add 19 to regex to allow years like '19XX'.
opw-2616575
closesodoo/odoo#75755
X-original-commit: da9a2fab230c07cd0ce069bc7832ffcce4b8e988
Signed-off-by: William André (wan) <wan@odoo.com>
Opening the task portal view while having the timesheet encoding in days
and having no timesheets linked to the viewed task would cause a
traceback.
This was caused by an index out of range exception.
The function called has been changed to a `api.model` function instead
and all calls have been changed to be compliant with that change.
Closes: odoo/odoo#75452
Task ID: 2630244
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Steps to reproduce:
1. Activiate "Units of Measure" setting
2. Create and "mark as done" a MO
3. Unlock MO (may need to activate MRP setting for locking/unlocking qty
to consume to see button to unlock first)
4. Add a new component to MO and save.
Expected result: New component added
Actual result: Validation Error related to UoM
This is due to all components' UoM being readonly once the MO is Done so
when the new component move is created, it is missing a UoM value.
We fix this by making any newly added component lines' UoM not readonly
regardless of MO status. When a user saves a MO after adding a new
component, they will not be able to edit the UoM again due to
quant/stock move inconsistencies this can cause.
closesodoo/odoo#75436
Opw: 2514262
X-original-commit: ab0fcdbceef3e2df7b89766b074c386465c60ad7
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Purpose
=======
Review the UX of the 2-factor authentication flow in order to make it more clear
and easy to use.
Specifications
==============
This commit applies multiple rewording of instructions, button, etc. Tests have
been adapted accordingly.
It also adds an 'invite to use two-factor authentication' flow that will
send an email to the selected used to redirect them their account security
settings.
- If portal is not installed yet, the user is redirected to his account security
settings in backend.
- If portal is installed, the user is redirected to /my/profile if them are
portal user. Otherwise, the redirection is still done at backend side.
As the backend view of auth_totp wizard is used at frontend side, copyclipboard
widget has to be rebuilt at frontend side (click event, style etc..).
As API key section is now displayed only on debug mode, test urls have been
adapted accordingly.
Task ID: 2487630
closesodoo/odoo#71142
Related: odoo/upgrade#2540
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit is part of the 2 factor authentication revamp.
The purpose is to avoid to display error modals when it's possible to only
display a notification toaser.
Task-2487630
Part-of: odoo/odoo#71142
Purpose
=======
Review the UX of the 2-factor authentication flow in order to make it more clear
and easy to use.
Specifications
==============
This commit applies multiple rewording of instructions, button, etc. Tests have
been adapted accordingly.
It also adds an 'invite to use two-factor authentication' flow that will
send an email to the selected used to redirect them their account security
settings.
- If portal is not installed yet, the user is redirected to his account security
settings in backend.
- If portal is installed, the user is redirected to /my/profile if them are
portal user. Otherwise, the redirection is still done at backend side.
As the backend view of auth_totp wizard is used at frontend side, copyclipboard
widget has to be rebuilt at frontend side (click event, style etc..).
As API key section is now displayed only on debug mode, test urls have been
adapted accordingly.
Task-2487630
Part-of: odoo/odoo#71142
Expected duration and real duration should be hide when the user doesn't use the Work Order aren't active
closesodoo/odoo#75677
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Prior to this commit, the project and task stat buttons were placed
before the invoice one.
After this commit, the project stat button will be placed before the
tasks stat button which will be before the sale order preview.
PR community : #75553
PR upgrade : odoo/upgrade#2777
task-2559061
Step to follow
1. open any record with a chatter enabled )
2. start to write a log note in the the full composer
3. write a line with at least one character, then shift+enter
-> There is a traceback
Cause of the issue
InputEvent.data can be null
opw-2622051
closesodoo/odoo#75726
X-original-commit: 503bbe7a4d0cdd0aefcb723460210b089732831a
Signed-off-by: Antoine Guenet <Zinston@users.noreply.github.com>
The initial behaviour of ExecutionContext was to
- add the context for the current level of the stack on enter
- remove the context at this same level on exit.
When two ExecutionContext are nested at the same stack level:
- the first one adds it's context;
- the second one overrides the current context;
- the second one removes it at the end;
- the first one fails to remove the context at the same level a second time.
def call():
with ExecutionContext(foo=1):
with ExecutionContext(bar=2):
execute()
In this case we could imagine to combine both Execution managers in one:
def call():
with ExecutionContext(foo=1, bar=2)
execute()
But the semantics is different: ExecutionContext should add one level to
the stack, instead of two. In the first example above, we expect two
additionnal levels:
call
foo=1
bar=2
execute
A simple solution would be to transform the value of the context at some
level to a list of dict, but this would make the copy more difficult.
The decision was taken to change the context storage strategy, going
from a dict where the keys are the level to a tuple of tuples where the
first element is the level.
{3: {foo: 1}, 4: {bar: 2}} => ((3, {foo: 1}), (4, {bar: 2}))
The first benefit is to allow multiple contexts at the same level. The
second one is that we don't need to copy the data structure, since
tuples are immutables and the dicts are coming from kwargs. This means
that saving the context is faster, and the tuple is shared between
multiple samples. This is interesting if we assume that we do more
samples than exec_context mutations.
closesodoo/odoo#75687
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
Adds the possibility to search an app/menu from the command palette .
It allows for fuzzy-searching apps and their submenus as shortcuts to directly
enter the right app and submenu and execute the corresponding action.
The comamnd is initiated by typing "/" in the command palette.
closesodoo/odoo#75396
Task-id: 2622952
Related: odoo/enterprise#20447
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Before this commit, the menu_service was not included into the pos.assets_backend bundle
which was fine until menu_service defined a helper function that other service would need.
Since pos.assets_backend imports virtually all web.assets_backend, there was dependencies errors.
Hence the need to import the menu_service as well, but making sure it doesn't make the rpc to load the menus.
After this commit, there are no dependency issues, and the menus are not loaded, as expected and as before.
Part-of: odoo/odoo#75396