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
The changes concern the following modules:
- sale
- sale_product_configurator
- website_sale
- website_sale_product_configurator
When optional products are enabled and a user adds an item to the cart, the
modal popup does not allow further modifications to the main product based
on its template. If the user wants to change the color or the material, they
have to close the popup, modify the product and open it back up.
The same is applied when Add to Cart is active, and the user cannot configure
the product at all after clicking the add to cart button.
This change will make it possible to change the product variants without having
to close the modal, and configure the product when using the "Add to cart"
button when it's enabled.
The added configuration step is needed for some cases like the following:
1. When adding a product that had variants directly from the /shop page before,
the first variant was added by default and configuring it was impossible without
explicitly going on the product's page and configuring it from there. This
behaviour made no sense, and it's the reason the "optional products modal"
(which should no longer be called that) is opened when the product is not
configured even if there are no optional products.
2. When going through the product's page, and there are optional products enabled
for the product getting configured, then it's nice but not necessary to be able to
configure the product further while choosing and configuring the optional products.
This doesn't add an extra step in any case, it just makes it possible to still configure
your product in the modal.
3. If there are no optional products, the configuration made on the product's
page is taken into account and the product is directly added to the cart without
opening the modal, which is the same behaviour as previously.
Only one modal is shown, depending on the situation:
- For the website flow, if the product is not configured and has variants or has
optional products (or both), a popup shows that allows for configuration +
choosing and configuring optional products.
- For the sales flow, there was already a configuration popup, so the optional
products modal is only shown when there are optional products and replaces
the first instead.
Some tests were adapted to function with the new product configuration modal:
- The steps checking for the text mentioned above are removed
- Triggers were adapted to the modal for products that were previously added to cart
with their default variant
- Various other small adjustments
task-2541663
closesodoo/odoo#73086
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
This revision has a similar goal than the previous revision
62c5b8d95c1ba5634e201c0c8a3e2d91fb2305a7
but this times, it's a kit/phantom bom which is nested in another
kit/phantom bom, and their computation is asked in the same time.
```
2021-08-20 11:29:54,835 1689 ERROR db_22687 odoo.upgrade.stock.tests.test_on_hand_quantity: FAIL: TestOnHandQuantityUnchanged.test_check
Traceback (most recent call last):
File "/tmp/tmpv3ujv2vr/migrations/testing.py", line 208, in test_check
self.check(value)
File "/tmp/tmpv3ujv2vr/migrations/stock/tests/test_on_hand_quantity.py", line 20, in check
self.assertEqual(before_results, self.convert_check(after_results), self.message)
AssertionError: Lists differ: [[551[14585 chars] [8988, '137'], [8989, '137'], [8990, '20'], [[1793 chars]91']] != [[551[14585 chars] [8989, '137'], [8990, '20'], [8991, '126'], [[1778 chars]91']]
First differing element 1007:
[8988, '137']
[8989, '137'
```
```
SELECT b.id, b.type, p.id as kit_product_id, b.product_tmpl_id as kit_product_tmpl_id, pt.name as
kit_product_name FROM mrp_bom b JOIN product_template pt ON pt.id = b.product_tmpl_id JOIN product_product p ON p.pr
oduct_tmpl_id = pt.id WHERE p.id = 8988;
-[ RECORD 1 ]-------+-----------------
id | 2208
type | phantom
kit_product_id | 8988
kit_product_tmpl_id | 9049
kit_product_name | KIT Poulie AR G4
```
```
SELECT b.id, p.id as kit_product_id, b.product_tmpl_id as kit_product_tmpl_id, pt.name as kit_product_name, l.product_id as component_product_id, component_t.name as component_name FROM mrp_bom_line l JOIN mrp_bom b ON l.bom_id = b.id JOIN product_product p ON p.product_tmpl_id = b.product_tmpl_id JOIN product_template pt ON pt.id = b.product_tmpl_id JOIN product_product component ON component.id = l.product_id JOIN product_template component_t ON component_t.id = component.product_tmpl_id WHERE l.product_id = 8988;
-[ RECORD 1 ]--------+---------------------
id | 2213
kit_product_id | 8761
kit_product_tmpl_id | 8879
kit_product_name | VEL BP KIT direction
component_product_id | 8988
component_name | KIT Poulie AR G4
```
upg-22687
closesodoo/odoo#75735
X-original-commit: c2df3d43fe16dde9057422f573fed1b976bc1c0b
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
Small fix in discuss_sidebar_category_item. An item with type "group" should not have a ThreadIcon.
closesodoo/odoo#75731
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
In master, in the 'Theme' tab of the website editor, the button to edit
color schemes has a light bulb icon, which doesn't clearly represent what
it does.
In this commit, we replace it with a palette SVG. Since we-select
elements do not have an image option implemented, we also add one
for future usage.
task-2618494
closesodoo/odoo#75730
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
In master, users cannot see or edit eCommerce Categories on products
from the tree view in the Website app.
In this commit, we add eCommerce Categories to the tree view so that
users can edit them after a filter.
task-2618494
Part-of: odoo/odoo#75730
In master, the embed code snippet can only be dropped as a sibling.
In this commit, we allow dropping it as a child, by giving it the same
options as the countdown snippet.
task-2618494
Part-of: odoo/odoo#75730
When adding a media to the library using its external URL, the
confirmation icon (either error, warning, or success) will not be
spaced correctly, and will stick to the button on its right.
In this commit, we add a class to it which adds some padding on the
right.
task-2618494
Part-of: odoo/odoo#75730
The customers shouldn't see the 'Pricelist' word in the eCommerce shop.
In this commit, we thus remove it entirely.
task-2618494
Part-of: odoo/odoo#75730
"Dyn. Colors" implies that the colors are dynamic, such as in an
animation. This is not the case, as it just represents the main color,
or accent.
This commit renames the "Dyn. Colors" option to "Main Color" to better
match its functionality.
task-2618494
Part-of: odoo/odoo#75730
Issue: When receiving a mail on a alias for a job position, the
application is created correctly in the right stage but the e-mail
template for that stage is not sent to the applicant
Steps to reproduce :
1) Set an alias and a external mail server
2) Configure incoming mail server
3) Create a job position with a mail alias and a email template
4) Receive a mail for that job position
5) The application is created but no mail is sent to the applicant
Why is that a bug:
When we create an application manually the mail is sent to the
applicant but when creating it via e-mail reception, it's not sent
even though it should. This is due to stage_id missing from the flow
when receiving an e-mail
opw-2533310
closesodoo/odoo#75721
X-original-commit: 108b1c30e6254f24564246c401ad50a983498066
Signed-off-by: Nathan Marotte <nmarotte@users.noreply.github.com>
Purpose
=======
Fix missing translations on the Outlook / Gmail plugin and add them in
the mail plugin module.
Task-2612788
closesodoo/odoo#75599
X-original-commit: 47c9be8970011863e8e7b474665c823e751df085
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Assuming that the only thing cared about when removing items from stock
is the accessibility of the product. Then it would be better to take
products stored on the floor instead of on higher levels of my racks.
In this case current solutions in Odoo are not the most efficient.
Closest location picks items in the 'smallest' location (in alphabetical
order), so it assumes the locations are ordrered alphabetically
according to how close they are to the ground.
Assume we have the following stock :
- WH/Stock/Shelf 2
- WH/Stock
- WH/Stock/Shelf 1
Quants would be looked at in the following order :
1. WH/Stock (due to shortest name for the same stock)
2. WH/Stock/Shelf 1 (due to alphabetical order)
3. WH/Stock/Shelf 2
Task-2568735
closesodoo/odoo#75303
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
This commit adds the smarts actions:
- Assign to... (many2one_avatar and many2many_avatar)
- Assign/unassign to me (many2one_avatar and many2many_avatar)
- Set priority... (priority)
- Set kanban state... (state_selection)
These smarts actions are commands with hotkeys accessible from
the form views containing the widget to which they are linked.
closesodoo/odoo#75312
Task-id: 2588238
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Remove superfluous dash in `project.task name_get` and replace it with
nbsp to be able to split on that specific value in a similar manner as
before.
Closesodoo/odoo#74350
Task ID: 2596229
Related: odoo/enterprise#19916
Related: odoo/upgrade#2705
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Before this PR when you accessed a certification through one company and passed it, the certification pdf was under the name of another company.
opw-2577532
closesodoo/odoo#75669
X-original-commit: 9f4fafee95e1f621a0d0b3a8bd5da6d059fa20c6
Signed-off-by: Achraf <abz-odoo@users.noreply.github.com>
- Channels
* "hash tag" avatar with different backgroud colors
* only private channels have lock thread icon
- DM groups
* "users" avatar with different background colors
* no thread icon
task-2584994
closesodoo/odoo#75653
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Two tests in owl_dialog_tests were not correctly added in the parent
module of owl_dialog_tests.
These orphaned tests will therefore be associated with the previous
Qunit.module("name") and it will use its beforeEach.
If the module used does a makeTestEnv in its beforeEach, then the
"remove tabindex on inactive dialog" test will cause
"Error: Cannot add 'xxx' in this registry: it already exists" errors
because the test call createWebClient that does a second makeTestEnv.
closesodoo/odoo#75696
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Strap yourself in, we're in for a ride:
The module sale_stock_margin overrides
SaleOrderLine._compute_purchase_price and adds some extra dependencies,
the key dependency here is 'move_ids'.
The field move_ids is defined in sale_stock's override of
sale.order.line, however sale_stock is not a dependency of
sale_stock_margin, but since they implicitly share the same dependencies
and are both auto_install=True it is impossible to install
sale_stock_margin without having sale_stock be automatically installed.
However, since sale_stock_margin does not explicitly depend on
sale_stock, if one were to uninstall sale_stock without uninstalling
sale_stock_margin first, the registry would crash because
sale_stock_margin's override of _compute_purchase_price would depend
on a field that no longer exists (move_ids).
This commit changes sale_stock_margin's dependency graph to explicitly
depend on `sale_stock`, this in turn means we can forego the
`stock_account` dependency since it's an explicit dependency of
`sale_stock`.
closesodoo/odoo#75693
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
When we want to open a quotation from the mobile view, we are
redirected to the POS Orders instead of the sale order.
This is because we are calling the wrong owl component.
Part-of: odoo/odoo#75682
Before this commit if the Apply/Discard buttons of the background image
positioning overlay were drawn outside of the visible area the user was
unable to access them - and thus had to reload the editor page.
After this commit the viewport is always scrolled to the background
image positioning overlay, making it always usable.
Because the block is always scrolled into the view, the buttons can
always be positioned near the top border of the overlay.
task-2627710
closesodoo/odoo#75679
X-original-commit: a9c3997b4bde08ceb75cacef7eb6ebad3efa7f44
Signed-off-by: Benoit Socias (bso) <bso-odoo@users.noreply.github.com>
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Before this fix applied color combinations were shown on the style
option.
After this fix the style option is displayed as any other plain option.
task-2612755
closesodoo/odoo#75665
X-original-commit: 2327248b8f67f5312f5630bf64fe49a31e025a09
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Benoit Socias (bso) <bso-odoo@users.noreply.github.com>
Now you can specify into the dynamic_filter_template the number of record to
use for desktop, mobile, and the number of record to fetch.
Some template have only sense to be shown with 1 record e.g. a full width.
Syntax:
Add on root element one or more of these attributes:
data-number-of-elements="2" -> number of record on Desktop
data-number-of-elements-sm="2" -> number of record on Mobile
data-number-of-elements-fetch="2" -> number of record to fetch
closesodoo/odoo#75662
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
When there is a connection failure (eg. server restart) while we are
polling adyen for payment status during the payment process, we would
show a connection error and when clicking on retry, we would do a new
payment even if the first one was successful causing a double payment.
After dcb1e2b48, the retry after failure should just continue the
polling as if there was no connection failure, so for example:
- order 1: pay with adyen => connection failure during payment
- order 1: retry => payment successful
But in this particular case:
- order 1: pay with adyen => connection failure during payment
- order 1: close adyen payment line and pay with another payment method
- order 2: pay with adyen => we will receive the response from order 1
With this changeset, we only continue the polling for adyen status if we
are retrying to pay the same order.
opw-2587625
closesodoo/odoo#75640
X-original-commit: f83d1b13a96f8df559918b5905b949009d2ece88
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>